operator-sdk
operator-sdk copied to clipboard
after init of the project Makefile doesn't have proper bundle target
Bug Report
What did you do?
after initializing helm based operator project by command
operator-sdk init --plugins helm --domain $(DOMAIN) --group $(GROUP) --version $(APIVERSION) --kind $(KIND) --helm-chart=../charts/$@/ --project-name prefix-$@
Makefile doesn't have proper bundle target with right option. current code - https://github.com/operator-framework/operator-sdk/blob/025df62736f9e98ad22af1384f1d67d96cbcb7ee/internal/plugins/manifests/v2/init.go#L185
Which should be:
- $(KUSTOMIZE) build config/manifests | operator-sdk generate bundle -q --overwrite --version $(VERSION) $(BUNDLE_METADATA_OPTS)
+ $(KUSTOMIZE) build config/manifests | operator-sdk generate bundle $(BUNDLE_GEN_FLAGS)
Like on the line https://github.com/operator-framework/operator-sdk/blob/025df62736f9e98ad22af1384f1d67d96cbcb7ee/internal/plugins/manifests/v2/init.go#L176
What did you expect to see?
digests injected to the manifests properly.
What did you see instead? Under which circumstances?
image tags are used instead of digests
Environment
Operator type: /language helm
Kubernetes cluster type:
OpenShift
$ operator-sdk version
operator-sdk version: "v1.22.2", commit: "da3346113a8a75e11225f586482934000504a60f", kubernetes version: "1.24.1", go version: "go1.18.4", GOOS: "darwin", GOARCH: "amd64"
$ kubectl version
Client Version: version.Info{Major:"1", Minor:"20+", GitVersion:"v1.20.8-dispatcher", GitCommit:"283881f025da4f5b3cefb6cd4c35f2ee4c2a79b8", GitTreeState:"clean", BuildDate:"2021-09-14T05:14:54Z", GoVersion:"go1.15.13", Compiler:"gc", Platform:"darwin/amd64"}
Possible Solution
Update current code - https://github.com/operator-framework/operator-sdk/blob/025df62736f9e98ad22af1384f1d67d96cbcb7ee/internal/plugins/manifests/v2/init.go#L185
to following:
- $(KUSTOMIZE) build config/manifests | operator-sdk generate bundle -q --overwrite --version $(VERSION) $(BUNDLE_METADATA_OPTS)
+ $(KUSTOMIZE) build config/manifests | operator-sdk generate bundle $(BUNDLE_GEN_FLAGS)
Additional context
N/A