Skip to content

Commit

Permalink
Update helm charts
Browse files Browse the repository at this point in the history
Signed-off-by: Yi Chen <[email protected]>
  • Loading branch information
ChenYi015 committed Aug 1, 2024
1 parent 54b1273 commit 58c29f7
Show file tree
Hide file tree
Showing 53 changed files with 3,732 additions and 1,554 deletions.
40 changes: 34 additions & 6 deletions charts/spark-operator-chart/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,39 @@
#
# Copyright 2024 The Kubeflow authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

apiVersion: v2

name: spark-operator
description: A Helm chart for Spark on Kubernetes operator
version: 1.4.6
appVersion: v1beta2-1.6.2-3.5.0

description: A Helm chart for Spark on Kubernetes operator.

version: 2.0.0-rc.0

appVersion: 2.0.0-rc.0

keywords:
- spark
- apache spark
- big data

home: https://github.com/kubeflow/spark-operator

maintainers:
- name: yuchaoran2011
email: [email protected]
- name: yuchaoran2011
email: [email protected]
url: https://github.com/yuchaoran2011
- name: ChenYi015
email: [email protected]
url: https://github.com/ChenYi015
161 changes: 88 additions & 73 deletions charts/spark-operator-chart/README.md

Large diffs are not rendered by default.

10 changes: 3 additions & 7 deletions charts/spark-operator-chart/README.md.gotmpl
Original file line number Diff line number Diff line change
Expand Up @@ -43,20 +43,16 @@ See [helm repo](https://helm.sh/docs/helm/helm_repo) for command documentation.
helm install [RELEASE_NAME] spark-operator/spark-operator
```

For example, if you want to create a release with name `spark-operator` in the `default` namespace:

```shell
helm install spark-operator spark-operator/spark-operator
```

Note that `helm` will fail to install if the namespace doesn't exist. Either create the namespace beforehand or pass the `--create-namespace` flag to the `helm install` command.
For example, if you want to create a release with name `spark-operator` in the `spark-operator` namespace:

```shell
helm install spark-operator spark-operator/spark-operator \
--namespace spark-operator \
--create-namespace
```

Note that by passing the `--create-namespace` flag to the `helm install` command, `helm` will create the release namespace if it does not exist.

See [helm install](https://helm.sh/docs/helm/helm_install) for command documentation.

### Upgrade the chart
Expand Down
2 changes: 1 addition & 1 deletion charts/spark-operator-chart/ci/ci-values.yaml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
image:
tag: "local"
tag: local
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ spec:
name: v1beta2
schema:
openAPIV3Schema:
description: ScheduledSparkApplication is the Schema for the scheduledsparkapplications
API.
properties:
apiVersion:
description: |-
Expand All @@ -55,6 +57,8 @@ spec:
metadata:
type: object
spec:
description: ScheduledSparkApplicationSpec defines the desired state of
ScheduledSparkApplication.
properties:
concurrencyPolicy:
description: ConcurrencyPolicy is the policy governing concurrent
Expand Down Expand Up @@ -4883,7 +4887,7 @@ spec:
serviceLabels:
additionalProperties:
type: string
description: ServiceLables is a map of key,value pairs of
description: ServiceLabels is a map of key,value pairs of
labels that might be added to the service object.
type: object
servicePort:
Expand Down Expand Up @@ -9820,7 +9824,7 @@ spec:
serviceLabels:
additionalProperties:
type: string
description: ServiceLables is a map of key,value pairs of
description: ServiceLabels is a map of key,value pairs of
labels that might be added to the service object.
type: object
servicePort:
Expand Down Expand Up @@ -11563,6 +11567,8 @@ spec:
- template
type: object
status:
description: ScheduledSparkApplicationStatus defines the observed state
of ScheduledSparkApplication.
properties:
lastRun:
description: LastRun is the time when the last run of the application
Expand Down Expand Up @@ -11601,9 +11607,6 @@ spec:
application.
type: string
type: object
required:
- metadata
- spec
type: object
served: true
storage: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,7 @@ spec:
name: v1beta2
schema:
openAPIV3Schema:
description: SparkApplication represents a Spark application running on and
using Kubernetes as a cluster manager.
description: SparkApplication is the Schema for the sparkapplications API
properties:
apiVersion:
description: |-
Expand All @@ -58,7 +57,7 @@ spec:
type: object
spec:
description: |-
SparkApplicationSpec describes the specification of a Spark application using Kubernetes as a cluster manager.
SparkApplicationSpec defines the desired state of SparkApplication
It carries every pieces of information a spark-submit command takes and recognizes.
properties:
arguments:
Expand Down Expand Up @@ -4827,7 +4826,7 @@ spec:
serviceLabels:
additionalProperties:
type: string
description: ServiceLables is a map of key,value pairs of labels
description: ServiceLabels is a map of key,value pairs of labels
that might be added to the service object.
type: object
servicePort:
Expand Down Expand Up @@ -9734,7 +9733,7 @@ spec:
serviceLabels:
additionalProperties:
type: string
description: ServiceLables is a map of key,value pairs of labels
description: ServiceLabels is a map of key,value pairs of labels
that might be added to the service object.
type: object
servicePort:
Expand Down Expand Up @@ -11466,8 +11465,7 @@ spec:
- type
type: object
status:
description: SparkApplicationStatus describes the current status of a
Spark application.
description: SparkApplicationStatus defines the observed state of SparkApplication
properties:
applicationState:
description: AppState tells the overall application state.
Expand All @@ -11487,15 +11485,15 @@ spec:
podName:
type: string
webUIAddress:
description: UI Details for the UI created via ClusterIP service
accessible from within the cluster.
type: string
webUIIngressAddress:
type: string
webUIIngressName:
description: Ingress Details if an ingress for the UI was created.
type: string
webUIPort:
description: UI Details for the UI created via ClusterIP service
accessible from within the cluster.
format: int32
type: integer
webUIServiceName:
Expand Down Expand Up @@ -11543,9 +11541,6 @@ spec:
required:
- driverInfo
type: object
required:
- metadata
- spec
type: object
served: true
storage: true
Expand Down
45 changes: 22 additions & 23 deletions charts/spark-operator-chart/templates/_helpers.tpl
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
{{/*
Copyright 2024 The Kubeflow authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/}}

{{/* vim: set filetype=mustache: */}}
{{/*
Expand the name of the chart.
Expand Down Expand Up @@ -37,13 +53,13 @@ Common labels
{{- define "spark-operator.labels" -}}
helm.sh/chart: {{ include "spark-operator.chart" . }}
{{ include "spark-operator.selectorLabels" . }}
{{- if .Values.commonLabels }}
{{ toYaml .Values.commonLabels }}
{{- end }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- with .Values.commonLabels }}
{{ toYaml . }}
{{- end }}
{{- end }}

{{/*
Expand All @@ -55,25 +71,8 @@ app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}

{{/*
Create the name of the service account to be used by the operator
Spark Operator image
*/}}
{{- define "spark-operator.serviceAccountName" -}}
{{- if .Values.serviceAccounts.sparkoperator.create -}}
{{ default (include "spark-operator.fullname" .) .Values.serviceAccounts.sparkoperator.name }}
{{- else -}}
{{ default "default" .Values.serviceAccounts.sparkoperator.name }}
{{- define "spark-operator.image" -}}
{{ printf "%s/%s:%s" .Values.image.registry .Values.image.repository (.Values.image.tag | default .Chart.AppVersion) }}
{{- end -}}
{{- end -}}

{{/*
Create the name of the service account to be used by spark apps
*/}}
{{- define "spark.serviceAccountName" -}}
{{- if .Values.serviceAccounts.spark.create -}}
{{- $sparkServiceaccount := printf "%s-%s" .Release.Name "spark" -}}
{{ default $sparkServiceaccount .Values.serviceAccounts.spark.name }}
{{- else -}}
{{ default "default" .Values.serviceAccounts.spark.name }}
{{- end -}}
{{- end -}}

70 changes: 70 additions & 0 deletions charts/spark-operator-chart/templates/controller/_helpers.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
{{/*
Copyright 2024 The Kubeflow authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/}}

{{/*
Create the name of controller component
*/}}
{{- define "spark-operator.controller.name" -}}
{{- include "spark-operator.fullname" . }}-controller
{{- end -}}

{{/*
Common labels for the controller
*/}}
{{- define "spark-operator.controller.labels" -}}
{{ include "spark-operator.labels" . }}
app.kubernetes.io/component: controller
{{- end -}}

{{/*
Selector labels for the controller
*/}}
{{- define "spark-operator.controller.selectorLabels" -}}
{{ include "spark-operator.selectorLabels" . }}
app.kubernetes.io/component: controller
{{- end -}}

{{/*
Create the name of the service account to be used by the controller
*/}}
{{- define "spark-operator.controller.serviceAccountName" -}}
{{- if .Values.controller.serviceAccount.create -}}
{{ .Values.controller.serviceAccount.name | default (include "spark-operator.controller.name" .) }}
{{- else -}}
{{ .Values.controller.serviceAccount.name | default "default" }}
{{- end -}}
{{- end -}}

{{/*
Create the name of the deployment to be used by controller
*/}}
{{- define "spark-operator.controller.deploymentName" -}}
{{ include "spark-operator.controller.name" . }}
{{- end -}}

{{/*
Create the name of the lease resource to be used by leader election
*/}}
{{- define "spark-operator.controller.leaderElectionName" -}}
{{ include "spark-operator.controller.name" . }}-lock
{{- end -}}

{{/*
Create the name of the pod disruption budget to be used by controller
*/}}
{{- define "spark-operator.controller.podDisruptionBudgetName" -}}
{{ include "spark-operator.controller.name" . }}-pdb
{{- end -}}
Loading

0 comments on commit 58c29f7

Please sign in to comment.