peter-toth opened a new pull request, #830:
URL: https://github.com/apache/spark-kubernetes-operator/pull/830

   ### What changes were proposed in this pull request?
   
   This PR adds `templates/NOTES.txt` to the Helm chart. It prints a 
deprecation warning when a values file still carries 
`operatorDeployment.networkPolicy.enable` or 
`operatorConfiguration.dynamicConfig.enable`, the legacy keys that 
[SPARK-59504](https://issues.apache.org/jira/browse/SPARK-59504) replaced with 
`enabled`.
   
   `hasKey` is an exact presence signal for these two, because SPARK-59504 
removed `enable` from the chart defaults. A key set to `false` still warns: the 
deprecation is about the key, not its value.
   
   The ASF header sits inside a `{{- /* ... */ -}}` comment, so 
`skywalking-eyes` sees it and `helm install` does not print it.
   
   ### Why are the changes needed?
   
   The deprecation is announced in `values.yaml`, `values.schema.json` and 
`docs/operations.md`, but `helm install` and `helm upgrade` say nothing. Docs 
only reach people who go looking. When 
[SPARK-59533](https://issues.apache.org/jira/browse/SPARK-59533) removes the 
keys in chart `2.0.0`, a user still on `networkPolicy.enable: true` loses their 
NetworkPolicy with no error.
   
   ### Does this PR introduce _any_ user-facing change?
   
   Yes. `helm install` and `helm upgrade` now print a NOTES section. Users on 
the current `enabled` keys see one line naming the installed version:
   
   ```
   NOTES:
   Apache Spark Kubernetes Operator 1.1.0-SNAPSHOT is installed.
   ```
   
   Users still on a legacy key additionally get a warning naming the 
replacement and the removal target:
   
   ```
   NOTES:
   Apache Spark Kubernetes Operator 1.1.0-SNAPSHOT is installed.
   
   WARNING: operatorDeployment.networkPolicy.enable is deprecated, use
            operatorDeployment.networkPolicy.enabled instead. The legacy key is 
still honored:
            the NetworkPolicy is created when either key is true. It will be 
removed in chart
            2.0.0, see SPARK-59533.
   ```
   
   ### How was this patch tested?
   
   - `helm lint --strict` passes with the default values and with each legacy 
key set.
   - Rendered the notes for all five combinations and confirmed the warning 
fires on key presence only:
   
   | values | notes |
   |---|---|
   | defaults | no warning |
   | `networkPolicy.enable=true` | networkPolicy warning |
   | `dynamicConfig.enable=true` | dynamicConfig warning |
   | both legacy keys set to `false` | both warnings |
   | both new `enabled` keys set | no warning |
   
   - New `Validate the deprecated helm key warning` step in the `helm-tests / 
configmap-metadata` job: upgrades with both legacy keys and asserts both 
warnings are printed, then upgrades back to the default values and fails if any 
warning is printed. `helm template` does not render `NOTES.txt`, so a real 
cluster is the only place this is observable.
   
   ### Was this patch authored or co-authored using generative AI tooling?
   
   Generated-by: Claude Opus 5
   


-- 
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