Skip to content
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

Add very useful values common with the main Cert-manager chart #126

Merged
merged 1 commit into from
Feb 21, 2023
Merged
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
2 changes: 1 addition & 1 deletion deploy/charts/csi-driver/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: v1
apiVersion: v2
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this correct? 👀 why have we changed the chart's api version?


name: cert-manager-csi-driver
type: application
Expand Down
11 changes: 8 additions & 3 deletions deploy/charts/csi-driver/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ A Helm chart for cert-manager-csi-driver

| Key | Type | Default | Description |
|-----|------|---------|-------------|
| affinity | object | `{}` | Kubernetes affinity: constraints for pod assignment |
| app.driver | object | `{"csiDataDir":"/tmp/cert-manager-csi-driver","name":"csi.cert-manager.io","useTokenRequest":false}` | Options for CSI driver |
| app.driver.csiDataDir | string | `"/tmp/cert-manager-csi-driver"` | Configures the hostPath directory that the driver will write and mount volumes from. |
| app.driver.name | string | `"csi.cert-manager.io"` | Name of the driver which will be registered with Kubernetes. |
Expand All @@ -28,6 +29,8 @@ A Helm chart for cert-manager-csi-driver
| app.livenessProbe | object | `{"port":9809}` | Options for the liveness container. |
| app.livenessProbe.port | int | `9809` | The port that will expose the livness of the csi-driver |
| app.logLevel | int | `1` | Verbosity of cert-manager-csi-driver logging. |
| commonLabels | object | `{}` | Labels to apply to all resources |
| daemonSetAnnotations | object | `{}` | Optional additional annotations to add to the csi-driver DaemonSet |
| image.pullPolicy | string | `"IfNotPresent"` | Kubernetes imagePullPolicy on csi-driver. |
| image.repository | string | `"quay.io/jetstack/cert-manager-csi-driver"` | Target image repository. |
| image.tag | string | `"v0.5.0"` | Target image version tag. |
Expand All @@ -38,8 +41,10 @@ A Helm chart for cert-manager-csi-driver
| nodeDriverRegistrarImage.pullPolicy | string | `"IfNotPresent"` | Kubernetes imagePullPolicy on node-driver. |
| nodeDriverRegistrarImage.repository | string | `"registry.k8s.io/sig-storage/csi-node-driver-registrar"` | Target image repository. |
| nodeDriverRegistrarImage.tag | string | `"v2.7.0"` | Target image version tag. |
| nodeSelector | object | `{}` | |
| nodeSelector | object | `{}` | Kubernetes node selector: node labels for pod assignment |
| podAnnotations | object | `{}` | Optional additional annotations to add to the csi-driver Pods |
| podLabels | object | `{}` | Optional additional labels to add to the csi-driver Pods |
| priorityClassName | string | `""` | Optional priority class to be used for the csi-driver pods. |
| resources | object | `{}` | |
| tolerations | list | `[]` | |
| resources | object | `{}` | Kubernetes pod resources requests/limits for cert-manager-csi-driver |
| tolerations | list | `[]` | Kubernetes pod tolerations for cert-manager-csi-driver |

3 changes: 3 additions & 0 deletions deploy/charts/csi-driver/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,7 @@ app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- if .Values.commonLabels}}
{{ toYaml .Values.commonLabels }}
{{- end }}
{{- end -}}
35 changes: 27 additions & 8 deletions deploy/charts/csi-driver/templates/daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ metadata:
name: {{ include "cert-manager-csi-driver.name" . }}
labels:
{{ include "cert-manager-csi-driver.labels" . | indent 4 }}
{{- with .Values.daemonSetAnnotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
selector:
matchLabels:
Expand All @@ -12,12 +16,23 @@ spec:
metadata:
labels:
app: {{ include "cert-manager-csi-driver.name" . }}
{{- include "cert-manager-csi-driver.labels" . | nindent 8 }}
{{- with .Values.podLabels }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.podAnnotations }}
annotations:
{{- toYaml . | nindent 8 }}
{{- end }}
spec:
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
serviceAccountName: {{ include "cert-manager-csi-driver.name" . }}
{{- with .Values.priorityClassName }}
priorityClassName: {{ . | quote }}
{{- end }}
containers:

- name: node-driver-registrar
Expand Down Expand Up @@ -90,18 +105,22 @@ spec:
port: healthz
initialDelaySeconds: 5
timeoutSeconds: 5
{{- with .Values.resources }}
resources:
{{- toYaml .Values.resources | nindent 12 }}
{{- toYaml . | nindent 12 }}
{{- end }}

{{- if .Values.nodeSelector }}
nodeSelector: {{- toYaml .Values.nodeSelector | nindent 8 }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}

{{- with .Values.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{- toYaml .Values.tolerations | nindent 8 }}

{{- with .Values.priorityClassName }}
priorityClassName: {{ . | quote }}
{{- toYaml . | nindent 8 }}
{{- end }}

volumes:
Expand Down
34 changes: 28 additions & 6 deletions deploy/charts/csi-driver/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ image:
imagePullSecrets: []
#- name: Secret with Registry credentials

# -- Labels to apply to all resources
commonLabels: {}

nodeDriverRegistrarImage:
# -- Target image repository.
repository: registry.k8s.io/sig-storage/csi-node-driver-registrar
Expand Down Expand Up @@ -50,24 +53,43 @@ app:
# -- Overrides path to root kubelet directory in case of a non-standard k8s install.
kubeletRootDir: /var/lib/kubelet

# -- Optional additional annotations to add to the csi-driver DaemonSet
daemonSetAnnotations: {}

# -- Optional additional annotations to add to the csi-driver Pods
podAnnotations: {}

# -- Optional additional labels to add to the csi-driver Pods
podLabels: {}

# -- Kubernetes pod resources requests/limits for cert-manager-csi-driver
resources: {}
# -- Kubernetes pod resource limits for cert-manager-csi-driver
# limits:
# cpu: 100m
# memory: 128Mi
# -- Kubernetes pod memory resource requests for cert-manager-csi-driver
# requests:
# cpu: 100m
# memory: 128Mi

# -- Kubernetes node selector: node labels for pod assignment
nodeSelector: {}
# -- Kubernetes node selector: node labels for pod assignment
# Allow scheduling of DaemonSet on linux nodes only
# -- Allow scheduling of DaemonSet on linux nodes only
# kubernetes.io/os: linux

# -- Kubernetes affinity: constraints for pod assignment
affinity: {}
# nodeAffinity:
# requiredDuringSchedulingIgnoredDuringExecution:
# nodeSelectorTerms:
# - matchExpressions:
# - key: foo.bar.com/role
# operator: In
# values:
# - master

# -- Kubernetes pod tolerations for cert-manager-csi-driver
tolerations: []
# -- Kubernetes pod tolerations for cert-manager-csi-driver
# Allow scheduling of DaemonSet on all nodes
# -- Allow scheduling of DaemonSet on all nodes
# - operator: "Exists"

# -- Optional priority class to be used for the csi-driver pods.
Expand Down