From b20cb5dbd5b01a7b63b5b629991a67498cf876bd Mon Sep 17 00:00:00 2001 From: Andy Cobaugh Date: Tue, 13 Sep 2022 15:56:48 -0400 Subject: [PATCH] feat(chart): use nodeSelector instead of affinity, support replicaCount and affinity --- charts/gmsa/Chart.yaml | 2 +- charts/gmsa/templates/deployment.yaml | 18 ++++++++--------- charts/gmsa/templates/pdb.yaml | 19 ++++++++++++++++++ charts/gmsa/values.yaml | 8 ++++++++ charts/repo/gmsa-0.5.0.tgz | Bin 0 -> 4045 bytes charts/repo/index.yaml | 27 +++++++++++++++++++++----- 6 files changed, 59 insertions(+), 15 deletions(-) create mode 100644 charts/gmsa/templates/pdb.yaml create mode 100644 charts/repo/gmsa-0.5.0.tgz diff --git a/charts/gmsa/Chart.yaml b/charts/gmsa/Chart.yaml index 1f583978..98d5d124 100644 --- a/charts/gmsa/Chart.yaml +++ b/charts/gmsa/Chart.yaml @@ -10,4 +10,4 @@ name: gmsa sources: - https://github.com/kubernetes-sigs/windows-gmsa type: application -version: 0.4.4 +version: 0.5.0 diff --git a/charts/gmsa/templates/deployment.yaml b/charts/gmsa/templates/deployment.yaml index 57bc8d6d..2139cb93 100644 --- a/charts/gmsa/templates/deployment.yaml +++ b/charts/gmsa/templates/deployment.yaml @@ -5,7 +5,7 @@ metadata: namespace: {{.Release.Namespace}} labels: {{ include "gmsa.chartref" . | nindent 4 }} spec: - replicas: 1 + replicas: {{ .Values.replicaCount }} selector: matchLabels: app: {{ .Release.Name }} @@ -18,19 +18,19 @@ spec: securityContext: {{ toYaml .Values.podSecurityContext | nindent 8 }} {{- end }} serviceAccountName: {{ .Release.Name }} + {{- with .Values.affinity }} affinity: - nodeAffinity: - requiredDuringSchedulingIgnoredDuringExecution: - nodeSelectorTerms: - - matchExpressions: - - key: kubernetes.io/os - operator: In - values: - - linux + {{- toYaml . | nindent 8 }} + {{- end }} {{- with .Values.tolerations }} tolerations: {{- toYaml . | nindent 8 }} {{- end }} + nodeSelector: + kubernetes.io/os: linux + {{- with .Values.nodeSelector }} + {{- toYaml . | nindent 8 }} + {{- end }} containers: - name: {{ .Release.Name }} image: '{{ template "system_default_registry" . }}{{ .Values.image.repository }}:{{ .Values.image.tag }}' diff --git a/charts/gmsa/templates/pdb.yaml b/charts/gmsa/templates/pdb.yaml new file mode 100644 index 00000000..73fc397b --- /dev/null +++ b/charts/gmsa/templates/pdb.yaml @@ -0,0 +1,19 @@ +{{- if .Values.podDisruptionBudget.enabled }} +apiVersion: policy/v1 +kind: PodDisruptionBudget +metadata: + name: {{ .Release.Name }} + namespace: {{ .Release.Namespace }} + labels: {{ include "gmsa.chartref" . | nindent 4 }} + +spec: +{{- if .Values.podDisruptionBudget.minAvailable }} + minAvailable: {{ .Values.podDisruptionBudget.minAvailable }} +{{- end }} +{{- if .Values.podDisruptionBudget.maxUnavailable }} + maxUnavailable: {{ .Values.podDisruptionBudget.maxUnavailable }} +{{- end }} + selector: + matchLabels: + app: {{ .Release.Name }} +{{- end }} \ No newline at end of file diff --git a/charts/gmsa/values.yaml b/charts/gmsa/values.yaml index b083614b..c93650ac 100644 --- a/charts/gmsa/values.yaml +++ b/charts/gmsa/values.yaml @@ -31,7 +31,15 @@ setPodOs: ture global: systemDefaultRegistry: "" +affinity: {} +nodeselector: {} +podDisruptionBudget: + enabled: false + # minAvailable: 1 + # maxUnavailable: 1 + podSecurityContext: {} +replicaCount: 2 securityContext: {} tolerations: [] diff --git a/charts/repo/gmsa-0.5.0.tgz b/charts/repo/gmsa-0.5.0.tgz new file mode 100644 index 0000000000000000000000000000000000000000..55e6e13d905cefb708aad36ba9e3557ee385b7f2 GIT binary patch literal 4045 zcmV;;4>Ir{iwG0|00000|0w_~VMtOiV@ORlOnEsqVl!4SWK%V1T2nbTPgYhoO;>Dc zVQyr3R8em|NM&qo0PH;3avM34ey*>`D0PRWZnJnw_Htt%WJ>MUdMqm>*%K2T4h2}1 zBrz%iH2{h-SEGO508lqi(KP!Q=7TL3uEdcC^1yH`Nxe5BL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