Skip to content
This repository was archived by the owner on May 3, 2024. It is now read-only.
Open
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/cert-manager-webhook-gandi/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: v2
description: A Helm chart for cert-manager-webhook-gandi
name: cert-manager-webhook-gandi
version: v0.2.0
version: v0.3.0
22 changes: 21 additions & 1 deletion deploy/cert-manager-webhook-gandi/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,26 @@ Create chart name and version as used by the chart label.
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
{{- end -}}

{{/*
Common labels
*/}}
{{- define "cert-manager-webhook-gandi.labels" -}}
helm.sh/chart: {{ include "cert-manager-webhook-gandi.chart" . }}
{{ include "cert-manager-webhook-gandi.selectorLabels" . }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- end }}

{{/*
Selector labels
*/}}
{{- define "cert-manager-webhook-gandi.selectorLabels" -}}
app.kubernetes.io/name: {{ include "cert-manager-webhook-gandi.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}

{{- define "cert-manager-webhook-gandi.selfSignedIssuer" -}}
{{ printf "%s-selfsign" (include "cert-manager-webhook-gandi.fullname" .) }}
{{- end -}}
Expand All @@ -45,4 +65,4 @@ Create chart name and version as used by the chart label.

{{- define "cert-manager-webhook-gandi.servingCertificate" -}}
{{ printf "%s-webhook-tls" (include "cert-manager-webhook-gandi.fullname" .) }}
{{- end -}}
{{- end -}}
7 changes: 2 additions & 5 deletions deploy/cert-manager-webhook-gandi/templates/apiservice.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,7 @@ kind: APIService
metadata:
name: v1alpha1.{{ .Values.groupName }}
labels:
app: {{ include "cert-manager-webhook-gandi.name" . }}
chart: {{ include "cert-manager-webhook-gandi.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
{{- include "cert-manager-webhook-gandi.labels" . | nindent 4 }}
annotations:
cert-manager.io/inject-ca-from: "{{ .Values.certManager.namespace }}/{{ include "cert-manager-webhook-gandi.servingCertificate" . }}"
spec:
Expand All @@ -16,4 +13,4 @@ spec:
service:
name: {{ include "cert-manager-webhook-gandi.fullname" . }}
namespace: {{ .Values.certManager.namespace | quote }}
version: v1alpha1
version: v1alpha1
13 changes: 4 additions & 9 deletions deploy/cert-manager-webhook-gandi/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,16 @@ metadata:
name: {{ include "cert-manager-webhook-gandi.fullname" . }}
namespace: {{ .Values.certManager.namespace | quote }}
labels:
app: {{ include "cert-manager-webhook-gandi.name" . }}
chart: {{ include "cert-manager-webhook-gandi.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
{{- include "cert-manager-webhook-gandi.labels" . | nindent 4 }}
spec:
replicas: {{ .Values.replicaCount }}
selector:
matchLabels:
app: {{ include "cert-manager-webhook-gandi.name" . }}
release: {{ .Release.Name }}
{{- include "cert-manager-webhook-gandi.selectorLabels" . | nindent 6 }}
template:
metadata:
labels:
app: {{ include "cert-manager-webhook-gandi.name" . }}
release: {{ .Release.Name }}
{{- include "cert-manager-webhook-gandi.selectorLabels" . | nindent 8 }}
spec:
serviceAccountName: {{ include "cert-manager-webhook-gandi.fullname" . }}
containers:
Expand Down Expand Up @@ -69,4 +64,4 @@ spec:
{{- with .Values.tolerations }}
tolerations:
{{ toYaml . | indent 8 }}
{{- end }}
{{- end }}
22 changes: 5 additions & 17 deletions deploy/cert-manager-webhook-gandi/templates/pki.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,7 @@ metadata:
name: {{ include "cert-manager-webhook-gandi.selfSignedIssuer" . }}
namespace: {{ .Values.certManager.namespace | quote }}
labels:
app: {{ include "cert-manager-webhook-gandi.name" . }}
chart: {{ include "cert-manager-webhook-gandi.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
{{- include "cert-manager-webhook-gandi.labels" . | nindent 4 }}
spec:
selfSigned: {}
---
Expand All @@ -21,10 +18,7 @@ metadata:
name: {{ include "cert-manager-webhook-gandi.rootCACertificate" . }}
namespace: {{ .Values.certManager.namespace | quote }}
labels:
app: {{ include "cert-manager-webhook-gandi.name" . }}
chart: {{ include "cert-manager-webhook-gandi.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
{{- include "cert-manager-webhook-gandi.labels" . | nindent 4 }}
spec:
secretName: {{ include "cert-manager-webhook-gandi.rootCACertificate" . }}
duration: 43800h # 5y
Expand All @@ -40,10 +34,7 @@ metadata:
name: {{ include "cert-manager-webhook-gandi.rootCAIssuer" . }}
namespace: {{ .Values.certManager.namespace | quote }}
labels:
app: {{ include "cert-manager-webhook-gandi.name" . }}
chart: {{ include "cert-manager-webhook-gandi.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
{{- include "cert-manager-webhook-gandi.labels" . | nindent 4 }}
spec:
ca:
secretName: {{ include "cert-manager-webhook-gandi.rootCACertificate" . }}
Expand All @@ -55,10 +46,7 @@ metadata:
name: {{ include "cert-manager-webhook-gandi.servingCertificate" . }}
namespace: {{ .Values.certManager.namespace | quote }}
labels:
app: {{ include "cert-manager-webhook-gandi.name" . }}
chart: {{ include "cert-manager-webhook-gandi.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
{{- include "cert-manager-webhook-gandi.labels" . | nindent 4 }}
spec:
secretName: {{ include "cert-manager-webhook-gandi.servingCertificate" . }}
duration: 8760h # 1y
Expand All @@ -67,4 +55,4 @@ spec:
dnsNames:
- {{ include "cert-manager-webhook-gandi.fullname" . }}
- {{ include "cert-manager-webhook-gandi.fullname" . }}.{{ .Values.certManager.namespace }}
- {{ include "cert-manager-webhook-gandi.fullname" . }}.{{ .Values.certManager.namespace }}.svc
- {{ include "cert-manager-webhook-gandi.fullname" . }}.{{ .Values.certManager.namespace }}.svc
37 changes: 8 additions & 29 deletions deploy/cert-manager-webhook-gandi/templates/rbac.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,7 @@ metadata:
name: {{ include "cert-manager-webhook-gandi.fullname" . }}
namespace: {{ .Values.certManager.namespace | quote }}
labels:
app: {{ include "cert-manager-webhook-gandi.name" . }}
chart: {{ include "cert-manager-webhook-gandi.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
{{- include "cert-manager-webhook-gandi.labels" . | nindent 4 }}
---
# Grant the webhook permission to read the ConfigMap containing the Kubernetes
# apiserver's requestheader-ca-certificate
Expand All @@ -18,10 +15,7 @@ metadata:
name: {{ include "cert-manager-webhook-gandi.fullname" . }}:webhook-authentication-reader
namespace: kube-system
labels:
app: {{ include "cert-manager-webhook-gandi.name" . }}
chart: {{ include "cert-manager-webhook-gandi.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
{{- include "cert-manager-webhook-gandi.labels" . | nindent 4 }}
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
Expand All @@ -39,10 +33,7 @@ kind: ClusterRoleBinding
metadata:
name: {{ include "cert-manager-webhook-gandi.fullname" . }}:auth-delegator
labels:
app: {{ include "cert-manager-webhook-gandi.name" . }}
chart: {{ include "cert-manager-webhook-gandi.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
{{- include "cert-manager-webhook-gandi.labels" . | nindent 4 }}
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
Expand All @@ -59,10 +50,7 @@ kind: ClusterRole
metadata:
name: {{ include "cert-manager-webhook-gandi.fullname" . }}:domain-solver
labels:
app: {{ include "cert-manager-webhook-gandi.name" . }}
chart: {{ include "cert-manager-webhook-gandi.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
{{- include "cert-manager-webhook-gandi.labels" . | nindent 4 }}
rules:
- apiGroups:
- {{ .Values.groupName }}
Expand All @@ -76,10 +64,7 @@ kind: ClusterRoleBinding
metadata:
name: {{ include "cert-manager-webhook-gandi.fullname" . }}:domain-solver
labels:
app: {{ include "cert-manager-webhook-gandi.name" . }}
chart: {{ include "cert-manager-webhook-gandi.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
{{- include "cert-manager-webhook-gandi.labels" . | nindent 4 }}
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
Expand Down Expand Up @@ -130,10 +115,7 @@ kind: ClusterRole
metadata:
name: {{ include "cert-manager-webhook-gandi.fullname" . }}:flowcontrol-solver
labels:
app: {{ include "cert-manager-webhook-gandi.name" . }}
chart: {{ include "cert-manager-webhook-gandi.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
{{- include "cert-manager-webhook-gandi.labels" . | nindent 4 }}
rules:
- apiGroups:
- "flowcontrol.apiserver.k8s.io"
Expand All @@ -149,10 +131,7 @@ kind: ClusterRoleBinding
metadata:
name: {{ include "cert-manager-webhook-gandi.fullname" . }}:flowcontrol-solver
labels:
app: {{ include "cert-manager-webhook-gandi.name" . }}
chart: {{ include "cert-manager-webhook-gandi.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
{{- include "cert-manager-webhook-gandi.labels" . | nindent 4 }}
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
Expand All @@ -162,4 +141,4 @@ subjects:
kind: ServiceAccount
name: {{ include "cert-manager-webhook-gandi.fullname" . }}
namespace: {{ .Values.certManager.namespace | quote }}
{{- end }}
{{- end }}
7 changes: 2 additions & 5 deletions deploy/cert-manager-webhook-gandi/templates/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,7 @@ metadata:
name: {{ include "cert-manager-webhook-gandi.fullname" . }}
namespace: {{ .Values.certManager.namespace | quote }}
labels:
app: {{ include "cert-manager-webhook-gandi.name" . }}
chart: {{ include "cert-manager-webhook-gandi.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
{{- include "cert-manager-webhook-gandi.labels" . | nindent 4 }}
spec:
type: {{ .Values.service.type }}
ports:
Expand All @@ -17,4 +14,4 @@ spec:
name: https
selector:
app: {{ include "cert-manager-webhook-gandi.name" . }}
release: {{ .Release.Name }}
release: {{ .Release.Name }}