Skip to content

Commit 5dd5ef8

Browse files
authored
Merge pull request #96 from MaesterZ/add-values
Add very useful values common with the main Cert-manager chart
2 parents f4144e5 + 16e103f commit 5dd5ef8

File tree

5 files changed

+82
-7
lines changed

5 files changed

+82
-7
lines changed

deploy/charts/google-cas-issuer/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
apiVersion: v1
1+
apiVersion: v2
22

33
name: cert-manager-google-cas-issuer
44
type: application

deploy/charts/google-cas-issuer/README.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,16 +20,24 @@ A Helm chart for jetstack/google-cas-issuer
2020

2121
| Key | Type | Default | Description |
2222
|-----|------|---------|-------------|
23+
| affinity | object | `{}` | Kubernetes affinity: constraints for pod assignment |
2324
| app.approval | object | `{"enabled":true,"subjects":[{"kind":"ServiceAccount","name":"cert-manager","namespace":"cert-manager"}]}` | Handle RBAC permissions for approving Google CAS issuer CertificateRequests. |
2425
| app.approval.enabled | bool | `true` | enabled determines whether the ClusterRole and ClusterRoleBinding for approval is created. You will want to disable this if you are managing approval RBAC elsewhere from this chart, for example if you create them separately for all installed issuers. |
2526
| app.approval.subjects | list | `[{"kind":"ServiceAccount","name":"cert-manager","namespace":"cert-manager"}]` | subjects is the subject that the approval RBAC permissions will be bound to. Here we are binding them to cert-manager's ServiceAccount so that the default approve all approver has the permissions to do so. You will want to change this subject to approver-policy's ServiceAccount if using that project (recommended). https://cert-manager.io/docs/projects/approver-policy name: cert-manager-approver-policy namespace: cert-manager |
2627
| app.logLevel | int | `1` | Verbosity of google-cas-issuer logging. |
2728
| app.metrics.port | int | `9402` | Port for exposing Prometheus metrics on 0.0.0.0 on path '/metrics'. |
29+
| commonLabels | object | `{}` | Labels to apply to all resources |
30+
| deploymentAnnotations | object | `{}` | Optional additional annotations to add to the google-cas-issuer Deployment |
2831
| image.pullPolicy | string | `"IfNotPresent"` | Kubernetes imagePullPolicy on Deployment. |
2932
| image.repository | string | `"quay.io/jetstack/cert-manager-google-cas-issuer"` | Target image repository. |
3033
| image.tag | string | `"0.6.2"` | Target image version tag. |
3134
| imagePullSecrets | list | `[]` | Optional secrets used for pulling the google-cas-issuer container image. |
35+
| nodeSelector | object | `{}` | Kubernetes node selector: node labels for pod assignment |
36+
| podAnnotations | object | `{}` | Optional additional annotations to add to the google-cas-issuer Pods |
37+
| podLabels | object | `{}` | Optional additional labels to add to the google-cas-issuer Pods |
38+
| priorityClassName | string | `""` | Optional priority class to be used for the google-cas-issuer pods. |
3239
| replicaCount | int | `1` | Number of replicas of google-cas-issuer to run. |
33-
| resources | object | `{}` | |
40+
| resources | object | `{}` | Kubernetes pod resource requests/limits for google-cas-issuer. |
3441
| serviceAccount.annotations | object | `{}` | Optional annotations to add to the service account |
42+
| tolerations | list | `[]` | Kubernetes pod tolerations for google-cas-issuer |
3543

deploy/charts/google-cas-issuer/templates/_helpers.tpl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
{{/* vim: set filetype=mustache: */}}
12
{{/*
23
Expand the name of the chart.
34
*/}}
@@ -23,4 +24,7 @@ app.kubernetes.io/instance: {{ .Release.Name }}
2324
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
2425
{{- end }}
2526
app.kubernetes.io/managed-by: {{ .Release.Service }}
27+
{{- if .Values.commonLabels}}
28+
{{ toYaml .Values.commonLabels }}
29+
{{- end }}
2630
{{- end -}}

deploy/charts/google-cas-issuer/templates/deployment.yaml

Lines changed: 31 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ metadata:
44
name: {{ include "cert-manager-google-cas-issuer.name" . }}
55
labels:
66
{{ include "cert-manager-google-cas-issuer.labels" . | indent 4 }}
7+
{{- with .Values.deploymentAnnotations }}
8+
annotations:
9+
{{- toYaml . | nindent 4 }}
10+
{{- end }}
711
spec:
812
replicas: {{ .Values.replicaCount }}
913
selector:
@@ -13,12 +17,23 @@ spec:
1317
metadata:
1418
labels:
1519
app: {{ include "cert-manager-google-cas-issuer.name" . }}
20+
{{- include "cert-manager-google-cas-issuer.labels" . | nindent 8 }}
21+
{{- with .Values.podLabels }}
22+
{{- toYaml . | nindent 8 }}
23+
{{- end }}
24+
{{- with .Values.podAnnotations }}
25+
annotations:
26+
{{- toYaml . | nindent 8 }}
27+
{{- end }}
1628
spec:
1729
{{- with .Values.imagePullSecrets }}
1830
imagePullSecrets:
1931
{{- toYaml . | nindent 8 }}
2032
{{- end }}
2133
serviceAccountName: {{ include "cert-manager-google-cas-issuer.name" . }}
34+
{{- with .Values.priorityClassName }}
35+
priorityClassName: {{ . | quote }}
36+
{{- end }}
2237
containers:
2338
- name: {{ include "cert-manager-google-cas-issuer.name" . }}
2439
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
@@ -31,6 +46,20 @@ spec:
3146
- --enable-leader-election
3247
- --log-level={{.Values.app.logLevel}}
3348
- --metrics-addr=:{{.Values.app.metrics.port}}
34-
49+
{{- with .Values.resources }}
3550
resources:
36-
{{- toYaml .Values.resources | indent 12 }}
51+
{{- toYaml . | nindent 10 }}
52+
{{- end }}
53+
54+
{{- with .Values.nodeSelector }}
55+
nodeSelector:
56+
{{- toYaml . | nindent 8 }}
57+
{{- end }}
58+
{{- with .Values.affinity }}
59+
affinity:
60+
{{- toYaml . | nindent 8 }}
61+
{{- end }}
62+
{{- with .Values.tolerations }}
63+
tolerations:
64+
{{- toYaml . | nindent 8 }}
65+
{{- end }}

deploy/charts/google-cas-issuer/values.yaml

Lines changed: 37 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,13 @@ image:
1212
# -- Optional secrets used for pulling the google-cas-issuer container image.
1313
imagePullSecrets: []
1414

15+
# -- Labels to apply to all resources
16+
commonLabels: {}
17+
1518
serviceAccount:
1619
# -- Optional annotations to add to the service account
1720
annotations: {}
1821

19-
2022
app:
2123
# -- Verbosity of google-cas-issuer logging.
2224
logLevel: 1 # 1-5
@@ -47,12 +49,44 @@ app:
4749
# -- Port for exposing Prometheus metrics on 0.0.0.0 on path '/metrics'.
4850
port: 9402
4951

52+
# -- Optional additional annotations to add to the google-cas-issuer Deployment
53+
deploymentAnnotations: {}
54+
55+
# -- Optional additional annotations to add to the google-cas-issuer Pods
56+
podAnnotations: {}
57+
58+
# -- Optional additional labels to add to the google-cas-issuer Pods
59+
podLabels: {}
60+
61+
# -- Kubernetes pod resource requests/limits for google-cas-issuer.
5062
resources: {}
51-
# -- Kubernetes pod resource limits for google-cas-issuer.
5263
# limits:
5364
# cpu: 100m
5465
# memory: 128Mi
55-
# -- Kubernetes pod memory resource requests for google-cas-issuer.
5666
# requests:
5767
# cpu: 100m
5868
# memory: 128Mi
69+
70+
# -- Kubernetes node selector: node labels for pod assignment
71+
nodeSelector: {}
72+
# -- Allow scheduling of DaemonSet on linux nodes only
73+
# kubernetes.io/os: linux
74+
75+
# -- Kubernetes affinity: constraints for pod assignment
76+
affinity: {}
77+
# nodeAffinity:
78+
# requiredDuringSchedulingIgnoredDuringExecution:
79+
# nodeSelectorTerms:
80+
# - matchExpressions:
81+
# - key: foo.bar.com/role
82+
# operator: In
83+
# values:
84+
# - master
85+
86+
# -- Kubernetes pod tolerations for google-cas-issuer
87+
tolerations: []
88+
# -- Allow scheduling of DaemonSet on all nodes
89+
# - operator: "Exists"
90+
91+
# -- Optional priority class to be used for the google-cas-issuer pods.
92+
priorityClassName: ""

0 commit comments

Comments
 (0)