spinframework / spinframework/spin-operator
Unable to reconcile deployment: Duplicate value: http-app in an attempt to edit the deployment
Open
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 289
- Forks
- 34
- PR merge metrics
- No merged PRs in 30d
Description
Steps to repro:
- Follow the Running a local development environment section on README to prepare a k3d cluster.
- After apply the sample application, run
kubectl edit deployto change the port number from80to something else (i.e.83). - See the error from the terminal that's running
spin-operator.
2024-10-14T06:58:10Z ERROR Unable to reconcile Deployment {"controller": "spinapp", "controllerGroup": "core.spinoperator.dev", "controllerKind": "SpinApp", "SpinApp": {"name":"simple-spinapp","namespace":"default"}, "namespace": "default", "name": "simple-spinapp", "reconcileID": "72640040-ef1e-437c-accb-2815effe4d84", "deployment": "simple-spinapp", "error": "Deployment.apps \"simple-spinapp\" is invalid: spec.template.spec.containers[0].ports[1].name: Duplicate value: \"http-app\""}
github.com/spinkube/spin-operator/internal/logging.logrLogger.Error
/home/mossaka/developer/spinkube/spin-operator-msk/internal/logging/logr_logger.go:72
github.com/spinkube/spin-operator/internal/controller.(*SpinAppReconciler).reconcileDeployment
/home/mossaka/developer/spinkube/spin-operator-msk/internal/controller/spinapp_controller.go:337
github.com/spinkube/spin-operator/internal/controller.(*SpinAppReconciler).Reconcile
/home/mossaka/developer/spinkube/spin-operator-msk/internal/controller/spinapp_controller.go:133
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Reconcile
/home/mossaka/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.18.4/pkg/internal/controller/controller.go:114
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler
/home/mossaka/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.18.4/pkg/internal/controller/controller.go:311
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem
/home/mossaka/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.18.4/pkg/internal/controller/controller.go:261
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2.2
/home/mossaka/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.18.4/pkg/internal/controller/controller.go:222
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with internal/controller/spinapp_controller.go at reconcileDeployment (around line 337), then review the local development setup in the README and reproduce the kubectl edit flow. Done means editing the deployment's port no longer causes the SpinApp reconciliation to fail with a duplicate http-app name.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, kubernetes
- Domain
- infrastructure
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100