diff --git a/ops/chart/crds/action-crd.yaml b/ops/chart/crds/action-crd.yaml index 477ddae..6b7ea1e 100644 --- a/ops/chart/crds/action-crd.yaml +++ b/ops/chart/crds/action-crd.yaml @@ -84,8 +84,6 @@ spec: UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids type: string - required: - - "" type: object x-kubernetes-map-type: atomic script: diff --git a/ops/chart/crds/apiapp-crd.yaml b/ops/chart/crds/apiapp-crd.yaml index 471fb03..070fea6 100644 --- a/ops/chart/crds/apiapp-crd.yaml +++ b/ops/chart/crds/apiapp-crd.yaml @@ -86,8 +86,6 @@ spec: UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids type: string - required: - - "" type: object x-kubernetes-map-type: atomic required: diff --git a/ops/chart/crds/flow-crd.yaml b/ops/chart/crds/flow-crd.yaml index 5898ac5..b135d14 100644 --- a/ops/chart/crds/flow-crd.yaml +++ b/ops/chart/crds/flow-crd.yaml @@ -79,8 +79,6 @@ spec: UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids type: string - required: - - "" type: object x-kubernetes-map-type: atomic type: array @@ -135,8 +133,6 @@ spec: UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids type: string - required: - - "" type: object x-kubernetes-map-type: atomic triggerType: diff --git a/ops/chart/crds/machineuser-crd.yaml b/ops/chart/crds/machineuser-crd.yaml index 3a354cf..02f4ab5 100644 --- a/ops/chart/crds/machineuser-crd.yaml +++ b/ops/chart/crds/machineuser-crd.yaml @@ -86,8 +86,6 @@ spec: UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids type: string - required: - - "" type: object x-kubernetes-map-type: atomic userGrants: @@ -133,8 +131,6 @@ spec: UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids type: string - required: - - "" type: object x-kubernetes-map-type: atomic roleKeys: diff --git a/ops/chart/crds/oidcapp-crd.yaml b/ops/chart/crds/oidcapp-crd.yaml index 457b14b..16bfec9 100644 --- a/ops/chart/crds/oidcapp-crd.yaml +++ b/ops/chart/crds/oidcapp-crd.yaml @@ -128,8 +128,6 @@ spec: UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids type: string - required: - - "" type: object x-kubernetes-map-type: atomic redirectUris: diff --git a/ops/chart/crds/organization-crd.yaml b/ops/chart/crds/organization-crd.yaml index 0c1dac8..ada940c 100644 --- a/ops/chart/crds/organization-crd.yaml +++ b/ops/chart/crds/organization-crd.yaml @@ -97,8 +97,6 @@ spec: UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids type: string - required: - - "" type: object x-kubernetes-map-type: atomic required: diff --git a/ops/chart/crds/project-crd.yaml b/ops/chart/crds/project-crd.yaml index 4fba9a8..a218471 100644 --- a/ops/chart/crds/project-crd.yaml +++ b/ops/chart/crds/project-crd.yaml @@ -81,8 +81,6 @@ spec: UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids type: string - required: - - "" type: object x-kubernetes-map-type: atomic roleKeys: @@ -140,8 +138,6 @@ spec: UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids type: string - required: - - "" type: object x-kubernetes-map-type: atomic projectRoleAssertion: diff --git a/ops/chart/crds/zitadelcluster-crd.yaml b/ops/chart/crds/zitadelcluster-crd.yaml index 6c26268..1085a54 100644 --- a/ops/chart/crds/zitadelcluster-crd.yaml +++ b/ops/chart/crds/zitadelcluster-crd.yaml @@ -124,8 +124,6 @@ spec: UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids type: string - required: - - "" type: object x-kubernetes-map-type: atomic purpose: diff --git a/ops/chart/templates/manager-rbac.yaml b/ops/chart/templates/manager-rbac.yaml index ece8afe..ff425d1 100644 --- a/ops/chart/templates/manager-rbac.yaml +++ b/ops/chart/templates/manager-rbac.yaml @@ -82,12 +82,6 @@ rules: - get - patch - update -- apiGroups: - - crdb.cockroachlabs.co - resources: - - clusters/finalizers - verbs: - - update - apiGroups: - policy resources: @@ -109,6 +103,12 @@ rules: - patch - update - watch +- apiGroups: + - postgresql.cnpg.io + resources: + - clusters/finalizers + verbs: + - update - apiGroups: - postgresql.cnpg.io resources: diff --git a/src/api/v1alpha1/ref_types.go b/src/api/v1alpha1/ref_types.go index 11b9161..3ed754d 100644 --- a/src/api/v1alpha1/ref_types.go +++ b/src/api/v1alpha1/ref_types.go @@ -6,42 +6,36 @@ import ( type OIDCAppRef struct { // ObjectReference is a reference to a object. - // +kubebuilder:validation:Required // +operator-sdk:csv:customresourcedefinitions:type=spec corev1.ObjectReference `json:",inline"` } type PostgreSQLClusterRef struct { // ObjectReference is a reference to a object. - // +kubebuilder:validation:Required // +operator-sdk:csv:customresourcedefinitions:type=spec corev1.ObjectReference `json:",inline"` } type ZitadelClusterRef struct { // ObjectReference is a reference to a object. - // +kubebuilder:validation:Required // +operator-sdk:csv:customresourcedefinitions:type=spec corev1.ObjectReference `json:",inline"` } type OrganizationRef struct { // ObjectReference is a reference to a object. - // +kubebuilder:validation:Required // +operator-sdk:csv:customresourcedefinitions:type=spec corev1.ObjectReference `json:",inline"` } type ProjectRef struct { // ObjectReference is a reference to a object. - // +kubebuilder:validation:Required // +operator-sdk:csv:customresourcedefinitions:type=spec corev1.ObjectReference `json:",inline"` } type ActionRef struct { // ObjectReference is a reference to a object. - // +kubebuilder:validation:Required // +operator-sdk:csv:customresourcedefinitions:type=spec corev1.ObjectReference `json:",inline"` } diff --git a/src/config/crd/bases/zitadel.topmanage.com_actions.yaml b/src/config/crd/bases/zitadel.topmanage.com_actions.yaml index a151928..25ec2ee 100644 --- a/src/config/crd/bases/zitadel.topmanage.com_actions.yaml +++ b/src/config/crd/bases/zitadel.topmanage.com_actions.yaml @@ -85,8 +85,6 @@ spec: UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids type: string - required: - - "" type: object x-kubernetes-map-type: atomic script: diff --git a/src/config/crd/bases/zitadel.topmanage.com_apiapps.yaml b/src/config/crd/bases/zitadel.topmanage.com_apiapps.yaml index b4fcc06..0e100e4 100644 --- a/src/config/crd/bases/zitadel.topmanage.com_apiapps.yaml +++ b/src/config/crd/bases/zitadel.topmanage.com_apiapps.yaml @@ -87,8 +87,6 @@ spec: UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids type: string - required: - - "" type: object x-kubernetes-map-type: atomic required: diff --git a/src/config/crd/bases/zitadel.topmanage.com_flows.yaml b/src/config/crd/bases/zitadel.topmanage.com_flows.yaml index d82b472..10c13fb 100644 --- a/src/config/crd/bases/zitadel.topmanage.com_flows.yaml +++ b/src/config/crd/bases/zitadel.topmanage.com_flows.yaml @@ -80,8 +80,6 @@ spec: UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids type: string - required: - - "" type: object x-kubernetes-map-type: atomic type: array @@ -136,8 +134,6 @@ spec: UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids type: string - required: - - "" type: object x-kubernetes-map-type: atomic triggerType: diff --git a/src/config/crd/bases/zitadel.topmanage.com_machineusers.yaml b/src/config/crd/bases/zitadel.topmanage.com_machineusers.yaml index 023ee65..409d39a 100644 --- a/src/config/crd/bases/zitadel.topmanage.com_machineusers.yaml +++ b/src/config/crd/bases/zitadel.topmanage.com_machineusers.yaml @@ -87,8 +87,6 @@ spec: UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids type: string - required: - - "" type: object x-kubernetes-map-type: atomic userGrants: @@ -134,8 +132,6 @@ spec: UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids type: string - required: - - "" type: object x-kubernetes-map-type: atomic roleKeys: diff --git a/src/config/crd/bases/zitadel.topmanage.com_oidcapps.yaml b/src/config/crd/bases/zitadel.topmanage.com_oidcapps.yaml index c867ce4..c38e3d1 100644 --- a/src/config/crd/bases/zitadel.topmanage.com_oidcapps.yaml +++ b/src/config/crd/bases/zitadel.topmanage.com_oidcapps.yaml @@ -129,8 +129,6 @@ spec: UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids type: string - required: - - "" type: object x-kubernetes-map-type: atomic redirectUris: diff --git a/src/config/crd/bases/zitadel.topmanage.com_organizations.yaml b/src/config/crd/bases/zitadel.topmanage.com_organizations.yaml index 3a9a91d..60bdfce 100644 --- a/src/config/crd/bases/zitadel.topmanage.com_organizations.yaml +++ b/src/config/crd/bases/zitadel.topmanage.com_organizations.yaml @@ -98,8 +98,6 @@ spec: UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids type: string - required: - - "" type: object x-kubernetes-map-type: atomic required: diff --git a/src/config/crd/bases/zitadel.topmanage.com_projects.yaml b/src/config/crd/bases/zitadel.topmanage.com_projects.yaml index e6991e3..63e3c89 100644 --- a/src/config/crd/bases/zitadel.topmanage.com_projects.yaml +++ b/src/config/crd/bases/zitadel.topmanage.com_projects.yaml @@ -82,8 +82,6 @@ spec: UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids type: string - required: - - "" type: object x-kubernetes-map-type: atomic roleKeys: @@ -141,8 +139,6 @@ spec: UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids type: string - required: - - "" type: object x-kubernetes-map-type: atomic projectRoleAssertion: diff --git a/src/config/crd/bases/zitadel.topmanage.com_zitadelclusters.yaml b/src/config/crd/bases/zitadel.topmanage.com_zitadelclusters.yaml index f5d9a83..e04b495 100644 --- a/src/config/crd/bases/zitadel.topmanage.com_zitadelclusters.yaml +++ b/src/config/crd/bases/zitadel.topmanage.com_zitadelclusters.yaml @@ -125,8 +125,6 @@ spec: UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids type: string - required: - - "" type: object x-kubernetes-map-type: atomic purpose: diff --git a/src/config/rbac/role.yaml b/src/config/rbac/role.yaml index 751d23f..7380230 100644 --- a/src/config/rbac/role.yaml +++ b/src/config/rbac/role.yaml @@ -81,12 +81,6 @@ rules: - get - patch - update -- apiGroups: - - crdb.cockroachlabs.co - resources: - - clusters/finalizers - verbs: - - update - apiGroups: - policy resources: @@ -108,6 +102,12 @@ rules: - patch - update - watch +- apiGroups: + - postgresql.cnpg.io + resources: + - clusters/finalizers + verbs: + - update - apiGroups: - postgresql.cnpg.io resources: diff --git a/src/internal/controller/zitadelcluster_controller.go b/src/internal/controller/zitadelcluster_controller.go index 151e16e..222e3bd 100644 --- a/src/internal/controller/zitadelcluster_controller.go +++ b/src/internal/controller/zitadelcluster_controller.go @@ -94,7 +94,7 @@ type ZitadelClusterReconciler struct { // +kubebuilder:rbac:groups=zitadel.topmanage.com,resources=zitadelclusters/finalizers,verbs=update // +kubebuilder:rbac:groups=postgresql.cnpg.io,resources=clusters,verbs=get;list;watch;create;update;patch;delete // +kubebuilder:rbac:groups=postgresql.cnpg.io,resources=clusters/status,verbs=get;update;patch -// +kubebuilder:rbac:groups=crdb.cockroachlabs.co,resources=clusters/finalizers,verbs=update +// +kubebuilder:rbac:groups=postgresql.cnpg.io,resources=clusters/finalizers,verbs=update // +kubebuilder:rbac:groups=certificates.k8s.io,resources=certificatesigningrequests,verbs=get;list;watch;create;patch;delete // +kubebuilder:rbac:groups=certificates.k8s.io,resources=certificatesigningrequests/status,verbs=get;update;patch // +kubebuilder:rbac:groups=certificates.k8s.io,resources=certificatesigningrequests/approval,verbs=update