sparkoperator

by joaquinito2051

Helm chartv0.2.3App v2.4.0-v1beta1-0.8.2

A Helm chart for Spark on Kubernetes operator

About this chart

Helm Chart for Spark Operator

This is the Helm chart for the Kubernetes Operator for Apache Spark.

Prerequisites

The Operator requires Kubernetes version 1.8 and above because it relies on garbage collection of custom resources. If customization of driver and executor pods (through mounting custom ConfigMaps and volumes) is desired, then the Mutating Admission Webhook needs to be enabled and it only became beta in Kubernetes 1.9.

Installing the chart

The chart can be installed by running:

$ helm install <helm-repo>/sparkoperator --namespace spark-operator --set sparkJobNamespace=default

$ helm install incubator/sparkoperator --namespace spark-operator --set sparkJobNamespace=default Note that you need to use the --namespace flag during helm install to specify in which namespace you want to install the operator. The namespace can be existing or not. When it's not available, Helm would take care of creating the namespace. Note that this namespace has no relation to the namespace where you would like to deploy Spark jobs (i.e. the setting sparkJobNamespace shown in the table below). They can be the same namespace or different ones.

Configuration

Note that you need to use the --namespace flag during helm install to specify in which namespace you want to install the operator. The namespace can be existing or not. When it's not available, Helm would take care of creating the namespace. Note that this namespace has no relation to the namespace where you would like to deploy Spark jobs (i.e. the setting sparkJobNamespace shown in the table below). They can be the same namespace or different ones.

The following table lists the configurable parameters of the Spark operator chart and their default values.

ParameterDescriptionDefault
operatorImageNameThe name of the operator imagegcr.io/spark-operator/spark-operator
operatorVersionThe version of the operator to installv2.4.0-v1beta1-0.8.1
imagePullPolicyDocker image pull policyIfNotPresent
sparkJobNamespaceK8s namespace where Spark jobs are to be deployed``
enableWebhookWhether to enable mutating admission webhookfalse
enableMetricsWhether to expose metrics to be scraped by Premetheustrue
controllerThreadsNumber of worker threads used by the SparkApplication controller10
ingressUrlFormatIngress URL format""
logLevelLogging verbosity level2
installCrdsWhether to install CRDstrue
metricsPortPort for the metrics endpoint10254
metricsEndpointMetrics endpoint"/metrics"
metricsPrefixPrefix for the metrics""
resyncIntervalInformer resync interval in seconds30
webhookPortService port of the webhook server8080

Specify each parameter using the --set key=value[,key=value] argument to helm install.

Deploy sparkoperator with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has sparkoperator on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartsparkoperator is pinned at v0.2.3 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below
opentenant validate opentenant.yaml
terraform init && terraform apply