Peter Toth created SPARK-59540:
----------------------------------
Summary: Warn about deprecated Helm `enable` keys via `NOTES.txt`
Key: SPARK-59540
URL: https://issues.apache.org/jira/browse/SPARK-59540
Project: Spark
Issue Type: Sub-task
Components: Kubernetes
Affects Versions: kubernetes-operator-1.1.0
Reporter: Peter Toth
SPARK-59504 deprecated the Helm values keys
operatorDeployment.networkPolicy.enable and
operatorConfiguration.dynamicConfig.enable in favor of 'enabled'. Both legacy
keys are still honored, and the deprecation is announced in values.yaml,
values.schema.json and docs/operations.md.
'helm install' and 'helm upgrade' print nothing for a values file that still
uses a legacy key. So the deprecation only reaches users who go looking in the
docs. When SPARK-59533 removes the keys in chart 2.0.0, those users lose the
feature with no error. For networkPolicy.enable that means a lost ingress
restriction.
Now that 'enable' is out of the chart defaults, hasKey is an exact presence
signal for a user-supplied legacy key. A templates/NOTES.txt can warn on both
toggles:
{code}
{{- if hasKey .Values.operatorDeployment.networkPolicy "enable" }}
WARNING: `operatorDeployment.networkPolicy.enable` is deprecated, use `enabled`
instead.
It is still honored and will be removed in chart 2.0.0 (SPARK-59533).
{{- end }}
{code}
The chart has no NOTES.txt today and .github/.licenserc.yaml does not exempt
one, so it needs the ASF header. Putting the header inside a Go template
comment keeps it out of the install output while leaving the text in the file
for skywalking-eyes.
Discussed at
https://github.com/apache/spark-kubernetes-operator/pull/825#discussion_r4016813882
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]