Skip to content

Commit 9ac6e9b

Browse files
committed
chore(spark): add spark plans
1 parent c321885 commit 9ac6e9b

25 files changed

Lines changed: 675 additions & 15 deletions
File renamed without changes.

addons/spark/3.4/plans/standard-512/create-instance-schema.json renamed to addons/spark/3.4/plans/standard-16c32g5w/create-instance-schema.json

File renamed without changes.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
name: "standard-16c32g5w"
2+
id: 4840c53b-2765-4d90-b025-f6a4cba50617
3+
description: "Spark standard-16c32g5w plan which limit resources 16 cores 32G memory 5 workers."
4+
displayName: "standard-16c32g5w"
5+
bindable: true
6+
maximum_polling_duration: 1800
Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
## @param fullnameOverride String to fully override common.names.fullname template
2+
##
3+
fullnameOverride: "hb-spark-standard-16c32g5w"
4+
5+
## Spark master specific configuration
6+
##
7+
master:
8+
## @param master.daemonMemoryLimit Set the memory limit for the master daemon
9+
##
10+
daemonMemoryLimit: ""
11+
## @param master.configOptions Use a string to set the config options for in the form "-Dx=y"
12+
##
13+
configOptions: ""
14+
## @param master.extraEnvVars Extra environment variables to pass to the master container
15+
## For example:
16+
## extraEnvVars:
17+
## - name: SPARK_DAEMON_JAVA_OPTS
18+
## value: -Dx=y
19+
##
20+
## Container resource requests and limits
21+
## ref: https://kubernetes.io/docs/user-guide/compute-resources/
22+
## We usually recommend not to specify default resources and to leave this as a conscious
23+
## choice for the user. This also increases chances charts run on environments with little
24+
## resources, such as Minikube. If you do want to specify resources, uncomment the following
25+
## lines, adjust them as necessary, and remove the curly braces after 'resources:'.
26+
## @param master.resources.limits The resources limits for the container
27+
## @param master.resources.requests The requested resources for the container
28+
##
29+
resources:
30+
limits:
31+
cpu: 16000m
32+
memory: 32Gi
33+
requests:
34+
cpu: 4000m
35+
memory: 16Gi
36+
37+
## @section Spark worker parameters
38+
##
39+
40+
## Spark worker specific configuration
41+
##
42+
worker:
43+
## @param worker.daemonMemoryLimit Set the memory limit for the worker daemon
44+
##
45+
daemonMemoryLimit: ""
46+
## @param worker.memoryLimit Set the maximum memory the worker is allowed to use
47+
##
48+
memoryLimit: ""
49+
## @param worker.coreLimit Se the maximum number of cores that the worker can use
50+
##
51+
coreLimit: ""
52+
javaOptions: ""
53+
## @param worker.configOptions Set extra options to configure the worker in the form `-Dx=y`
54+
##
55+
configOptions: ""
56+
## @param worker.extraEnvVars An array to add extra env vars
57+
## For example:
58+
## extraEnvVars:
59+
## - name: SPARK_DAEMON_JAVA_OPTS
60+
## value: -Dx=y
61+
62+
## @param worker.replicaCount Number of spark workers (will be the minimum number when autoscaling is enabled)
63+
##
64+
replicaCount: 5
65+
## Container resource requests and limits
66+
## ref: https://kubernetes.io/docs/user-guide/compute-resources/
67+
## We usually recommend not to specify default resources and to leave this as a conscious
68+
## choice for the user. This also increases chances charts run on environments with little
69+
## resources, such as Minikube. If you do want to specify resources, uncomment the following
70+
## lines, adjust them as necessary, and remove the curly braces after 'resources:'.
71+
## @param worker.resources.limits The resources limits for the container
72+
## @param worker.resources.requests The requested resources for the container
73+
##
74+
resources:
75+
limits:
76+
cpu: 16000m
77+
memory: 32Gi
78+
requests:
79+
cpu: 4000m
80+
memory: 16Gi
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
credential:
2+
{{- if (eq .Values.service.type "LoadBalancer") }}
3+
- name: MASTER_HOST
4+
valueFrom:
5+
serviceRef:
6+
name: {{ printf "%s-master-svc" (include "common.names.fullname" .) }}
7+
jsonpath: '{ .status.loadBalancer.ingress[*].ip }'
8+
{{- else if (eq .Values.service.type "ClusterIP") }}
9+
- name: HOST
10+
valueFrom:
11+
serviceRef:
12+
name: {{ printf "%s-master-svc" (include "common.names.fullname" .) }}
13+
jsonpath: '{ .spec.clusterIP }'
14+
{{- end }}
15+
16+
- name: MASTER_PORT
17+
valueFrom:
18+
serviceRef:
19+
name: {{ printf "%s-master-svc" (include "common.names.fullname" .) }}
20+
jsonpath: '{ .spec.ports[?(@.name=="cluster")].port }'
21+
22+
{{- if .Values.security.ssl.enabled }}
23+
- name: HTTPS_PORT
24+
valueFrom:
25+
serviceRef:
26+
name: {{ printf "%s-master-svc" (include "common.names.fullname" .) }}
27+
jsonpath: '{ .spec.ports[?(@.name=="https")].port }'
28+
{{- else }}
29+
- name: HTTP_PORT
30+
valueFrom:
31+
serviceRef:
32+
name: {{ printf "%s-master-svc" (include "common.names.fullname" .) }}
33+
jsonpath: '{ .spec.ports[?(@.name=="http")].port }'
34+
{{- end }}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"$schema": "http://json-schema.org/draft-04/schema#",
3+
"type": "object",
4+
"properties": {
5+
"imagePullPolicy": {
6+
"type": "string",
7+
"enum": ["Always", "IfNotPresent", "Never"],
8+
"default": "IfNotPresent",
9+
"title": "Image pull policy"
10+
}
11+
}
12+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
name: "standard-1c2g2w"
2+
id: c9c096e8-55a1-4b17-aa7a-5129b1852207
3+
description: "Spark standard-1c2g2w plan which limit resources 1 coreS 2G memory 2 workers."
4+
displayName: "standard-1c2g2w"
5+
bindable: true
6+
maximum_polling_duration: 1800

addons/spark/3.4/plans/standard-512/values.yaml renamed to addons/spark/3.4/plans/standard-1c2g2w/values.yaml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
## @param fullnameOverride String to fully override common.names.fullname template
22
##
3-
fullnameOverride: "hb-spark-standard-512"
3+
fullnameOverride: "hb-spark-standard-1c2g2w"
44

55
## Spark master specific configuration
66
##
@@ -28,11 +28,11 @@ master:
2828
##
2929
resources:
3030
limits:
31-
cpu: 250m
32-
memory: 512Mi
31+
cpu: 1000m
32+
memory: 2Gi
3333
requests:
34-
cpu: 250m
35-
memory: 256Mi
34+
cpu: 500m
35+
memory: 1Gi
3636

3737
## @section Spark worker parameters
3838
##
@@ -73,8 +73,8 @@ worker:
7373
##
7474
resources:
7575
limits:
76-
cpu: 250m
77-
memory: 512Mi
76+
cpu: 1000m
77+
memory: 2Gi
7878
requests:
79-
cpu: 250m
80-
memory: 256Mi
79+
cpu: 500m
80+
memory: 1Gi
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
credential:
2+
{{- if (eq .Values.service.type "LoadBalancer") }}
3+
- name: MASTER_HOST
4+
valueFrom:
5+
serviceRef:
6+
name: {{ printf "%s-master-svc" (include "common.names.fullname" .) }}
7+
jsonpath: '{ .status.loadBalancer.ingress[*].ip }'
8+
{{- else if (eq .Values.service.type "ClusterIP") }}
9+
- name: HOST
10+
valueFrom:
11+
serviceRef:
12+
name: {{ printf "%s-master-svc" (include "common.names.fullname" .) }}
13+
jsonpath: '{ .spec.clusterIP }'
14+
{{- end }}
15+
16+
- name: MASTER_PORT
17+
valueFrom:
18+
serviceRef:
19+
name: {{ printf "%s-master-svc" (include "common.names.fullname" .) }}
20+
jsonpath: '{ .spec.ports[?(@.name=="cluster")].port }'
21+
22+
{{- if .Values.security.ssl.enabled }}
23+
- name: HTTPS_PORT
24+
valueFrom:
25+
serviceRef:
26+
name: {{ printf "%s-master-svc" (include "common.names.fullname" .) }}
27+
jsonpath: '{ .spec.ports[?(@.name=="https")].port }'
28+
{{- else }}
29+
- name: HTTP_PORT
30+
valueFrom:
31+
serviceRef:
32+
name: {{ printf "%s-master-svc" (include "common.names.fullname" .) }}
33+
jsonpath: '{ .spec.ports[?(@.name=="http")].port }'
34+
{{- end }}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"$schema": "http://json-schema.org/draft-04/schema#",
3+
"type": "object",
4+
"properties": {
5+
"imagePullPolicy": {
6+
"type": "string",
7+
"enum": ["Always", "IfNotPresent", "Never"],
8+
"default": "IfNotPresent",
9+
"title": "Image pull policy"
10+
}
11+
}
12+
}

0 commit comments

Comments
 (0)