Open horis233 opened 3 years ago
Hi @horis233
I was experimenting the same issue that you with envFrom
that is not taken into account by the OLM controller.
After investigating the OLM Subscription
resource. I think a better way is to use the spec.config.env
option because you can also reference a configmap
or a secret
and it provide a more granular configuration (use a key different from the envvar name).
For example:
spec:
config:
env:
- name: DD_API_KEY
valueFrom:
secretKeyRef:
key: api-key
name: my-secret
Bug Report
We claimed subscription config supports the envForm in the doc https://github.com/operator-framework/operator-lifecycle-manager/blob/master/doc/design/subscription-config.md#envfrom, but it doesn't.
What did you do? A clear and concise description of the steps you took (or insert a code snippet).
Add an envFrom into the Subscription config.
What did you expect to see? A clear and concise description of what you expected to happen (or insert a code snippet).
The envFrom is inherited by the operator deployments.
What did you see instead? Under which circumstances? A clear and concise description of what you expected to happen (or insert a code snippet).
It doesn't exist in operator deployments.
Environment
operator-lifecycle-manager version: 0.15.1
Kubernetes version information: Client Version: version.Info{Major:"1", Minor:"18", GitVersion:"v1.18.8", GitCommit:"9f2892aab98fe339f3bd70e3c470144299398ace", GitTreeState:"clean", BuildDate:"2020-08-13T16:12:48Z", GoVersion:"go1.13.15", Compiler:"gc", Platform:"darwin/amd64"} Server Version: version.Info{Major:"1", Minor:"18+", GitVersion:"v1.18.3+ca4017d", GitCommit:"ca4017d", GitTreeState:"clean", BuildDate:"2020-11-14T01:37:24Z", GoVersion:"go1.13.15", Compiler:"gc", Platform:"linux/amd64"}
Kubernetes cluster kind: OCP Possible Solution
It is not included in the
pkg/controller/operators/olm/overrides/config.go
when it copies the subscription config.Additional context Add any other context about the problem here.