Create Kubernetes Object only if it does not already exist
ma-ble opened this issue · 1 comments
We would like to be able to create & manage kubernetes resources in another cluster using the kubernetes-provider. However, not all resources are created in the other cluster via the kubernetes-provider.
In our case, for example, we would like to create namespaces in the other cluster, but only if they do not already exist in this cluster. Up to now, the kubernetes-provider works in such a way that the existing namespace is adopted.
How could such behaviour be prevented?
Would an extension - for example the managed policies "create-if-not-exists" - of the kubernetes provider be conceivable?
If you have other solutions and see solutions that could make it into the kubernetes provider, I would be very grateful for your comments.
make a call to another cluster, check if resource exists and if exists create Object.Object with ObserveOnly policy. That would be my guess