Skip to content

Commit

Permalink
feat(chart): use nodeSelector instead of affinity, support replicaCou…
Browse files Browse the repository at this point in the history
…nt and affinity
  • Loading branch information
acobaugh committed Sep 14, 2022
1 parent 8e61536 commit b20cb5d
Show file tree
Hide file tree
Showing 6 changed files with 59 additions and 15 deletions.
2 changes: 1 addition & 1 deletion charts/gmsa/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ name: gmsa
sources:
- https://github.com/kubernetes-sigs/windows-gmsa
type: application
version: 0.4.4
version: 0.5.0
18 changes: 9 additions & 9 deletions charts/gmsa/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand All @@ -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 }}'
Expand Down
19 changes: 19 additions & 0 deletions charts/gmsa/templates/pdb.yaml
Original file line number Diff line number Diff line change
@@ -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 }}
8 changes: 8 additions & 0 deletions charts/gmsa/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,15 @@ setPodOs: ture
global:
systemDefaultRegistry: ""

affinity: {}
nodeselector: {}
podDisruptionBudget:
enabled: false
# minAvailable: 1
# maxUnavailable: 1

podSecurityContext: {}
replicaCount: 2
securityContext: {}
tolerations: []

Expand Down
Binary file added charts/repo/gmsa-0.5.0.tgz
Binary file not shown.
27 changes: 22 additions & 5 deletions charts/repo/index.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,24 @@ entries:
gmsa:
- apiVersion: v2
appVersion: 0.4.0
created: "2022-07-19T13:45:23.7139652-07:00"
created: "2022-09-13T21:57:51.527971-04:00"
description: Windows GMSA Configuration
digest: 19003bcc3f5af484afd5a9ad0c833a861420daf7e50964563ecaf92e4a1dc35c
keywords:
- Windows
- Windows GMSA
- GMSA
- Active Directory
name: gmsa
sources:
- https://github.com/kubernetes-sigs/windows-gmsa
type: application
urls:
- gmsa-0.5.0.tgz
version: 0.5.0
- apiVersion: v2
appVersion: 0.4.0
created: "2022-09-13T21:57:51.527486-04:00"
description: Windows GMSA Configuration
digest: 1f6b8bbfe6af4088f80d08d3065094ab1504054526bea6e4477459fb738f504b
keywords:
Expand All @@ -20,7 +37,7 @@ entries:
version: 0.4.4
- apiVersion: v2
appVersion: 0.4.0
created: "2022-07-19T13:45:23.7136327-07:00"
created: "2022-09-13T21:57:51.526874-04:00"
description: Windows GMSA Configuration
digest: 399a4d03dfc08ac4cd811106ab55d525845ca715f0edbdcfcafcfa02cceaf108
keywords:
Expand All @@ -37,7 +54,7 @@ entries:
version: 0.4.2
- apiVersion: v2
appVersion: 0.4.0
created: "2022-07-19T13:45:23.7132983-07:00"
created: "2022-09-13T21:57:51.526244-04:00"
description: Windows GMSA Configuration
digest: 0709c8666554bf7b521c003d33f6198dafe03bf883161e132e929dac478bda45
keywords:
Expand All @@ -54,7 +71,7 @@ entries:
version: 0.4.1
- apiVersion: v2
appVersion: 0.4.0
created: "2022-07-19T13:45:23.7129363-07:00"
created: "2022-09-13T21:57:51.525622-04:00"
description: Windows GMSA Configuration
digest: 7f29d22ba85d90a18e5b9c4e1a7d9ba1149d5827a2ca37b9a6fe1966e3598767
keywords:
Expand All @@ -69,4 +86,4 @@ entries:
urls:
- gmsa-0.4.0.tgz
version: 0.4.0
generated: "2022-07-19T13:45:23.712461-07:00"
generated: "2022-09-13T21:57:51.524379-04:00"

0 comments on commit b20cb5d

Please sign in to comment.