This is an automated email from the ASF dual-hosted git repository.
agrove pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/arrow-ballista.git
The following commit(s) were added to refs/heads/master by this push:
new 6b997809 Add helm chart (#322)
6b997809 is described below
commit 6b997809e4d02c6940ac350cc5730b8ab58ddc82
Author: Brent Gardner <[email protected]>
AuthorDate: Mon Oct 10 11:39:49 2022 -0700
Add helm chart (#322)
---
dev/release/rat_exclude_files.txt | 1 +
helm/README.md | 73 +++++++++++++
helm/ballista/.gitignore | 3 +
helm/ballista/.helmignore | 37 +++++++
helm/ballista/Chart.lock | 6 ++
helm/ballista/Chart.yaml | 45 ++++++++
helm/ballista/templates/NOTES.txt | 40 +++++++
helm/ballista/templates/_helpers.tpl | 77 ++++++++++++++
helm/ballista/templates/executor.yaml | 105 +++++++++++++++++++
helm/ballista/templates/hpa.yaml | 44 ++++++++
helm/ballista/templates/ingress.yaml | 77 ++++++++++++++
helm/ballista/templates/scheduler.yaml | 104 ++++++++++++++++++
helm/ballista/templates/serviceaccount.yaml | 28 +++++
helm/ballista/templates/tests/test-connection.yaml | 31 ++++++
helm/ballista/values.yaml | 116 +++++++++++++++++++++
15 files changed, 787 insertions(+)
diff --git a/dev/release/rat_exclude_files.txt
b/dev/release/rat_exclude_files.txt
index 2f847b95..d1ee673d 100644
--- a/dev/release/rat_exclude_files.txt
+++ b/dev/release/rat_exclude_files.txt
@@ -94,6 +94,7 @@ dev/tasks/linux-packages/apache-arrow/debian/source/format
dev/tasks/linux-packages/apache-arrow/debian/watch
dev/tasks/requirements*.txt
dev/tasks/conda-recipes/*
+helm/ballista/Chart.lock
pax_global_header
MANIFEST.in
__init__.pxd
diff --git a/helm/README.md b/helm/README.md
new file mode 100644
index 00000000..7be9832b
--- /dev/null
+++ b/helm/README.md
@@ -0,0 +1,73 @@
+<!---
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you 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
+
+ http://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.
+-->
+
+# Ballista Helm Chart
+
+Helm is a convenient way to install applications into Kubernetes. It can work
against any Kubeneretes environement,
+including all the major cloud providers.
+For the purposes of this documentation, we will use Kubernetes-in-Docker
(kind) to install locally.
+
+## Prerequisites
+
+```shell
+sudo apt install docker.io docker-compose
+sudo snap install go kubectl helm --classic
+go install sigs.k8s.io/[email protected]
+~/go/bin/kind create cluster
+```
+
+## Build
+
+```shell
+dev/build-ballista-docker.sh
+```
+
+## Deploy
+
+```shell
+# See https://iximiuz.com/en/posts/kubernetes-kind-load-docker-image/
+#
https://kind.sigs.k8s.io/docs/user/quick-start/#loading-an-image-into-your-cluster
+~/go/bin/kind load docker-image ballista-scheduler:latest
+~/go/bin/kind load docker-image ballista-executor:latest
+
+cd helm/ballista
+helm repo add bitnami https://charts.bitnami.com/bitnami
+helm dep update
+helm dep build
+helm install ballista .
+```
+
+## Access Scheduler Web UI
+
+Run the following command to redirect localhost port 8080 to port 80 in the
scheduler container and then view the scheduler UI at http://localhost:8080.
+
+kubectl port-forward ballista-scheduler-0 8080:80
+
+## Connect
+
+```shell
+kubectl port-forward ballista-scheduler-0 50050:50050
+sqline # ... see FlightSQL instructions
+```
+
+## Teardown
+
+```shell
+helm uninstall ballista
+```
\ No newline at end of file
diff --git a/helm/ballista/.gitignore b/helm/ballista/.gitignore
new file mode 100644
index 00000000..f263fee8
--- /dev/null
+++ b/helm/ballista/.gitignore
@@ -0,0 +1,3 @@
+*.tar.gz
+*.tgz
+
diff --git a/helm/ballista/.helmignore b/helm/ballista/.helmignore
new file mode 100644
index 00000000..bd2d4649
--- /dev/null
+++ b/helm/ballista/.helmignore
@@ -0,0 +1,37 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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
+#
+# http://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.
+
+.DS_Store
+# Common VCS dirs
+.git/
+.gitignore
+.bzr/
+.bzrignore
+.hg/
+.hgignore
+.svn/
+# Common backup files
+*.swp
+*.bak
+*.tmp
+*.orig
+*~
+# Various IDEs
+.project
+.idea/
+*.tmproj
+.vscode/
diff --git a/helm/ballista/Chart.lock b/helm/ballista/Chart.lock
new file mode 100644
index 00000000..62875df0
--- /dev/null
+++ b/helm/ballista/Chart.lock
@@ -0,0 +1,6 @@
+dependencies:
+- name: minio
+ repository: https://charts.bitnami.com/bitnami
+ version: 11.10.5
+digest: sha256:53448ec4e280c4a77c33fe944da96c38bb877f3777c9a9dcfc364fc9012a1b09
+generated: "2022-10-07T13:05:49.084667348-06:00"
diff --git a/helm/ballista/Chart.yaml b/helm/ballista/Chart.yaml
new file mode 100644
index 00000000..913a954a
--- /dev/null
+++ b/helm/ballista/Chart.yaml
@@ -0,0 +1,45 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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
+#
+# http://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: ballista
+description: A Helm chart for Kubernetes
+
+# A chart can be either an 'application' or a 'library' chart.
+#
+# Application charts are a collection of templates that can be packaged into
versioned archives
+# to be deployed.
+#
+# Library charts provide useful utilities or functions for the chart
developer. They're included as
+# a dependency of application charts to inject those utilities and functions
into the rendering
+# pipeline. Library charts do not define any templates and therefore cannot be
deployed.
+type: application
+
+# This is the chart version. This version number should be incremented each
time you make changes
+# to the chart and its templates, including the app version.
+# Versions are expected to follow Semantic Versioning (https://semver.org/)
+version: 0.1.0
+
+# This is the version number of the application being deployed. This version
number should be
+# incremented each time you make changes to the application. Versions are not
expected to
+# follow Semantic Versioning. They should reflect the version the application
is using.
+# It is recommended to use it with quotes.
+appVersion: "1.16.0"
+
+dependencies:
+ - name: minio
+ version: 11.10.x
+ repository: https://charts.bitnami.com/bitnami
diff --git a/helm/ballista/templates/NOTES.txt
b/helm/ballista/templates/NOTES.txt
new file mode 100644
index 00000000..a6334427
--- /dev/null
+++ b/helm/ballista/templates/NOTES.txt
@@ -0,0 +1,40 @@
+{{/*
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you 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
+
+ http://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.
+*/}}
+1. Get the application URL by running these commands:
+{{- if .Values.ingress.enabled }}
+{{- range $host := .Values.ingress.hosts }}
+ {{- range .paths }}
+ http{{ if $.Values.ingress.tls }}s{{ end }}://{{ $host.host }}{{ .path }}
+ {{- end }}
+{{- end }}
+{{- else if contains "NodePort" .Values.service.scheduler.type }}
+ export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o
jsonpath="{.spec.ports[0].nodePort}" services {{ include "ballista.fullname" .
}})
+ export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o
jsonpath="{.items[0].status.addresses[0].address}")
+ echo http://$NODE_IP:$NODE_PORT
+{{- else if contains "LoadBalancer" .Values.service.scheduler.type }}
+ NOTE: It may take a few minutes for the LoadBalancer IP to be available.
+ You can watch the status of by running 'kubectl get --namespace {{
.Release.Namespace }} svc -w {{ include "ballista.fullname" . }}'
+ export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{
include "ballista.fullname" . }} --template "{{"{{ range (index
.status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}")
+ echo http://$SERVICE_IP:{{ .Values.service.scheduler.port }}
+{{- else if contains "ClusterIP" .Values.service.scheduler.type }}
+ export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l
"app.kubernetes.io/name={{ include "ballista.name" .
}},app.kubernetes.io/instance={{ .Release.Name }}" -o
jsonpath="{.items[0].metadata.name}")
+ export CONTAINER_PORT=$(kubectl get pod --namespace {{ .Release.Namespace }}
$POD_NAME -o jsonpath="{.spec.containers[0].ports[0].containerPort}")
+ echo "Visit 127.0.0.1:50050 to use your application"
+ kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME
50050:$CONTAINER_PORT
+{{- end }}
diff --git a/helm/ballista/templates/_helpers.tpl
b/helm/ballista/templates/_helpers.tpl
new file mode 100644
index 00000000..e575aaa6
--- /dev/null
+++ b/helm/ballista/templates/_helpers.tpl
@@ -0,0 +1,77 @@
+{{/*
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you 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
+
+ http://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.
+*/}}
+{{- define "ballista.name" -}}
+{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
+{{- end }}
+
+{{/*
+Create a default fully qualified app name.
+We truncate at 63 chars because some Kubernetes name fields are limited to
this (by the DNS naming spec).
+If release name contains chart name it will be used as a full name.
+*/}}
+{{- define "ballista.fullname" -}}
+{{- if .Values.fullnameOverride }}
+{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
+{{- else }}
+{{- $name := default .Chart.Name .Values.nameOverride }}
+{{- if contains $name .Release.Name }}
+{{- .Release.Name | trunc 63 | trimSuffix "-" }}
+{{- else }}
+{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }}
+{{- end }}
+{{- end }}
+{{- end }}
+
+{{/*
+Create chart name and version as used by the chart label.
+*/}}
+{{- define "ballista.chart" -}}
+{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 |
trimSuffix "-" }}
+{{- end }}
+
+{{/*
+Common labels
+*/}}
+{{- define "ballista.labels" -}}
+helm.sh/chart: {{ include "ballista.chart" . }}
+{{ include "ballista.selectorLabels" . }}
+{{- if .Chart.AppVersion }}
+app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
+{{- end }}
+app.kubernetes.io/managed-by: {{ .Release.Service }}
+{{- end }}
+
+{{/*
+Selector labels
+*/}}
+{{- define "ballista.selectorLabels" -}}
+app.kubernetes.io/name: {{ include "ballista.name" . }}
+app.kubernetes.io/instance: {{ .Release.Name }}
+{{- end }}
+
+{{/*
+Create the name of the service account to use
+*/}}
+{{- define "ballista.serviceAccountName" -}}
+{{- if .Values.serviceAccount.create }}
+{{- default (include "ballista.fullname" .) .Values.serviceAccount.name }}
+{{- else }}
+{{- default "default" .Values.serviceAccount.name }}
+{{- end }}
+{{- end }}
diff --git a/helm/ballista/templates/executor.yaml
b/helm/ballista/templates/executor.yaml
new file mode 100644
index 00000000..61c2d7e6
--- /dev/null
+++ b/helm/ballista/templates/executor.yaml
@@ -0,0 +1,105 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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
+#
+# http://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: apps/v1
+kind: StatefulSet
+metadata:
+ name: ballista-executor
+ labels:
+ {{- include "ballista.labels" . | nindent 4 }}
+spec:
+ serviceName: executor
+ {{- if not .Values.autoscaling.enabled }}
+ replicas: {{ .Values.replicaCount }}
+ {{- end }}
+ selector:
+ matchLabels:
+ run: ballista-executor
+ template:
+ metadata:
+ {{- with .Values.podAnnotations }}
+ annotations:
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ labels:
+ run: ballista-executor
+ spec:
+ {{- with .Values.imagePullSecrets }}
+ imagePullSecrets:
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ serviceAccountName: {{ include "ballista.serviceAccountName" . }}
+ securityContext:
+ {{- toYaml .Values.podSecurityContext | nindent 8 }}
+ containers:
+ - name: {{ .Chart.Name }}-executor
+ securityContext:
+ {{- toYaml .Values.securityContext | nindent 12 }}
+ image: "{{ .Values.image.repository }}{{ .Values.image.executor
}}:{{ .Values.image.tag | default .Chart.AppVersion }}"
+ imagePullPolicy: {{ .Values.image.pullPolicy }}
+ command: ["/root/ballista-executor",
"--scheduler-host=ballista-scheduler"]
+ env:
+ - name: AWS_DEFAULT_REGION
+ value: {{.Values.config.s3.region}}
+ - name: AWS_ENDPOINT
+ value: {{.Values.config.s3.endpoint}}
+ - name: AWS_ALLOW_HTTP
+ value: {{.Values.config.s3.allowHttp | quote}}
+ - name: AWS_ACCESS_KEY_ID
+ value: {{.Values.minio.auth.rootUser}}
+ - name: AWS_SECRET_ACCESS_KEY
+ value: {{.Values.minio.auth.rootPassword}}
+ ports:
+ - name: flight
+ containerPort: 50051
+ protocol: TCP
+ livenessProbe:
+ tcpSocket:
+ port: 50051
+ readinessProbe:
+ tcpSocket:
+ port: 50051
+ resources:
+ {{- toYaml .Values.resources | nindent 12 }}
+ {{- with .Values.nodeSelector }}
+ nodeSelector:
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.affinity }}
+ affinity:
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.tolerations }}
+ tolerations:
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+
+---
+apiVersion: v1
+kind: Service
+metadata:
+ name: ballista-executor
+ labels:
+ run: ballista-executor
+spec:
+ type: {{ .Values.service.executor.type }}
+ ports:
+ - port: {{ .Values.service.executor.port }}
+ targetPort: 50051
+ protocol: TCP
+ name: flight
+ selector:
+ run: ballista-executor
diff --git a/helm/ballista/templates/hpa.yaml b/helm/ballista/templates/hpa.yaml
new file mode 100644
index 00000000..85d82aa6
--- /dev/null
+++ b/helm/ballista/templates/hpa.yaml
@@ -0,0 +1,44 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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
+#
+# http://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.
+{{- if .Values.autoscaling.enabled }}
+apiVersion: autoscaling/v2beta1
+kind: HorizontalPodAutoscaler
+metadata:
+ name: {{ include "ballista.fullname" . }}
+ labels:
+ {{- include "ballista.labels" . | nindent 4 }}
+spec:
+ scaleTargetRef:
+ apiVersion: apps/v1
+ kind: Deployment
+ name: {{ include "ballista.fullname" . }}
+ minReplicas: {{ .Values.autoscaling.minReplicas }}
+ maxReplicas: {{ .Values.autoscaling.maxReplicas }}
+ metrics:
+ {{- if .Values.autoscaling.targetCPUUtilizationPercentage }}
+ - type: Resource
+ resource:
+ name: cpu
+ targetAverageUtilization: {{
.Values.autoscaling.targetCPUUtilizationPercentage }}
+ {{- end }}
+ {{- if .Values.autoscaling.targetMemoryUtilizationPercentage }}
+ - type: Resource
+ resource:
+ name: memory
+ targetAverageUtilization: {{
.Values.autoscaling.targetMemoryUtilizationPercentage }}
+ {{- end }}
+{{- end }}
diff --git a/helm/ballista/templates/ingress.yaml
b/helm/ballista/templates/ingress.yaml
new file mode 100644
index 00000000..a404bb39
--- /dev/null
+++ b/helm/ballista/templates/ingress.yaml
@@ -0,0 +1,77 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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
+#
+# http://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.
+{{- if .Values.ingress.enabled -}}
+{{- $fullName := include "ballista.fullname" . -}}
+{{- $svcPort := .Values.service.scheduler.port -}}
+{{- if and .Values.ingress.className (not (semverCompare ">=1.18-0"
.Capabilities.KubeVersion.GitVersion)) }}
+ {{- if not (hasKey .Values.ingress.annotations
"kubernetes.io/ingress.class") }}
+ {{- $_ := set .Values.ingress.annotations "kubernetes.io/ingress.class"
.Values.ingress.className}}
+ {{- end }}
+{{- end }}
+{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion -}}
+apiVersion: networking.k8s.io/v1
+{{- else if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}}
+apiVersion: networking.k8s.io/v1beta1
+{{- else -}}
+apiVersion: extensions/v1beta1
+{{- end }}
+kind: Ingress
+metadata:
+ name: {{ $fullName }}
+ labels:
+ {{- include "ballista.labels" . | nindent 4 }}
+ {{- with .Values.ingress.annotations }}
+ annotations:
+ {{- toYaml . | nindent 4 }}
+ {{- end }}
+spec:
+ {{- if and .Values.ingress.className (semverCompare ">=1.18-0"
.Capabilities.KubeVersion.GitVersion) }}
+ ingressClassName: {{ .Values.ingress.className }}
+ {{- end }}
+ {{- if .Values.ingress.tls }}
+ tls:
+ {{- range .Values.ingress.tls }}
+ - hosts:
+ {{- range .hosts }}
+ - {{ . | quote }}
+ {{- end }}
+ secretName: {{ .secretName }}
+ {{- end }}
+ {{- end }}
+ rules:
+ {{- range .Values.ingress.hosts }}
+ - host: {{ .host | quote }}
+ http:
+ paths:
+ {{- range .paths }}
+ - path: {{ .path }}
+ {{- if and .pathType (semverCompare ">=1.18-0"
$.Capabilities.KubeVersion.GitVersion) }}
+ pathType: {{ .pathType }}
+ {{- end }}
+ backend:
+ {{- if semverCompare ">=1.19-0"
$.Capabilities.KubeVersion.GitVersion }}
+ service:
+ name: {{ $fullName }}
+ port:
+ number: {{ $svcPort }}
+ {{- else }}
+ serviceName: {{ $fullName }}
+ servicePort: {{ $svcPort }}
+ {{- end }}
+ {{- end }}
+ {{- end }}
+{{- end }}
diff --git a/helm/ballista/templates/scheduler.yaml
b/helm/ballista/templates/scheduler.yaml
new file mode 100644
index 00000000..96d58cad
--- /dev/null
+++ b/helm/ballista/templates/scheduler.yaml
@@ -0,0 +1,104 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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
+#
+# http://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: apps/v1
+kind: StatefulSet
+metadata:
+ name: ballista-scheduler
+ labels:
+ {{- include "ballista.labels" . | nindent 4 }}
+spec:
+ serviceName: scheduler
+ {{- if not .Values.autoscaling.enabled }}
+ replicas: {{ .Values.replicaCount }}
+ {{- end }}
+ selector:
+ matchLabels:
+ run: ballista-scheduler
+ template:
+ metadata:
+ {{- with .Values.podAnnotations }}
+ annotations:
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ labels:
+ run: ballista-scheduler
+ spec:
+ {{- with .Values.imagePullSecrets }}
+ imagePullSecrets:
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ serviceAccountName: {{ include "ballista.serviceAccountName" . }}
+ securityContext:
+ {{- toYaml .Values.podSecurityContext | nindent 8 }}
+ containers:
+ - name: {{ .Chart.Name }}-scheduler
+ securityContext:
+ {{- toYaml .Values.securityContext | nindent 12 }}
+ image: "{{ .Values.image.repository }}{{ .Values.image.scheduler
}}:{{ .Values.image.tag | default .Chart.AppVersion }}"
+ imagePullPolicy: {{ .Values.image.pullPolicy }}
+ env:
+ - name: AWS_DEFAULT_REGION
+ value: {{.Values.config.s3.region}}
+ - name: AWS_ENDPOINT
+ value: {{.Values.config.s3.endpoint}}
+ - name: AWS_ALLOW_HTTP
+ value: {{.Values.config.s3.allowHttp | quote}}
+ - name: AWS_ACCESS_KEY_ID
+ value: {{.Values.minio.auth.rootUser}}
+ - name: AWS_SECRET_ACCESS_KEY
+ value: {{.Values.minio.auth.rootPassword}}
+ ports:
+ - name: flightsql
+ containerPort: 50050
+ protocol: TCP
+ livenessProbe:
+ tcpSocket:
+ port: 50050
+ readinessProbe:
+ tcpSocket:
+ port: 50050
+ resources:
+ {{- toYaml .Values.resources | nindent 12 }}
+ {{- with .Values.nodeSelector }}
+ nodeSelector:
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.affinity }}
+ affinity:
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.tolerations }}
+ tolerations:
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+
+---
+apiVersion: v1
+kind: Service
+metadata:
+ name: ballista-scheduler
+ labels:
+ run: ballista-scheduler
+spec:
+ type: {{ .Values.service.scheduler.type }}
+ ports:
+ - port: {{ .Values.service.scheduler.port }}
+ targetPort: 50050
+ protocol: TCP
+ name: flightsql
+ selector:
+ run: ballista-scheduler
diff --git a/helm/ballista/templates/serviceaccount.yaml
b/helm/ballista/templates/serviceaccount.yaml
new file mode 100644
index 00000000..f62982e9
--- /dev/null
+++ b/helm/ballista/templates/serviceaccount.yaml
@@ -0,0 +1,28 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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
+#
+# http://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.
+{{- if .Values.serviceAccount.create -}}
+apiVersion: v1
+kind: ServiceAccount
+metadata:
+ name: {{ include "ballista.serviceAccountName" . }}
+ labels:
+ {{- include "ballista.labels" . | nindent 4 }}
+ {{- with .Values.serviceAccount.annotations }}
+ annotations:
+ {{- toYaml . | nindent 4 }}
+ {{- end }}
+{{- end }}
diff --git a/helm/ballista/templates/tests/test-connection.yaml
b/helm/ballista/templates/tests/test-connection.yaml
new file mode 100644
index 00000000..9fe7660c
--- /dev/null
+++ b/helm/ballista/templates/tests/test-connection.yaml
@@ -0,0 +1,31 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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
+#
+# http://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: v1
+kind: Pod
+metadata:
+ name: "{{ include "ballista.fullname" . }}-test-connection"
+ labels:
+ {{- include "ballista.labels" . | nindent 4 }}
+ annotations:
+ "helm.sh/hook": test
+spec:
+ containers:
+ - name: wget
+ image: busybox
+ command: ['wget']
+ args: ['{{ include "ballista.fullname" . }}:{{
.Values.service.scheduler.port }}']
+ restartPolicy: Never
diff --git a/helm/ballista/values.yaml b/helm/ballista/values.yaml
new file mode 100644
index 00000000..bbf31627
--- /dev/null
+++ b/helm/ballista/values.yaml
@@ -0,0 +1,116 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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
+#
+# http://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.
+replicaCount: 1
+
+image:
+ repository: ""
+ scheduler: ballista-scheduler
+ executor: ballista-executor
+ pullPolicy: Never
+ # Overrides the image tag whose default is the chart appVersion.
+ tag: "latest"
+
+config:
+ s3:
+ allowHttp: true
+ region: "minio"
+ endpoint: "http://ballista-minio:9000"
+
+imagePullSecrets:
+ - name: regcred
+nameOverride: ""
+fullnameOverride: ""
+
+serviceAccount:
+ # Specifies whether a service account should be created
+ create: true
+ # Annotations to add to the service account
+ annotations: {}
+ # The name of the service account to use.
+ # If not set and create is true, a name is generated using the fullname
template
+ name: ""
+
+podAnnotations: {}
+
+podSecurityContext: {}
+ # fsGroup: 2000
+
+securityContext: {}
+ # capabilities:
+ # drop:
+ # - ALL
+ # readOnlyRootFilesystem: true
+ # runAsNonRoot: true
+ # runAsUser: 1000
+
+service:
+ scheduler:
+ type: ClusterIP
+ port: 50050
+ executor:
+ type: ClusterIP
+ port: 50051
+
+ingress:
+ enabled: false
+ className: ""
+ annotations: {}
+ # kubernetes.io/ingress.class: nginx
+ # kubernetes.io/tls-acme: "true"
+ hosts:
+ - host: ballista-scheduler.local
+ paths:
+ - path: /
+ pathType: ImplementationSpecific
+ tls: []
+ # - secretName: chart-example-tls
+ # hosts:
+ # - chart-example.local
+
+resources: {}
+ # We usually recommend not to specify default resources and to leave this as
a conscious
+ # choice for the user. This also increases chances charts run on
environments with little
+ # resources, such as Minikube. If you do want to specify resources,
uncomment the following
+ # lines, adjust them as necessary, and remove the curly braces after
'resources:'.
+ # limits:
+ # cpu: 100m
+ # memory: 128Mi
+ # requests:
+ # cpu: 100m
+ # memory: 128Mi
+
+autoscaling:
+ enabled: false
+ minReplicas: 1
+ maxReplicas: 100
+ targetCPUUtilizationPercentage: 80
+ # targetMemoryUtilizationPercentage: 80
+
+nodeSelector: {}
+
+tolerations: []
+
+affinity: {}
+
+minio:
+ persistence:
+ enabled: false
+ storageClass: azurefile-csi
+ size: 1Gi
+ existingClaim: ""
+ auth:
+ rootUser: minio