Skip to content

Commit e38f3e7

Browse files
authored
Merge pull request #177 from bradfordwagner/feature/labels
Allow custom labels to be added to resources
2 parents f8c9b98 + 30b0513 commit e38f3e7

File tree

4 files changed

+9
-0
lines changed

4 files changed

+9
-0
lines changed

deploy/charts/approver-policy/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ A Helm chart for cert-manager-approver-policy
3939
| app.webhook.service | object | `{"type":"ClusterIP"}` | Type of Kubernetes Service used by the Webhook |
4040
| app.webhook.timeoutSeconds | int | `5` | Timeout of webhook HTTP request. |
4141
| app.webhook.tolerations | list | `[]` | https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/ |
42+
| commonLabels | object | `{}` | Optional allow custom labels to be placed on resources |
4243
| image.pullPolicy | string | `"IfNotPresent"` | Kubernetes imagePullPolicy on Deployment. |
4344
| image.repository | string | `"quay.io/jetstack/cert-manager-approver-policy"` | Target image repository. |
4445
| image.tag | string | `""` | Target image version tag (if empty, Chart AppVersion will be used) |

deploy/charts/approver-policy/templates/_helpers.tpl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,7 @@ app.kubernetes.io/instance: {{ .Release.Name }}
2323
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
2424
{{- end }}
2525
app.kubernetes.io/managed-by: {{ .Release.Service }}
26+
{{- if .Values.commonLabels}}
27+
{{ toYaml .Values.commonLabels }}
28+
{{- end }}
2629
{{- end -}}

deploy/charts/approver-policy/templates/deployment.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ spec:
1414
metadata:
1515
labels:
1616
app: {{ include "cert-manager-approver-policy.name" . }}
17+
{{- include "cert-manager-approver-policy.labels" . | nindent 8 }}
1718
spec:
1819
{{- with .Values.imagePullSecrets }}
1920
imagePullSecrets:

deploy/charts/approver-policy/values.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,3 +95,7 @@ resources: {}
9595
# requests:
9696
# cpu: 100m
9797
# memory: 128Mi
98+
99+
# -- Optional allow custom labels to be placed on resources
100+
commonLabels: {}
101+

0 commit comments

Comments
 (0)