feat: Add option to keep CRDs when helm chart is uninstalled
Signed-off-by: Jason Witkowski <jwitko1@gmail.com>
This commit is contained in:
parent
57de0fc4d2
commit
a6f665353f
@ -170,7 +170,17 @@ The duration the clients should wait between attempting acquisition and renewal
|
||||
> false
|
||||
> ```
|
||||
|
||||
Install the cert-manager CRDs, it is recommended to not use Helm to manage the CRDs.
|
||||
This method of CRDs installation will be deprecated in future releases. It is mutually exclusive with crds.install and crds.keep=true
|
||||
#### **crds.install** ~ `bool`
|
||||
> Default value:
|
||||
> ```yaml
|
||||
> false
|
||||
> ```
|
||||
#### **crds.keep** ~ `bool`
|
||||
> Default value:
|
||||
> ```yaml
|
||||
> false
|
||||
> ```
|
||||
### Controller
|
||||
|
||||
#### **replicaCount** ~ `number`
|
||||
|
||||
9
deploy/charts/cert-manager/templates/_preflight.tpl
Normal file
9
deploy/charts/cert-manager/templates/_preflight.tpl
Normal file
@ -0,0 +1,9 @@
|
||||
{{/* vim: set filetype=mustache: */}}
|
||||
{{/*
|
||||
Expand the name of the chart.
|
||||
*/}}
|
||||
{{- define "cert-manager.preflight" -}}
|
||||
{{- if and (.Values.installCRDs) (or (.Values.crds.install) (.Values.crds.keep)) }}
|
||||
{{- fail "ERROR: Cannot set both .Values.installCRDs and .Values.crds.install" }}
|
||||
{{- end }}
|
||||
{{- end -}}
|
||||
@ -67,10 +67,14 @@ global:
|
||||
# +docs:property
|
||||
# retryPeriod: 15s
|
||||
|
||||
# Install the cert-manager CRDs, it is recommended to not use Helm to manage
|
||||
# the CRDs.
|
||||
# This method of CRDs installation will be deprecated in future releases
|
||||
# It is mutually exclusive with crds.install and crds.keep=true
|
||||
installCRDs: false
|
||||
|
||||
crds:
|
||||
install: false
|
||||
keep: false
|
||||
|
||||
# +docs:section=Controller
|
||||
|
||||
# The number of replicas of the cert-manager controller to run.
|
||||
|
||||
@ -3,6 +3,9 @@ kind: CustomResourceDefinition
|
||||
metadata:
|
||||
name: certificaterequests.cert-manager.io
|
||||
labels:
|
||||
{{- if .Values.crds.keep }}
|
||||
"helm.sh/resource-policy": keep
|
||||
{{- end }}
|
||||
app: '{{ template "cert-manager.name" . }}'
|
||||
app.kubernetes.io/name: '{{ template "cert-manager.name" . }}'
|
||||
app.kubernetes.io/instance: '{{ .Release.Name }}'
|
||||
|
||||
@ -3,6 +3,9 @@ kind: CustomResourceDefinition
|
||||
metadata:
|
||||
name: certificates.cert-manager.io
|
||||
labels:
|
||||
{{- if .Values.crds.keep }}
|
||||
"helm.sh/resource-policy": keep
|
||||
{{- end }}
|
||||
app: '{{ template "cert-manager.name" . }}'
|
||||
app.kubernetes.io/name: '{{ template "cert-manager.name" . }}'
|
||||
app.kubernetes.io/instance: '{{ .Release.Name }}'
|
||||
|
||||
@ -3,6 +3,9 @@ kind: CustomResourceDefinition
|
||||
metadata:
|
||||
name: challenges.acme.cert-manager.io
|
||||
labels:
|
||||
{{- if .Values.crds.keep }}
|
||||
"helm.sh/resource-policy": keep
|
||||
{{- end }}
|
||||
app: '{{ template "cert-manager.name" . }}'
|
||||
app.kubernetes.io/name: '{{ template "cert-manager.name" . }}'
|
||||
app.kubernetes.io/instance: '{{ .Release.Name }}'
|
||||
|
||||
@ -1,8 +1,12 @@
|
||||
{{- include "cert-manager.preflight" . }}
|
||||
apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
name: clusterissuers.cert-manager.io
|
||||
labels:
|
||||
{{- if .Values.crds.keep }}
|
||||
"helm.sh/resource-policy": keep
|
||||
{{- end }}
|
||||
app: '{{ template "cert-manager.name" . }}'
|
||||
app.kubernetes.io/name: '{{ template "cert-manager.name" . }}'
|
||||
app.kubernetes.io/instance: "{{ .Release.Name }}"
|
||||
|
||||
@ -3,6 +3,9 @@ kind: CustomResourceDefinition
|
||||
metadata:
|
||||
name: issuers.cert-manager.io
|
||||
labels:
|
||||
{{- if .Values.crds.keep }}
|
||||
"helm.sh/resource-policy": keep
|
||||
{{- end }}
|
||||
app: '{{ template "cert-manager.name" . }}'
|
||||
app.kubernetes.io/name: '{{ template "cert-manager.name" . }}'
|
||||
app.kubernetes.io/instance: "{{ .Release.Name }}"
|
||||
|
||||
@ -3,6 +3,9 @@ kind: CustomResourceDefinition
|
||||
metadata:
|
||||
name: orders.acme.cert-manager.io
|
||||
labels:
|
||||
{{- if .Values.crds.keep }}
|
||||
"helm.sh/resource-policy": keep
|
||||
{{- end }}
|
||||
app: '{{ template "cert-manager.name" . }}'
|
||||
app.kubernetes.io/name: '{{ template "cert-manager.name" . }}'
|
||||
app.kubernetes.io/instance: '{{ .Release.Name }}'
|
||||
|
||||
Loading…
Reference in New Issue
Block a user