oracle / coherence-operator

Oracle Coherence Operator
https://oracle.github.io/coherence-operator/docs/latest
Universal Permissive License v1.0
96 stars 26 forks source link

Add ability to support global label which can be added to all resources created by coherence operator #642

Closed ripun closed 5 months ago

ripun commented 6 months ago

We are using coherence operator to manage our coherence cluster and below are the versions what we are using COHERENCE_IMAGE: coherence-ce:23.09.2 OPERATOR_IMAGE: coherence-operator:3.3.2

We are installing coherence alongwith our helidon based application but we see that coherence container is failing because coherence operator is failing to create ‘coherence-wka’ service since at K8S cluster level we have admission webhook enabled which requires all resources created in our OKE namespace must have calico-usage: defined we are having below error so please add ability which can enable operator to create resources in K8S with label as provided by user

2024-02-23T13:56:00Z ERROR controllers.Coherence Secondary Reconciler failed {"namespace": "xyz-ns", "name": "abc", "Reconciler": "controllers.Service", "error": "failed to create Service/abc-wka: admission webhook \"validation.gatekeeper. sh\" denied the request: [xyz-required-label-calico] All resources must have a specified label calico-usage: xyz-calico", "errorVerbose": "admission webhook \"validation.gatekeeper.sh\" denied the request: [xyz-required-label-calico] All resources must have a specified label calico-usage: xyz-calico\nfailed to create Service/abc-wka\ngithub.com/oracle/coherence-operator/controllers/reconciler.(*ReconcileSecondaryResource).Create\n\tgithub.com/oracle/coherence-operator/controllers/reconciler/base_controller.go:857\ngithub.com/oracle/coherence-operator/controllers/reconciler.(*ReconcileSecondaryResource).ReconcileSingleResource\n\tgithub.com/oracle/coherence-operator/controllers/reconciler/base_controller.go:825\ngithub.com/oracle/coherence-operator/controllers/reconciler.(*ReconcileSecondaryResource).ReconcileAllResourceOfKind\n\tgithub.com/oracle/coherence-operator/controllers/reconciler/base_controller.go:759\ngithub.com/oracle/coherence-operator/controllers.(*CoherenceReconciler).Reconcile\n\tgithub.com/oracle/coherence-operator/controllers/coherence_controller.go:270\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Reconcile\n\tsigs.k8s.io/controller-runtime@v0.16.1/pkg/internal/controller/controller.go:119\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler\n\tsigs.k8s.io/controller-runtime@v0.16.1/pkg/internal/controller/controller.go:316\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem\n\tsigs.k8s.io/controller-runtime@v0.16.1/pkg/internal/controller/controller.go:266\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2.2\n\tsigs.k8s.io/controller-runtime@v0.16.1/pkg/internal/controller/controller.go:227\nruntime.goexit\n\truntime/asm_arm64.s:1197"} github.com/oracle/coherence-operator/controllers.(*CoherenceReconciler).Reconcile github.com/oracle/coherence-operator/controllers/coherence_controller.go:280 sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Reconcile

Add ability at global level to support adding label which can be added to all resources created by coherence operator

thegridman commented 5 months ago

Fixed in 3.3.3