Skip to content

Feat/add env tol resources #53

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 14 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions charts/redis-stack-server/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.4.6
version: 0.4.7

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes.
appVersion: "7.2.1"
appVersion: "7.2.2"
20 changes: 19 additions & 1 deletion charts/redis-stack-server/templates/redis-stack-server.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ spec:
ports:
- port: {{ .Values.redis_stack_server.port }}
name: db
type: NodePort
type: {{ .Values.redis_stack_server.serviceType }}
selector:
app: "{{ .Values.name }}"
---
Expand Down Expand Up @@ -39,6 +39,24 @@ spec:
volumeMounts:
- name: db
mountPath: /data
{{- with .Values.redis_stack_server.env }}
env:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.redis_stack_server.resources }}
resources:
{{- toYaml . | nindent 10 }}
{{- end }}
{{- with .Values.redis_stack_server.nodeSelector }}
nodeSelector:
{{ range $key, $value := . }}
{{ $key }}: {{ $value | quote }}
{{- end }}
{{- end }}
{{- with .Values.redis_stack_server.tolerations }}
tolerations:
{{- toYaml . | nindent 6 }}
{{- end }}
volumeClaimTemplates:
- metadata:
name: db
Expand Down
23 changes: 22 additions & 1 deletion charts/redis-stack-server/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,27 @@ redis_stack_server:
image: "redis/redis-stack-server"
tag: "7.2.0-v6"
port: 6379
serviceType: ClusterIP
replicas: 1
storage_class: standard
storage_class: default
storage: 1Gi
env:
- name: REDIS_ARGS
valueFrom:
secretKeyRef:
name: redis-stack-server
key: redis-args
resources:
limits:
cpu: 1
memory: 4G
requests:
cpu: 1
memory: 4G
nodeSelector:
type: app
tolerations:
- effect: NoSchedule
key: NodeType
operator: Equal
value: app
4 changes: 2 additions & 2 deletions charts/redis-stack/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.4.6
version: 0.4.7

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes.
appVersion: "7.2.1"
appVersion: "7.2.2"
14 changes: 14 additions & 0 deletions charts/redis-stack/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ spec:
name: db
- containerPort: {{ .Values.redis_stack.redis_insight_port }}
name: "{{ .Values.redis_stack.redis_insight }}"
{{- with .Values.redis_stack.env }}
env:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- if .Values.redis_stack.resources }}
resources:
{{- if .Values.redis_stack.resources.requests }}
Expand All @@ -36,3 +40,13 @@ spec:
cpu: "{{ .Values.redis_stack.cpu }}"
{{- end}}
{{- end}}
{{- with .Values.redis_stack.nodeSelector }}
nodeSelector:
{{ range $key, $value := . }}
{{ $key }}: {{ $value | quote }}
{{- end }}
{{- end }}
{{- with .Values.redis_stack.tolerations }}
tolerations:
{{- toYaml . | nindent 6 }}
{{- end }}
7 changes: 7 additions & 0 deletions charts/redis-stack/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,10 @@ redis_stack:
replicas: 1
memory: 1Gi
cpu: 100m
nodeSelector:
type: app
tolerations:
- effect: NoSchedule
key: NodeType
operator: Equal
value: app