Add configuration flag for disabling operator CRD creation/update (#1733)

* Make CRD registration configurable and drop RBAC permissions when CRD registration is disabled
* add generated deep copy functions

Co-authored-by: Damian Peckett <d.peckett_admin@mgmt.innovo-cloud.de>
This commit is contained in:
Damian Peckett
2022-01-13 15:20:04 +01:00
committed by GitHub
co-authored by Damian Peckett
parent b4155bc8fb
commit fe340192ca
13 changed files with 41 additions and 10 deletions
@@ -64,6 +64,9 @@ spec:
docker_image:
type: string
default: "registry.opensource.zalan.do/acid/spilo-14:2.1-p3"
enable_crd_registration:
type: boolean
default: true
enable_crd_validation:
type: boolean
default: true
@@ -40,10 +40,12 @@ rules:
resources:
- customresourcedefinitions
verbs:
- create
- get
{{- if toString .Values.configGeneral.enable_crd_registration | eq "true" }}
- create
- patch
- update
{{- end }}
# to send events to the CRs
- apiGroups:
- ""
+2
View File
@@ -20,6 +20,8 @@ enableJsonLogging: false
# general configuration parameters
configGeneral:
# the deployment should create/update the CRDs
enable_crd_registration: true
# choose if deployment creates/updates CRDs with OpenAPIV3Validation
enable_crd_validation: true
# update only the statefulsets without immediately doing the rolling update