spinframework / spinframework/spin-operator

Unused SpinAppExecutor webhooks cause circular dependency conflict

Open
#229 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
289
Forks
34
PR merge metrics
No merged PRs in 30d

Description

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:

  1. Demos: We need an automatic way to get SpinKube running as fast as possible
  2. Marketplaces: It seems the K8s marketplaces all want Helm as an input

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with charts/spin-operator/templates/mutating-webhook-configuration.yaml around line 45 and internal/webhook/spinappexecutor_defaulting.go. Run the single-Helm-chart installation described in the issue to reproduce the webhook ordering failure, then verify the unused SpinAppExecutor webhooks are disabled and the combined installation completes successfully.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, helm, kubernetes
Domain
devops, infrastructure
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.