Skip to content

Commit a3bb504

Browse files
Merge pull request #42 from puzzle/fix/group-name
Change wording and handling of .Values.groupName
2 parents 3765f9b + 3412b5f commit a3bb504

File tree

8 files changed

+20
-17
lines changed

8 files changed

+20
-17
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ The Helm chart accepts the following values:
6666
| `image.pullPolicy` | ✔️ | Image pull policy of the solver | `IfNotPresent` |
6767
| `logLevel` | | Set the verbosity of the solver | _empty_ |
6868
| `useUnprivilegedPort` | | Use an unprivileged container-port for the webhook | `true` |
69-
| `groupName` | ✔️ | Identifies the company that created the webhook | _empty_ |
69+
| `groupName` | ✔️ | Name of the API group used to register the webhook API service as | `acme.dnsimple.com` |
7070
| `certManager.namespace` | ✔️ | The namespace cert-manager was installed to | `cert-manager` |
7171
| `certManager.serviceAccountName` | ✔️ | The service account cert-manager runs under | `cert-manager` |
7272

charts/cert-manager-webhook-dnsimple/templates/_helpers.tpl

+7
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,13 @@ Expand the name of the chart.
66
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
77
{{- end -}}
88

9+
{{/*
10+
APIService group name
11+
*/}}
12+
{{- define "dnsimple-webhook.api-group" -}}
13+
{{- default "acme.dnsimple.com" (.Values.groupName) -}}
14+
{{- end -}}
15+
916
{{/*
1017
Create a default fully qualified app name.
1118
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).

charts/cert-manager-webhook-dnsimple/templates/apiservice.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
apiVersion: {{ $APIRegistrationAPIVersion }}
33
kind: APIService
44
metadata:
5-
name: v1alpha1.{{ .Values.groupName }}
5+
name: v1alpha1.{{ include "dnsimple-webhook.api-group" . }}
66
labels:
77
app: {{ include "dnsimple-webhook.name" . }}
88
chart: {{ include "dnsimple-webhook.chart" . }}
@@ -11,7 +11,7 @@ metadata:
1111
annotations:
1212
cert-manager.io/inject-ca-from: "{{ .Release.Namespace }}/{{ include "dnsimple-webhook.servingCertificate" . }}"
1313
spec:
14-
group: {{ .Values.groupName }}
14+
group: {{ include "dnsimple-webhook.api-group" . }}
1515
groupPriorityMinimum: 1000
1616
versionPriority: 15
1717
service:

charts/cert-manager-webhook-dnsimple/templates/deployment.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ spec:
4343
{{- end }}
4444
env:
4545
- name: GROUP_NAME
46-
value: {{ .Values.groupName | quote }}
46+
value: {{ include "dnsimple-webhook.api-group" . | quote }}
4747
ports:
4848
- name: https
4949
{{- if .Values.useUnprivilegedPort }}

charts/cert-manager-webhook-dnsimple/templates/production.cluster-issuer.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,6 @@ spec:
2222
key: token
2323
name: {{ include "dnsimple-webhook.tokenSecretName" . }}
2424
accountID: {{ .Values.dnsimple.accountID | quote }}
25-
groupName: {{ .Values.groupName }}
25+
groupName: {{ include "dnsimple-webhook.api-group" . }}
2626
solverName: dnsimple
2727
{{- end -}}

charts/cert-manager-webhook-dnsimple/templates/rbac.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ metadata:
6565
heritage: {{ .Release.Service }}
6666
rules:
6767
- apiGroups:
68-
- {{ .Values.groupName }}
68+
- {{ include "dnsimple-webhook.api-group" . }}
6969
resources:
7070
- '*'
7171
verbs:

charts/cert-manager-webhook-dnsimple/templates/staging.cluster-issuer.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,6 @@ spec:
2222
key: token
2323
name: {{ include "dnsimple-webhook.tokenSecretName" . }}
2424
accountID: {{ .Values.dnsimple.accountID | quote }}
25-
groupName: {{ .Values.groupName }}
25+
groupName: {{ include "dnsimple-webhook.api-group" . }}
2626
solverName: dnsimple
2727
{{- end -}}

charts/cert-manager-webhook-dnsimple/values.yaml

+6-10
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,8 @@
1-
# The GroupName here is used to identify your company or business unit that
2-
# created this webhook.
3-
# For example, this may be "acme.mycompany.com".
4-
# This name will need to be referenced in each Issuer's `webhook` stanza to
5-
# inform cert-manager of where to send ChallengePayload resources in order to
6-
# solve the DNS01 challenge.
7-
# This group name should be **unique**, hence using your own company's domain
8-
# here is recommended.
9-
groupName: ""
1+
# groupName sets the API group name for the API service that registers this webhook service.
2+
# It will be used when specifying an issuer for a (Cluster)Issuer object.
3+
# When customizing, provide an FQDN, for example acme.my-company.com.
4+
groupName: "acme.dnsimple.com"
5+
106
certManager:
117
namespace: cert-manager
128
serviceAccountName: cert-manager
@@ -47,4 +43,4 @@ resources: {}
4743

4844
nodeSelector: {}
4945
tolerations: []
50-
affinity: {}
46+
affinity: {}

0 commit comments

Comments
 (0)