You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit df96061
Browse filesBrowse the repository at this point in the historyBrowse files
[SPARK-59504] Use enabled key convention in Helm values.yaml while honoring legacy enable
### What changes were proposed in this pull request?
This PR aims to use the `enabled` key convention in the Helm chart `values.yaml` while still honoring the legacy `enable` keys.
- `operatorDeployment.networkPolicy.enable` → `operatorDeployment.networkPolicy.enabled`
- `operatorConfiguration.dynamicConfig.enable` → `operatorConfiguration.dynamicConfig.enabled`
Two helpers in `_helpers.tpl` resolve each toggle to `true` when either the new or the legacy key is `true`, and all templates use them. The legacy keys stay valid in `values.schema.json`, marked as deprecated, and will be removed in chart `2.0.0`.
### Why are the changes needed?
`<feature>.enabled` is the common Helm convention, and the operator's runtime property is already `spark.kubernetes.operator.dynamicConfig.enabled`. Resolving with `or` keeps existing `enable: true` users working because the chart default `enabled: false` is always merged and cannot be distinguished from a user-supplied value.
### Does this PR introduce _any_ user-facing change?
Yes, compared to [v1.0.0 (2026-07-23)](https://github.com/apache/spark-kubernetes-operator/releases/tag/1.0.0). New users should use `enabled`. Existing values files with `enable` keep working without modification.
### How was this patch tested?
- `helm lint --strict` passes.
- Rendered with `helm template` for default, `enabled=true`, legacy `enable=true`, and legacy `enable=false` and confirmed the expected resources and properties.
- Added a CI step in the `lint` job that renders the chart with the legacy `enable` keys and asserts they are still honored.
- Existing Helm and E2E tests cover the new `enabled` keys.
### Was this patch authored or co-authored using generative AI tooling?
Generated-by: Claude Fable 5.1
Closes#825 from dongjoon-hyun/SPARK-59504.
Authored-by: Dongjoon Hyun <dongjoon@apache.org>
Signed-off-by: Dongjoon Hyun <dongjoon@apache.org>
Copy file name to clipboardExpand all lines: build-tools/helm/spark-kubernetes-operator/values.schema.json
+12-4Lines changed: 12 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -396,13 +396,17 @@
396
396
"type": "object",
397
397
"description": "NetworkPolicy for the operator pod",
398
398
"required": [
399
-
"enable"
399
+
"enabled"
400
400
],
401
401
"properties": {
402
-
"enable": {
402
+
"enabled": {
403
403
"type": "boolean",
404
404
"description": "Whether to create a NetworkPolicy for the operator pod"
405
405
},
406
+
"enable": {
407
+
"type": "boolean",
408
+
"description": "Deprecated, use 'enabled' instead; still honored (the NetworkPolicy is created when either key is true) and will be removed in chart 2.0.0 (SPARK-59533)"
409
+
},
406
410
"metricsIngress": {
407
411
"type": ["array", "null"],
408
412
"description": "List of NetworkPolicyPeer(s) allowed to reach the metrics port; when empty, ingress to the metrics port is denied",
@@ -818,16 +822,20 @@
818
822
"type": "object",
819
823
"description": "Dynamic configuration",
820
824
"required": [
821
-
"enable",
825
+
"enabled",
822
826
"create",
823
827
"annotations",
824
828
"data"
825
829
],
826
830
"properties": {
827
-
"enable": {
831
+
"enabled": {
828
832
"type": "boolean",
829
833
"description": "Enable dynamic configuration"
830
834
},
835
+
"enable": {
836
+
"type": "boolean",
837
+
"description": "Deprecated, use 'enabled' instead; still honored (dynamic configuration is enabled when either key is true) and will be removed in chart 2.0.0 (SPARK-59533)"
838
+
},
831
839
"create": {
832
840
"type": "boolean",
833
841
"description": "Create ConfigMap for dynamic configuration"
Copy file name to clipboardExpand all lines: docs/operations.md
+9-2Lines changed: 9 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -133,7 +133,8 @@ following table:
133
133
| operatorConfiguration.spark-operator.properties | The default operator configuration. ||
134
134
| operatorConfiguration.metrics.properties | The default operator metrics (sink) configuration. ||
135
135
| operatorConfiguration.dynamicConfig.create | If set to true, a config map would be created & watched by operator as source of truth for hot properties loading. | false |
136
-
| operatorConfiguration.dynamicConfig.enable | If set to true, operator would honor the created config map as source of truth for hot properties loading. | false |
136
+
| operatorConfiguration.dynamicConfig.enabled | If set to true, operator would honor the created config map as source of truth for hot properties loading. | false |
137
+
| operatorConfiguration.dynamicConfig.enable | Deprecated, use `operatorConfiguration.dynamicConfig.enabled`. Still honored: `enable: true` wins over `enabled: false`. Removed in chart 2.0.0 (SPARK-59533). ||
137
138
| operatorConfiguration.dynamicConfig.annotations | Annotations to be applied for the dynamicConfig resources. |`"helm.sh/resource-policy": keep`|
138
139
| operatorConfiguration.dynamicConfig.data | Data field (key-value pairs) that acts as hot properties in the config map. |`spark.kubernetes.operator.reconciler.intervalSeconds: "60"`|
139
140
@@ -154,7 +155,7 @@ for the operator pod:
154
155
```yaml
155
156
operatorDeployment:
156
157
networkPolicy:
157
-
enable: true
158
+
enabled: true
158
159
metricsIngress:
159
160
- namespaceSelector:
160
161
matchLabels:
@@ -174,6 +175,12 @@ Note that this requires a CNI plugin that enforces NetworkPolicy; on clusters wi
174
175
a plugin the policy is silently ignored. Egress traffic of the operator (Kubernetes API
175
176
server, DNS) is not restricted by this policy.
176
177
178
+
The legacy key `operatorDeployment.networkPolicy.enable` is deprecated in favor of `enabled`
179
+
and will be removed in chart `2.0.0` ([SPARK-59533](https://issues.apache.org/jira/browse/SPARK-59533)).
180
+
It is still honored: the NetworkPolicy is created when either key is `true`, so a stale
181
+
`enable: true` in a base values file wins over `enabled: false` and must be removed to turn
182
+
the feature off. The same rule applies to `operatorConfiguration.dynamicConfig.enable`.
183
+
177
184
## Operator Health(Liveness) Probe with Sentinel Resource
0 commit comments