Skip to content

Commit

Permalink
Merge pull request #42 from equinor/extend-chart-values
Browse files Browse the repository at this point in the history
extend chart values
  • Loading branch information
nilsgstrabo authored Apr 17, 2024
2 parents c820869 + 1fb480e commit 8f7b7c7
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 18 deletions.
39 changes: 22 additions & 17 deletions charts/radix-cluster-cleanup/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,29 +14,26 @@ spec:
{{- include "radix-cluster-cleanup.selectorLabels" . | nindent 6 }}
template:
metadata:
{{- if (.Values.metrics.enabled) }}
{{- if (.Values.metrics.enabled) }}
annotations:
prometheus.io/port: "8080"
prometheus.io/scrape: "true"
{{- if (.Values.metrics.annotations) }}
{{- toYaml .Values.metrics.annotations | nindent 8 }}
{{- end }}
{{- end }}
{{- end }}
labels:
{{- include "radix-cluster-cleanup.selectorLabels" . | nindent 8 }}
spec:
serviceAccountName: {{ include "radix-cluster-cleanup.serviceAccountName" . }}
{{- with .Values.imagePullSecrets }}
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}
{{- with .Values.podSecurityContext }}
securityContext:
runAsNonRoot: true
runAsUser: 1000
runAsGroup: 1000
fsGroup: 1000
supplementalGroups:
- 1000
{{- toYaml . | nindent 8 }}
{{- end }}
containers:
- name: {{ .Chart.Name }}
env:
Expand All @@ -60,19 +57,27 @@ spec:
protocol: TCP
resources:
{{- toYaml .Values.resources | nindent 12 }}
{{- with .Values.securityContext }}
securityContext:
privileged: false
readOnlyRootFilesystem: false
allowPrivilegeEscalation: false
{{- toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.volumeMounts }}
volumeMounts:
{{- toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.affinity }}
{{- with .Values.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.tolerations }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}
{{- with .Values.volumes }}
volumes:
{{- toYaml . | nindent 8 }}
{{- end }}
6 changes: 5 additions & 1 deletion charts/radix-cluster-cleanup/templates/serviceaccount.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,8 @@ metadata:
name: {{ include "radix-cluster-cleanup.serviceAccountName" . }}
namespace: {{ .Release.Namespace }}
labels:
{{- include "radix-cluster-cleanup.labels" . | nindent 4 }}
{{- include "radix-cluster-cleanup.labels" . | nindent 4 }}
{{- with .Values.serviceAccount.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
21 changes: 21 additions & 0 deletions charts/radix-cluster-cleanup/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ serviceAccount:
# The name of the service account to use.
# If not set, a name is generated using the fullname template
name: ""
# Annotations to add to the service account
annotations: {}

image:
repository: xx
Expand All @@ -37,3 +39,22 @@ nodeSelector: {}
tolerations: []

affinity: {}

podSecurityContext:
runAsNonRoot: true
runAsUser: 1000
runAsGroup: 1000
fsGroup: 1000
supplementalGroups:
- 1000

securityContext:
privileged: false
readOnlyRootFilesystem: false
allowPrivilegeEscalation: false

# Additional volumes to add to the radix-cluster-cleanup pod.
volumes: []

# Additional volume mounts to add to the radix-cluster-cleanup container.
volumeMounts: []

0 comments on commit 8f7b7c7

Please sign in to comment.