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
Add optional spec.timestampPrecision to configure the precision of the timestamp suffix
appended to generated SparkApplication names for scheduled runs. Default remains 'nanos'
for backward compatibility. Adds 'minutes' option to match CronJob granularity and keep
generated names short.
Includes helper function, unit tests and optional chart value.
Fixes: #2602
Signed-off-by: rahul810050 <rahul810050@gmail.com>
| controller.logLevel | string |`"info"`| Configure the verbosity of logging, can be one of `debug`, `info`, `error`. |
98
98
| controller.logEncoder | string |`"console"`| Configure the encoder of logging, can be one of `console` or `json`. |
99
-
| controller.driverPodCreationGracePeriod | string |`"10s"`| Grace period after a successful spark-submit when driver pod not found errors will be retried. Useful if the driver pod can take some time to be created. |
100
-
| controller.maxTrackedExecutorPerApp | int |`1000`| Specifies the maximum number of Executor pods that can be tracked by the controller per SparkApplication. |
101
-
| controller.uiService.enable | bool |`true`| Specifies whether to create service for Spark web UI. |
102
-
| controller.uiIngress.enable | bool |`false`| Specifies whether to create ingress for Spark web UI. `controller.uiService.enable` must be `true` to enable ingress. |
103
-
| controller.uiIngress.urlFormat | string |`""`| Ingress URL format. Required if `controller.uiIngress.enable` is true. |
104
-
| controller.uiIngress.ingressClassName | string |`""`| Optionally set the ingressClassName. |
105
-
| controller.uiIngress.tls | list |`[]`| Optionally set default TLS configuration for the Spark UI's ingress. `ingressTLS` in the SparkApplication spec overrides this. |
106
-
| controller.uiIngress.annotations | object |`{}`| Optionally set default ingress annotations for the Spark UI's ingress. `ingressAnnotations` in the SparkApplication spec overrides this. |
107
99
| controller.batchScheduler.enable | bool |`false`| Specifies whether to enable batch scheduler for spark jobs scheduling. If enabled, users can specify batch scheduler name in spark application. |
108
100
| controller.batchScheduler.kubeSchedulerNames | list |`[]`| Specifies a list of kube-scheduler names for scheduling Spark pods. |
109
101
| controller.batchScheduler.default | string |`""`| Default batch scheduler to be used if not specified by the user. If specified, this value must be either "volcano" or "yunikorn". Specifying any other value will cause the controller to error on startup. |
102
+
| controller.scheduledSparkApplication.timestampPrecision | string |`"nanos"`| Default timestamp precision for the ScheduledSparkApplication name suffix. Can be one of `nanos`, `micros`, `millis`, `seconds`, `minutes`. |
110
103
| controller.serviceAccount.create | bool |`true`| Specifies whether to create a service account for the controller. |
111
104
| controller.serviceAccount.name | string |`""`| Optional name for the controller service account. |
112
105
| controller.serviceAccount.annotations | object |`{}`| Extra annotations for the controller service account. |
Copy file name to clipboardExpand all lines: charts/spark-operator-chart/values.yaml
+7-29Lines changed: 7 additions & 29 deletions
Original file line number
Diff line number
Diff line change
@@ -82,35 +82,6 @@ controller:
82
82
# -- Configure the encoder of logging, can be one of `console` or `json`.
83
83
logEncoder: console
84
84
85
-
# -- Grace period after a successful spark-submit when driver pod not found errors will be retried. Useful if the driver pod can take some time to be created.
86
-
driverPodCreationGracePeriod: 10s
87
-
88
-
# -- Specifies the maximum number of Executor pods that can be tracked by the controller per SparkApplication.
89
-
maxTrackedExecutorPerApp: 1000
90
-
91
-
uiService:
92
-
# -- Specifies whether to create service for Spark web UI.
93
-
enable: true
94
-
95
-
uiIngress:
96
-
# -- Specifies whether to create ingress for Spark web UI.
97
-
# `controller.uiService.enable` must be `true` to enable ingress.
98
-
enable: false
99
-
# -- Ingress URL format.
100
-
# Required if `controller.uiIngress.enable` is true.
101
-
urlFormat: ""
102
-
# -- Optionally set the ingressClassName.
103
-
ingressClassName: ""
104
-
# -- Optionally set default TLS configuration for the Spark UI's ingress. `ingressTLS` in the SparkApplication spec overrides this.
105
-
tls: []
106
-
# - hosts:
107
-
# - "*.example.com"
108
-
# secretName: "example-secret"
109
-
# -- Optionally set default ingress annotations for the Spark UI's ingress. `ingressAnnotations` in the SparkApplication spec overrides this.
110
-
annotations: {}
111
-
# key1: value1
112
-
# key2: value2
113
-
114
85
batchScheduler:
115
86
# -- Specifies whether to enable batch scheduler for spark jobs scheduling.
116
87
# If enabled, users can specify batch scheduler name in spark application.
@@ -123,6 +94,12 @@ controller:
123
94
# value will cause the controller to error on startup.
command.Flags().StringVar(&ingressTLSstring, "ingress-tls", "", "JSON format string for the default TLS config on the Spark UI ingresses. e.g. '[{\"hosts\":[\"*.example.com\"],\"secretName\":\"example-secret\"}]'. `ingressTLS` in the SparkApplication spec will override this value.")
168
157
command.Flags().StringVar(&ingressAnnotationsString, "ingress-annotations", "", "JSON format string for the default ingress annotations for the Spark UI ingresses. e.g. '[{\"cert-manager.io/cluster-issuer\": \"letsencrypt\"}]'. `ingressAnnotations` in the SparkApplication spec will override this value.")
169
158
159
+
// New flag for scheduled SA timestamp precision
160
+
command.Flags().StringVar(&scheduledSATimestampPrecision, "scheduled-sa-timestamp-precision", "", "Default timestamp precision for ScheduledSparkApplication run name suffixes. One of: nanos,micros,millis,seconds,minutes. If unset, defaults to nanos.")
161
+
170
162
command.Flags().BoolVar(&enableLeaderElection, "leader-election", false, "Enable leader election for controller manager. "+
171
163
"Enabling this will ensure there is only one active controller manager.")
172
164
command.Flags().StringVar(&leaderElectionLockName, "leader-election-lock-name", "spark-operator-lock", "Name of the ConfigMap for leader election.")
@@ -232,17 +224,6 @@ func start() {
232
224
LeaseDuration: &leaderElectionLeaseDuration,
233
225
RenewDeadline: &leaderElectionRenewDeadline,
234
226
RetryPeriod: &leaderElectionRetryPeriod,
235
-
// LeaderElectionReleaseOnCancel defines if the leader should step down voluntarily
236
-
// when the Manager ends. This requires the binary to immediately end when the
237
-
// Manager is stopped, otherwise, this setting is unsafe. Setting this significantly
238
-
// speeds up voluntary leader transitions as the new leader don't have to wait
239
-
// LeaseDuration time first.
240
-
//
241
-
// In the default scaffold provided, the program ends immediately after
242
-
// the manager stops, so would be fine to enable this option. However,
243
-
// if you are doing or is intended to do any operation such as perform cleanups
244
-
// after the manager stops then its usage might be unsafe.
0 commit comments