Unused SpinAppExecutor webhooks cause circular dependency conflict
Spin-Operator sets up validators and mutator webhooks for SpinApp and SpinAppExecutor. The ones for SpinAppExecutor currently are simply No-op and it's causing an issue when trying to install all of SpinKube in a single Helm chart. Namely the templates which trigger the webhooks get setup first here: https://github.com/spinkube/spin-operator/blob/main/charts/spin-operator/templates/mutating-webhook-configuration.yaml#L45
Then when the template to install the executor is run, the above code causes it to want to reach out to the webhook, which hasn't been setup yet, resulting in a failure.
However these webhook don't currently do anything: https://github.com/spinkube/spin-operator/blob/main/internal/webhook/spinappexecutor_defaulting.go
So either can try to ensure that the the SpinAppExecutor template happens before mutating-webhook-configuration template or after the webhook is up. But since the webhook isn't doing anything yet, we should probably disable it for now.
Here is the proof of concept code: https://github.com/jpflueger/spinkube-oneclick
Context: This will be very helpful for two reasons:
- Demos: We need an automatic way to get SpinKube running as fast as possible
- Marketplaces: It seems the K8s marketplaces all want Helm as an input
Is cert-manager running when you get the error? You might get the error if cert-manager isn't ready