-
Bug
-
Resolution: Done
-
Undefined
-
None
-
None
-
None
https://github.com/operator-framework/operator-sdk/issues/5038
What did you do?
Running a Helm chart from an ansible-operator using community.kubernetes.helm module.h4. What did you expect to see?
Owner reference is injected for the Helm Secret.h4. What did you see instead? Under which circumstances?
Owner reference is only injected for the resources created by the Helm chart, but not for the Secret containing Helm metadata (type helm.sh/release.v1). The Helm secret (release) is not removed when CR is deleted and the chart is not reinstalled when the CR is recreated.h4. Environment
Operator type:
/language ansible|
Kubernetes cluster type:
On OpenShift 4.7.16
$ operator-sdk version
operator-sdk version: "v1.8.0", commit: "d3bd87c6900f70b7df618340e1d63329c7cd651e", kubernetes version: "v1.20.2", go version: "go1.16.4", GOOS: "darwin", GOARCH: "amd64"
$ go version (if language is Go)
go version go1.16.4 darwin/amd64
$ oc version
Client Version: 4.7.3
Server Version: 4.7.16
Kubernetes Version: v1.20.0+2817867h4. Possible Solution
The proxy inject injection code assumes that the metadata.namespace is set in the manifest. But in this case Helm does POST /api/v1/namespaces/mynamespace/secrets and doesn't set the namespace in metadata. Kubernetes accepts it, but the owner injection doesn't happen.|