Skip to content

Commit 1ae2cfd

Browse files
committed
feat(helm): add scheduling values
Signed-off-by: Oliver Bähler <[email protected]>
1 parent 4b0d010 commit 1ae2cfd

File tree

5 files changed

+191
-115
lines changed

5 files changed

+191
-115
lines changed

charts/capsule-proxy/README.md

+8
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ If you only need to make minor customizations, you can specify them on the comma
6262
|-----|------|---------|-------------|
6363
| affinity | object | `{}` | Set affinity rules for the capsule-proxy pod. |
6464
| certManager.certificate.dnsNames | list | `[]` | Additional DNS Names to include in certificate |
65+
| certManager.certificate.includeInternalServiceNames | bool | `true` | Include internal service names in certificate (disable if you create a public cert) |
6566
| certManager.certificate.ipAddresses | list | `[]` | Additional IP Addresses to include in certificate |
6667
| certManager.certificate.uris | list | `[]` | Additional URIs to include in certificate |
6768
| certManager.externalCA.enabled | bool | `false` | Set if want cert manager to sign certificates with an external CA |
@@ -71,18 +72,25 @@ If you only need to make minor customizations, you can specify them on the comma
7172
| certManager.issuer.name | string | `""` | Set the name of the ClusterIssuer if issuer kind is ClusterIssuer and if cert manager will generate CA signed SSL certificates |
7273
| daemonset.hostNetwork | bool | `false` | Use the host network namespace for capsule-proxy pod. |
7374
| daemonset.hostPort | bool | `false` | Binding the capsule-proxy listening port to the host port. |
75+
| hostNetwork | bool | `false` | When deployed as DaemonSet use |
7476
| image.pullPolicy | string | `"IfNotPresent"` | Set the image pull policy. |
7577
| image.registry | string | `"ghcr.io"` | Set the image registry for capsule-proxy |
7678
| image.repository | string | `"projectcapsule/capsule-proxy"` | Set the image repository for capsule-proxy. |
7779
| image.tag | string | `""` | Overrides the image tag whose default is the chart appVersion. |
7880
| imagePullSecrets | list | `[]` | Configuration for `imagePullSecrets` so that you can use a private images registry. |
81+
| jobs.affinity | object | `{}` | Set affinity rules |
7982
| jobs.annotations | object | `{}` | Annotations to add to the certgen job. |
8083
| jobs.certs.pullPolicy | string | `"IfNotPresent"` | Set the image pull policy of the post install certgen job |
8184
| jobs.certs.registry | string | `"docker.io"` | Set the image repository of the post install certgen job |
8285
| jobs.certs.repository | string | `"jettech/kube-webhook-certgen"` | Set the image repository of the post install certgen job |
8386
| jobs.certs.tag | string | `"v1.3.0"` | Set the image tag of the post install certgen job |
87+
| jobs.nodeSelector | object | `{}` | Set the node selector |
8488
| jobs.podSecurityContext | object | `{"seccompProfile":{"type":"RuntimeDefault"}}` | Security context for the job pods. |
89+
| jobs.priorityClassName | string | `""` | Set a pod priorityClassName |
90+
| jobs.restartPolicy | string | `"Never"` | Set the restartPolicy |
8591
| jobs.securityContext | object | `{"allowPrivilegeEscalation":false,"capabilities":{"drop":["ALL"]},"readOnlyRootFilesystem":true,"runAsGroup":1002,"runAsNonRoot":true,"runAsUser":1002}` | Security context for the job containers. |
92+
| jobs.tolerations | list | `[]` | Set list of tolerations |
93+
| jobs.topologySpreadConstraints | list | `[]` | Set Topology Spread Constraints |
8694
| jobs.ttlSecondsAfterFinished | int | `60` | Sets the ttl in seconds after a finished certgen job is deleted. Set to -1 to never delete. |
8795
| kind | string | `"Deployment"` | Set the deployment mode of the capsule-proxy as `Deployment` or `DaemonSet`. |
8896
| nodeSelector | object | `{}` | Set the node selector for the capsule-proxy pod. |

charts/capsule-proxy/ci/ds-values.yaml

+36
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,16 @@ tolerations:
4545
operator: Exists
4646
- effect: NoSchedule
4747
key: node-role.kubernetes.io/master
48+
affinity:
49+
nodeAffinity:
50+
preferredDuringSchedulingIgnoredDuringExecution:
51+
- weight: 1
52+
preference:
53+
matchExpressions:
54+
- key: another-node-label-key
55+
operator: In
56+
values:
57+
- another-node-label-value
4858
# Ingress
4959
ingress:
5060
enabled: true
@@ -59,3 +69,29 @@ ingress:
5969
# ServiceMonitor
6070
serviceMonitor:
6171
enabled: true
72+
jobs:
73+
affinity:
74+
nodeAffinity:
75+
preferredDuringSchedulingIgnoredDuringExecution:
76+
- weight: 1
77+
preference:
78+
matchExpressions:
79+
- key: another-node-label-key
80+
operator: In
81+
values:
82+
- another-node-label-value
83+
topologySpreadConstraints:
84+
- maxSkew: 1
85+
topologyKey: kubernetes.io/hostname
86+
whenUnsatisfiable: ScheduleAnyway
87+
labelSelector:
88+
matchLabels:
89+
app.kubernetes.io/name: capsule-proxy
90+
priorityClassName: "system-node-critical"
91+
nodeSelector:
92+
node-role.kubernetes.io/master: ""
93+
tolerations:
94+
- key: CriticalAddonsOnly
95+
operator: Exists
96+
- effect: NoSchedule
97+
key: node-role.kubernetes.io/master

charts/capsule-proxy/templates/certgen-job.yaml

+20-1
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,30 @@ spec:
1919
labels:
2020
{{- include "capsule-proxy.selectorLabels" . | nindent 8 }}
2121
spec:
22-
restartPolicy: Never
22+
restartPolicy: {{ $.Values.jobs.restartPolicy }}
2323
{{- with $.Values.jobs.podSecurityContext }}
2424
securityContext:
2525
{{- toYaml . | nindent 8 }}
2626
{{- end }}
27+
{{- with .Values.jobs.nodeSelector }}
28+
nodeSelector:
29+
{{- toYaml . | nindent 8 }}
30+
{{- end }}
31+
{{- with .Values.jobs.affinity }}
32+
affinity:
33+
{{- toYaml . | nindent 8 }}
34+
{{- end }}
35+
{{- with .Values.jobs.tolerations }}
36+
tolerations:
37+
{{- toYaml . | nindent 8 }}
38+
{{- end }}
39+
{{- with .Values.jobs.topologySpreadConstraints }}
40+
topologySpreadConstraints:
41+
{{- toYaml . | nindent 8 }}
42+
{{- end }}
43+
{{- with .Values.jobs.priorityClassName }}
44+
priorityClassName: {{ . }}
45+
{{- end }}
2746
containers:
2847
- name: post-install-job
2948
image: {{ include "capsule.jobs.certsFullyQualifiedDockerImage" $ }}

charts/capsule-proxy/templates/certmanager.yaml

+2
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,10 @@ spec:
4848
{{- range $dns := .Values.certManager.certificate.dnsNames }}
4949
- {{ $dns }}
5050
{{- end }}
51+
{{- if $.Values.certManager.certificate.includeInternalServiceNames }}
5152
- {{ include "capsule-proxy.fullname" . }}
5253
- {{ include "capsule-proxy.fullname" . }}.{{ .Release.Namespace }}.svc
54+
{{- end }}
5355
{{- with .Values.certManager.certificate.ipAddresses }}
5456
ipAddresses:
5557
{{- range $ip := . }}

0 commit comments

Comments
 (0)