younsl opened a new pull request, #426:
URL: https://github.com/apache/superset-kubernetes-operator/pull/426

   ## Summary
   
   Add an optional extraEnv value for the operator manager container. Today the 
container only receives the chart-managed WATCH_NAMESPACE, so clusters that 
route egress through an HTTP proxy, or that want 
[GOMEMLIMIT](https://pkg.go.dev/runtime#hdr-Environment_Variables) tied to the 
container memory limit, have no way to set environment variables on the 
operator, and extraManifests cannot patch the Deployment. The value defaults to 
an empty list, so the rendered manifest is unchanged.
   
   ## Details
   
   - The Deployment template appends extraEnv after WATCH_NAMESPACE and renders 
the env block only when either is present. Entries are passed through as 
[EnvVar](https://pkg.go.dev/k8s.io/api/core/v1#EnvVar), so both literal values 
and valueFrom (for example resourceFieldRef on limits.memory) work.
   - [values.schema.json](https://helm.sh/docs/topics/charts/#schema-files) 
keeps the block strict (name, value, valueFrom) and rejects WATCH_NAMESPACE as 
a name, because the watch block owns namespace scoping and a duplicate entry 
would silently override it.
   - The chart README is regenerated with 
[helm-docs](https://github.com/norwoodj/helm-docs). The full-options test 
values set the key so the values coverage check passes, and the snapshot gains 
the entries. Focused tests cover the default (no env), extraEnv alone, ordering 
after WATCH_NAMESPACE, and the schema rejection.
   - The changelog entry is added under Unreleased.
   
   <details>
   <summary>Verification</summary>
   
   - [helm-unittest](https://github.com/helm-unittest/helm-unittest): 35 tests 
and 26 snapshots pass.
   - helm lint strict and [kubeconform](https://github.com/yannh/kubeconform) 
strict pass for the default and full-options values (10 and 16 resources, the 
ServiceMonitor skipped for lack of a schema).
   - make helm-lint, make helm-values-covered, make lint-md, and make codegen 
(no diff beyond the regenerated README) pass.
   - kind cluster with the 0.3.0 image, watch scope namespaces, and extraEnv 
set to TZ and a GOMEMLIMIT resourceFieldRef: the manager pod becomes Ready, its 
env lists WATCH_NAMESPACE first followed by both extra entries, the operator 
still logs watching namespaces team-a, and log timestamps switch to +09:00, 
confirming TZ reaches the process.
   - helm template with WATCH_NAMESPACE in extraEnv fails schema validation at 
/extraEnv/0/name.
   
   </details>
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to