[bitnami/superset] Add chart (#26713)

* [bitnami/superset] Add chart

Signed-off-by: Miguel Ruiz <miruiz@vmware.com>

* Add missing license header

Signed-off-by: Miguel Ruiz <miruiz@vmware.com>

* Apply suggestions

Signed-off-by: Miguel Ruiz <miguel.ruiz@broadcom.com>

* Fix typo

Signed-off-by: Miguel Ruiz <miguel.ruiz@broadcom.com>

* Add database and redis validations

Signed-off-by: Miguel Ruiz <miguel.ruiz@broadcom.com>

* Add extraContainerPorts

Signed-off-by: Miguel Ruiz <miguel.ruiz@broadcom.com>

* Fix values metadata

Signed-off-by: Miguel Ruiz <miguel.ruiz@broadcom.com>

* Update CHANGELOG.md

Signed-off-by: Bitnami Containers <bitnami-bot@vmware.com>

* Fix wrong README sections

Signed-off-by: Miguel Ruiz <miguel.ruiz@broadcom.com>

* Regen README locally

Signed-off-by: Miguel Ruiz <miguel.ruiz@broadcom.com>

* Change web containerPort to 8080

Signed-off-by: Miguel Ruiz <miguel.ruiz@broadcom.com>

* Update README.md with readme-generator-for-helm

Signed-off-by: Bitnami Containers <bitnami-bot@vmware.com>

* Increase flower resourcesPreset to small and liveness initial delay

Signed-off-by: Miguel Ruiz <miguel.ruiz@broadcom.com>

* Update README.md with readme-generator-for-helm

Signed-off-by: Bitnami Containers <bitnami-bot@vmware.com>

* Increase target platform size

Signed-off-by: Miguel Ruiz <miguel.ruiz@broadcom.com>

* Update vib pipelines

Signed-off-by: Miguel Ruiz <miguel.ruiz@broadcom.com>

* Increase web resourcePreset to small

Signed-off-by: Miguel Ruiz <miguel.ruiz@broadcom.com>

* Increase wait

Signed-off-by: Miguel Ruiz <miguel.ruiz@broadcom.com>

* Add web.waitForExamples init container

Signed-off-by: Miguel Ruiz <miguel.ruiz@broadcom.com>

* Update CHANGELOG.md

Signed-off-by: Bitnami Containers <bitnami-bot@vmware.com>

* Update README.md with readme-generator-for-helm

Signed-off-by: Bitnami Containers <bitnami-bot@vmware.com>

* Apply suggestions from code review

Signed-off-by: Miguel Ruiz <miguel.ruiz@broadcom.com>

Co-authored-by: Juan Ariza Toledano <jariza@vmware.com>
Signed-off-by: Miguel Ruiz <miguel.ruiz@broadcom.com>

* Revert change

Signed-off-by: Miguel Ruiz <miguel.ruiz@broadcom.com>

* Apply suggestions from code review

Signed-off-by: Miguel Ruiz <miguel.ruiz@broadcom.com>

Co-authored-by: Juan Ariza Toledano <jariza@vmware.com>
Signed-off-by: Miguel Ruiz <miguel.ruiz@broadcom.com>

* Fix Markdown lint

Signed-off-by: Miguel Ruiz <miguel.ruiz@broadcom.com>

* Fix minor issues

Signed-off-by: Miguel Ruiz <miguel.ruiz@broadcom.com>

* Update README.md with readme-generator-for-helm

Signed-off-by: Bitnami Containers <bitnami-bot@vmware.com>

* Use auth.existingSecret instead of existingSecret

Signed-off-by: Miguel Ruiz <miguel.ruiz@broadcom.com>

* Update README.md with readme-generator-for-helm

Signed-off-by: Bitnami Containers <bitnami-bot@vmware.com>

* Apply suggestions

Signed-off-by: Miguel Ruiz <miguel.ruiz@broadcom.com>

* Fix values metadata

Signed-off-by: Miguel Ruiz <miguel.ruiz@broadcom.com>

* Update CHANGELOG.md

Signed-off-by: Bitnami Containers <bitnami-bot@vmware.com>

* Update README.md with readme-generator-for-helm

Signed-off-by: Bitnami Containers <bitnami-bot@vmware.com>

* Add support for celery flower auth

Signed-off-by: Miguel Ruiz <miguel.ruiz@broadcom.com>

* Update README.md with readme-generator-for-helm

Signed-off-by: Bitnami Containers <bitnami-bot@vmware.com>

* Use bitnami/superset image

Signed-off-by: Miguel Ruiz <miguel.ruiz@broadcom.com>

* Minor fixes

Signed-off-by: Miguel Ruiz <miguel.ruiz@broadcom.com>

---------

Signed-off-by: Miguel Ruiz <miruiz@vmware.com>
Signed-off-by: Miguel Ruiz <miguel.ruiz@broadcom.com>
Signed-off-by: Bitnami Containers <bitnami-bot@vmware.com>
Co-authored-by: Bitnami Containers <bitnami-bot@vmware.com>
Co-authored-by: Juan Ariza Toledano <jariza@vmware.com>
This commit is contained in:
Miguel Ruiz
2025-01-28 16:31:51 +01:00
committed by GitHub
parent f3ff98f600
commit 8a91a4864d
48 changed files with 5965 additions and 0 deletions

View File

@@ -0,0 +1,12 @@
module.exports = {
pageLoadTimeout: 240000,
defaultCommandTimeout: 80000,
env: {
username: 'user',
password: 'ComplicatedPassword123!4',
},
e2e: {
setupNodeEvents(on, config) {},
baseUrl: 'http://localhost',
},
}

View File

@@ -0,0 +1,49 @@
/*
* Copyright Broadcom, Inc. All Rights Reserved.
* SPDX-License-Identifier: APACHE-2.0
*/
/// <reference types="cypress" />
import { random } from '../support/utils';
it('Example dashboards visible', () => {
cy.login();
cy.visit(`dashboard/list`);
// Retries required to ensure examples finished loading
const max_attempts = 5;
let runFound = false;
for (let i = 0; i < max_attempts && !runFound; i += 1) {
cy.get('body').then(($body) => {
if ($body.find('a[href*="/dashboard/births/"]').length === 0) {
// run job has not finished executing, so we wait and reload the page
cy.wait(5000);
cy.reload();
} else {
runFound = true;
}
});
}
// Navigate Dashboards list
cy.contains('USA Births Names').click();
// Check Dashboard contains data
cy.wait(5000);
cy.contains('Michael');
});
it('allows to create a user', () => {
cy.login();
cy.visit('users/add');
cy.fixture('users').then((users) => {
cy.get('#first_name').type(users.newUser.firstName);
cy.get('#last_name').type(users.newUser.lastName);
cy.get('#username').type(`${users.newUser.username}.${random}`);
cy.get('#email').type(`${users.newUser.username}.${random}@email.com`);
cy.get('input[type="search"]').type(`${users.newUser.role}{enter}`);
cy.get('#password').type(users.newUser.password);
cy.get('#conf_password').type(users.newUser.password);
cy.contains('Save').click();
// Verify the user was created successfully
cy.contains('div', 'Added Row');
});
});

View File

@@ -0,0 +1,9 @@
{
"newUser": {
"firstName": "Jane Jessica",
"lastName": "Doe",
"username": "janedoe",
"password": "someComplicatedPass12345!",
"role": "Public"
}
}

View File

@@ -0,0 +1,31 @@
/*
* Copyright Broadcom, Inc. All Rights Reserved.
* SPDX-License-Identifier: APACHE-2.0
*/
const COMMAND_DELAY = 2000;
for (const command of ['click']) {
Cypress.Commands.overwrite(command, (originalFn, ...args) => {
const origVal = originalFn(...args);
return new Promise((resolve) => {
setTimeout(() => {
resolve(origVal);
}, COMMAND_DELAY);
});
});
}
Cypress.Commands.add(
'login',
(username = Cypress.env('username'), password = Cypress.env('password')) => {
cy.visit('/login');
// Wait for DOM content to load
cy.wait(5000);
cy.get('form[name="login"]').should('exist').and('be.visible'); // Needed to ensure stability of the test
cy.get('input#username').type(username);
cy.get('input#password').type(password);
cy.get('input[type="submit"]').click();
}
);

View File

@@ -0,0 +1,25 @@
/*
* Copyright Broadcom, Inc. All Rights Reserved.
* SPDX-License-Identifier: APACHE-2.0
*/
// ***********************************************************
// This example support/index.js is processed and
// loaded automatically before your test files.
//
// This is a great place to put global configuration and
// behavior that modifies Cypress.
//
// You can change the location of this file or turn off
// automatically serving support files with the
// 'supportFile' configuration option.
//
// You can read more here:
// https://on.cypress.io/configuration
// ***********************************************************
// Import commands.js using ES2015 syntax:
import './commands';
// Alternatively you can use CommonJS syntax:
// require('./commands')

View File

@@ -0,0 +1,8 @@
/*
* Copyright Broadcom, Inc. All Rights Reserved.
* SPDX-License-Identifier: APACHE-2.0
*/
/// <reference types="cypress" />
export let random = (Math.random() + 1).toString(36).substring(7);

View File

@@ -0,0 +1,35 @@
# Copyright Broadcom, Inc. All Rights Reserved.
# SPDX-License-Identifier: APACHE-2.0
http:
http://superset-web:{{ .Vars.web.service.ports.http }}/health:
status: 200
body:
- /OK/
http://127.0.0.1:{{ .Vars.web.containerPorts.http }}/health:
status: 200
body:
- /OK/
http://{{ .Vars.flower.auth.username }}:{{ .Vars.flower.auth.password }}@superset-flower:{{ .Vars.flower.service.ports.flower }}:
status: 200
file:
/opt/bitnami/superset/superset_config.py:
mode: "0664"
filetype: file
exists: true
/opt/bitnami/superset/superset_home:
filetype: directory
exists: true
{{- $uid := .Vars.web.containerSecurityContext.runAsUser }}
check-user-info:
# The UID should always be either the one specified as vars (always a bigger number that the default)
# or the one randomly defined by openshift (larger values). Otherwise, the chart is still using the default value.
exec: if [ $(id -u) -lt {{ $uid }} ]; then exit 1; fi
exit-status: 0
{{ if .Vars.serviceAccount.automountServiceAccountToken }}
check-sa:
exec: cat /var/run/secrets/kubernetes.io/serviceaccount/token | cut -d '.' -f 2 | xargs -I '{}' echo '{}====' | fold -w 4 | sed '$ d' | tr -d '\n' | base64 -d
exit-status: 0
stdout:
- /serviceaccount.*name.*{{ .Env.BITNAMI_APP_NAME }}/
{{ end }}

View File

@@ -0,0 +1,29 @@
auth:
password: ComplicatedPassword123!4
loadExamples: true
web:
waitForExamples:
enabled: true
containerPorts:
http: 8081
service:
ports:
http: 80
type: LoadBalancer
containerSecurityContext:
enabled: true
runAsUser: 1002
beat:
enabled: true
flower:
enabled: true
service:
ports:
flower: 5556
auth:
enabled: true
username: "vib-user"
password: "ComplicatedPassword123!4"
serviceAccount:
create: true
automountServiceAccountToken: true

View File

@@ -0,0 +1,47 @@
{
"phases": {
"package": {
"context": {
"credentials": [
{
"url": "{VIB_ENV_CHARTS_REGISTRY}",
"authn": {
"username": "{VIB_ENV_CHARTS_REGISTRY_USERNAME}",
"password": "{VIB_ENV_CHARTS_REGISTRY_PASSWORD}"
}
}
],
"resources": {
"url": "{SHA_ARCHIVE}",
"path": "/bitnami/superset"
}
},
"actions": [
{
"action_id": "helm-package"
},
{
"action_id": "helm-lint"
}
]
},
"publish": {
"actions": [
{
"action_id": "helm-publish",
"params": {
"repository": {
"kind": "S3",
"url": "{VIB_ENV_S3_URL}",
"authn": {
"access_key_id": "{VIB_ENV_S3_ACCESS_KEY_ID}",
"secret_access_key": "{VIB_ENV_S3_SECRET_ACCESS_KEY}",
"role": "{VIB_ENV_S3_ROLE_ARN}"
}
}
}
}
]
}
}
}

View File

@@ -0,0 +1,80 @@
{
"phases": {
"package": {
"context": {
"credentials": [
{
"url": "{VIB_ENV_CHARTS_REGISTRY}",
"authn": {
"username": "{VIB_ENV_CHARTS_REGISTRY_USERNAME}",
"password": "{VIB_ENV_CHARTS_REGISTRY_PASSWORD}"
}
}
],
"resources": {
"url": "{SHA_ARCHIVE}",
"path": "/bitnami/superset"
}
},
"actions": [
{
"action_id": "helm-package"
},
{
"action_id": "helm-lint"
}
]
},
"verify": {
"context": {
"resources": {
"url": "{SHA_ARCHIVE}",
"path": "/bitnami/superset"
},
"target_platform": {
"target_platform_id": "{VIB_ENV_TARGET_PLATFORM}",
"size": {
"name": "L4"
}
}
},
"actions": [
{
"action_id": "goss",
"params": {
"resources": {
"path": "/.vib"
},
"tests_file": "superset/goss/goss.yaml",
"vars_file": "superset/runtime-parameters.yaml",
"remote": {
"pod": {
"workload": "deploy-superset-web"
}
}
}
},
{
"action_id": "cypress",
"params": {
"resources": {
"path": "/.vib/superset/cypress"
},
"endpoint": "lb-superset-web-http",
"app_protocol": "HTTP",
"env": {
"username": "user",
"password": "ComplicatedPassword123!4"
}
}
},
{
"action_id": "kubescape",
"params": {
"threshold": {VIB_ENV_KUBESCAPE_SCORE_THRESHOLD}
}
}
]
}
}
}

View File

@@ -0,0 +1,27 @@
# Patterns to ignore when building packages.
# This supports shell glob matching, relative path matching, and
# negation (prefixed with !). Only one pattern per line.
.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/
# img folder
img/
# Changelog
CHANGELOG.md

View File

@@ -0,0 +1,5 @@
# Changelog
## 0.1.0 (2025-01-28)
* [bitnami/superset] Add chart ([#26713](https://github.com/bitnami/charts/pull/26713))

View File

@@ -0,0 +1,12 @@
dependencies:
- name: redis
repository: oci://registry-1.docker.io/bitnamicharts
version: 19.6.4
- name: postgresql
repository: oci://registry-1.docker.io/bitnamicharts
version: 15.5.38
- name: common
repository: oci://registry-1.docker.io/bitnamicharts
version: 2.29.0
digest: sha256:f4db197fb58fd50eb77e594c89562b92c9c262e4671725de5d76dcb0be217354
generated: "2025-01-20T15:53:07.508553+01:00"

View File

@@ -0,0 +1,40 @@
# Copyright Broadcom, Inc. All Rights Reserved.
# SPDX-License-Identifier: APACHE-2.0
annotations:
category: Analytics
licenses: Apache-2.0
images: |
- name: superset
image: docker.io/bitnami/superset:4.1.1-debian-12-r1
apiVersion: v2
appVersion: 4.0.0
dependencies:
- condition: redis.enabled
name: redis
repository: oci://registry-1.docker.io/bitnamicharts
version: 19.x.x
- condition: postgresql.enabled
name: postgresql
repository: oci://registry-1.docker.io/bitnamicharts
version: 15.x.x
- name: common
repository: oci://registry-1.docker.io/bitnamicharts
tags:
- bitnami-common
version: 2.x.x
description: Apache Superset is a Data Visualization and Data Exploration Platform
home: https://bitnami.com
icon: https://bitnami.com/assets/stacks/superset/img/superset-stack-220x234.png
keywords:
- superset
- analytics
maintainers:
- name: Broadcom, Inc. All Rights Reserved.
url: https://github.com/bitnami/charts
name: superset
sources:
- https://github.com/bitnami/charts/tree/main/bitnami/superset
- https://github.com/bitnami/containers/tree/main/bitnami/superset
- https://github.com/apache/superset
version: 0.1.0

756
bitnami/superset/README.md Normal file
View File

@@ -0,0 +1,756 @@
<!--- app-name: superset -->
# Bitnami package for Apache Superset
Superset is an open source Data Visualization and Data Exploration Platform.
[Overview of Apache Superset](https://superset.apache.org/)
Trademarks: This software listing is packaged by Bitnami. The respective trademarks mentioned in the offering are owned by the respective companies, and use of them does not imply any affiliation or endorsement.
## TL;DR
```console
helm install my-release oci://registry-1.docker.io/bitnamicharts/superset
```
Looking to use Superset in production? Try [VMware Tanzu Application Catalog](https://bitnami.com/enterprise), the enterprise edition of Bitnami Application Catalog.
## Introduction
Bitnami charts for Helm are carefully engineered, actively maintained and are the quickest and easiest way to deploy containers on a Kubernetes cluster that are ready to handle production workloads.
This chart bootstraps a [Superset](https://superset.apache.org/) Deployment in a [Kubernetes](https://kubernetes.io) cluster using the [Helm](https://helm.sh) package manager.
Bitnami charts can be used with [Kubeapps](https://kubeapps.dev/) for deployment and management of Helm Charts in clusters.
## Prerequisites
- Kubernetes 1.23+
- Helm 3.8.0+
- PV provisioner support in the underlying infrastructure
## Installing the Chart
To install the chart with the release name `my-release`:
```console
helm install my-release oci://REGISTRY_NAME/REPOSITORY_NAME/superset
```
> Note: You need to substitute the placeholders `REGISTRY_NAME` and `REPOSITORY_NAME` with a reference to your Helm chart registry and repository. For example, in the case of Bitnami, you need to use `REGISTRY_NAME=registry-1.docker.io` and `REPOSITORY_NAME=bitnamicharts`.
The command deploys Superset on the Kubernetes cluster in the default configuration. The [Parameters](#parameters) section lists the parameters that can be configured during installation.
> **Tip**: List all releases using `helm list`
## Configuration and installation details
### [Rolling VS Immutable tags](https://docs.vmware.com/en/VMware-Tanzu-Application-Catalog/services/tutorials/GUID-understand-rolling-tags-containers-index.html)
It is strongly recommended to use immutable tags in a production environment. This ensures your deployment does not change automatically if the same tag is updated with a different image.
Bitnami will release a new chart updating its containers if a new version of the main container, significant changes, or critical vulnerabilities exist.
### External database support
You may want to have Superset connect to an external database rather than installing one inside your cluster. Typical reasons for this are to use a managed database service, or to share a common database server for all your applications. To achieve this, the chart allows you to specify credentials for an external database with the [`externalDatabase` parameter](#parameters). You should also disable the MariaDB installation with the `postgresql.enabled` option. Here is an example:
```console
postgresql.enabled=false
externalDatabase.host=myexternalhost
externalDatabase.user=myuser
externalDatabase.password=mypassword
externalDatabase.database=mydatabase
externalDatabase.port=5432
```
Similarly, you can specify an external Redis&reg; instance rather than installing one inside your cluster. First, you may disable the Redis&reg; installation with the `redis.enabled` option. As aforementioned, used the provided parameters to provide data about your instance:
```console
redis.enabled=false
externalRedis.host=myexternalhost
externalRedis.password=mypassword
externalRedis.port=5432
```
### Ingress
This chart provides support for Ingress resources. If you have an ingress controller installed on your cluster, such as [nginx-ingress-controller](https://github.com/bitnami/charts/tree/main/bitnami/nginx-ingress-controller) or [contour](https://github.com/bitnami/charts/tree/main/bitnami/contour) you can utilize the ingress controller to serve your application.To enable Ingress integration, set `ingress.enabled` to `true`.
The most common scenario is to have one host name mapped to the deployment. In this case, the `ingress.hostname` property can be used to set the host name. The `ingress.tls` parameter can be used to add the TLS configuration for this host.
However, it is also possible to have more than one host. To facilitate this, the `ingress.extraHosts` parameter (if available) can be set with the host names specified as an array. The `ingress.extraTLS` parameter (if available) can also be used to add the TLS configuration for extra hosts.
> NOTE: For each host specified in the `ingress.extraHosts` parameter, it is necessary to set a name, path, and any annotations that the Ingress controller should know about. Not all annotations are supported by all Ingress controllers, but [this annotation reference document](https://github.com/kubernetes/ingress-nginx/blob/master/docs/user-guide/nginx-configuration/annotations.md) lists the annotations supported by many popular Ingress controllers.
Adding the TLS parameter (where available) will cause the chart to generate HTTPS URLs, and the application will be available on port 443. The actual TLS secrets do not have to be generated by this chart. However, if TLS is enabled, the Ingress record will not work until the TLS secret exists.
[Learn more about Ingress controllers](https://kubernetes.io/docs/concepts/services-networking/ingress-controllers/).
### Additional environment variables
In case you want to add extra environment variables (useful for advanced operations like custom init scripts), you can use the `extraEnvVars` property.
```yaml
web:
extraEnvVars:
- name: LOG_LEVEL
value: error
```
Alternatively, you can use a ConfigMap or a Secret with the environment variables. To do so, use the `extraEnvVarsCM` or the `extraEnvVarsSecret` values.
### Sidecars
If additional containers are needed in the same pod as Superset (such as additional metrics or logging exporters), they can be defined using the `*.sidecars` parameter, where `*` would be the section corresponding to each of the pods deployed by the chart, e.g. `web`, `worker`, `beat`, `flower`, `init`.
```yaml
web:
sidecars:
- name: your-image-name
image: your-image
imagePullPolicy: Always
ports:
- name: portname
containerPort: 1234
```
If these sidecars export extra ports, extra port definitions can be added using the `service.*.extraPorts` parameter (where available), as shown in the example below:
```yaml
web:
service:
extraPorts:
- name: extraPort
port: 11311
targetPort: 11311
```
If additional init containers are needed in the same pod, they can be defined using the `*.initContainers` parameter. Here is an example adding an extra init container to the Superset `web` pods:
```yaml
web:
initContainers:
- name: your-image-name
image: your-image
imagePullPolicy: Always
ports:
- name: portname
containerPort: 1234
```
Learn more about [sidecar containers](https://kubernetes.io/docs/concepts/workloads/pods/) and [init containers](https://kubernetes.io/docs/concepts/workloads/pods/init-containers/).
### Pod affinity
This chart allows you to set your custom affinity using the `affinity` parameter. Find more information about Pod affinity in the [kubernetes documentation](https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity).
As an alternative, use one of the preset configurations for pod affinity, pod anti-affinity, and node affinity available at the [bitnami/common](https://github.com/bitnami/charts/tree/main/bitnami/common#affinities) chart. To do so, set the `podAffinityPreset`, `podAntiAffinityPreset`, or `nodeAffinityPreset` parameters.
## Parameters
### Global parameters
| Name | Description | Value |
| ----------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------ |
| `global.imageRegistry` | Global Docker image registry | `""` |
| `global.imagePullSecrets` | Global Docker registry secret names as an array | `[]` |
| `global.storageClass` | Global StorageClass for Persistent Volume(s) | `""` |
| `global.compatibility.openshift.adaptSecurityContext` | Adapt the securityContext sections of the deployment to make them compatible with Openshift restricted-v2 SCC: remove runAsUser, runAsGroup and fsGroup and let the platform use their allowed default IDs. Possible values: auto (apply if the detected running cluster is Openshift), force (perform the adaptation always), disabled (do not perform adaptation) | `auto` |
### Common parameters
| Name | Description | Value |
| ------------------------ | --------------------------------------------------------------------------------------- | --------------- |
| `kubeVersion` | Override Kubernetes version | `""` |
| `nameOverride` | String to partially override common.names.name | `""` |
| `fullnameOverride` | String to fully override common.names.fullname | `""` |
| `namespaceOverride` | String to fully override common.names.namespace | `""` |
| `commonLabels` | Labels to add to all deployed objects | `{}` |
| `commonAnnotations` | Annotations to add to all deployed objects | `{}` |
| `clusterDomain` | Kubernetes cluster domain name | `cluster.local` |
| `extraDeploy` | Array of extra objects to deploy with the release | `[]` |
| `diagnosticMode.enabled` | Enable diagnostic mode (all probes will be disabled and the command will be overridden) | `false` |
| `diagnosticMode.command` | Command to override all containers in the chart release | `["sleep"]` |
| `diagnosticMode.args` | Args to override all containers in the chart release | `["infinity"]` |
### Superset Parameters
| Name | Description | Value |
| ----------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------- |
| `image.registry` | Superset image registry | `REGISTRY_NAME` |
| `image.repository` | Superset image repository | `REPOSITORY_NAME/superset` |
| `image.digest` | Superset image digest in the way sha256:aa.... Please note this parameter, if set, will override the tag image tag (immutable tags are recommended) | `""` |
| `image.pullPolicy` | Superset image pull policy | `IfNotPresent` |
| `image.pullSecrets` | Superset image pull secrets | `[]` |
| `image.debug` | Enable Superset image debug mode | `false` |
| `config` | The name of an existing ConfigMap with your custom configuration for Superset | `""` |
| `existingConfigmap` | The name of an existing ConfigMap with your custom configuration for Superset | `""` |
| `loadExamples` | If set to true, the Superset examples database will be loaded at startup | `false` |
| `auth.username` | Username to access web UI | `""` |
| `auth.email` | Username email | `""` |
| `auth.password` | Password to access web UI | `""` |
| `auth.secretKey` | Secret key to run your flask app | `""` |
| `auth.existingSecret` | Name of an existing secret to use for Superset credentials | `""` |
| `web.replicaCount` | Number of Superset webserver replicas to deploy | `1` |
| `web.containerPorts.http` | Superset webserver HTTP container port | `8080` |
| `web.extraContainerPorts` | Optionally specify extra list of additional ports for WordPress container(s) | `[]` |
| `web.livenessProbe.enabled` | Enable livenessProbe on Superset webserver containers | `false` |
| `web.livenessProbe.initialDelaySeconds` | Initial delay seconds for livenessProbe | `15` |
| `web.livenessProbe.periodSeconds` | Period seconds for livenessProbe | `15` |
| `web.livenessProbe.timeoutSeconds` | Timeout seconds for livenessProbe | `1` |
| `web.livenessProbe.failureThreshold` | Failure threshold for livenessProbe | `3` |
| `web.livenessProbe.successThreshold` | Success threshold for livenessProbe | `1` |
| `web.readinessProbe.enabled` | Enable readinessProbe on Superset webserver containers | `true` |
| `web.readinessProbe.initialDelaySeconds` | Initial delay seconds for readinessProbe | `15` |
| `web.readinessProbe.periodSeconds` | Period seconds for readinessProbe | `15` |
| `web.readinessProbe.timeoutSeconds` | Timeout seconds for readinessProbe | `1` |
| `web.readinessProbe.failureThreshold` | Failure threshold for readinessProbe | `3` |
| `web.readinessProbe.successThreshold` | Success threshold for readinessProbe | `1` |
| `web.startupProbe.enabled` | Enable startupProbe on Superset webserver containers | `false` |
| `web.startupProbe.initialDelaySeconds` | Initial delay seconds for startupProbe | `15` |
| `web.startupProbe.periodSeconds` | Period seconds for startupProbe | `5` |
| `web.startupProbe.timeoutSeconds` | Timeout seconds for startupProbe | `1` |
| `web.startupProbe.failureThreshold` | Failure threshold for startupProbe | `60` |
| `web.startupProbe.successThreshold` | Success threshold for startupProbe | `1` |
| `web.customLivenessProbe` | Custom livenessProbe that overrides the default one | `{}` |
| `web.customReadinessProbe` | Custom readinessProbe that overrides the default one | `{}` |
| `web.customStartupProbe` | Custom startupProbe that overrides the default one | `{}` |
| `web.resourcesPreset` | Set Superset webserver container resources according to one common preset (allowed values: none, nano, small, medium, large, xlarge, 2xlarge). This is ignored if web.resources is set (web.resources is recommended for production). | `small` |
| `web.resources` | Set Superset webserver container requests and limits for different resources like CPU or memory (essential for production workloads) | `{}` |
| `web.podSecurityContext.enabled` | Enable Superset webserver pods' Security Context | `true` |
| `web.podSecurityContext.fsGroupChangePolicy` | Set filesystem group change policy for Superset webserver pods | `Always` |
| `web.podSecurityContext.sysctls` | Set kernel settings using the sysctl interface for Superset webserver pods | `[]` |
| `web.podSecurityContext.supplementalGroups` | Set filesystem extra groups for Superset webserver pods | `[]` |
| `web.podSecurityContext.fsGroup` | Set fsGroup in Superset webserver pods' Security Context | `1001` |
| `web.containerSecurityContext.enabled` | Enabled Superset webserver container' Security Context | `true` |
| `web.containerSecurityContext.seLinuxOptions` | Set SELinux options in Superset webserver container | `{}` |
| `web.containerSecurityContext.runAsUser` | Set runAsUser in Superset webserver container' Security Context | `1001` |
| `web.containerSecurityContext.runAsGroup` | Set runAsGroup in Superset webserver container' Security Context | `1001` |
| `web.containerSecurityContext.runAsNonRoot` | Set runAsNonRoot in Superset webserver container' Security Context | `true` |
| `web.containerSecurityContext.readOnlyRootFilesystem` | Set readOnlyRootFilesystem in Superset webserver container' Security Context | `false` |
| `web.containerSecurityContext.privileged` | Set privileged in Superset webserver container' Security Context | `false` |
| `web.containerSecurityContext.allowPrivilegeEscalation` | Set allowPrivilegeEscalation in Superset webserver container' Security Context | `false` |
| `web.containerSecurityContext.capabilities.drop` | List of capabilities to be dropped in Superset webserver container | `["ALL"]` |
| `web.containerSecurityContext.seccompProfile.type` | Set seccomp profile in Superset webserver container | `RuntimeDefault` |
| `web.command` | Override default Superset webserver container command (useful when using custom images) | `[]` |
| `web.args` | Override default Superset webserver container args (useful when using custom images) | `[]` |
| `web.automountServiceAccountToken` | Mount Service Account token in Superset webserver pods | `false` |
| `web.hostAliases` | Superset webserver pods host aliases | `[]` |
| `web.deploymentAnnotations` | Annotations for Superset webserver deployment | `{}` |
| `web.podLabels` | Extra labels for Superset webserver pods | `{}` |
| `web.podAnnotations` | Annotations for Superset webserver pods | `{}` |
| `web.podAffinityPreset` | Pod affinity preset. Ignored if `web.affinity` is set. Allowed values: `soft` or `hard` | `""` |
| `web.podAntiAffinityPreset` | Pod anti-affinity preset. Ignored if `web.affinity` is set. Allowed values: `soft` or `hard` | `soft` |
| `web.nodeAffinityPreset.type` | Node affinity preset type. Ignored if `web.affinity` is set. Allowed values: `soft` or `hard` | `""` |
| `web.nodeAffinityPreset.key` | Node label key to match. Ignored if `web.affinity` is set | `""` |
| `web.nodeAffinityPreset.values` | Node label values to match. Ignored if `web.affinity` is set | `[]` |
| `web.affinity` | Affinity for Superset webserver pods assignment | `{}` |
| `web.nodeSelector` | Node labels for Superset webserver pods assignment | `{}` |
| `web.tolerations` | Tolerations for Superset webserver pods assignment | `[]` |
| `web.updateStrategy.type` | Superset webserver deployment strategy type | `RollingUpdate` |
| `web.priorityClassName` | Superset webserver pods' priorityClassName | `""` |
| `web.topologySpreadConstraints` | Topology Spread Constraints for Superset webserver pod assignment spread across your cluster among failure-domains | `[]` |
| `web.schedulerName` | Name of the k8s scheduler (other than default) for Superset webserver pods | `""` |
| `web.terminationGracePeriodSeconds` | Seconds Superset webserver pods need to terminate gracefully | `""` |
| `web.lifecycleHooks` | for Superset webserver containers to automate configuration before or after startup | `{}` |
| `web.extraEnvVars` | Array with extra environment variables to add to Superset webserver containers | `[]` |
| `web.extraEnvVarsCM` | Name of existing ConfigMap containing extra env vars for Superset webserver containers | `""` |
| `web.extraEnvVarsSecret` | Name of existing Secret containing extra env vars for Superset webserver containers | `""` |
| `web.extraVolumes` | Optionally specify extra list of additional volumes for the Superset webserver pods | `[]` |
| `web.extraVolumeMounts` | Optionally specify extra list of additional volumeMounts for the Superset webserver containers | `[]` |
| `web.sidecars` | Add additional sidecar containers to the Superset webserver pods | `[]` |
| `web.initContainers` | Add additional init containers to the Superset webserver pods | `[]` |
| `web.pdb.create` | Enable/disable a Pod Disruption Budget creation | `false` |
| `web.pdb.minAvailable` | Minimum number/percentage of pods that should remain scheduled | `1` |
| `web.pdb.maxUnavailable` | Maximum number/percentage of pods that may be made unavailable | `""` |
| `web.autoscaling.vpa.enabled` | Enable VPA | `false` |
| `web.autoscaling.vpa.annotations` | Annotations for VPA resource | `{}` |
| `web.autoscaling.vpa.controlledResources` | VPA List of resources that the vertical pod autoscaler can control. Defaults to cpu and memory | `[]` |
| `web.autoscaling.vpa.maxAllowed` | VPA Max allowed resources for the pod | `{}` |
| `web.autoscaling.vpa.minAllowed` | VPA Min allowed resources for the pod | `{}` |
| `web.autoscaling.vpa.updatePolicy.updateMode` | Autoscaling update policy Specifies whether recommended updates are applied when a Pod is started and whether recommended updates are applied during the life of a Pod | `Auto` |
| `web.autoscaling.hpa.enabled` | Enable HPA | `false` |
| `web.autoscaling.hpa.minReplicas` | Minimum number of replicas | `""` |
| `web.autoscaling.hpa.maxReplicas` | Maximum number of replicas | `""` |
| `web.autoscaling.hpa.targetCPU` | Target CPU utilization percentage | `""` |
| `web.autoscaling.hpa.targetMemory` | Target Memory utilization percentage | `""` |
| `web.service.type` | Superset webserver service type | `LoadBalancer` |
| `web.service.ports.http` | Superset webserver service HTTP port | `80` |
| `web.service.nodePorts.http` | Node port for HTTP | `""` |
| `web.service.clusterIP` | Superset webserver service Cluster IP | `""` |
| `web.service.loadBalancerIP` | Superset webserver service Load Balancer IP | `""` |
| `web.service.loadBalancerSourceRanges` | Superset webserver service Load Balancer sources | `[]` |
| `web.service.externalTrafficPolicy` | Superset webserver service external traffic policy | `Cluster` |
| `web.service.annotations` | Additional custom annotations for Superset webserver service | `{}` |
| `web.service.extraPorts` | Extra ports to expose in Superset webserver service (normally used with the `sidecars` value) | `[]` |
| `web.service.sessionAffinity` | Control where client requests go, to the same pod or round-robin | `None` |
| `web.service.sessionAffinityConfig` | Additional settings for the sessionAffinity | `{}` |
| `web.networkPolicy.enabled` | Specifies whether a NetworkPolicy should be created | `true` |
| `web.networkPolicy.allowExternal` | Don't require server label for connections | `true` |
| `web.networkPolicy.allowExternalEgress` | Allow the pod to access any range of port and all destinations. | `true` |
| `web.networkPolicy.addExternalClientAccess` | Allow access from pods with client label set to "true". Ignored if `networkPolicy.allowExternal` is true. | `true` |
| `web.networkPolicy.extraIngress` | Add extra ingress rules to the NetworkPolicy | `[]` |
| `web.networkPolicy.extraEgress` | Add extra ingress rules to the NetworkPolicy (ignored if allowExternalEgress=true) | `[]` |
| `web.networkPolicy.ingressPodMatchLabels` | Labels to match to allow traffic from other pods. Ignored if `networkPolicy.allowExternal` is true. | `{}` |
| `web.networkPolicy.ingressNSMatchLabels` | Labels to match to allow traffic from other namespaces | `{}` |
| `web.networkPolicy.ingressNSPodMatchLabels` | Pod labels to match to allow traffic from other namespaces | `{}` |
| `web.waitForExamples.enabled` | Enable init container that waits for the load_examples command to finish before starting the webserver | `false` |
| `web.waitForExamples.resourcesPreset` | Set init container resources according to one common preset (allowed values: none, nano, small, medium, large, xlarge, 2xlarge). This is ignored if waitForExamples.resources is set (waitForExamples.resources is recommended for production). | `nano` |
| `web.waitForExamples.resources` | Set init container requests and limits for different resources like CPU or memory (essential for production workloads) | `{}` |
| `web.waitForExamples.containerSecurityContext.enabled` | Enabled wait-for-redis initcontainer's Security Context | `true` |
| `web.waitForExamples.containerSecurityContext.seLinuxOptions` | Set SELinux options in wait-for-redis initcontainer | `{}` |
| `web.waitForExamples.containerSecurityContext.runAsUser` | Set runAsUser in wait-for-redis initcontainer's Security Context | `1001` |
| `web.waitForExamples.containerSecurityContext.runAsGroup` | Set runAsGroup in wait-for-redis initcontainer's Security Context | `1001` |
| `web.waitForExamples.containerSecurityContext.runAsNonRoot` | Set runAsNonRoot in wait-for-redis initcontainer's Security Context | `true` |
| `web.waitForExamples.containerSecurityContext.readOnlyRootFilesystem` | Set readOnlyRootFilesystem in wait-for-redis initcontainer's Security Context | `false` |
| `web.waitForExamples.containerSecurityContext.privileged` | Set privileged in wait-for-redis initcontainer's Security Context | `false` |
| `web.waitForExamples.containerSecurityContext.allowPrivilegeEscalation` | Set allowPrivilegeEscalation in wait-for-redis initcontainer's Security Context | `false` |
| `web.waitForExamples.containerSecurityContext.capabilities.drop` | List of capabilities to be dropped in wait-for-redis initcontainer | `["ALL"]` |
| `web.waitForExamples.containerSecurityContext.seccompProfile.type` | Set seccomp profile in wait-for-redis initcontainer | `RuntimeDefault` |
| `worker.replicaCount` | Number of Superset Celery worker replicas to deploy | `1` |
| `worker.livenessProbe.enabled` | Enable livenessProbe on Superset Celery worker containers | `true` |
| `worker.livenessProbe.initialDelaySeconds` | Initial delay seconds for livenessProbe | `15` |
| `worker.livenessProbe.periodSeconds` | Period seconds for livenessProbe | `60` |
| `worker.livenessProbe.timeoutSeconds` | Timeout seconds for livenessProbe | `30` |
| `worker.livenessProbe.failureThreshold` | Failure threshold for livenessProbe | `3` |
| `worker.livenessProbe.successThreshold` | Success threshold for livenessProbe | `1` |
| `worker.readinessProbe.enabled` | Enable readinessProbe on Superset Celery worker containers | `true` |
| `worker.readinessProbe.initialDelaySeconds` | Initial delay seconds for readinessProbe | `15` |
| `worker.readinessProbe.periodSeconds` | Period seconds for readinessProbe | `60` |
| `worker.readinessProbe.timeoutSeconds` | Timeout seconds for readinessProbe | `30` |
| `worker.readinessProbe.failureThreshold` | Failure threshold for readinessProbe | `3` |
| `worker.readinessProbe.successThreshold` | Success threshold for readinessProbe | `1` |
| `worker.startupProbe.enabled` | Enable startupProbe on Superset Celery worker containers | `false` |
| `worker.startupProbe.initialDelaySeconds` | Initial delay seconds for startupProbe | `15` |
| `worker.startupProbe.periodSeconds` | Period seconds for startupProbe | `15` |
| `worker.startupProbe.timeoutSeconds` | Timeout seconds for startupProbe | `30` |
| `worker.startupProbe.failureThreshold` | Failure threshold for startupProbe | `60` |
| `worker.startupProbe.successThreshold` | Success threshold for startupProbe | `1` |
| `worker.customLivenessProbe` | Custom livenessProbe that overrides the default one | `{}` |
| `worker.customReadinessProbe` | Custom readinessProbe that overrides the default one | `{}` |
| `worker.customStartupProbe` | Custom startupProbe that overrides the default one | `{}` |
| `worker.resourcesPreset` | Set Superset Celery worker container resources according to one common preset (allowed values: none, nano, small, medium, large, xlarge, 2xlarge). This is ignored if worker.resources is set (worker.resources is recommended for production). | `large` |
| `worker.resources` | Set Superset Celery worker container requests and limits for different resources like CPU or memory (essential for production workloads) | `{}` |
| `worker.podSecurityContext.enabled` | Enable Superset Celery worker pods' Security Context | `true` |
| `worker.podSecurityContext.fsGroupChangePolicy` | Set filesystem group change policy for Superset Celery worker pods | `Always` |
| `worker.podSecurityContext.sysctls` | Set kernel settings using the sysctl interface for Superset Celery worker pods | `[]` |
| `worker.podSecurityContext.supplementalGroups` | Set filesystem extra groups for Superset Celery worker pods | `[]` |
| `worker.podSecurityContext.fsGroup` | Set fsGroup in Superset Celery worker pods' Security Context | `1001` |
| `worker.containerSecurityContext.enabled` | Enabled Superset Celery worker container' Security Context | `true` |
| `worker.containerSecurityContext.seLinuxOptions` | Set SELinux options in Superset Celery worker container | `{}` |
| `worker.containerSecurityContext.runAsUser` | Set runAsUser in Superset Celery worker container' Security Context | `1001` |
| `worker.containerSecurityContext.runAsGroup` | Set runAsGroup in Superset Celery worker container' Security Context | `1001` |
| `worker.containerSecurityContext.runAsNonRoot` | Set runAsNonRoot in Superset Celery worker container' Security Context | `true` |
| `worker.containerSecurityContext.readOnlyRootFilesystem` | Set readOnlyRootFilesystem in Superset Celery worker container' Security Context | `false` |
| `worker.containerSecurityContext.privileged` | Set privileged in Superset Celery worker container' Security Context | `false` |
| `worker.containerSecurityContext.allowPrivilegeEscalation` | Set allowPrivilegeEscalation in Superset Celery worker container' Security Context | `false` |
| `worker.containerSecurityContext.capabilities.drop` | List of capabilities to be dropped in Superset Celery worker container | `["ALL"]` |
| `worker.containerSecurityContext.seccompProfile.type` | Set seccomp profile in Superset Celery worker container | `RuntimeDefault` |
| `worker.command` | Override default Superset Celery worker container command (useful when using custom images) | `[]` |
| `worker.args` | Override default Superset Celery worker container args (useful when using custom images) | `[]` |
| `worker.automountServiceAccountToken` | Mount Service Account token in Superset Celery worker pods | `false` |
| `worker.hostAliases` | Superset Celery worker pods host aliases | `[]` |
| `worker.deploymentAnnotations` | Annotations for Superset Celery worker deployment | `{}` |
| `worker.podLabels` | Extra labels for Superset Celery worker pods | `{}` |
| `worker.podAnnotations` | Annotations for Superset Celery worker pods | `{}` |
| `worker.podAffinityPreset` | Pod affinity preset. Ignored if `worker.affinity` is set. Allowed values: `soft` or `hard` | `""` |
| `worker.podAntiAffinityPreset` | Pod anti-affinity preset. Ignored if `worker.affinity` is set. Allowed values: `soft` or `hard` | `soft` |
| `worker.nodeAffinityPreset.type` | Node affinity preset type. Ignored if `worker.affinity` is set. Allowed values: `soft` or `hard` | `""` |
| `worker.nodeAffinityPreset.key` | Node label key to match. Ignored if `worker.affinity` is set | `""` |
| `worker.nodeAffinityPreset.values` | Node label values to match. Ignored if `worker.affinity` is set | `[]` |
| `worker.affinity` | Affinity for Superset Celery worker pods assignment | `{}` |
| `worker.nodeSelector` | Node labels for Superset Celery worker pods assignment | `{}` |
| `worker.tolerations` | Tolerations for Superset Celery worker pods assignment | `[]` |
| `worker.updateStrategy.type` | Superset celery worker deployment strategy type | `RollingUpdate` |
| `worker.priorityClassName` | Superset Celery worker pods' priorityClassName | `""` |
| `worker.topologySpreadConstraints` | Topology Spread Constraints for Superset Celery worker pod assignment spread across your cluster among failure-domains | `[]` |
| `worker.schedulerName` | Name of the k8s scheduler (other than default) for Superset Celery worker pods | `""` |
| `worker.terminationGracePeriodSeconds` | Seconds Superset Celery worker pods need to terminate gracefully | `""` |
| `worker.lifecycleHooks` | for Superset Celery worker containers to automate configuration before or after startup | `{}` |
| `worker.extraEnvVars` | Array with extra environment variables to add to Superset Celery worker containers | `[]` |
| `worker.extraEnvVarsCM` | Name of existing ConfigMap containing extra env vars for Superset Celery worker containers | `""` |
| `worker.extraEnvVarsSecret` | Name of existing Secret containing extra env vars for Superset Celery worker containers | `""` |
| `worker.extraVolumes` | Optionally specify extra list of additional volumes for the Superset Celery worker pods | `[]` |
| `worker.extraVolumeMounts` | Optionally specify extra list of additional volumeMounts for the Superset Celery worker containers | `[]` |
| `worker.sidecars` | Add additional sidecar containers to the Superset Celery worker pods | `[]` |
| `worker.initContainers` | Add additional init containers to the Superset Celery worker pods | `[]` |
| `worker.pdb.create` | Enable/disable a Pod Disruption Budget creation | `false` |
| `worker.pdb.minAvailable` | Minimum number/percentage of pods that should remain scheduled | `1` |
| `worker.pdb.maxUnavailable` | Maximum number/percentage of pods that may be made unavailable | `""` |
| `worker.autoscaling.vpa.enabled` | Enable VPA | `false` |
| `worker.autoscaling.vpa.annotations` | Annotations for VPA resource | `{}` |
| `worker.autoscaling.vpa.controlledResources` | VPA List of resources that the vertical pod autoscaler can control. Defaults to cpu and memory | `[]` |
| `worker.autoscaling.vpa.maxAllowed` | VPA Max allowed resources for the pod | `{}` |
| `worker.autoscaling.vpa.minAllowed` | VPA Min allowed resources for the pod | `{}` |
| `worker.autoscaling.vpa.updatePolicy.updateMode` | Autoscaling update policy Specifies whether recommended updates are applied when a Pod is started and whether recommended updates are applied during the life of a Pod | `Auto` |
| `worker.autoscaling.hpa.enabled` | Enable HPA | `false` |
| `worker.autoscaling.hpa.minReplicas` | Minimum number of replicas | `""` |
| `worker.autoscaling.hpa.maxReplicas` | Maximum number of replicas | `""` |
| `worker.autoscaling.hpa.targetCPU` | Target CPU utilization percentage | `""` |
| `worker.autoscaling.hpa.targetMemory` | Target Memory utilization percentage | `""` |
| `worker.networkPolicy.enabled` | Specifies whether a NetworkPolicy should be created | `true` |
| `worker.networkPolicy.allowExternal` | Don't require server label for connections | `true` |
| `worker.networkPolicy.allowExternalEgress` | Allow the pod to access any range of port and all destinations. | `true` |
| `worker.networkPolicy.extraIngress` | Add extra ingress rules to the NetworkPolicy | `[]` |
| `worker.networkPolicy.extraEgress` | Add extra ingress rules to the NetworkPolicy (ignored if allowExternalEgress=true) | `[]` |
| `init.enabled` | Enables the Superset init job, which is in charge of initialising the database, admin user credentials, DB upgrade, etc. | `true` |
| `init.extraEnvVars` | Array with extra environment variables to add to Superset init-job containers | `[]` |
| `init.extraEnvVarsCM` | Name of existing ConfigMap containing extra env vars for Superset init-job containers | `""` |
| `init.extraEnvVarsSecret` | Name of existing Secret containing extra env vars for Superset init-job containers | `""` |
| `init.extraVolumes` | Optionally specify extra list of additional volumes for the Superset init-job pods | `[]` |
| `init.extraVolumeMounts` | Optionally specify extra list of additional volumeMounts for the Superset init-job containers | `[]` |
| `init.sidecars` | Add additional sidecar containers to the Superset init-job pods | `[]` |
| `init.initContainers` | Add additional init containers to the Superset init-job pods | `[]` |
| `init.command` | Override default Superset init-job container command (useful when using custom images) | `[]` |
| `init.args` | Override default Superset init-job container args (useful when using custom images) | `[]` |
| `init.resourcesPreset` | Set Superset init-job container resources according to one common preset (allowed values: none, nano, small, medium, large, xlarge, 2xlarge). This is ignored if init.resources is set (init.resources is recommended for production). | `medium` |
| `init.resources` | Set Superset init-job container requests and limits for different resources like CPU or memory (essential for production workloads) | `{}` |
| `init.podSecurityContext.enabled` | Enable Superset init-job pods' Security Context | `true` |
| `init.podSecurityContext.fsGroupChangePolicy` | Set filesystem group change policy for Superset init-job pods | `Always` |
| `init.podSecurityContext.sysctls` | Set kernel settings using the sysctl interface for Superset init-job pods | `[]` |
| `init.podSecurityContext.supplementalGroups` | Set filesystem extra groups for Superset init-job pods | `[]` |
| `init.podSecurityContext.fsGroup` | Set fsGroup in Superset init-job pods' Security Context | `1001` |
| `init.containerSecurityContext.enabled` | Enabled Superset init-job container' Security Context | `true` |
| `init.containerSecurityContext.seLinuxOptions` | Set SELinux options in Superset init-job container | `{}` |
| `init.containerSecurityContext.runAsUser` | Set runAsUser in Superset init-job container' Security Context | `1001` |
| `init.containerSecurityContext.runAsGroup` | Set runAsGroup in Superset init-job container' Security Context | `1001` |
| `init.containerSecurityContext.runAsNonRoot` | Set runAsNonRoot in Superset init-job container' Security Context | `true` |
| `init.containerSecurityContext.readOnlyRootFilesystem` | Set readOnlyRootFilesystem in Superset init-job container' Security Context | `false` |
| `init.containerSecurityContext.privileged` | Set privileged in Superset init-job container' Security Context | `false` |
| `init.containerSecurityContext.allowPrivilegeEscalation` | Set allowPrivilegeEscalation in Superset init-job container' Security Context | `false` |
| `init.containerSecurityContext.capabilities.drop` | List of capabilities to be dropped in Superset init-job container | `["ALL"]` |
| `init.containerSecurityContext.seccompProfile.type` | Set seccomp profile in Superset init-job container | `RuntimeDefault` |
| `init.backoffLimit` | set backoff limit of the job | `10` |
| `init.automountServiceAccountToken` | Mount Service Account token in Superset init-job pods | `false` |
| `init.hostAliases` | Superset init-job pods host aliases | `[]` |
| `init.jobAnnotations` | Annotations for Superset init-job job | `{}` |
| `init.podLabels` | Extra labels for Superset init-job pods | `{}` |
| `init.podAnnotations` | Annotations for Superset init-job pods | `{}` |
| `init.networkPolicy.enabled` | Specifies whether a NetworkPolicy should be created | `true` |
| `init.networkPolicy.allowExternal` | Don't require server label for connections | `true` |
| `init.networkPolicy.allowExternalEgress` | Allow the pod to access any range of port and all destinations. | `true` |
| `init.networkPolicy.extraIngress` | Add extra ingress rules to the NetworkPolicy | `[]` |
| `init.networkPolicy.extraEgress` | Add extra ingress rules to the NetworkPolicy (ignored if allowExternalEgress=true) | `[]` |
| `beat.enabled` | Set to true to enable Superset celery beat. Required if you intend to use alerts and reports | `false` |
| `beat.livenessProbe.enabled` | Enable livenessProbe on Superset celery beat containers | `true` |
| `beat.livenessProbe.initialDelaySeconds` | Initial delay seconds for livenessProbe | `15` |
| `beat.livenessProbe.periodSeconds` | Period seconds for livenessProbe | `15` |
| `beat.livenessProbe.timeoutSeconds` | Timeout seconds for livenessProbe | `1` |
| `beat.livenessProbe.failureThreshold` | Failure threshold for livenessProbe | `3` |
| `beat.livenessProbe.successThreshold` | Success threshold for livenessProbe | `1` |
| `beat.readinessProbe.enabled` | Enable readinessProbe on Superset celery beat containers | `true` |
| `beat.readinessProbe.initialDelaySeconds` | Initial delay seconds for readinessProbe | `15` |
| `beat.readinessProbe.periodSeconds` | Period seconds for readinessProbe | `15` |
| `beat.readinessProbe.timeoutSeconds` | Timeout seconds for readinessProbe | `1` |
| `beat.readinessProbe.failureThreshold` | Failure threshold for readinessProbe | `3` |
| `beat.readinessProbe.successThreshold` | Success threshold for readinessProbe | `1` |
| `beat.startupProbe.enabled` | Enable startupProbe on Superset celery beat containers | `false` |
| `beat.startupProbe.initialDelaySeconds` | Initial delay seconds for startupProbe | `15` |
| `beat.startupProbe.periodSeconds` | Period seconds for startupProbe | `5` |
| `beat.startupProbe.timeoutSeconds` | Timeout seconds for startupProbe | `1` |
| `beat.startupProbe.failureThreshold` | Failure threshold for startupProbe | `60` |
| `beat.startupProbe.successThreshold` | Success threshold for startupProbe | `1` |
| `beat.customLivenessProbe` | Custom livenessProbe that overrides the default one | `{}` |
| `beat.customReadinessProbe` | Custom readinessProbe that overrides the default one | `{}` |
| `beat.customStartupProbe` | Custom startupProbe that overrides the default one | `{}` |
| `beat.resourcesPreset` | Set Superset celery beat container resources according to one common preset (allowed values: none, nano, small, medium, large, xlarge, 2xlarge). This is ignored if beat.resources is set (beat.resources is recommended for production). | `small` |
| `beat.resources` | Set Superset celery beat container requests and limits for different resources like CPU or memory (essential for production workloads) | `{}` |
| `beat.podSecurityContext.enabled` | Enable Superset celery beat pods' Security Context | `true` |
| `beat.podSecurityContext.fsGroupChangePolicy` | Set filesystem group change policy for Superset celery beat pods | `Always` |
| `beat.podSecurityContext.sysctls` | Set kernel settings using the sysctl interface for Superset celery beat pods | `[]` |
| `beat.podSecurityContext.supplementalGroups` | Set filesystem extra groups for Superset celery beat pods | `[]` |
| `beat.podSecurityContext.fsGroup` | Set fsGroup in Superset celery beat pods' Security Context | `1001` |
| `beat.containerSecurityContext.enabled` | Enabled Superset celery beat container' Security Context | `true` |
| `beat.containerSecurityContext.seLinuxOptions` | Set SELinux options in Superset celery beat container | `{}` |
| `beat.containerSecurityContext.runAsUser` | Set runAsUser in Superset celery beat container' Security Context | `1001` |
| `beat.containerSecurityContext.runAsGroup` | Set runAsGroup in Superset celery beat container' Security Context | `1001` |
| `beat.containerSecurityContext.runAsNonRoot` | Set runAsNonRoot in Superset celery beat container' Security Context | `true` |
| `beat.containerSecurityContext.readOnlyRootFilesystem` | Set readOnlyRootFilesystem in Superset celery beat container' Security Context | `false` |
| `beat.containerSecurityContext.privileged` | Set privileged in Superset celery beat container' Security Context | `false` |
| `beat.containerSecurityContext.allowPrivilegeEscalation` | Set allowPrivilegeEscalation in Superset celery beat container' Security Context | `false` |
| `beat.containerSecurityContext.capabilities.drop` | List of capabilities to be dropped in Superset celery beat container | `["ALL"]` |
| `beat.containerSecurityContext.seccompProfile.type` | Set seccomp profile in Superset celery beat container | `RuntimeDefault` |
| `beat.command` | Override default Superset celery beat container command (useful when using custom images) | `[]` |
| `beat.args` | Override default Superset celery beat container args (useful when using custom images) | `[]` |
| `beat.automountServiceAccountToken` | Mount Service Account token in Superset celery beat pods | `false` |
| `beat.hostAliases` | Superset celery beat pods host aliases | `[]` |
| `beat.deploymentAnnotations` | Annotations for Superset celery beat deployment | `{}` |
| `beat.podLabels` | Extra labels for Superset celery beat pods | `{}` |
| `beat.podAnnotations` | Annotations for Superset celery beat pods | `{}` |
| `beat.podAffinityPreset` | Pod affinity preset. Ignored if `beat.affinity` is set. Allowed values: `soft` or `hard` | `""` |
| `beat.podAntiAffinityPreset` | Pod anti-affinity preset. Ignored if `beat.affinity` is set. Allowed values: `soft` or `hard` | `soft` |
| `beat.nodeAffinityPreset.type` | Node affinity preset type. Ignored if `beat.affinity` is set. Allowed values: `soft` or `hard` | `""` |
| `beat.nodeAffinityPreset.key` | Node label key to match. Ignored if `beat.affinity` is set | `""` |
| `beat.nodeAffinityPreset.values` | Node label values to match. Ignored if `beat.affinity` is set | `[]` |
| `beat.affinity` | Affinity for Superset celery beat pods assignment | `{}` |
| `beat.nodeSelector` | Node labels for Superset celery beat pods assignment | `{}` |
| `beat.tolerations` | Tolerations for Superset celery beat pods assignment | `[]` |
| `beat.updateStrategy.type` | Superset celery beat deployment strategy type | `RollingUpdate` |
| `beat.priorityClassName` | Superset celery beat pods' priorityClassName | `""` |
| `beat.topologySpreadConstraints` | Topology Spread Constraints for Superset celery beat pod assignment spread across your cluster among failure-domains | `[]` |
| `beat.schedulerName` | Name of the k8s scheduler (other than default) for Superset celery beat pods | `""` |
| `beat.terminationGracePeriodSeconds` | Seconds Superset celery beat pods need to terminate gracefully | `""` |
| `beat.lifecycleHooks` | for Superset celery beat containers to automate configuration before or after startup | `{}` |
| `beat.extraEnvVars` | Array with extra environment variables to add to Superset celery beat containers | `[]` |
| `beat.extraEnvVarsCM` | Name of existing ConfigMap containing extra env vars for Superset celery beat containers | `""` |
| `beat.extraEnvVarsSecret` | Name of existing Secret containing extra env vars for Superset celery beat containers | `""` |
| `beat.extraVolumes` | Optionally specify extra list of additional volumes for the Superset celery beat pods | `[]` |
| `beat.extraVolumeMounts` | Optionally specify extra list of additional volumeMounts for the Superset celery beat containers | `[]` |
| `beat.sidecars` | Add additional sidecar containers to the Superset celery beat pods | `[]` |
| `beat.initContainers` | Add additional init containers to the Superset celery beat pods | `[]` |
| `beat.pdb.create` | Enable/disable a Pod Disruption Budget creation | `false` |
| `beat.pdb.minAvailable` | Minimum number/percentage of pods that should remain scheduled | `1` |
| `beat.pdb.maxUnavailable` | Maximum number/percentage of pods that may be made unavailable | `""` |
| `beat.networkPolicy.enabled` | Specifies whether a NetworkPolicy should be created | `true` |
| `beat.networkPolicy.allowExternal` | Don't require server label for connections | `true` |
| `beat.networkPolicy.allowExternalEgress` | Allow the pod to access any range of port and all destinations. | `true` |
| `beat.networkPolicy.extraIngress` | Add extra ingress rules to the NetworkPolicy | `[]` |
| `beat.networkPolicy.extraEgress` | Add extra ingress rules to the NetworkPolicy (ignored if allowExternalEgress=true) | `[]` |
| `flower.enabled` | Set to true to enable Superset celery flower. Required if you intend to use alerts and reports | `false` |
| `flower.replicaCount` | Number of Superset Celery flower replicas to deploy | `1` |
| `flower.containerPorts.flower` | Superset celery flower container port | `5555` |
| `flower.extraContainerPorts` | Optionally specify extra list of additional ports for WordPress container(s) | `[]` |
| `flower.auth.enabled` | Enables Apache Celery flower HTTP basic authentication | `true` |
| `flower.auth.username` | Apache Celery flower username | `user` |
| `flower.auth.password` | Apache Celery flower password | `""` |
| `flower.auth.usePasswordFiles` | Mount credentials as files instead of using an environment variable | `true` |
| `flower.auth.existingSecret` | Name of existing secret to use for Superset Celery flower | `""` |
| `flower.livenessProbe.enabled` | Enable livenessProbe on Superset celery flower containers | `true` |
| `flower.livenessProbe.initialDelaySeconds` | Initial delay seconds for livenessProbe | `30` |
| `flower.livenessProbe.periodSeconds` | Period seconds for livenessProbe | `15` |
| `flower.livenessProbe.timeoutSeconds` | Timeout seconds for livenessProbe | `1` |
| `flower.livenessProbe.failureThreshold` | Failure threshold for livenessProbe | `3` |
| `flower.livenessProbe.successThreshold` | Success threshold for livenessProbe | `1` |
| `flower.readinessProbe.enabled` | Enable readinessProbe on Superset celery flower containers | `true` |
| `flower.readinessProbe.initialDelaySeconds` | Initial delay seconds for readinessProbe | `15` |
| `flower.readinessProbe.periodSeconds` | Period seconds for readinessProbe | `15` |
| `flower.readinessProbe.timeoutSeconds` | Timeout seconds for readinessProbe | `1` |
| `flower.readinessProbe.failureThreshold` | Failure threshold for readinessProbe | `3` |
| `flower.readinessProbe.successThreshold` | Success threshold for readinessProbe | `1` |
| `flower.startupProbe.enabled` | Enable startupProbe on Superset celery flower containers | `false` |
| `flower.startupProbe.initialDelaySeconds` | Initial delay seconds for startupProbe | `15` |
| `flower.startupProbe.periodSeconds` | Period seconds for startupProbe | `5` |
| `flower.startupProbe.timeoutSeconds` | Timeout seconds for startupProbe | `1` |
| `flower.startupProbe.failureThreshold` | Failure threshold for startupProbe | `60` |
| `flower.startupProbe.successThreshold` | Success threshold for startupProbe | `1` |
| `flower.customLivenessProbe` | Custom livenessProbe that overrides the default one | `{}` |
| `flower.customReadinessProbe` | Custom readinessProbe that overrides the default one | `{}` |
| `flower.customStartupProbe` | Custom startupProbe that overrides the default one | `{}` |
| `flower.resourcesPreset` | Set Superset celery flower container resources according to one common preset (allowed values: none, nano, small, medium, large, xlarge, 2xlarge). This is ignored if flower.resources is set (flower.resources is recommended for production). | `small` |
| `flower.resources` | Set Superset celery flower container requests and limits for different resources like CPU or memory (essential for production workloads) | `{}` |
| `flower.podSecurityContext.enabled` | Enable Superset celery flower pods' Security Context | `true` |
| `flower.podSecurityContext.fsGroupChangePolicy` | Set filesystem group change policy for Superset celery flower pods | `Always` |
| `flower.podSecurityContext.sysctls` | Set kernel settings using the sysctl interface for Superset celery flower pods | `[]` |
| `flower.podSecurityContext.supplementalGroups` | Set filesystem extra groups for Superset celery flower pods | `[]` |
| `flower.podSecurityContext.fsGroup` | Set fsGroup in Superset celery flower pods' Security Context | `1001` |
| `flower.containerSecurityContext.enabled` | Enabled Superset celery flower container' Security Context | `true` |
| `flower.containerSecurityContext.seLinuxOptions` | Set SELinux options in Superset celery flower container | `{}` |
| `flower.containerSecurityContext.runAsUser` | Set runAsUser in Superset celery flower container' Security Context | `1001` |
| `flower.containerSecurityContext.runAsGroup` | Set runAsGroup in Superset celery flower container' Security Context | `1001` |
| `flower.containerSecurityContext.runAsNonRoot` | Set runAsNonRoot in Superset celery flower container' Security Context | `true` |
| `flower.containerSecurityContext.readOnlyRootFilesystem` | Set readOnlyRootFilesystem in Superset celery flower container' Security Context | `false` |
| `flower.containerSecurityContext.privileged` | Set privileged in Superset celery flower container' Security Context | `false` |
| `flower.containerSecurityContext.allowPrivilegeEscalation` | Set allowPrivilegeEscalation in Superset celery flower container' Security Context | `false` |
| `flower.containerSecurityContext.capabilities.drop` | List of capabilities to be dropped in Superset celery flower container | `["ALL"]` |
| `flower.containerSecurityContext.seccompProfile.type` | Set seccomp profile in Superset celery flower container | `RuntimeDefault` |
| `flower.command` | Override default Superset celery flower container command (useful when using custom images) | `[]` |
| `flower.args` | Override default Superset celery flower container args (useful when using custom images) | `[]` |
| `flower.automountServiceAccountToken` | Mount Service Account token in Superset celery flower pods | `false` |
| `flower.hostAliases` | Superset celery flower pods host aliases | `[]` |
| `flower.deploymentAnnotations` | Annotations for Superset celery flower deployment | `{}` |
| `flower.podLabels` | Extra labels for Superset celery flower pods | `{}` |
| `flower.podAnnotations` | Annotations for Superset celery flower pods | `{}` |
| `flower.podAffinityPreset` | Pod affinity preset. Ignored if `flower.affinity` is set. Allowed values: `soft` or `hard` | `""` |
| `flower.podAntiAffinityPreset` | Pod anti-affinity preset. Ignored if `flower.affinity` is set. Allowed values: `soft` or `hard` | `soft` |
| `flower.nodeAffinityPreset.type` | Node affinity preset type. Ignored if `flower.affinity` is set. Allowed values: `soft` or `hard` | `""` |
| `flower.nodeAffinityPreset.key` | Node label key to match. Ignored if `flower.affinity` is set | `""` |
| `flower.nodeAffinityPreset.values` | Node label values to match. Ignored if `flower.affinity` is set | `[]` |
| `flower.affinity` | Affinity for Superset celery flower pods assignment | `{}` |
| `flower.nodeSelector` | Node labels for Superset celery flower pods assignment | `{}` |
| `flower.tolerations` | Tolerations for Superset celery flower pods assignment | `[]` |
| `flower.updateStrategy.type` | Superset celery flower deployment strategy type | `RollingUpdate` |
| `flower.priorityClassName` | Superset celery flower pods' priorityClassName | `""` |
| `flower.topologySpreadConstraints` | Topology Spread Constraints for Superset celery flower pod assignment spread across your cluster among failure-domains | `[]` |
| `flower.schedulerName` | Name of the k8s scheduler (other than default) for Superset celery flower pods | `""` |
| `flower.terminationGracePeriodSeconds` | Seconds Superset celery flower pods need to terminate gracefully | `""` |
| `flower.lifecycleHooks` | for Superset celery flower containers to automate configuration before or after startup | `{}` |
| `flower.extraEnvVars` | Array with extra environment variables to add to Superset celery flower containers | `[]` |
| `flower.extraEnvVarsCM` | Name of existing ConfigMap containing extra env vars for Superset celery flower containers | `""` |
| `flower.extraEnvVarsSecret` | Name of existing Secret containing extra env vars for Superset celery flower containers | `""` |
| `flower.extraVolumes` | Optionally specify extra list of additional volumes for the Superset celery flower pods | `[]` |
| `flower.extraVolumeMounts` | Optionally specify extra list of additional volumeMounts for the Superset celery flower containers | `[]` |
| `flower.sidecars` | Add additional sidecar containers to the Superset celery flower pods | `[]` |
| `flower.initContainers` | Add additional init containers to the Superset celery flower pods | `[]` |
| `flower.pdb.create` | Enable/disable a Pod Disruption Budget creation | `false` |
| `flower.pdb.minAvailable` | Minimum number/percentage of pods that should remain scheduled | `1` |
| `flower.pdb.maxUnavailable` | Maximum number/percentage of pods that may be made unavailable | `""` |
| `flower.autoscaling.vpa.enabled` | Enable VPA | `false` |
| `flower.autoscaling.vpa.annotations` | Annotations for VPA resource | `{}` |
| `flower.autoscaling.vpa.controlledResources` | VPA List of resources that the vertical pod autoscaler can control. Defaults to cpu and memory | `[]` |
| `flower.autoscaling.vpa.maxAllowed` | VPA Max allowed resources for the pod | `{}` |
| `flower.autoscaling.vpa.minAllowed` | VPA Min allowed resources for the pod | `{}` |
| `flower.autoscaling.vpa.updatePolicy.updateMode` | Autoscaling update policy Specifies whether recommended updates are applied when a Pod is started and whether recommended updates are applied during the life of a Pod | `Auto` |
| `flower.autoscaling.hpa.enabled` | Enable HPA | `false` |
| `flower.autoscaling.hpa.minReplicas` | Minimum number of replicas | `""` |
| `flower.autoscaling.hpa.maxReplicas` | Maximum number of replicas | `""` |
| `flower.autoscaling.hpa.targetCPU` | Target CPU utilization percentage | `""` |
| `flower.autoscaling.hpa.targetMemory` | Target Memory utilization percentage | `""` |
| `flower.service.type` | Superset celery flower service type | `LoadBalancer` |
| `flower.service.ports.flower` | Superset celery flower service port | `5555` |
| `flower.service.nodePorts.flower` | Node port for flower | `""` |
| `flower.service.clusterIP` | Superset celery flower service Cluster IP | `""` |
| `flower.service.loadBalancerIP` | Superset celery flower service Load Balancer IP | `""` |
| `flower.service.loadBalancerSourceRanges` | Superset celery flower service Load Balancer sources | `[]` |
| `flower.service.externalTrafficPolicy` | Superset celery flower service external traffic policy | `Cluster` |
| `flower.service.annotations` | Additional custom annotations for Superset celery flower service | `{}` |
| `flower.service.extraPorts` | Extra ports to expose in Superset celery flower service (normally used with the `sidecars` value) | `[]` |
| `flower.service.sessionAffinity` | Control where client requests go, to the same pod or round-robin | `None` |
| `flower.service.sessionAffinityConfig` | Additional settings for the sessionAffinity | `{}` |
| `flower.networkPolicy.enabled` | Specifies whether a NetworkPolicy should be created | `true` |
| `flower.networkPolicy.allowExternal` | Don't require server label for connections | `true` |
| `flower.networkPolicy.allowExternalEgress` | Allow the pod to access any range of port and all destinations. | `true` |
| `flower.networkPolicy.addExternalClientAccess` | Allow access from pods with client label set to "true". Ignored if `networkPolicy.allowExternal` is true. | `true` |
| `flower.networkPolicy.extraIngress` | Add extra ingress rules to the NetworkPolicy | `[]` |
| `flower.networkPolicy.extraEgress` | Add extra ingress rules to the NetworkPolicy (ignored if allowExternalEgress=true) | `[]` |
| `flower.networkPolicy.ingressPodMatchLabels` | Labels to match to allow traffic from other pods. Ignored if `networkPolicy.allowExternal` is true. | `{}` |
| `flower.networkPolicy.ingressNSMatchLabels` | Labels to match to allow traffic from other namespaces | `{}` |
| `flower.networkPolicy.ingressNSPodMatchLabels` | Pod labels to match to allow traffic from other namespaces | `{}` |
| `ingress.enabled` | Enable ingress record generation for Superset | `false` |
| `ingress.pathType` | Ingress path type | `ImplementationSpecific` |
| `ingress.apiVersion` | Force Ingress API version (automatically detected if not set) | `""` |
| `ingress.hostname` | Default host for the ingress record | `superset.local` |
| `ingress.ingressClassName` | IngressClass that will be be used to implement the Ingress (Kubernetes 1.18+) | `""` |
| `ingress.path` | Default path for the ingress record | `/` |
| `ingress.annotations` | Additional annotations for the Ingress resource. To enable certificate autogeneration, place here your cert-manager annotations. | `{}` |
| `ingress.tls` | Enable TLS configuration for the host defined at `ingress.hostname` parameter | `false` |
| `ingress.selfSigned` | Create a TLS secret for this ingress record using self-signed certificates generated by Helm | `false` |
| `ingress.extraHosts` | An array with additional hostname(s) to be covered with the ingress record | `[]` |
| `ingress.extraPaths` | An array with additional arbitrary paths that may need to be added to the ingress under the main host | `[]` |
| `ingress.extraTls` | TLS configuration for additional hostname(s) to be covered with this ingress record | `[]` |
| `ingress.secrets` | Custom TLS certificates as secrets | `[]` |
| `ingress.extraRules` | Additional rules to be covered with this ingress record | `[]` |
### Default Init Container Parameters
| Name | Description | Value |
| -------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------- |
| `defaultInitContainers.waitForDB.enabled` | Enable init container that waits for the Database to be available | `true` |
| `defaultInitContainers.waitForDB.resourcesPreset` | Set init container resources according to one common preset (allowed values: none, nano, small, medium, large, xlarge, 2xlarge). This is ignored if waitForDB.resources is set (waitForDB.resources is recommended for production). | `nano` |
| `defaultInitContainers.waitForDB.resources` | Set init container requests and limits for different resources like CPU or memory (essential for production workloads) | `{}` |
| `defaultInitContainers.waitForDB.containerSecurityContext.enabled` | Enabled wait-for-db initcontainer's Security Context | `true` |
| `defaultInitContainers.waitForDB.containerSecurityContext.seLinuxOptions` | Set SELinux options in wait-for-db initcontainer | `{}` |
| `defaultInitContainers.waitForDB.containerSecurityContext.runAsUser` | Set runAsUser in wait-for-db initcontainer's Security Context | `1001` |
| `defaultInitContainers.waitForDB.containerSecurityContext.runAsGroup` | Set runAsGroup in wait-for-db initcontainer's Security Context | `1001` |
| `defaultInitContainers.waitForDB.containerSecurityContext.runAsNonRoot` | Set runAsNonRoot in wait-for-db initcontainer's Security Context | `true` |
| `defaultInitContainers.waitForDB.containerSecurityContext.readOnlyRootFilesystem` | Set readOnlyRootFilesystem in wait-for-db initcontainer's Security Context | `false` |
| `defaultInitContainers.waitForDB.containerSecurityContext.privileged` | Set privileged in wait-for-db initcontainer's Security Context | `false` |
| `defaultInitContainers.waitForDB.containerSecurityContext.allowPrivilegeEscalation` | Set allowPrivilegeEscalation in wait-for-db initcontainer's Security Context | `false` |
| `defaultInitContainers.waitForDB.containerSecurityContext.capabilities.drop` | List of capabilities to be dropped in wait-for-db initcontainer | `["ALL"]` |
| `defaultInitContainers.waitForDB.containerSecurityContext.seccompProfile.type` | Set seccomp profile in wait-for-db initcontainer | `RuntimeDefault` |
| `defaultInitContainers.waitForRedis.enabled` | Enable init container that waits for Redis to be available | `true` |
| `defaultInitContainers.waitForRedis.resourcesPreset` | Set init container resources according to one common preset (allowed values: none, nano, small, medium, large, xlarge, 2xlarge). This is ignored if waitForRedis.resources is set (waitForRedis.resources is recommended for production). | `nano` |
| `defaultInitContainers.waitForRedis.resources` | Set init container requests and limits for different resources like CPU or memory (essential for production workloads) | `{}` |
| `defaultInitContainers.waitForRedis.containerSecurityContext.enabled` | Enabled wait-for-redis initcontainer's Security Context | `true` |
| `defaultInitContainers.waitForRedis.containerSecurityContext.seLinuxOptions` | Set SELinux options in wait-for-redis initcontainer | `{}` |
| `defaultInitContainers.waitForRedis.containerSecurityContext.runAsUser` | Set runAsUser in wait-for-redis initcontainer's Security Context | `1001` |
| `defaultInitContainers.waitForRedis.containerSecurityContext.runAsGroup` | Set runAsGroup in wait-for-redis initcontainer's Security Context | `1001` |
| `defaultInitContainers.waitForRedis.containerSecurityContext.runAsNonRoot` | Set runAsNonRoot in wait-for-redis initcontainer's Security Context | `true` |
| `defaultInitContainers.waitForRedis.containerSecurityContext.readOnlyRootFilesystem` | Set readOnlyRootFilesystem in wait-for-redis initcontainer's Security Context | `false` |
| `defaultInitContainers.waitForRedis.containerSecurityContext.privileged` | Set privileged in wait-for-redis initcontainer's Security Context | `false` |
| `defaultInitContainers.waitForRedis.containerSecurityContext.allowPrivilegeEscalation` | Set allowPrivilegeEscalation in wait-for-redis initcontainer's Security Context | `false` |
| `defaultInitContainers.waitForRedis.containerSecurityContext.capabilities.drop` | List of capabilities to be dropped in wait-for-redis initcontainer | `["ALL"]` |
| `defaultInitContainers.waitForRedis.containerSecurityContext.seccompProfile.type` | Set seccomp profile in wait-for-redis initcontainer | `RuntimeDefault` |
### Other Parameters
| Name | Description | Value |
| --------------------------------------------- | ---------------------------------------------------------------- | ------ |
| `serviceAccount.create` | Specifies whether a ServiceAccount should be created | `true` |
| `serviceAccount.name` | The name of the ServiceAccount to use. | `""` |
| `serviceAccount.annotations` | Additional Service Account annotations (evaluated as a template) | `{}` |
| `serviceAccount.automountServiceAccountToken` | Automount service account token for the server service account | `true` |
### Superset database parameters
| Name | Description | Value |
| --------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------ |
| `postgresql.enabled` | Switch to enable or disable the PostgreSQL helm chart | `true` |
| `postgresql.auth.enablePostgresUser` | Assign a password to the "postgres" admin user. Otherwise, remote access will be blocked for this user | `true` |
| `postgresql.auth.username` | Name for a custom user to create | `bn_superset` |
| `postgresql.auth.password` | Password for the custom user to create | `""` |
| `postgresql.auth.database` | Name for a custom database to create | `bitnami_superset` |
| `postgresql.auth.existingSecret` | Name of existing secret to use for PostgreSQL credentials | `""` |
| `postgresql.architecture` | PostgreSQL architecture (`standalone` or `replication`) | `standalone` |
| `postgresql.primary.service.ports.postgresql` | PostgreSQL service port | `5432` |
| `postgresql.primary.resourcesPreset` | Set container resources according to one common preset (allowed values: none, nano, small, medium, large, xlarge, 2xlarge). This is ignored if primary.resources is set (primary.resources is recommended for production). | `nano` |
| `postgresql.primary.resources` | Set container requests and limits for different resources like CPU or memory (essential for production workloads) | `{}` |
| `externalDatabase.host` | Database host | `""` |
| `externalDatabase.port` | Database port number | `5432` |
| `externalDatabase.user` | Non-root username for Superset | `bn_superset` |
| `externalDatabase.password` | Password for the non-root username for Superset | `""` |
| `externalDatabase.database` | Superset database name | `bitnami_superset` |
| `externalDatabase.existingSecret` | Name of an existing secret resource containing the database credentials | `""` |
| `externalDatabase.existingSecretPasswordKey` | Name of an existing secret key containing the database credentials | `db-password` |
| `redis.enabled` | Switch to enable or disable the Redis&reg; helm | `true` |
| `redis.auth.enabled` | Enable password authentication | `true` |
| `redis.auth.password` | Redis&reg; password | `""` |
| `redis.auth.existingSecret` | The name of an existing secret with Redis&reg; credentials | `""` |
| `redis.architecture` | Redis&reg; architecture. Allowed values: `standalone` or `replication` | `standalone` |
| `redis.master.service.ports.redis` | Redis&reg; port | `6379` |
| `redis.master.resourcesPreset` | Set container resources according to one common preset (allowed values: none, nano, small, medium, large, xlarge, 2xlarge). This is ignored if master.resources is set (master.resources is recommended for production). | `nano` |
| `redis.master.resources` | Set container requests and limits for different resources like CPU or memory (essential for production workloads) | `{}` |
| `externalRedis.host` | Redis&reg; host | `""` |
| `externalRedis.port` | Redis&reg; port number | `6379` |
| `externalRedis.username` | Redis&reg; username | `default` |
| `externalRedis.password` | Redis&reg; password | `""` |
| `externalRedis.existingSecret` | Name of an existing secret resource containing the Redis&trade credentials | `""` |
| `externalRedis.existingSecretPasswordKey` | Name of an existing secret key containing the Redis&trade credentials | `redis-password` |
The above parameters map to the env variables defined in [bitnami/superset](https://github.com/bitnami/containers/tree/main/bitnami/superset). For more information please refer to the [bitnami/superset](https://github.com/bitnami/containers/tree/main/bitnami/superset) image documentation.
Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example,
```console
helm install my-release \
--set auth.username=admin \
--set auth.password=password \
--set postgresql.auth.password=secretpassword \
oci://REGISTRY_NAME/REPOSITORY_NAME/superset
```
> Note: You need to substitute the placeholders `REGISTRY_NAME` and `REPOSITORY_NAME` with a reference to your Helm chart registry and repository. For example, in the case of Bitnami, you need to use `REGISTRY_NAME=registry-1.docker.io` and `REPOSITORY_NAME=bitnamicharts`.
The above command sets the Superset administrator account username and password to `admin` and `password` respectively. Additionally, it sets the PostgreSQL user password to `secretpassword`.
> NOTE: Once this chart is deployed, it is not possible to change the application's access credentials, such as usernames or passwords, using Helm. To change these application credentials after deployment, delete any persistent volumes (PVs) used by the chart and re-deploy it, or use the application's built-in administrative tools if available.
Alternatively, a YAML file that specifies the values for the above parameters can be provided while installing the chart. For example,
```console
helm install my-release -f values.yaml oci://REGISTRY_NAME/REPOSITORY_NAME/superset
```
> Note: You need to substitute the placeholders `REGISTRY_NAME` and `REPOSITORY_NAME` with a reference to your Helm chart registry and repository. For example, in the case of Bitnami, you need to use `REGISTRY_NAME=registry-1.docker.io` and `REPOSITORY_NAME=bitnamicharts`.
> **Tip**: You can use the default [values.yaml](https://github.com/bitnami/charts/blob/main/template/superset/values.yaml)
## Troubleshooting
Find more information about how to deal with common errors related to Bitnami's Helm charts in [this troubleshooting guide](https://docs.bitnami.com/general/how-to/troubleshoot-helm-chart-issues).
## License
Copyright &copy; 2024 Broadcom. The term "Broadcom" refers to Broadcom Inc. and/or its subsidiaries.
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
<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.

View File

@@ -0,0 +1,90 @@
CHART NAME: {{ .Chart.Name }}
CHART VERSION: {{ .Chart.Version }}
APP VERSION: {{ .Chart.AppVersion }}
{{- $releaseNamespace := .Release.Namespace }}
{{- $clusterDomain := .Values.clusterDomain }}
{{- $fullname := include "common.names.fullname" . }}
** Please be patient while the chart is being deployed **
{{- if .Values.diagnosticMode.enabled }}
The chart has been deployed in diagnostic mode. All probes have been disabled and the command has been overwritten with:
command: {{- include "common.tplvalues.render" (dict "value" .Values.diagnosticMode.command "context" $) | nindent 4 }}
args: {{- include "common.tplvalues.render" (dict "value" .Values.diagnosticMode.args "context" $) | nindent 4 }}
Get the list of pods by executing:
kubectl get pods --namespace {{ include "common.names.namespace" . | quote }} -l app.kubernetes.io/instance={{ .Release.Name }}
Access the pod you want to debug by executing
kubectl exec --namespace {{ include "common.names.namespace" . | quote }} -ti <NAME OF THE POD> -- bash
In order to replicate the container startup scripts execute this command:
/opt/bitnami/scripts/superset/entrypoint.sh /opt/bitnami/scripts/superset/run.sh
{{- else }}
Superset can be accessed via port {{ .Values.web.service.ports.http }} on the following DNS name from within your cluster:
{{ printf "%s.%s.svc.%s" $fullname $releaseNamespace $clusterDomain }}
To connect to Superset from outside the cluster, perform the following steps:
{{- if .Values.ingress.enabled }}
1. Get the Superset URL and associate its hostname to your cluster external IP:
echo "Superset URL: http{{ if .Values.ingress.tls }}s{{ end }}://{{ .Values.ingress.hostname }}"
{{- else if eq .Values.web.service.type "ClusterIP" }}
1. Create a port-forward to the service:
kubectl port-forward --namespace {{ $releaseNamespace }} svc/{{ $fullname }} {{ .Values.web.service.ports.http }}:{{ .Values.web.service.ports.http }} &
echo "Superset URL: http://127.0.0.1:{{ .Values.web.service.ports.http }}"
{{- else if eq .Values.web.service.type "NodePort" }}
1. Obtain the NodePort IP and port:
export NODE_IP=$(kubectl get nodes --namespace {{ $releaseNamespace }} -o jsonpath="{.items[0].status.addresses[0].address}")
export NODE_PORT=$(kubectl get svc --namespace {{ $releaseNamespace }} {{ $fullname }} -o jsonpath="{.spec.ports[0].nodePort}")
echo "Superset URL: http://${NODE_IP}:$NODE_PORT"
{{- else if eq .Values.web.service.type "LoadBalancer" }}
1. Obtain the LoadBalancer IP:
NOTE: It may take a few minutes for the LoadBalancer IP to be available.
Watch the status with: 'kubectl get svc --namespace {{ .Release.Namespace }} -w {{ $fullname }}'
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ $fullname }} --template "{{ "{{ range (index .status.loadBalancer.ingress 0) }}{{ . }}{{ end }}" }}")
echo "Superset URL: http://${SERVICE_IP}:{{ .Values.web.service.ports.http }}"
{{- end }}
2. Open a browser and access Superset using the obtained URL.
3. Get your Superset login credentials by running:
{{ include "common.utils.secret.getvalue" (dict "secret" (include "superset.secretName" .) "field" "superset-password" "context" $) }}
echo User: {{ default "user" .Values.auth.username }}
echo Password: $SUPERSET_PASSWORD
{{- if and .Values.flower.enabled .Values.flower.auth.enabled }}
4. Celery flower has been enabled. You can get your Superset Celery flower login credentials by running:
{{ include "common.utils.secret.getvalue" (dict "secret" (include "superset.flower.secretName" .) "field" "flower-basic-auth" "context" $) }}
echo Flower credentials: $FLOWER_BASIC_AUTH
{{- end }}
{{- end }}
{{- include "common.warnings.rollingTag" .Values.image }}
{{- include "common.warnings.resources" (dict "sections" (list "web" "worker" "init" "beat" "flower" "defaultInitContainers.waitForDB" "defaultInitContainers.waitForRedis") "context" $) }}
{{- include "common.warnings.modifiedImages" (dict "images" (list .Values.image) "context" $) }}
{{- include "common.errors.insecureImages" (dict "images" (list .Values.image) "context" $) }}
{{- include "superset.validateValues" . }}

View File

@@ -0,0 +1,428 @@
{{/*
Copyright Broadcom, Inc. All Rights Reserved.
SPDX-License-Identifier: APACHE-2.0
*/}}
{{/*
Return the proper Superset image name
*/}}
{{- define "superset.image" -}}
{{ include "common.images.image" (dict "imageRoot" .Values.image "global" .Values.global) }}
{{- end -}}
{{/*
Return the proper Docker Image Registry Secret Names
*/}}
{{- define "superset.imagePullSecrets" -}}
{{- include "common.images.renderPullSecrets" (dict "images" (list .Values.image) "context" $) -}}
{{- end -}}
{{/*
Create a default fully qualified name for Superset web component.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
*/}}
{{- define "superset.web.fullname" -}}
{{- printf "%s-web" (include "common.names.fullname" .) | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{/*
Create a default fully qualified name for Superset Celery flower component.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
*/}}
{{- define "superset.flower.fullname" -}}
{{- printf "%s-flower" (include "common.names.fullname" .) | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{/*
Create a default fully qualified name for Superset Celery worker component.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
*/}}
{{- define "superset.worker.fullname" -}}
{{- printf "%s-worker" (include "common.names.fullname" .) | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{/*
Create a default fully qualified name for Superset Celery beat component.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
*/}}
{{- define "superset.beat.fullname" -}}
{{- printf "%s-beat" (include "common.names.fullname" .) | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{/*
Create a default fully qualified postgresql name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
*/}}
{{- define "superset.postgresql.fullname" -}}
{{- include "common.names.dependency.fullname" (dict "chartName" "postgresql" "chartValues" .Values.postgresql "context" $) -}}
{{- end -}}
{{/*
Create a default fully qualified redis name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
*/}}
{{- define "superset.redis.fullname" -}}
{{- include "common.names.dependency.fullname" (dict "chartName" "redis-master" "chartValues" .Values.redis "context" $) -}}
{{- end -}}
{{/*
Create the name of the service account to use
*/}}
{{- define "superset.serviceAccountName" -}}
{{- if .Values.serviceAccount.create -}}
{{ default (include "common.names.fullname" .) .Values.serviceAccount.name }}
{{- else -}}
{{ default "default" .Values.serviceAccount.name }}
{{- end -}}
{{- end -}}
{{/*
Get the Redis&reg; credentials secret.
*/}}
{{- define "superset.redis.secretName" -}}
{{- if .Values.redis.enabled -}}
{{- $name := default "redis" .Values.redis.nameOverride -}}
{{- default (printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-") (tpl .Values.redis.auth.existingSecret $) -}}
{{- else }}
{{- default (printf "%s-externalredis" .Release.Name) (tpl .Values.externalRedis.existingSecret $) -}}
{{- end -}}
{{- end -}}
{{/*
Get the Postgresql credentials secret.
*/}}
{{- define "superset.postgresql.secretName" -}}
{{- if .Values.postgresql.enabled }}
{{- tpl (coalesce (((.Values.global).postgresql).auth).existingSecret .Values.postgresql.auth.existingSecret (include "superset.postgresql.fullname" .)) $ -}}
{{- else -}}
{{- default (printf "%s-externaldb" .Release.Name) (tpl .Values.externalDatabase.existingSecret $) -}}
{{- end -}}
{{- end -}}
{{/*
Get the Superset Celery flower secret name
*/}}
{{- define "superset.flower.secretName" -}}
{{- default (include "superset.flower.fullname" .) (tpl .Values.flower.auth.existingSecret .) -}}
{{- end -}}
{{/*
Get the secret name
*/}}
{{- define "superset.secretName" -}}
{{- default (include "common.names.fullname" .) (tpl .Values.auth.existingSecret .) -}}
{{- end -}}
{{/*
Get the configmap name
*/}}
{{- define "superset.configMapName" -}}
{{- default (printf "%s-configuration" (include "common.names.fullname" .)) (tpl .Values.existingConfigmap .) -}}
{{- end -}}
{{/*
Add environment variables to configure database values
*/}}
{{- define "superset.database.host" -}}
{{- ternary (include "superset.postgresql.fullname" .) .Values.externalDatabase.host .Values.postgresql.enabled -}}
{{- end -}}
{{/*
Add environment variables to configure database values
*/}}
{{- define "superset.database.user" -}}
{{- if .Values.postgresql.enabled }}
{{- default .Values.postgresql.auth.username (((.Values.global).postgresql).auth).username -}}
{{- else -}}
{{- .Values.externalDatabase.user -}}
{{- end -}}
{{- end -}}
{{/*
Add environment variables to configure database values
*/}}
{{- define "superset.database.name" -}}
{{- if .Values.postgresql.enabled }}
{{- default .Values.postgresql.auth.database (((.Values.global).postgresql).auth).database -}}
{{- else -}}
{{- .Values.externalDatabase.database -}}
{{- end -}}
{{- end -}}
{{/*
Add environment variables to configure database values
*/}}
{{- define "superset.database.secretKey" -}}
{{- ternary "password" (tpl .Values.externalDatabase.existingSecretPasswordKey .) .Values.postgresql.enabled -}}
{{- end -}}
{{/*
Add environment variables to configure database values
*/}}
{{- define "superset.database.port" -}}
{{- if .Values.postgresql.enabled -}}
{{- default .Values.postgresql.primary.service.ports.postgresql ((((.Values.global).postgresql).service).ports).postgresql -}}
{{- else -}}
{{- .Values.externalDatabase.port -}}
{{- end -}}
{{- end -}}
{{/*
Add environment variables to configure redis values
*/}}
{{- define "superset.redis.host" -}}
{{- ternary (include "superset.redis.fullname" .) .Values.externalRedis.host .Values.redis.enabled -}}
{{- end -}}
{{/*
Add environment variables to configure redis values
*/}}
{{- define "superset.redis.port" -}}
{{- ternary .Values.redis.master.service.ports.redis .Values.externalRedis.port .Values.redis.enabled -}}
{{- end -}}
{{/*
Add environment variables to configure redis values
*/}}
{{- define "superset.redis.secretKey" -}}
{{- ternary "redis-password" (tpl .Values.externalRedis.existingSecretPasswordKey .) .Values.redis.enabled -}}
{{- end -}}
{{/*
Add environment variables to configure database values
*/}}
{{- define "superset.configure.database" -}}
- name: SUPERSET_DATABASE_HOST
value: {{ include "superset.database.host" . | quote }}
- name: SUPERSET_DATABASE_PORT_NUMBER
value: {{ include "superset.database.port" . | quote }}
- name: SUPERSET_DATABASE_NAME
value: {{ include "superset.database.name" . | quote }}
- name: SUPERSET_DATABASE_USER
value: {{ include "superset.database.user" . | quote }}
{{- if or (not .Values.postgresql.enabled) .Values.postgresql.auth.enablePostgresUser }}
- name: SUPERSET_DATABASE_PASSWORD
valueFrom:
secretKeyRef:
name: {{ include "superset.postgresql.secretName" . }}
key: {{ include "superset.database.secretKey" . }}
{{- else }}
- name: ALLOW_EMPTY_PASSWORD
value: "true"
{{- end }}
{{- end -}}
{{/*
Add environment variables to configure redis values
*/}}
{{- define "superset.configure.redis" -}}
- name: REDIS_HOST
value: {{ include "superset.redis.host" . | quote }}
- name: REDIS_PORT_NUMBER
value: {{ include "superset.redis.port" . | quote }}
- name: REDIS_USER
value: {{ ternary "default" .Values.externalRedis.username .Values.redis.enabled | quote }}
- name: REDIS_PASSWORD
valueFrom:
secretKeyRef:
name: {{ include "superset.redis.secretName" . }}
key: {{ include "superset.redis.secretKey" . }}
{{- end -}}
{{/*
Add environment variables to configure superset common values
*/}}
{{- define "superset.configure.common" -}}
- name: SUPERSET_SECRET_KEY
valueFrom:
secretKeyRef:
name: {{ include "superset.secretName" . }}
key: superset-secret-key
{{- if or .Values.existingConfigmap .Values.config }}
- name: SUPERSET_CONF_FILE
value: "/bitnami/superset/conf/superset_config.py"
{{- end }}
- name: BITNAMI_DEBUG
value: {{ ternary "true" "false" .Values.image.debug | quote }}
{{- end -}}
{{/*
Init container definition to wait for PostgreSQL
# NOTE: The value postgresql.image is not available unless postgresql.enabled is not set. We could change this to use os-shell if
# it had the binary wait-for-port.
*/}}
{{- define "superset.initContainers.waitForDB" -}}
- name: wait-for-db
image: {{ include "common.images.image" (dict "imageRoot" .Values.postgresql.image "global" .Values.global) }}
imagePullPolicy: {{ .Values.postgresql.image.pullPolicy }}
{{- if .Values.defaultInitContainers.waitForDB.resources }}
resources: {{ toYaml .Values.defaultInitContainers.waitForDB.resources | nindent 4 }}
{{- else if ne .Values.defaultInitContainers.waitForDB.resourcesPreset "none" }}
resources: {{- include "common.resources.preset" (dict "type" .Values.defaultInitContainers.waitForDB.resourcesPreset) | nindent 4 }}
{{- end }}
{{- if .Values.defaultInitContainers.waitForDB.containerSecurityContext.enabled }}
securityContext: {{- include "common.compatibility.renderSecurityContext" (dict "secContext" .Values.defaultInitContainers.waitForDB.containerSecurityContext "context" $) | nindent 4 }}
{{- end }}
command:
- /bin/bash
args:
- -ec
- |
set -o errexit
set -o nounset
set -o pipefail
. /opt/bitnami/scripts/libos.sh
. /opt/bitnami/scripts/liblog.sh
. /opt/bitnami/scripts/libpostgresql.sh
check_postgresql_connection() {
echo "SELECT 1" | postgresql_remote_execute "$SUPERSET_DATABASE_HOST" "$SUPERSET_DATABASE_PORT_NUMBER" "$SUPERSET_DATABASE_NAME" "$SUPERSET_DATABASE_USER" "$SUPERSET_DATABASE_PASSWORD"
}
info "Connecting to the PostgreSQL instance $SUPERSET_DATABASE_HOST:$SUPERSET_DATABASE_PORT_NUMBER"
if ! retry_while "check_postgresql_connection"; then
error "Could not connect to the database server"
exit 1
else
info "Connected to the PostgreSQL instance"
fi
env:
{{- include "superset.configure.database" . | nindent 4 }}
{{- end -}}
{{/*
Init container definition to wait for Redis
*/}}
{{- define "superset.initContainers.waitForRedis" -}}
# NOTE: The value redis.image is not available unless redis.enabled is not set. We could change this to use os-shell if
# it had the binary wait-for-port.
- name: wait-for-redis
image: {{ include "common.images.image" (dict "imageRoot" .Values.redis.image "global" .Values.global) }}
imagePullPolicy: {{ .Values.redis.image.pullPolicy | quote }}
{{- if .Values.defaultInitContainers.waitForRedis.resources }}
resources: {{ toYaml .Values.defaultInitContainers.waitForRedis.resources | nindent 4 }}
{{- else if ne .Values.defaultInitContainers.waitForRedis.resourcesPreset "none" }}
resources: {{- include "common.resources.preset" (dict "type" .Values.defaultInitContainers.waitForRedis.resourcesPreset) | nindent 4 }}
{{- end }}
{{- if .Values.defaultInitContainers.waitForRedis.containerSecurityContext.enabled }}
securityContext: {{- include "common.compatibility.renderSecurityContext" (dict "secContext" .Values.defaultInitContainers.waitForRedis.containerSecurityContext "context" $) | nindent 4 }}
{{- end }}
command:
- /bin/bash
args:
- -ec
- |
set -o errexit
set -o nounset
set -o pipefail
. /opt/bitnami/scripts/libos.sh
. /opt/bitnami/scripts/liblog.sh
check_redis_connection() {
local result="$(redis-cli -h ${REDIS_HOST} -p ${REDIS_PORT_NUMBER} -a ${REDIS_PASSWORD} --user ${REDIS_USER} PING)"
if [[ "$result" != "PONG" ]]; then
false
fi
}
info "Checking redis connection..."
if ! retry_while "check_redis_connection"; then
error "Could not connect to the Redis server"
exit 1
else
info "Connected to the Redis instance"
fi
env:
{{- include "superset.configure.redis" . | nindent 4 }}
{{- end }}
{{- define "superset.initContainers.waitForExamples" -}}
# NOTE: The value postgresql.image is not available unless postgresql.enabled is not set.
# We could change this to use superset image postgresql client.
- name: wait-for-examples
image: {{ include "common.images.image" (dict "imageRoot" .Values.postgresql.image "global" .Values.global) }}
imagePullPolicy: {{ .Values.postgresql.image.pullPolicy }}
{{- if .Values.web.waitForExamples.resources }}
resources: {{ toYaml .Values.web.waitForExamples.resources | nindent 4 }}
{{- else if ne .Values.web.waitForExamples.resourcesPreset "none" }}
resources: {{- include "common.resources.preset" (dict "type" .Values.web.waitForExamples.resourcesPreset) | nindent 4 }}
{{- end }}
{{- if .Values.web.waitForExamples.containerSecurityContext.enabled }}
securityContext: {{- include "common.compatibility.renderSecurityContext" (dict "secContext" .Values.web.waitForExamples.containerSecurityContext "context" $) | nindent 4 }}
{{- end }}
command:
- /bin/bash
args:
- -ec
- |
set -o errexit
set -o nounset
set -o pipefail
. /opt/bitnami/scripts/libos.sh
. /opt/bitnami/scripts/liblog.sh
. /opt/bitnami/scripts/libpostgresql.sh
check_examples_database() {
echo "SELECT dashboard_title FROM dashboards" | postgresql_remote_execute_print_output "$SUPERSET_DATABASE_HOST" "$SUPERSET_DATABASE_PORT_NUMBER" "$SUPERSET_DATABASE_NAME" "$SUPERSET_DATABASE_USER" "$SUPERSET_DATABASE_PASSWORD" | grep "Dashboard"
}
info "Checking if the 'examples' database exists at $SUPERSET_DATABASE_HOST:$SUPERSET_DATABASE_PORT_NUMBER"
if ! retry_while "check_examples_database"; then
error "Examples database not ready yet"
exit 1
else
info "Connected to the PostgreSQL instance"
fi
env:
{{- include "superset.configure.database" . | nindent 4 }}
{{- end }}
{{/*
Compile all warnings into a single message.
*/}}
{{- define "superset.validateValues" -}}
{{- $messages := list -}}
{{- $messages := append $messages (include "superset.validateValues.database" .) -}}
{{- $messages := append $messages (include "superset.validateValues.redis" .) -}}
{{- $messages := without $messages "" -}}
{{- $message := join "\n" $messages -}}
{{- if $message -}}
{{- printf "\nVALUES VALIDATION:\n%s" $message -}}
{{- end -}}
{{- end -}}
{{/* Validate values of Superset - Postgresql */}}
{{- define "superset.validateValues.database" -}}
{{- if and .Values.postgresql.enabled .Values.externalDatabase.host -}}
superset: Database
You can only use one database.
Please choose installing a Postgresql chart (--set postgresql.enabled=true) or
using an external database (--set externalDatabase.host)
{{- end -}}
{{- if and (not .Values.postgresql.enabled) (not .Values.externalDatabase.host) -}}
superset: NoDatabase
You did not set any database.
Please choose installing a Postgresql chart (--set postgresql.enabled=true) or
using an external instance (--set externalDatabase.host)
{{- end -}}
{{- end -}}
{{/* Validate values of Superset - Redis */}}
{{- define "superset.validateValues.redis" -}}
{{- if and .Values.redis.enabled .Values.externalRedis.host -}}
superset: Redis
You can only use one Redis.
Please choose installing a Redis chart (--set redis.enabled=true) or
using an external Redis (--set externalRedis.host)
{{- end -}}
{{- if and (not .Values.redis.enabled) (not .Values.externalRedis.host) -}}
superset: NoRedis
You did not set any Redis.
Please choose installing a Redis chart (--set redis.enabled=true) or
using an external instance (--set externalRedis.host)
{{- end -}}
{{- end -}}

View File

@@ -0,0 +1,185 @@
{{- /*
Copyright Broadcom, Inc. All Rights Reserved.
SPDX-License-Identifier: APACHE-2.0
*/}}
{{- if .Values.beat.enabled }}
apiVersion: {{ include "common.capabilities.deployment.apiVersion" . }}
kind: Deployment
metadata:
name: {{ template "superset.beat.fullname" . }}
namespace: {{ include "common.names.namespace" . | quote }}
labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
app.kubernetes.io/component: celery-beat
app.kubernetes.io/part-of: superset
{{- if or .Values.beat.deploymentAnnotations .Values.commonAnnotations }}
{{- $annotations := include "common.tplvalues.merge" (dict "values" (list .Values.beat.deploymentAnnotations .Values.commonAnnotations) "context" .) }}
annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $ ) | nindent 4 }}
{{- end }}
spec:
{{- if .Values.beat.updateStrategy }}
strategy: {{- toYaml .Values.beat.updateStrategy | nindent 4 }}
{{- end }}
{{- $podLabels := include "common.tplvalues.merge" (dict "values" (list .Values.beat.podLabels .Values.commonLabels) "context" .) }}
selector:
matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 6 }}
app.kubernetes.io/component: celery-beat
app.kubernetes.io/part-of: superset
template:
metadata:
{{- if .Values.beat.podAnnotations }}
annotations: {{- include "common.tplvalues.render" (dict "value" .Values.beat.podAnnotations "context" $) | nindent 8 }}
{{- end }}
labels: {{- include "common.labels.standard" ( dict "customLabels" $podLabels "context" $ ) | nindent 8 }}
app.kubernetes.io/component: celery-beat
app.kubernetes.io/part-of: superset
spec:
{{- include "superset.imagePullSecrets" . | nindent 6 }}
serviceAccountName: {{ template "superset.serviceAccountName" . }}
automountServiceAccountToken: {{ .Values.beat.automountServiceAccountToken }}
{{- if .Values.beat.hostAliases }}
hostAliases: {{- include "common.tplvalues.render" (dict "value" .Values.beat.hostAliases "context" $) | nindent 8 }}
{{- end }}
{{- if .Values.beat.affinity }}
affinity: {{- include "common.tplvalues.render" ( dict "value" .Values.beat.affinity "context" $) | nindent 8 }}
{{- else }}
affinity:
podAffinity: {{- include "common.affinities.pods" (dict "type" .Values.beat.podAffinityPreset "component" "celery-beat" "customLabels" $podLabels "context" $) | nindent 10 }}
podAntiAffinity: {{- include "common.affinities.pods" (dict "type" .Values.beat.podAntiAffinityPreset "component" "celery-beat" "customLabels" $podLabels "context" $) | nindent 10 }}
nodeAffinity: {{- include "common.affinities.nodes" (dict "type" .Values.beat.nodeAffinityPreset.type "key" .Values.beat.nodeAffinityPreset.key "values" .Values.beat.nodeAffinityPreset.values) | nindent 10 }}
{{- end }}
{{- if .Values.beat.nodeSelector }}
nodeSelector: {{- include "common.tplvalues.render" ( dict "value" .Values.beat.nodeSelector "context" $) | nindent 8 }}
{{- end }}
{{- if .Values.beat.tolerations }}
tolerations: {{- include "common.tplvalues.render" (dict "value" .Values.beat.tolerations "context" .) | nindent 8 }}
{{- end }}
{{- if .Values.beat.priorityClassName }}
priorityClassName: {{ .Values.beat.priorityClassName | quote }}
{{- end }}
{{- if .Values.beat.schedulerName }}
schedulerName: {{ .Values.beat.schedulerName | quote }}
{{- end }}
{{- if .Values.beat.topologySpreadConstraints }}
topologySpreadConstraints: {{- include "common.tplvalues.render" (dict "value" .Values.beat.topologySpreadConstraints "context" .) | nindent 8 }}
{{- end }}
{{- if .Values.beat.podSecurityContext.enabled }}
securityContext: {{- include "common.compatibility.renderSecurityContext" (dict "secContext" .Values.beat.podSecurityContext "context" $) | nindent 8 }}
{{- end }}
{{- if .Values.beat.terminationGracePeriodSeconds }}
terminationGracePeriodSeconds: {{ .Values.beat.terminationGracePeriodSeconds }}
{{- end }}
initContainers:
{{- if .Values.defaultInitContainers.waitForDB.enabled }}
{{- include "superset.initContainers.waitForDB" . | nindent 8 }}
{{- end }}
{{- if .Values.defaultInitContainers.waitForRedis.enabled }}
{{- include "superset.initContainers.waitForRedis" . | nindent 8 }}
{{- end }}
{{- if .Values.beat.initContainers }}
{{- include "common.tplvalues.render" (dict "value" .Values.beat.initContainers "context" $) | nindent 8 }}
{{- end }}
containers:
- name: celery-beat
image: {{ template "superset.image" . }}
imagePullPolicy: {{ .Values.image.pullPolicy | quote }}
{{- if .Values.beat.containerSecurityContext.enabled }}
securityContext: {{- include "common.compatibility.renderSecurityContext" (dict "secContext" .Values.beat.containerSecurityContext "context" $) | nindent 12 }}
{{- end }}
{{- if .Values.diagnosticMode.enabled }}
command: {{- include "common.tplvalues.render" (dict "value" .Values.diagnosticMode.command "context" $) | nindent 12 }}
{{- else if .Values.beat.command }}
command: {{- include "common.tplvalues.render" (dict "value" .Values.beat.command "context" $) | nindent 12 }}
{{- end }}
{{- if .Values.diagnosticMode.enabled }}
args: {{- include "common.tplvalues.render" (dict "value" .Values.diagnosticMode.args "context" $) | nindent 12 }}
{{- else if .Values.beat.args }}
args: {{- include "common.tplvalues.render" (dict "value" .Values.beat.args "context" $) | nindent 12 }}
{{- end }}
env:
{{- include "superset.configure.common" . | nindent 12 }}
{{- include "superset.configure.database" . | nindent 12 }}
{{- include "superset.configure.redis" . | nindent 12 }}
- name: SUPERSET_ROLE
value: "celery-beat"
{{- if .Values.beat.extraEnvVars }}
{{- include "common.tplvalues.render" (dict "value" .Values.beat.extraEnvVars "context" $) | nindent 12 }}
{{- end }}
envFrom:
{{- if .Values.beat.extraEnvVarsCM }}
- configMapRef:
name: {{ include "common.tplvalues.render" (dict "value" .Values.beat.extraEnvVarsCM "context" $) }}
{{- end }}
{{- if .Values.beat.extraEnvVarsSecret }}
- secretRef:
name: {{ include "common.tplvalues.render" (dict "value" .Values.beat.extraEnvVarsSecret "context" $) }}
{{- end }}
{{- if .Values.beat.resources }}
resources: {{- toYaml .Values.beat.resources | nindent 12 }}
{{- else if ne .Values.beat.resourcesPreset "none" }}
resources: {{- include "common.resources.preset" (dict "type" .Values.beat.resourcesPreset) | nindent 12 }}
{{- end }}
{{- if not .Values.diagnosticMode.enabled }}
{{- if .Values.beat.customLivenessProbe }}
livenessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.beat.customLivenessProbe "context" $) | nindent 12 }}
{{- else if .Values.beat.livenessProbe.enabled }}
livenessProbe: {{- include "common.tplvalues.render" (dict "value" (omit .Values.beat.livenessProbe "enabled") "context" $) | nindent 12 }}
exec:
command:
- pgrep
- -f
- celery
{{- end }}
{{- if .Values.beat.customReadinessProbe }}
readinessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.beat.customReadinessProbe "context" $) | nindent 12 }}
{{- else if .Values.beat.readinessProbe.enabled }}
readinessProbe: {{- include "common.tplvalues.render" (dict "value" (omit .Values.beat.readinessProbe "enabled") "context" $) | nindent 12 }}
exec:
command: ["/bin/sh", "-c", "pgrep -f celery"]
{{- end }}
{{- if .Values.beat.customStartupProbe }}
startupProbe: {{- include "common.tplvalues.render" (dict "value" .Values.beat.customStartupProbe "context" $) | nindent 12 }}
{{- else if .Values.beat.startupProbe.enabled }}
startupProbe: {{- include "common.tplvalues.render" (dict "value" (omit .Values.beat.startupProbe "enabled") "context" $) | nindent 12 }}
exec:
command:
- pgrep
- -f
- celery
{{- end }}
{{- end }}
{{- if .Values.beat.lifecycleHooks }}
lifecycle: {{- include "common.tplvalues.render" (dict "value" .Values.beat.lifecycleHooks "context" $) | nindent 12 }}
{{- end }}
volumeMounts:
- name: empty-dir
mountPath: /tmp
subPath: tmp-dir
- name: empty-dir
mountPath: /opt/bitnami/superset/superset_home
subPath: superset-home
- name: empty-dir
mountPath: /opt/bitnami/superset/tmp
subPath: app-tmp-dir
{{- if or .Values.existingConfigmap .Values.config }}
- name: superset-config
mountPath: /bitnami/superset/conf
{{- end }}
{{- if .Values.beat.extraVolumeMounts }}
{{- include "common.tplvalues.render" (dict "value" .Values.beat.extraVolumeMounts "context" $) | nindent 12 }}
{{- end }}
{{- if .Values.beat.sidecars }}
{{- include "common.tplvalues.render" ( dict "value" .Values.beat.sidecars "context" $) | nindent 8 }}
{{- end }}
volumes:
- name: empty-dir
emptyDir: {}
{{- if or .Values.existingConfigmap .Values.config }}
- name: superset-config
configMap:
name: {{ include "superset.configMapName" . }}
{{- end }}
{{- if .Values.beat.extraVolumes }}
{{- include "common.tplvalues.render" (dict "value" .Values.beat.extraVolumes "context" $) | nindent 8 }}
{{- end }}
{{- end }}

View File

@@ -0,0 +1,64 @@
{{- /*
Copyright Broadcom, Inc. All Rights Reserved.
SPDX-License-Identifier: APACHE-2.0
*/}}
{{- if and .Values.beat.enabled .Values.beat.networkPolicy.enabled }}
kind: NetworkPolicy
apiVersion: {{ include "common.capabilities.networkPolicy.apiVersion" . }}
metadata:
name: {{ template "superset.beat.fullname" . }}
namespace: {{ include "common.names.namespace" . | quote }}
labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
app.kubernetes.io/component: celery-beat
app.kubernetes.io/part-of: superset
{{- if .Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
spec:
{{- $podLabels := include "common.tplvalues.merge" ( dict "values" ( list .Values.beat.podLabels .Values.commonLabels ) "context" . ) }}
podSelector:
matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 6 }}
app.kubernetes.io/component: celery-beat
app.kubernetes.io/part-of: superset
policyTypes:
- Ingress
- Egress
egress:
{{- if .Values.beat.networkPolicy.allowExternalEgress }}
- {}
{{- else }}
- ports:
# Allow dns resolution
- port: 53
protocol: UDP
- port: 53
protocol: TCP
# Allow outbound connections to Redis and Posgresql
- ports:
- port: {{ include "superset.redis.port" . }}
{{- if .Values.redis.enabled }}
to:
- podSelector:
matchLabels:
app.kubernetes.io/name: redis
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}
- ports:
- port: {{ include "superset.postgresql.port" . }}
{{- if .Values.postgresql.enabled }}
to:
- podSelector:
matchLabels:
app.kubernetes.io/name: postgresql
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}
{{- if .Values.beat.networkPolicy.extraEgress }}
{{- include "common.tplvalues.render" ( dict "value" .Values.beat.networkPolicy.extraEgress "context" $ ) | nindent 4 }}
{{- end }}
{{- end }}
ingress:
{{- if .Values.beat.networkPolicy.extraIngress }}
{{- include "common.tplvalues.render" ( dict "value" .Values.beat.networkPolicy.extraIngress "context" $ ) | nindent 4 }}
{{- end }}
{{- end }}

View File

@@ -0,0 +1,30 @@
{{- /*
Copyright Broadcom, Inc. All Rights Reserved.
SPDX-License-Identifier: APACHE-2.0
*/}}
{{- if and .Values.beat.enabled .Values.beat.pdb.create }}
apiVersion: {{ include "common.capabilities.policy.apiVersion" . }}
kind: PodDisruptionBudget
metadata:
name: {{ template "superset.beat.fullname" . }}
namespace: {{ include "common.names.namespace" . | quote }}
labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
app.kubernetes.io/component: celery-beat
app.kubernetes.io/part-of: superset
{{- if .Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
spec:
{{- if .Values.beat.pdb.minAvailable }}
minAvailable: {{ .Values.beat.pdb.minAvailable }}
{{- end }}
{{- if or .Values.beat.pdb.maxUnavailable ( not .Values.beat.pdb.minAvailable ) }}
maxUnavailable: {{ .Values.beat.pdb.maxUnavailable | default 1 }}
{{- end }}
{{- $podLabels := include "common.tplvalues.merge" (dict "values" (list .Values.beat.podLabels .Values.commonLabels) "context" .) }}
selector:
matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 6 }}
app.kubernetes.io/component: celery-beat
app.kubernetes.io/part-of: superset
{{- end }}

View File

@@ -0,0 +1,20 @@
{{- /*
Copyright Broadcom, Inc. All Rights Reserved.
SPDX-License-Identifier: APACHE-2.0
*/}}
{{- if and .Values.config (not .Values.existingConfigmap) }}
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ printf "%s-configuration" (include "common.names.fullname" .) }}
namespace: {{ include "common.names.namespace" . | quote }}
labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
app.kubernetes.io/part-of: superset
{{- if .Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
data:
superset_config.py: |-
{{- include "common.tplvalues.render" ( dict "value" .Values.config "context" $ ) | nindent 4 }}
{{- end }}

View File

@@ -0,0 +1,35 @@
{{- /*
Copyright Broadcom, Inc. All Rights Reserved.
SPDX-License-Identifier: APACHE-2.0
*/}}
{{- if and (not .Values.postgresql.enabled) (not .Values.externalDatabase.existingSecret) .Values.externalDatabase.password -}}
apiVersion: v1
kind: Secret
metadata:
name: {{ printf "%s-externaldb" .Release.Name }}
namespace: {{ include "common.names.namespace" . | quote }}
labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
{{- if .Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
type: Opaque
data:
{{ .Values.externalDatabase.existingSecretPasswordKey }}: {{ .Values.externalDatabase.password | b64enc | quote }}
{{- end }}
{{- if and (not .Values.redis.enabled) (not .Values.externalRedis.existingSecret) .Values.externalRedis.password -}}
---
apiVersion: v1
kind: Secret
metadata:
name: {{ printf "%s-externalredis" .Release.Name }}
namespace: {{ include "common.names.namespace" . | quote }}
labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
{{- if .Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
type: Opaque
data:
{{ .Values.externalRedis.existingSecretPasswordKey }}: {{ .Values.externalRedis.password | b64enc | quote }}
{{- end }}

View File

@@ -0,0 +1,9 @@
{{- /*
Copyright Broadcom, Inc. All Rights Reserved.
SPDX-License-Identifier: APACHE-2.0
*/}}
{{- range .Values.extraDeploy }}
---
{{ include "common.tplvalues.render" (dict "value" . "context" $) }}
{{- end }}

View File

@@ -0,0 +1,212 @@
{{- /*
Copyright Broadcom, Inc. All Rights Reserved.
SPDX-License-Identifier: APACHE-2.0
*/}}
{{- if .Values.flower.enabled }}
apiVersion: {{ include "common.capabilities.deployment.apiVersion" . }}
kind: Deployment
metadata:
name: {{ template "superset.flower.fullname" . }}
namespace: {{ include "common.names.namespace" . | quote }}
labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
app.kubernetes.io/component: celery-flower
app.kubernetes.io/part-of: superset
{{- if or .Values.flower.deploymentAnnotations .Values.commonAnnotations }}
{{- $annotations := include "common.tplvalues.merge" (dict "values" (list .Values.flower.deploymentAnnotations .Values.commonAnnotations) "context" .) }}
annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $ ) | nindent 4 }}
{{- end }}
spec:
{{- if and (not .Values.flower.autoscaling.hpa.enabled) (not .Values.flower.autoscaling.vpa.enabled) }}
replicas: {{ .Values.flower.replicaCount }}
{{- end }}
{{- if .Values.flower.updateStrategy }}
strategy: {{- toYaml .Values.flower.updateStrategy | nindent 4 }}
{{- end }}
{{- $podLabels := include "common.tplvalues.merge" (dict "values" (list .Values.flower.podLabels .Values.commonLabels) "context" .) }}
selector:
matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 6 }}
app.kubernetes.io/component: celery-flower
app.kubernetes.io/part-of: superset
template:
metadata:
{{- if .Values.flower.podAnnotations }}
annotations: {{- include "common.tplvalues.render" (dict "value" .Values.flower.podAnnotations "context" $) | nindent 8 }}
{{- end }}
labels: {{- include "common.labels.standard" ( dict "customLabels" $podLabels "context" $ ) | nindent 8 }}
app.kubernetes.io/component: celery-flower
app.kubernetes.io/part-of: superset
spec:
{{- include "superset.imagePullSecrets" . | nindent 6 }}
serviceAccountName: {{ template "superset.serviceAccountName" . }}
automountServiceAccountToken: {{ .Values.flower.automountServiceAccountToken }}
{{- if .Values.flower.hostAliases }}
hostAliases: {{- include "common.tplvalues.render" (dict "value" .Values.flower.hostAliases "context" $) | nindent 8 }}
{{- end }}
{{- if .Values.flower.affinity }}
affinity: {{- include "common.tplvalues.render" ( dict "value" .Values.flower.affinity "context" $) | nindent 8 }}
{{- else }}
affinity:
podAffinity: {{- include "common.affinities.pods" (dict "type" .Values.flower.podAffinityPreset "component" "celery-flower" "customLabels" $podLabels "context" $) | nindent 10 }}
podAntiAffinity: {{- include "common.affinities.pods" (dict "type" .Values.flower.podAntiAffinityPreset "component" "celery-flower" "customLabels" $podLabels "context" $) | nindent 10 }}
nodeAffinity: {{- include "common.affinities.nodes" (dict "type" .Values.flower.nodeAffinityPreset.type "key" .Values.flower.nodeAffinityPreset.key "values" .Values.flower.nodeAffinityPreset.values) | nindent 10 }}
{{- end }}
{{- if .Values.flower.nodeSelector }}
nodeSelector: {{- include "common.tplvalues.render" ( dict "value" .Values.flower.nodeSelector "context" $) | nindent 8 }}
{{- end }}
{{- if .Values.flower.tolerations }}
tolerations: {{- include "common.tplvalues.render" (dict "value" .Values.flower.tolerations "context" .) | nindent 8 }}
{{- end }}
{{- if .Values.flower.priorityClassName }}
priorityClassName: {{ .Values.flower.priorityClassName | quote }}
{{- end }}
{{- if .Values.flower.schedulerName }}
schedulerName: {{ .Values.flower.schedulerName | quote }}
{{- end }}
{{- if .Values.flower.topologySpreadConstraints }}
topologySpreadConstraints: {{- include "common.tplvalues.render" (dict "value" .Values.flower.topologySpreadConstraints "context" .) | nindent 8 }}
{{- end }}
{{- if .Values.flower.podSecurityContext.enabled }}
securityContext: {{- include "common.compatibility.renderSecurityContext" (dict "secContext" .Values.flower.podSecurityContext "context" $) | nindent 8 }}
{{- end }}
{{- if .Values.flower.terminationGracePeriodSeconds }}
terminationGracePeriodSeconds: {{ .Values.flower.terminationGracePeriodSeconds }}
{{- end }}
initContainers:
{{- if .Values.defaultInitContainers.waitForDB.enabled }}
{{- include "superset.initContainers.waitForDB" . | nindent 8 }}
{{- end }}
{{- if .Values.defaultInitContainers.waitForRedis.enabled }}
{{- include "superset.initContainers.waitForRedis" . | nindent 8 }}
{{- end }}
{{- if .Values.flower.initContainers }}
{{- include "common.tplvalues.render" (dict "value" .Values.flower.initContainers "context" $) | nindent 8 }}
{{- end }}
containers:
- name: celery-flower
image: {{ template "superset.image" . }}
imagePullPolicy: {{ .Values.image.pullPolicy | quote }}
{{- if .Values.flower.containerSecurityContext.enabled }}
securityContext: {{- include "common.compatibility.renderSecurityContext" (dict "secContext" .Values.flower.containerSecurityContext "context" $) | nindent 12 }}
{{- end }}
{{- if .Values.diagnosticMode.enabled }}
command: {{- include "common.tplvalues.render" (dict "value" .Values.diagnosticMode.command "context" $) | nindent 12 }}
{{- else if .Values.flower.command }}
command: {{- include "common.tplvalues.render" (dict "value" .Values.flower.command "context" $) | nindent 12 }}
{{- end }}
{{- if .Values.diagnosticMode.enabled }}
args: {{- include "common.tplvalues.render" (dict "value" .Values.diagnosticMode.args "context" $) | nindent 12 }}
{{- else if .Values.flower.args }}
args: {{- include "common.tplvalues.render" (dict "value" .Values.flower.args "context" $) | nindent 12 }}
{{- end }}
env:
{{- include "superset.configure.common" . | nindent 12 }}
{{- include "superset.configure.database" . | nindent 12 }}
{{- include "superset.configure.redis" . | nindent 12 }}
- name: SUPERSET_ROLE
value: "celery-flower"
{{- if .Values.flower.auth.enabled }}
{{- if .Values.auth.usePasswordFiles }}
- name: FLOWER_BASIC_AUTH_FILE
value: "/opt/bitnami/superset/secrets/flower-basic-auth"
{{- else }}
- name: FLOWER_BASIC_AUTH
valueFrom:
secretKeyRef:
name: {{ template "superset.flower.secretName" . }}
key: flower-basic-auth
{{- end }}
{{- end }}
{{- if .Values.flower.extraEnvVars }}
{{- include "common.tplvalues.render" (dict "value" .Values.flower.extraEnvVars "context" $) | nindent 12 }}
{{- end }}
envFrom:
{{- if .Values.flower.extraEnvVarsCM }}
- configMapRef:
name: {{ include "common.tplvalues.render" (dict "value" .Values.flower.extraEnvVarsCM "context" $) }}
{{- end }}
{{- if .Values.flower.extraEnvVarsSecret }}
- secretRef:
name: {{ include "common.tplvalues.render" (dict "value" .Values.flower.extraEnvVarsSecret "context" $) }}
{{- end }}
{{- if .Values.flower.resources }}
resources: {{- toYaml .Values.flower.resources | nindent 12 }}
{{- else if ne .Values.flower.resourcesPreset "none" }}
resources: {{- include "common.resources.preset" (dict "type" .Values.flower.resourcesPreset) | nindent 12 }}
{{- end }}
ports:
- name: flower
containerPort: {{ .Values.flower.containerPorts.flower }}
{{- if .Values.flower.extraContainerPorts }}
{{- include "common.tplvalues.render" (dict "value" .Values.flower.extraContainerPorts "context" $) | nindent 12 }}
{{- end }}
{{- if not .Values.diagnosticMode.enabled }}
{{- if .Values.flower.customLivenessProbe }}
livenessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.flower.customLivenessProbe "context" $) | nindent 12 }}
{{- else if .Values.flower.livenessProbe.enabled }}
livenessProbe: {{- include "common.tplvalues.render" (dict "value" (omit .Values.flower.livenessProbe "enabled") "context" $) | nindent 12 }}
tcpSocket:
port: flower
{{- end }}
{{- if .Values.flower.customReadinessProbe }}
readinessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.flower.customReadinessProbe "context" $) | nindent 12 }}
{{- else if .Values.flower.readinessProbe.enabled }}
readinessProbe: {{- include "common.tplvalues.render" (dict "value" (omit .Values.flower.readinessProbe "enabled") "context" $) | nindent 12 }}
httpGet:
path: /healthcheck
port: flower
{{- end }}
{{- if .Values.flower.customStartupProbe }}
startupProbe: {{- include "common.tplvalues.render" (dict "value" .Values.flower.customStartupProbe "context" $) | nindent 12 }}
{{- else if .Values.flower.startupProbe.enabled }}
startupProbe: {{- include "common.tplvalues.render" (dict "value" (omit .Values.flower.startupProbe "enabled") "context" $) | nindent 12 }}
httpGet:
path: /healthcheck
port: flower
{{- end }}
{{- end }}
{{- if .Values.flower.lifecycleHooks }}
lifecycle: {{- include "common.tplvalues.render" (dict "value" .Values.flower.lifecycleHooks "context" $) | nindent 12 }}
{{- end }}
volumeMounts:
- name: empty-dir
mountPath: /tmp
subPath: tmp-dir
- name: empty-dir
mountPath: /opt/bitnami/superset/superset_home
subPath: superset-home
{{- if and .Values.flower.auth.enabled .Values.flower.auth.usePasswordFiles }}
- name: flower-basic-auth
mountPath: /opt/bitnami/superset/secrets
readOnly: true
{{- end }}
{{- if or .Values.existingConfigmap .Values.config }}
- name: superset-config
mountPath: /bitnami/superset/conf
{{- end }}
{{- if .Values.flower.extraVolumeMounts }}
{{- include "common.tplvalues.render" (dict "value" .Values.flower.extraVolumeMounts "context" $) | nindent 12 }}
{{- end }}
{{- if .Values.flower.sidecars }}
{{- include "common.tplvalues.render" ( dict "value" .Values.flower.sidecars "context" $) | nindent 8 }}
{{- end }}
volumes:
- name: empty-dir
emptyDir: {}
{{- if and .Values.flower.auth.enabled .Values.flower.auth.usePasswordFiles }}
- name: flower-basic-auth
secret:
secretName: {{ template "superset.flower.secretName" . }}
items:
- key: flower-basic-auth
path: flower-basic-auth
{{- end }}
{{- if or .Values.existingConfigmap .Values.config }}
- name: superset-config
configMap:
name: {{ include "superset.configMapName" . }}
{{- end }}
{{- if .Values.flower.extraVolumes }}
{{- include "common.tplvalues.render" (dict "value" .Values.flower.extraVolumes "context" $) | nindent 8 }}
{{- end }}
{{- end }}

View File

@@ -0,0 +1,50 @@
{{- /*
Copyright Broadcom, Inc. All Rights Reserved.
SPDX-License-Identifier: APACHE-2.0
*/}}
{{- if and .Values.flower.enabled .Values.flower.autoscaling.hpa.enabled }}
apiVersion: {{ include "common.capabilities.hpa.apiVersion" . }}
kind: HorizontalPodAutoscaler
metadata:
name: {{ template "superset.flower.fullname" . }}
namespace: {{ include "common.names.namespace" . | quote }}
labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
app.kubernetes.io/component: celery-flower
app.kubernetes.io/part-of: superset
{{- if .Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
spec:
scaleTargetRef:
apiVersion: {{ include "common.capabilities.deployment.apiVersion" . }}
kind: Deployment
name: {{ template "superset.flower.fullname" . }}
minReplicas: {{ .Values.flower.autoscaling.hpa.minReplicas }}
maxReplicas: {{ .Values.flower.autoscaling.hpa.maxReplicas }}
metrics:
{{- if .Values.flower.autoscaling.hpa.targetMemory }}
- type: Resource
resource:
name: memory
{{- if semverCompare "<1.23-0" (include "common.capabilities.kubeVersion" .) }}
targetAverageUtilization: {{ .Values.flower.autoscaling.hpa.targetMemory }}
{{- else }}
target:
type: Utilization
averageUtilization: {{ .Values.flower.autoscaling.hpa.targetMemory }}
{{- end }}
{{- end }}
{{- if .Values.flower.autoscaling.hpa.targetCPU }}
- type: Resource
resource:
name: cpu
{{- if semverCompare "<1.23-0" (include "common.capabilities.kubeVersion" .) }}
targetAverageUtilization: {{ .Values.flower.autoscaling.hpa.targetCPU }}
{{- else }}
target:
type: Utilization
averageUtilization: {{ .Values.flower.autoscaling.hpa.targetCPU }}
{{- end }}
{{- end }}
{{- end }}

View File

@@ -0,0 +1,92 @@
{{- /*
Copyright Broadcom, Inc. All Rights Reserved.
SPDX-License-Identifier: APACHE-2.0
*/}}
{{- if and .Values.flower.enabled .Values.flower.networkPolicy.enabled }}
kind: NetworkPolicy
apiVersion: {{ include "common.capabilities.networkPolicy.apiVersion" . }}
metadata:
name: {{ template "superset.flower.fullname" . }}
namespace: {{ include "common.names.namespace" . | quote }}
labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
app.kubernetes.io/component: celery-flower
app.kubernetes.io/part-of: superset
{{- if .Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
spec:
{{- $podLabels := include "common.tplvalues.merge" ( dict "values" ( list .Values.flower.podLabels .Values.commonLabels ) "context" . ) }}
podSelector:
matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 6 }}
app.kubernetes.io/component: celery-flower
app.kubernetes.io/part-of: superset
policyTypes:
- Ingress
- Egress
egress:
{{- if .Values.flower.networkPolicy.allowExternalEgress }}
- {}
{{- else }}
- ports:
# Allow dns resolution
- port: 53
protocol: UDP
- port: 53
protocol: TCP
# Allow outbound connections to Redis and Posgresql
- ports:
- port: {{ include "superset.redis.port" . }}
{{- if .Values.redis.enabled }}
to:
- podSelector:
matchLabels:
app.kubernetes.io/name: redis
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}
- ports:
- port: {{ include "superset.postgresql.port" . }}
{{- if .Values.postgresql.enabled }}
to:
- podSelector:
matchLabels:
app.kubernetes.io/name: postgresql
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}
{{- if .Values.flower.networkPolicy.extraEgress }}
{{- include "common.tplvalues.render" ( dict "value" .Values.flower.networkPolicy.extraEgress "context" $ ) | nindent 4 }}
{{- end }}
{{- end }}
ingress:
- ports:
- port: {{ .Values.flower.containerPorts.flower }}
{{- range .Values.web.extraContainerPorts }}
- port: {{ .containerPort }}
{{- end }}
{{- if not .Values.flower.networkPolicy.allowExternal }}
from:
- podSelector:
matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 14 }}
{{- if .Values.flower.networkPolicy.addExternalClientAccess }}
- podSelector:
matchLabels:
{{ printf "%s-flower" include "common.names.fullname" . }}-client: "true"
{{- end }}
{{- if .Values.flower.networkPolicy.ingressPodMatchLabels }}
- podSelector:
matchLabels: {{- include "common.tplvalues.render" (dict "value" .Values.flower.networkPolicy.ingressPodMatchLabels "context" $ ) | nindent 14 }}
{{- end }}
{{- if .Values.flower.networkPolicy.ingressNSMatchLabels }}
- namespaceSelector:
matchLabels: {{- include "common.tplvalues.render" (dict "value" .Values.flower.networkPolicy.ingressNSMatchLabels "context" $ ) | nindent 14 }}
{{- if .Values.flower.networkPolicy.ingressNSPodMatchLabels }}
podSelector:
matchLabels:
matchLabels: {{- include "common.tplvalues.render" (dict "value" .Values.flower.networkPolicy.ingressNSPodMatchLabels "context" $ ) | nindent 14 }}
{{- end }}
{{- end }}
{{- end }}
{{- if .Values.flower.networkPolicy.extraIngress }}
{{- include "common.tplvalues.render" ( dict "value" .Values.flower.networkPolicy.extraIngress "context" $ ) | nindent 4 }}
{{- end }}
{{- end }}

View File

@@ -0,0 +1,30 @@
{{- /*
Copyright Broadcom, Inc. All Rights Reserved.
SPDX-License-Identifier: APACHE-2.0
*/}}
{{- if and .Values.flower.enabled .Values.flower.pdb.create }}
apiVersion: {{ include "common.capabilities.policy.apiVersion" . }}
kind: PodDisruptionBudget
metadata:
name: {{ template "superset.flower.fullname" . }}
namespace: {{ include "common.names.namespace" . | quote }}
labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
app.kubernetes.io/component: celery-flower
app.kubernetes.io/part-of: superset
{{- if .Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
spec:
{{- if .Values.flower.pdb.minAvailable }}
minAvailable: {{ .Values.flower.pdb.minAvailable }}
{{- end }}
{{- if or .Values.flower.pdb.maxUnavailable ( not .Values.flower.pdb.minAvailable ) }}
maxUnavailable: {{ .Values.flower.pdb.maxUnavailable | default 1 }}
{{- end }}
{{- $podLabels := include "common.tplvalues.merge" (dict "values" (list .Values.flower.podLabels .Values.commonLabels) "context" .) }}
selector:
matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 6 }}
app.kubernetes.io/component: celery-flower
app.kubernetes.io/part-of: superset
{{- end }}

View File

@@ -0,0 +1,22 @@
{{- /*
Copyright Broadcom, Inc. All Rights Reserved.
SPDX-License-Identifier: APACHE-2.0
*/}}
{{- if and .Values.flower.enabled .Values.flower.auth.enabled (not .Values.flower.auth.existingSecret) }}
apiVersion: v1
kind: Secret
metadata:
name: {{ template "superset.flower.fullname" . }}
namespace: {{ include "common.names.namespace" . | quote }}
labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
app.kubernetes.io/component: celery-flower
app.kubernetes.io/part-of: superset
{{- if .Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
type: Opaque
data:
{{- $basicAuth := printf "%s:%s" .Values.flower.auth.username (default (randAlphaNum 12) .Values.flower.auth.password) }}
flower-basic-auth: {{ include "common.secrets.lookup" (dict "secret" (include "superset.flower.fullname" .) "key" "flower-basic-auth" "defaultValue" $basicAuth "context" $) }}
{{- end }}

View File

@@ -0,0 +1,56 @@
{{- /*
Copyright Broadcom, Inc. All Rights Reserved.
SPDX-License-Identifier: APACHE-2.0
*/}}
{{- if .Values.flower.enabled }}
apiVersion: v1
kind: Service
metadata:
name: {{ template "superset.flower.fullname" . }}
namespace: {{ include "common.names.namespace" . | quote }}
labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
app.kubernetes.io/component: celery-flower
app.kubernetes.io/part-of: superset
{{- if or .Values.flower.service.annotations .Values.commonAnnotations }}
{{- $annotations := include "common.tplvalues.merge" (dict "values" (list .Values.flower.service.annotations .Values.commonAnnotations) "context" .) }}
annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $ ) | nindent 4 }}
{{- end }}
spec:
type: {{ .Values.flower.service.type }}
{{- if and .Values.flower.service.clusterIP (eq .Values.flower.service.type "ClusterIP") }}
clusterIP: {{ .Values.flower.service.clusterIP }}
{{- end }}
{{- if .Values.flower.service.sessionAffinity }}
sessionAffinity: {{ .Values.flower.service.sessionAffinity }}
{{- end }}
{{- if .Values.flower.service.sessionAffinityConfig }}
sessionAffinityConfig: {{- include "common.tplvalues.render" (dict "value" .Values.flower.service.sessionAffinityConfig "context" $) | nindent 4 }}
{{- end }}
{{- if or (eq .Values.flower.service.type "LoadBalancer") (eq .Values.flower.service.type "NodePort") }}
externalTrafficPolicy: {{ .Values.flower.service.externalTrafficPolicy | quote }}
{{- end }}
{{- if and (eq .Values.flower.service.type "LoadBalancer") (not (empty .Values.flower.service.loadBalancerSourceRanges)) }}
loadBalancerSourceRanges: {{ .Values.flower.service.loadBalancerSourceRanges }}
{{- end }}
{{- if and (eq .Values.flower.service.type "LoadBalancer") (not (empty .Values.flower.service.loadBalancerIP)) }}
loadBalancerIP: {{ .Values.flower.service.loadBalancerIP }}
{{- end }}
ports:
- name: flower
port: {{ .Values.flower.service.ports.flower }}
targetPort: flower
protocol: TCP
{{- if and (or (eq .Values.flower.service.type "NodePort") (eq .Values.flower.service.type "LoadBalancer")) (not (empty .Values.flower.service.nodePorts.flower)) }}
nodePort: {{ .Values.flower.service.nodePorts.flower }}
{{- else if eq .Values.flower.service.type "ClusterIP" }}
nodePort: null
{{- end }}
{{- if .Values.flower.service.extraPorts }}
{{- include "common.tplvalues.render" (dict "value" .Values.flower.service.extraPorts "context" $) | nindent 4 }}
{{- end }}
{{- $podLabels := include "common.tplvalues.merge" (dict "values" (list .Values.flower.podLabels .Values.commonLabels) "context" .) | fromYaml }}
selector: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 4 }}
app.kubernetes.io/component: celery-flower
app.kubernetes.io/part-of: superset
{{- end }}

View File

@@ -0,0 +1,45 @@
{{- /*
Copyright Broadcom, Inc. All Rights Reserved.
SPDX-License-Identifier: APACHE-2.0
*/}}
{{- if and .Values.flower.enabled (.Capabilities.APIVersions.Has "autoscaling.k8s.io/v1/VerticalPodAutoscaler") .Values.flower.autoscaling.vpa.enabled }}
apiVersion: autoscaling.k8s.io/v1
kind: VerticalPodAutoscaler
metadata:
name: {{ include "common.names.fullname" . | trunc 63 | trimSuffix "-" }}
namespace: {{ include "common.names.namespace" . | quote }}
labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
app.kubernetes.io/component: celery-flower
app.kubernetes.io/part-of: superset
{{- if or .Values.flower.autoscaling.vpa.annotations .Values.commonAnnotations }}
{{- $annotations := include "common.tplvalues.merge" ( dict "values" ( list .Values.flower.autoscaling.vpa.annotations .Values.commonAnnotations ) "context" . ) }}
annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }}
{{- end }}
spec:
resourcePolicy:
containerPolicies:
- containerName: celery-flower
{{- with .Values.flower.autoscaling.vpa.controlledResources }}
controlledResources:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.flower.autoscaling.vpa.maxAllowed }}
maxAllowed:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.flower.autoscaling.vpa.minAllowed }}
minAllowed:
{{- toYaml . | nindent 8 }}
{{- end }}
targetRef:
apiVersion: {{ include "common.capabilities.deployment.apiVersion" . }}
kind: "Deployment"
name: {{ template "superset.flower.fullname" . }}
{{- if .Values.flower.autoscaling.vpa.updatePolicy }}
updatePolicy:
{{- with .Values.flower.autoscaling.vpa.updatePolicy.updateMode }}
updateMode: {{ . }}
{{- end }}
{{- end }}
{{- end }}

View File

@@ -0,0 +1,61 @@
{{- /*
Copyright Broadcom, Inc. All Rights Reserved.
SPDX-License-Identifier: APACHE-2.0
*/}}
{{- if .Values.ingress.enabled }}
apiVersion: {{ include "common.capabilities.ingress.apiVersion" . }}
kind: Ingress
metadata:
name: {{ printf "%s-web" (include "common.names.fullname" .) }}
namespace: {{ include "common.names.namespace" . | quote }}
labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
app.kubernetes.io/component: superset-web
app.kubernetes.io/part-of: superset
{{- if or .Values.ingress.annotations .Values.commonAnnotations }}
{{- $annotations := include "common.tplvalues.merge" (dict "values" (list .Values.ingress.annotations .Values.commonAnnotations) "context" .) }}
annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $ ) | nindent 4 }}
{{- end }}
spec:
{{- if and .Values.ingress.ingressClassName (eq "true" (include "common.ingress.supportsIngressClassname" .)) }}
ingressClassName: {{ .Values.ingress.ingressClassName | quote }}
{{- end }}
rules:
{{- if .Values.ingress.hostname }}
- host: {{ .Values.ingress.hostname }}
http:
paths:
{{- if .Values.ingress.extraPaths }}
{{- toYaml .Values.ingress.extraPaths | nindent 10 }}
{{- end }}
- path: {{ .Values.ingress.path }}
{{- if eq "true" (include "common.ingress.supportsPathType" .) }}
pathType: {{ .Values.ingress.pathType }}
{{- end }}
backend: {{- include "common.ingress.backend" (dict "serviceName" (printf "%s-web" (include "common.names.fullname" .)) "servicePort" "http" "context" $) | nindent 14 }}
{{- end }}
{{- range .Values.ingress.extraHosts }}
- host: {{ .name | quote }}
http:
paths:
- path: {{ default "/" .path }}
{{- if eq "true" (include "common.ingress.supportsPathType" $) }}
pathType: {{ default "ImplementationSpecific" .pathType }}
{{- end }}
backend: {{- include "common.ingress.backend" (dict "serviceName" (printf "%s-web" (include "common.names.fullname" .)) "servicePort" "http" "context" $) | nindent 14 }}
{{- end }}
{{- if .Values.ingress.extraRules }}
{{- include "common.tplvalues.render" (dict "value" .Values.ingress.extraRules "context" $) | nindent 4 }}
{{- end }}
{{- if or (and .Values.ingress.tls (or (include "common.ingress.certManagerRequest" ( dict "annotations" .Values.ingress.annotations )) .Values.ingress.selfSigned)) .Values.ingress.extraTls }}
tls:
{{- if and .Values.ingress.tls (or (include "common.ingress.certManagerRequest" ( dict "annotations" .Values.ingress.annotations )) .Values.ingress.selfSigned) }}
- hosts:
- {{ .Values.ingress.hostname | quote }}
secretName: {{ printf "%s-tls" .Values.ingress.hostname }}
{{- end }}
{{- if .Values.ingress.extraTls }}
{{- include "common.tplvalues.render" (dict "value" .Values.ingress.extraTls "context" $) | nindent 4 }}
{{- end }}
{{- end }}
{{- end }}

View File

@@ -0,0 +1,129 @@
{{- /*
Copyright Broadcom, Inc. All Rights Reserved.
SPDX-License-Identifier: APACHE-2.0
*/}}
{{- if .Values.init.enabled }}
apiVersion: batch/v1
kind: Job
metadata:
name: {{ printf "%s-init" (include "common.names.fullname" .) | trunc 63 | trimSuffix "-" }}
namespace: {{ include "common.names.namespace" . | quote }}
labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
app.kubernetes.io/part-of: superset
app.kubernetes.io/component: init
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.init.jobAnnotations "context" $ ) | nindent 4 }}
{{- if .Values.commonAnnotations }}
{{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
spec:
backoffLimit: {{ .Values.init.backoffLimit }}
template:
metadata:
{{- $podLabels := include "common.tplvalues.merge" ( dict "values" ( list .Values.init.podLabels .Values.commonLabels) "context" . ) }}
labels: {{- include "common.labels.standard" ( dict "customLabels" $podLabels "context" $ ) | nindent 8 }}
app.kubernetes.io/part-of: superset
app.kubernetes.io/component: init
{{- if .Values.init.podAnnotations }}
annotations: {{- include "common.tplvalues.render" (dict "value" .Values.init.podAnnotations "context" $) | nindent 8 }}
{{- end }}
spec:
{{- include "superset.imagePullSecrets" . | nindent 6 }}
restartPolicy: OnFailure
{{- if .Values.init.podSecurityContext.enabled }}
securityContext: {{- include "common.compatibility.renderSecurityContext" (dict "secContext" .Values.init.podSecurityContext "context" $) | nindent 8 }}
{{- end }}
automountServiceAccountToken: {{ .Values.init.automountServiceAccountToken }}
{{- if .Values.init.hostAliases }}
hostAliases: {{- include "common.tplvalues.render" (dict "value" .Values.init.hostAliases "context" $) | nindent 8 }}
{{- end }}
initContainers:
{{- if .Values.defaultInitContainers.waitForDB.enabled }}
{{- include "superset.initContainers.waitForDB" . | nindent 8 }}
{{- end }}
{{- if .Values.defaultInitContainers.waitForRedis.enabled }}
{{- include "superset.initContainers.waitForRedis" . | nindent 8 }}
{{- end }}
{{- if .Values.init.initContainers }}
{{- include "common.tplvalues.render" (dict "value" .Values.init.initContainers "context" $) | nindent 8 }}
{{- end }}
containers:
- name: superset-init
image: {{ template "superset.image" . }}
imagePullPolicy: {{ .Values.image.pullPolicy | quote }}
{{- if .Values.init.containerSecurityContext.enabled }}
securityContext: {{- include "common.compatibility.renderSecurityContext" (dict "secContext" .Values.init.containerSecurityContext "context" $) | nindent 12 }}
{{- end }}
{{- if .Values.diagnosticMode.enabled }}
command: {{- include "common.tplvalues.render" (dict "value" .Values.diagnosticMode.command "context" $) | nindent 12 }}
{{- else if .Values.init.command }}
command: {{- include "common.tplvalues.render" (dict "value" .Values.init.command "context" $) | nindent 12 }}
{{- end }}
{{- if .Values.diagnosticMode.enabled }}
args: {{- include "common.tplvalues.render" (dict "value" .Values.diagnosticMode.args "context" $) | nindent 12 }}
{{- else if .Values.init.args }}
args: {{- include "common.tplvalues.render" (dict "value" .Values.init.args "context" $) | nindent 12 }}
{{- end }}
env:
{{- include "superset.configure.common" . | nindent 12 }}
{{- include "superset.configure.database" . | nindent 12 }}
{{- include "superset.configure.redis" . | nindent 12 }}
- name: SUPERSET_ROLE
value: "init"
- name: SUPERSET_USERNAME
value: {{ .Values.auth.username | quote }}
- name: SUPERSET_EMAIL
value: {{ .Values.auth.email | quote }}
- name: SUPERSET_PASSWORD
valueFrom:
secretKeyRef:
name: {{ include "superset.secretName" . }}
key: superset-password
- name: SUPERSET_LOAD_EXAMPLES
value: {{ ternary "true" "false" .Values.loadExamples | quote }}
{{- if .Values.init.extraEnvVars }}
{{- include "common.tplvalues.render" (dict "value" .Values.init.extraEnvVars "context" $) | nindent 12 }}
{{- end }}
envFrom:
{{- if .Values.init.extraEnvVarsCM }}
- configMapRef:
name: {{ include "common.tplvalues.render" (dict "value" .Values.init.extraEnvVarsCM "context" $) }}
{{- end }}
{{- if .Values.init.extraEnvVarsSecret }}
- secretRef:
name: {{ include "common.tplvalues.render" (dict "value" .Values.init.extraEnvVarsSecret "context" $) }}
{{- end }}
{{- if .Values.init.resources }}
resources: {{- toYaml .Values.init.resources | nindent 12 }}
{{- else if ne .Values.init.resourcesPreset "none" }}
resources: {{- include "common.resources.preset" (dict "type" .Values.init.resourcesPreset) | nindent 12 }}
{{- end }}
volumeMounts:
- name: empty-dir
mountPath: /tmp
subPath: tmp-dir
- name: empty-dir
mountPath: /opt/bitnami/superset/superset_home
subPath: superset-home
{{- if or .Values.existingConfigmap .Values.config }}
- name: superset-config
mountPath: /bitnami/superset/conf
{{- end }}
{{- if .Values.init.extraVolumeMounts }}
{{- include "common.tplvalues.render" (dict "value" .Values.init.extraVolumeMounts "context" $) | nindent 12 }}
{{- end }}
{{- if .Values.init.sidecars }}
{{- include "common.tplvalues.render" ( dict "value" .Values.init.sidecars "context" $) | nindent 8 }}
{{- end }}
volumes:
- name: empty-dir
emptyDir: {}
{{- if or .Values.existingConfigmap .Values.config }}
- name: superset-config
configMap:
name: {{ include "superset.configMapName" . }}
{{- end }}
{{- if .Values.init.extraVolumes }}
{{- include "common.tplvalues.render" (dict "value" .Values.init.extraVolumes "context" $) | nindent 8 }}
{{- end }}
{{- end }}

View File

@@ -0,0 +1,67 @@
{{- /*
Copyright Broadcom, Inc. All Rights Reserved.
SPDX-License-Identifier: APACHE-2.0
*/}}
{{- if and .Values.init.networkPolicy.enabled .Values.init.enabled }}
kind: NetworkPolicy
apiVersion: {{ include "common.capabilities.networkPolicy.apiVersion" . }}
metadata:
name: {{ printf "%s-init" (include "common.names.fullname" .) | trunc 63 | trimSuffix "-" }}
namespace: {{ include "common.names.namespace" . | quote }}
{{- $versionLabel := dict "app.kubernetes.io/version" ( include "common.images.version" ( dict "imageRoot" .Values.image "chart" .Chart ) ) }}
{{- $labels := include "common.tplvalues.merge" ( dict "values" ( list .Values.commonLabels $versionLabel ) "context" . ) }}
labels: {{- include "common.labels.standard" ( dict "customLabels" $labels "context" $ ) | nindent 4 }}
app.kubernetes.io/part-of: superset
app.kubernetes.io/component: init
{{- if .Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
spec:
{{- $podLabels := include "common.tplvalues.merge" ( dict "values" ( list .Values.init.podLabels .Values.commonLabels ) "context" . ) }}
podSelector:
matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 6 }}
app.kubernetes.io/part-of: superset
app.kubernetes.io/component: init
policyTypes:
- Ingress
- Egress
{{- if .Values.init.networkPolicy.allowExternalEgress }}
egress:
- {}
{{- else }}
egress:
# Allow dns resolution
- ports:
- port: 53
protocol: UDP
- port: 53
protocol: TCP
# Allow outbound connections to Redis and Posgresql
- ports:
- port: {{ include "superset.redis.port" . }}
{{- if .Values.redis.enabled }}
to:
- podSelector:
matchLabels:
app.kubernetes.io/name: redis
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}
- ports:
- port: {{ include "superset.postgresql.port" . }}
{{- if .Values.postgresql.enabled }}
to:
- podSelector:
matchLabels:
app.kubernetes.io/name: postgresql
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}
{{- if .Values.init.networkPolicy.extraEgress }}
{{- include "common.tplvalues.render" ( dict "value" .Values.init.networkPolicy.extraEgress "context" $ ) | nindent 4 }}
{{- end }}
{{- end }}
ingress:
{{- if .Values.init.networkPolicy.extraIngress }}
{{- include "common.tplvalues.render" ( dict "value" .Values.init.networkPolicy.extraIngress "context" $ ) | nindent 4 }}
{{- end }}
{{- end }}

View File

@@ -0,0 +1,21 @@
{{- /*
Copyright Broadcom, Inc. All Rights Reserved.
SPDX-License-Identifier: APACHE-2.0
*/}}
{{- if not .Values.auth.existingSecret }}
apiVersion: v1
kind: Secret
metadata:
name: {{ template "common.names.fullname" . }}
namespace: {{ include "common.names.namespace" . | quote }}
labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
app.kubernetes.io/part-of: superset
{{- if .Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
type: Opaque
data:
superset-password: {{ include "common.secrets.passwords.manage" (dict "secret" (include "common.names.fullname" .) "key" "superset-password" "providedValues" (list "auth.password") "context" $) }}
superset-secret-key: {{ include "common.secrets.passwords.manage" (dict "secret" (include "common.names.fullname" .) "key" "superset-secret-key" "providedValues" (list "auth.secretKey") "length" 42 "context" $) }}
{{- end }}

View File

@@ -0,0 +1,19 @@
{{- /*
Copyright Broadcom, Inc. All Rights Reserved.
SPDX-License-Identifier: APACHE-2.0
*/}}
{{- if .Values.serviceAccount.create }}
apiVersion: v1
kind: ServiceAccount
metadata:
name: {{ include "superset.serviceAccountName" . }}
namespace: {{ include "common.names.namespace" . | quote }}
labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
app.kubernetes.io/part-of: superset
{{- if or .Values.serviceAccount.annotations .Values.commonAnnotations }}
{{- $annotations := include "common.tplvalues.merge" (dict "values" (list .Values.serviceAccount.annotations .Values.commonAnnotations) "context" .) }}
annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $ ) | nindent 4 }}
{{- end }}
automountServiceAccountToken: {{ .Values.serviceAccount.automountServiceAccountToken }}
{{- end }}

View File

@@ -0,0 +1,46 @@
{{- /*
Copyright Broadcom, Inc. All Rights Reserved.
SPDX-License-Identifier: APACHE-2.0
*/}}
{{- if .Values.ingress.enabled }}
{{- if .Values.ingress.secrets }}
{{- range .Values.ingress.secrets }}
apiVersion: v1
kind: Secret
metadata:
name: {{ .name }}
namespace: {{ include "common.names.namespace" $ | quote }}
labels: {{- include "common.labels.standard" ( dict "customLabels" $.Values.commonLabels "context" $ ) | nindent 4 }}
app.kubernetes.io/part-of: superset
{{- if $.Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" $.Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
type: kubernetes.io/tls
data:
tls.crt: {{ .certificate | b64enc }}
tls.key: {{ .key | b64enc }}
---
{{- end }}
{{- end }}
{{- if and .Values.ingress.tls .Values.ingress.selfSigned }}
{{- $secretName := printf "%s-tls" .Values.ingress.hostname }}
{{- $ca := genCA "superset-ca" 365 }}
{{- $cert := genSignedCert .Values.ingress.hostname nil (list .Values.ingress.hostname) 365 $ca }}
apiVersion: v1
kind: Secret
metadata:
name: {{ $secretName }}
namespace: {{ include "common.names.namespace" . | quote }}
labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
app.kubernetes.io/part-of: superset
{{- if .Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
type: kubernetes.io/tls
data:
tls.crt: {{ include "common.secrets.lookup" (dict "secret" $secretName "key" "tls.crt" "defaultValue" $cert.Cert "context" $) }}
tls.key: {{ include "common.secrets.lookup" (dict "secret" $secretName "key" "tls.key" "defaultValue" $cert.Key "context" $) }}
ca.crt: {{ include "common.secrets.lookup" (dict "secret" $secretName "key" "ca.crt" "defaultValue" $ca.Cert "context" $) }}
{{- end }}
{{- end }}

View File

@@ -0,0 +1,190 @@
{{- /*
Copyright Broadcom, Inc. All Rights Reserved.
SPDX-License-Identifier: APACHE-2.0
*/}}
apiVersion: {{ include "common.capabilities.deployment.apiVersion" . }}
kind: Deployment
metadata:
name: {{ template "superset.web.fullname" . }}
namespace: {{ include "common.names.namespace" . | quote }}
labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
app.kubernetes.io/component: superset-web
app.kubernetes.io/part-of: superset
{{- if or .Values.web.deploymentAnnotations .Values.commonAnnotations }}
{{- $annotations := include "common.tplvalues.merge" (dict "values" (list .Values.web.deploymentAnnotations .Values.commonAnnotations) "context" .) }}
annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $ ) | nindent 4 }}
{{- end }}
spec:
{{- if and (not .Values.web.autoscaling.hpa.enabled) (not .Values.web.autoscaling.vpa.enabled) }}
replicas: {{ .Values.web.replicaCount }}
{{- end }}
{{- if .Values.web.updateStrategy }}
strategy: {{- toYaml .Values.web.updateStrategy | nindent 4 }}
{{- end }}
{{- $podLabels := include "common.tplvalues.merge" (dict "values" (list .Values.web.podLabels .Values.commonLabels) "context" .) }}
selector:
matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 6 }}
app.kubernetes.io/component: superset-web
app.kubernetes.io/part-of: superset
template:
metadata:
{{- if .Values.web.podAnnotations }}
annotations: {{- include "common.tplvalues.render" (dict "value" .Values.web.podAnnotations "context" $) | nindent 8 }}
{{- end }}
labels: {{- include "common.labels.standard" ( dict "customLabels" $podLabels "context" $ ) | nindent 8 }}
app.kubernetes.io/component: superset-web
app.kubernetes.io/part-of: superset
spec:
{{- include "superset.imagePullSecrets" . | nindent 6 }}
serviceAccountName: {{ template "superset.serviceAccountName" . }}
automountServiceAccountToken: {{ .Values.web.automountServiceAccountToken }}
{{- if .Values.web.hostAliases }}
hostAliases: {{- include "common.tplvalues.render" (dict "value" .Values.web.hostAliases "context" $) | nindent 8 }}
{{- end }}
{{- if .Values.web.affinity }}
affinity: {{- include "common.tplvalues.render" ( dict "value" .Values.web.affinity "context" $) | nindent 8 }}
{{- else }}
affinity:
podAffinity: {{- include "common.affinities.pods" (dict "type" .Values.web.podAffinityPreset "component" "superset-web" "customLabels" $podLabels "context" $) | nindent 10 }}
podAntiAffinity: {{- include "common.affinities.pods" (dict "type" .Values.web.podAntiAffinityPreset "component" "superset-web" "customLabels" $podLabels "context" $) | nindent 10 }}
nodeAffinity: {{- include "common.affinities.nodes" (dict "type" .Values.web.nodeAffinityPreset.type "key" .Values.web.nodeAffinityPreset.key "values" .Values.web.nodeAffinityPreset.values) | nindent 10 }}
{{- end }}
{{- if .Values.web.nodeSelector }}
nodeSelector: {{- include "common.tplvalues.render" ( dict "value" .Values.web.nodeSelector "context" $) | nindent 8 }}
{{- end }}
{{- if .Values.web.tolerations }}
tolerations: {{- include "common.tplvalues.render" (dict "value" .Values.web.tolerations "context" .) | nindent 8 }}
{{- end }}
{{- if .Values.web.priorityClassName }}
priorityClassName: {{ .Values.web.priorityClassName | quote }}
{{- end }}
{{- if .Values.web.schedulerName }}
schedulerName: {{ .Values.web.schedulerName | quote }}
{{- end }}
{{- if .Values.web.topologySpreadConstraints }}
topologySpreadConstraints: {{- include "common.tplvalues.render" (dict "value" .Values.web.topologySpreadConstraints "context" .) | nindent 8 }}
{{- end }}
{{- if .Values.web.podSecurityContext.enabled }}
securityContext: {{- include "common.compatibility.renderSecurityContext" (dict "secContext" .Values.web.podSecurityContext "context" $) | nindent 8 }}
{{- end }}
{{- if .Values.web.terminationGracePeriodSeconds }}
terminationGracePeriodSeconds: {{ .Values.web.terminationGracePeriodSeconds }}
{{- end }}
initContainers:
{{- if .Values.defaultInitContainers.waitForDB.enabled }}
{{- include "superset.initContainers.waitForDB" . | nindent 8 }}
{{- end }}
{{- if .Values.defaultInitContainers.waitForRedis.enabled }}
{{- include "superset.initContainers.waitForRedis" . | nindent 8 }}
{{- end }}
{{- if and .Values.web.waitForExamples.enabled .Values.loadExamples }}
{{- include "superset.initContainers.waitForExamples" . | nindent 8 }}
{{- end }}
{{- if .Values.web.initContainers }}
{{- include "common.tplvalues.render" (dict "value" .Values.web.initContainers "context" $) | nindent 8 }}
{{- end }}
containers:
- name: superset-web
image: {{ template "superset.image" . }}
imagePullPolicy: {{ .Values.image.pullPolicy | quote }}
{{- if .Values.web.containerSecurityContext.enabled }}
securityContext: {{- include "common.compatibility.renderSecurityContext" (dict "secContext" .Values.web.containerSecurityContext "context" $) | nindent 12 }}
{{- end }}
{{- if .Values.diagnosticMode.enabled }}
command: {{- include "common.tplvalues.render" (dict "value" .Values.diagnosticMode.command "context" $) | nindent 12 }}
{{- else if .Values.web.command }}
command: {{- include "common.tplvalues.render" (dict "value" .Values.web.command "context" $) | nindent 12 }}
{{- end }}
{{- if .Values.diagnosticMode.enabled }}
args: {{- include "common.tplvalues.render" (dict "value" .Values.diagnosticMode.args "context" $) | nindent 12 }}
{{- else if .Values.web.args }}
args: {{- include "common.tplvalues.render" (dict "value" .Values.web.args "context" $) | nindent 12 }}
{{- end }}
env:
{{- include "superset.configure.common" . | nindent 12 }}
{{- include "superset.configure.database" . | nindent 12 }}
{{- include "superset.configure.redis" . | nindent 12 }}
- name: SUPERSET_ROLE
value: "webserver"
- name: SUPERSET_WEBSERVER_PORT_NUMBER
value: {{ .Values.web.containerPorts.http | quote }}
{{- if .Values.web.extraEnvVars }}
{{- include "common.tplvalues.render" (dict "value" .Values.web.extraEnvVars "context" $) | nindent 12 }}
{{- end }}
envFrom:
{{- if .Values.web.extraEnvVarsCM }}
- configMapRef:
name: {{ include "common.tplvalues.render" (dict "value" .Values.web.extraEnvVarsCM "context" $) }}
{{- end }}
{{- if .Values.web.extraEnvVarsSecret }}
- secretRef:
name: {{ include "common.tplvalues.render" (dict "value" .Values.web.extraEnvVarsSecret "context" $) }}
{{- end }}
{{- if .Values.web.resources }}
resources: {{- toYaml .Values.web.resources | nindent 12 }}
{{- else if ne .Values.web.resourcesPreset "none" }}
resources: {{- include "common.resources.preset" (dict "type" .Values.web.resourcesPreset) | nindent 12 }}
{{- end }}
ports:
- name: http
containerPort: {{ .Values.web.containerPorts.http }}
{{- if .Values.flower.extraContainerPorts }}
{{- include "common.tplvalues.render" (dict "value" .Values.flower.extraContainerPorts "context" $) | nindent 12 }}
{{- end }}
{{- if not .Values.diagnosticMode.enabled }}
{{- if .Values.web.customLivenessProbe }}
livenessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.web.customLivenessProbe "context" $) | nindent 12 }}
{{- else if .Values.web.livenessProbe.enabled }}
livenessProbe: {{- include "common.tplvalues.render" (dict "value" (omit .Values.web.livenessProbe "enabled") "context" $) | nindent 12 }}
tcpSocket:
port: http
{{- end }}
{{- if .Values.web.customReadinessProbe }}
readinessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.web.customReadinessProbe "context" $) | nindent 12 }}
{{- else if .Values.web.readinessProbe.enabled }}
readinessProbe: {{- include "common.tplvalues.render" (dict "value" (omit .Values.web.readinessProbe "enabled") "context" $) | nindent 12 }}
httpGet:
path: /health
port: http
{{- end }}
{{- if .Values.web.customStartupProbe }}
startupProbe: {{- include "common.tplvalues.render" (dict "value" .Values.web.customStartupProbe "context" $) | nindent 12 }}
{{- else if .Values.web.startupProbe.enabled }}
startupProbe: {{- include "common.tplvalues.render" (dict "value" (omit .Values.web.startupProbe "enabled") "context" $) | nindent 12 }}
httpGet:
path: /health
port: http
{{- end }}
{{- end }}
{{- if .Values.web.lifecycleHooks }}
lifecycle: {{- include "common.tplvalues.render" (dict "value" .Values.web.lifecycleHooks "context" $) | nindent 12 }}
{{- end }}
volumeMounts:
- name: empty-dir
mountPath: /tmp
subPath: tmp-dir
- name: empty-dir
mountPath: /opt/bitnami/superset/superset_home
subPath: superset-home
{{- if or .Values.existingConfigmap .Values.config }}
- name: superset-config
mountPath: /bitnami/superset/conf
{{- end }}
{{- if .Values.web.extraVolumeMounts }}
{{- include "common.tplvalues.render" (dict "value" .Values.web.extraVolumeMounts "context" $) | nindent 12 }}
{{- end }}
{{- if .Values.web.sidecars }}
{{- include "common.tplvalues.render" ( dict "value" .Values.web.sidecars "context" $) | nindent 8 }}
{{- end }}
volumes:
- name: empty-dir
emptyDir: {}
{{- if or .Values.existingConfigmap .Values.config }}
- name: superset-config
configMap:
name: {{ include "superset.configMapName" . }}
{{- end }}
{{- if .Values.web.extraVolumes }}
{{- include "common.tplvalues.render" (dict "value" .Values.web.extraVolumes "context" $) | nindent 8 }}
{{- end }}

View File

@@ -0,0 +1,50 @@
{{- /*
Copyright Broadcom, Inc. All Rights Reserved.
SPDX-License-Identifier: APACHE-2.0
*/}}
{{- if .Values.web.autoscaling.hpa.enabled }}
apiVersion: {{ include "common.capabilities.hpa.apiVersion" . }}
kind: HorizontalPodAutoscaler
metadata:
name: {{ template "superset.web.fullname" . }}
namespace: {{ include "common.names.namespace" . | quote }}
labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
app.kubernetes.io/component: superset-web
app.kubernetes.io/part-of: superset
{{- if .Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
spec:
scaleTargetRef:
apiVersion: {{ include "common.capabilities.deployment.apiVersion" . }}
kind: Deployment
name: {{ template "superset.web.fullname" . }}
minReplicas: {{ .Values.web.autoscaling.hpa.minReplicas }}
maxReplicas: {{ .Values.web.autoscaling.hpa.maxReplicas }}
metrics:
{{- if .Values.web.autoscaling.hpa.targetMemory }}
- type: Resource
resource:
name: memory
{{- if semverCompare "<1.23-0" (include "common.capabilities.kubeVersion" .) }}
targetAverageUtilization: {{ .Values.web.autoscaling.hpa.targetMemory }}
{{- else }}
target:
type: Utilization
averageUtilization: {{ .Values.web.autoscaling.hpa.targetMemory }}
{{- end }}
{{- end }}
{{- if .Values.web.autoscaling.hpa.targetCPU }}
- type: Resource
resource:
name: cpu
{{- if semverCompare "<1.23-0" (include "common.capabilities.kubeVersion" .) }}
targetAverageUtilization: {{ .Values.web.autoscaling.hpa.targetCPU }}
{{- else }}
target:
type: Utilization
averageUtilization: {{ .Values.web.autoscaling.hpa.targetCPU }}
{{- end }}
{{- end }}
{{- end }}

View File

@@ -0,0 +1,88 @@
{{- /*
Copyright Broadcom, Inc. All Rights Reserved.
SPDX-License-Identifier: APACHE-2.0
*/}}
{{- if .Values.web.networkPolicy.enabled }}
kind: NetworkPolicy
apiVersion: {{ include "common.capabilities.networkPolicy.apiVersion" . }}
metadata:
name: {{ template "superset.web.fullname" . }}
namespace: {{ include "common.names.namespace" . | quote }}
labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
app.kubernetes.io/component: superset-web
app.kubernetes.io/part-of: superset
{{- if .Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
spec:
{{- $podLabels := include "common.tplvalues.merge" ( dict "values" ( list .Values.web.podLabels .Values.commonLabels ) "context" . ) }}
podSelector:
matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 6 }}
app.kubernetes.io/component: superset-web
app.kubernetes.io/part-of: superset
policyTypes:
- Ingress
- Egress
egress:
{{- if .Values.web.networkPolicy.allowExternalEgress }}
- {}
{{- else }}
- ports:
# Allow dns resolution
- port: 53
protocol: UDP
- port: 53
protocol: TCP
- ports:
- port: {{ include "superset.redis.port" . }}
{{- if .Values.redis.enabled }}
to:
- podSelector:
matchLabels:
app.kubernetes.io/name: redis
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}
- ports:
- port: {{ include "superset.postgresql.port" . }}
{{- if .Values.postgresql.enabled }}
to:
- podSelector:
matchLabels:
app.kubernetes.io/name: postgresql
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}
{{- if .Values.web.networkPolicy.extraEgress }}
{{- include "common.tplvalues.render" ( dict "value" .Values.web.networkPolicy.extraEgress "context" $ ) | nindent 4 }}
{{- end }}
{{- end }}
ingress:
- ports:
- port: {{ .Values.web.containerPorts.http }}
{{- if not .Values.web.networkPolicy.allowExternal }}
from:
- podSelector:
matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 14 }}
{{- if .Values.web.networkPolicy.addExternalClientAccess }}
- podSelector:
matchLabels:
{{ printf "%s-web" include "common.names.fullname" . }}-client: "true"
{{- end }}
{{- if .Values.web.networkPolicy.ingressPodMatchLabels }}
- podSelector:
matchLabels: {{- include "common.tplvalues.render" (dict "value" .Values.web.networkPolicy.ingressPodMatchLabels "context" $ ) | nindent 14 }}
{{- end }}
{{- if .Values.web.networkPolicy.ingressNSMatchLabels }}
- namespaceSelector:
matchLabels: {{- include "common.tplvalues.render" (dict "value" .Values.web.networkPolicy.ingressNSMatchLabels "context" $ ) | nindent 14 }}
{{- if .Values.web.networkPolicy.ingressNSPodMatchLabels }}
podSelector:
matchLabels:
matchLabels: {{- include "common.tplvalues.render" (dict "value" .Values.web.networkPolicy.ingressNSPodMatchLabels "context" $ ) | nindent 14 }}
{{- end }}
{{- end }}
{{- end }}
{{- if .Values.web.networkPolicy.extraIngress }}
{{- include "common.tplvalues.render" ( dict "value" .Values.web.networkPolicy.extraIngress "context" $ ) | nindent 4 }}
{{- end }}
{{- end }}

View File

@@ -0,0 +1,30 @@
{{- /*
Copyright Broadcom, Inc. All Rights Reserved.
SPDX-License-Identifier: APACHE-2.0
*/}}
{{- if and .Values.web.pdb.create }}
apiVersion: {{ include "common.capabilities.policy.apiVersion" . }}
kind: PodDisruptionBudget
metadata:
name: {{ template "superset.web.fullname" . }}
namespace: {{ include "common.names.namespace" . | quote }}
labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
app.kubernetes.io/component: superset-web
app.kubernetes.io/part-of: superset
{{- if .Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
spec:
{{- if .Values.web.pdb.minAvailable }}
minAvailable: {{ .Values.web.pdb.minAvailable }}
{{- end }}
{{- if or .Values.web.pdb.maxUnavailable ( not .Values.web.pdb.minAvailable ) }}
maxUnavailable: {{ .Values.web.pdb.maxUnavailable | default 1 }}
{{- end }}
{{- $podLabels := include "common.tplvalues.merge" (dict "values" (list .Values.web.podLabels .Values.commonLabels) "context" .) }}
selector:
matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 6 }}
app.kubernetes.io/component: superset-web
app.kubernetes.io/part-of: superset
{{- end }}

View File

@@ -0,0 +1,54 @@
{{- /*
Copyright Broadcom, Inc. All Rights Reserved.
SPDX-License-Identifier: APACHE-2.0
*/}}
apiVersion: v1
kind: Service
metadata:
name: {{ template "superset.web.fullname" . }}
namespace: {{ include "common.names.namespace" . | quote }}
labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
app.kubernetes.io/component: superset-web
app.kubernetes.io/part-of: superset
{{- if or .Values.web.service.annotations .Values.commonAnnotations }}
{{- $annotations := include "common.tplvalues.merge" (dict "values" (list .Values.web.service.annotations .Values.commonAnnotations) "context" .) }}
annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $ ) | nindent 4 }}
{{- end }}
spec:
type: {{ .Values.web.service.type }}
{{- if and .Values.web.service.clusterIP (eq .Values.web.service.type "ClusterIP") }}
clusterIP: {{ .Values.web.service.clusterIP }}
{{- end }}
{{- if .Values.web.service.sessionAffinity }}
sessionAffinity: {{ .Values.web.service.sessionAffinity }}
{{- end }}
{{- if .Values.web.service.sessionAffinityConfig }}
sessionAffinityConfig: {{- include "common.tplvalues.render" (dict "value" .Values.web.service.sessionAffinityConfig "context" $) | nindent 4 }}
{{- end }}
{{- if or (eq .Values.web.service.type "LoadBalancer") (eq .Values.web.service.type "NodePort") }}
externalTrafficPolicy: {{ .Values.web.service.externalTrafficPolicy | quote }}
{{- end }}
{{- if and (eq .Values.web.service.type "LoadBalancer") (not (empty .Values.web.service.loadBalancerSourceRanges)) }}
loadBalancerSourceRanges: {{ .Values.web.service.loadBalancerSourceRanges }}
{{- end }}
{{- if and (eq .Values.web.service.type "LoadBalancer") (not (empty .Values.web.service.loadBalancerIP)) }}
loadBalancerIP: {{ .Values.web.service.loadBalancerIP }}
{{- end }}
ports:
- name: http
port: {{ .Values.web.service.ports.http }}
targetPort: http
protocol: TCP
{{- if and (or (eq .Values.web.service.type "NodePort") (eq .Values.web.service.type "LoadBalancer")) (not (empty .Values.web.service.nodePorts.http)) }}
nodePort: {{ .Values.web.service.nodePorts.http }}
{{- else if eq .Values.web.service.type "ClusterIP" }}
nodePort: null
{{- end }}
{{- if .Values.web.service.extraPorts }}
{{- include "common.tplvalues.render" (dict "value" .Values.web.service.extraPorts "context" $) | nindent 4 }}
{{- end }}
{{- $podLabels := include "common.tplvalues.merge" (dict "values" (list .Values.web.podLabels .Values.commonLabels) "context" .) | fromYaml }}
selector: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 4 }}
app.kubernetes.io/component: superset-web
app.kubernetes.io/part-of: superset

View File

@@ -0,0 +1,45 @@
{{- /*
Copyright Broadcom, Inc. All Rights Reserved.
SPDX-License-Identifier: APACHE-2.0
*/}}
{{- if and (.Capabilities.APIVersions.Has "autoscaling.k8s.io/v1/VerticalPodAutoscaler") .Values.web.autoscaling.vpa.enabled }}
apiVersion: autoscaling.k8s.io/v1
kind: VerticalPodAutoscaler
metadata:
name: {{ template "superset.web.fullname" . }}
namespace: {{ include "common.names.namespace" . | quote }}
labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
app.kubernetes.io/component: superset-web
app.kubernetes.io/part-of: superset
{{- if or .Values.web.autoscaling.vpa.annotations .Values.commonAnnotations }}
{{- $annotations := include "common.tplvalues.merge" ( dict "values" ( list .Values.web.autoscaling.vpa.annotations .Values.commonAnnotations ) "context" . ) }}
annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }}
{{- end }}
spec:
resourcePolicy:
containerPolicies:
- containerName: superset-web
{{- with .Values.web.autoscaling.vpa.controlledResources }}
controlledResources:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.web.autoscaling.vpa.maxAllowed }}
maxAllowed:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.web.autoscaling.vpa.minAllowed }}
minAllowed:
{{- toYaml . | nindent 8 }}
{{- end }}
targetRef:
apiVersion: {{ include "common.capabilities.deployment.apiVersion" . }}
kind: "Deployment"
name: {{ template "superset.web.fullname" . }}
{{- if .Values.web.autoscaling.vpa.updatePolicy }}
updatePolicy:
{{- with .Values.web.autoscaling.vpa.updatePolicy.updateMode }}
updateMode: {{ . }}
{{- end }}
{{- end }}
{{- end }}

View File

@@ -0,0 +1,189 @@
{{- /*
Copyright Broadcom, Inc. All Rights Reserved.
SPDX-License-Identifier: APACHE-2.0
*/}}
apiVersion: {{ include "common.capabilities.deployment.apiVersion" . }}
kind: Deployment
metadata:
name: {{ template "superset.worker.fullname" . }}
namespace: {{ include "common.names.namespace" . | quote }}
labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
app.kubernetes.io/component: celery-worker
app.kubernetes.io/part-of: superset
{{- if or .Values.worker.deploymentAnnotations .Values.commonAnnotations }}
{{- $annotations := include "common.tplvalues.merge" (dict "values" (list .Values.worker.deploymentAnnotations .Values.commonAnnotations) "context" .) }}
annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $ ) | nindent 4 }}
{{- end }}
spec:
{{- if and (not .Values.worker.autoscaling.hpa.enabled) (not .Values.worker.autoscaling.vpa.enabled) }}
replicas: {{ .Values.worker.replicaCount }}
{{- end }}
{{- if .Values.worker.updateStrategy }}
strategy: {{- toYaml .Values.worker.updateStrategy | nindent 4 }}
{{- end }}
{{- $podLabels := include "common.tplvalues.merge" (dict "values" (list .Values.worker.podLabels .Values.commonLabels) "context" .) }}
selector:
matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 6 }}
app.kubernetes.io/component: celery-worker
app.kubernetes.io/part-of: superset
template:
metadata:
{{- if .Values.worker.podAnnotations }}
annotations: {{- include "common.tplvalues.render" (dict "value" .Values.worker.podAnnotations "context" $) | nindent 8 }}
{{- end }}
labels: {{- include "common.labels.standard" ( dict "customLabels" $podLabels "context" $ ) | nindent 8 }}
app.kubernetes.io/component: celery-worker
app.kubernetes.io/part-of: superset
spec:
{{- include "superset.imagePullSecrets" . | nindent 6 }}
serviceAccountName: {{ template "superset.serviceAccountName" . }}
automountServiceAccountToken: {{ .Values.worker.automountServiceAccountToken }}
{{- if .Values.worker.hostAliases }}
hostAliases: {{- include "common.tplvalues.render" (dict "value" .Values.worker.hostAliases "context" $) | nindent 8 }}
{{- end }}
{{- if .Values.worker.affinity }}
affinity: {{- include "common.tplvalues.render" ( dict "value" .Values.worker.affinity "context" $) | nindent 8 }}
{{- else }}
affinity:
podAffinity: {{- include "common.affinities.pods" (dict "type" .Values.worker.podAffinityPreset "component" "celery-worker" "customLabels" $podLabels "context" $) | nindent 10 }}
podAntiAffinity: {{- include "common.affinities.pods" (dict "type" .Values.worker.podAntiAffinityPreset "component" "celery-worker" "customLabels" $podLabels "context" $) | nindent 10 }}
nodeAffinity: {{- include "common.affinities.nodes" (dict "type" .Values.worker.nodeAffinityPreset.type "key" .Values.worker.nodeAffinityPreset.key "values" .Values.worker.nodeAffinityPreset.values) | nindent 10 }}
{{- end }}
{{- if .Values.worker.nodeSelector }}
nodeSelector: {{- include "common.tplvalues.render" ( dict "value" .Values.worker.nodeSelector "context" $) | nindent 8 }}
{{- end }}
{{- if .Values.worker.tolerations }}
tolerations: {{- include "common.tplvalues.render" (dict "value" .Values.worker.tolerations "context" .) | nindent 8 }}
{{- end }}
{{- if .Values.worker.priorityClassName }}
priorityClassName: {{ .Values.worker.priorityClassName | quote }}
{{- end }}
{{- if .Values.worker.schedulerName }}
schedulerName: {{ .Values.worker.schedulerName | quote }}
{{- end }}
{{- if .Values.worker.topologySpreadConstraints }}
topologySpreadConstraints: {{- include "common.tplvalues.render" (dict "value" .Values.worker.topologySpreadConstraints "context" .) | nindent 8 }}
{{- end }}
{{- if .Values.worker.podSecurityContext.enabled }}
securityContext: {{- include "common.compatibility.renderSecurityContext" (dict "secContext" .Values.worker.podSecurityContext "context" $) | nindent 8 }}
{{- end }}
{{- if .Values.worker.terminationGracePeriodSeconds }}
terminationGracePeriodSeconds: {{ .Values.worker.terminationGracePeriodSeconds }}
{{- end }}
initContainers:
{{- if .Values.defaultInitContainers.waitForDB.enabled }}
{{- include "superset.initContainers.waitForDB" . | nindent 8 }}
{{- end }}
{{- if .Values.defaultInitContainers.waitForRedis.enabled }}
{{- include "superset.initContainers.waitForRedis" . | nindent 8 }}
{{- end }}
{{- if .Values.worker.initContainers }}
{{- include "common.tplvalues.render" (dict "value" .Values.worker.initContainers "context" $) | nindent 8 }}
{{- end }}
containers:
- name: celery-worker
image: {{ template "superset.image" . }}
imagePullPolicy: {{ .Values.image.pullPolicy | quote }}
{{- if .Values.worker.containerSecurityContext.enabled }}
securityContext: {{- include "common.compatibility.renderSecurityContext" (dict "secContext" .Values.worker.containerSecurityContext "context" $) | nindent 12 }}
{{- end }}
{{- if .Values.diagnosticMode.enabled }}
command: {{- include "common.tplvalues.render" (dict "value" .Values.diagnosticMode.command "context" $) | nindent 12 }}
{{- else if .Values.worker.command }}
command: {{- include "common.tplvalues.render" (dict "value" .Values.worker.command "context" $) | nindent 12 }}
{{- end }}
{{- if .Values.diagnosticMode.enabled }}
args: {{- include "common.tplvalues.render" (dict "value" .Values.diagnosticMode.args "context" $) | nindent 12 }}
{{- else if .Values.worker.args }}
args: {{- include "common.tplvalues.render" (dict "value" .Values.worker.args "context" $) | nindent 12 }}
{{- end }}
env:
{{- include "superset.configure.common" . | nindent 12 }}
{{- include "superset.configure.database" . | nindent 12 }}
{{- include "superset.configure.redis" . | nindent 12 }}
- name: SUPERSET_ROLE
value: "celery-worker"
{{- if .Values.worker.extraEnvVars }}
{{- include "common.tplvalues.render" (dict "value" .Values.worker.extraEnvVars "context" $) | nindent 12 }}
{{- end }}
envFrom:
{{- if .Values.worker.extraEnvVarsCM }}
- configMapRef:
name: {{ include "common.tplvalues.render" (dict "value" .Values.worker.extraEnvVarsCM "context" $) }}
{{- end }}
{{- if .Values.worker.extraEnvVarsSecret }}
- secretRef:
name: {{ include "common.tplvalues.render" (dict "value" .Values.worker.extraEnvVarsSecret "context" $) }}
{{- end }}
{{- if .Values.worker.resources }}
resources: {{- toYaml .Values.worker.resources | nindent 12 }}
{{- else if ne .Values.worker.resourcesPreset "none" }}
resources: {{- include "common.resources.preset" (dict "type" .Values.worker.resourcesPreset) | nindent 12 }}
{{- end }}
{{- if not .Values.diagnosticMode.enabled }}
{{- if .Values.worker.customLivenessProbe }}
livenessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.worker.customLivenessProbe "context" $) | nindent 12 }}
{{- else if .Values.worker.livenessProbe.enabled }}
livenessProbe: {{- include "common.tplvalues.render" (dict "value" (omit .Values.worker.livenessProbe "enabled") "context" $) | nindent 12 }}
exec:
command:
- /bin/bash
- -ec
- |
. /opt/bitnami/scripts/superset-env.sh && celery -A superset.tasks.celery_app:app inspect ping -d celery@$HOSTNAME
{{- end }}
{{- if .Values.worker.customReadinessProbe }}
readinessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.worker.customReadinessProbe "context" $) | nindent 12 }}
{{- else if .Values.worker.readinessProbe.enabled }}
readinessProbe: {{- include "common.tplvalues.render" (dict "value" (omit .Values.worker.readinessProbe "enabled") "context" $) | nindent 12 }}
exec:
command:
- /bin/bash
- -ec
- |
. /opt/bitnami/scripts/superset-env.sh && celery -A superset.tasks.celery_app:app inspect ping -d celery@$HOSTNAME
{{- end }}
{{- if .Values.worker.customStartupProbe }}
startupProbe: {{- include "common.tplvalues.render" (dict "value" .Values.worker.customStartupProbe "context" $) | nindent 12 }}
{{- else if .Values.worker.startupProbe.enabled }}
startupProbe: {{- include "common.tplvalues.render" (dict "value" (omit .Values.worker.startupProbe "enabled") "context" $) | nindent 12 }}
exec:
command:
- /bin/bash
- -ec
- |
. /opt/bitnami/scripts/superset-env.sh && celery -A superset.tasks.celery_app:app inspect ping -d celery@$HOSTNAME
{{- end }}
{{- end }}
{{- if .Values.worker.lifecycleHooks }}
lifecycle: {{- include "common.tplvalues.render" (dict "value" .Values.worker.lifecycleHooks "context" $) | nindent 12 }}
{{- end }}
volumeMounts:
- name: empty-dir
mountPath: /tmp
subPath: tmp-dir
- name: empty-dir
mountPath: /opt/bitnami/superset/superset_home
subPath: superset-home
{{- if or .Values.existingConfigmap .Values.config }}
- name: superset-config
mountPath: /bitnami/superset/conf
{{- end }}
{{- if .Values.worker.extraVolumeMounts }}
{{- include "common.tplvalues.render" (dict "value" .Values.worker.extraVolumeMounts "context" $) | nindent 12 }}
{{- end }}
{{- if .Values.worker.sidecars }}
{{- include "common.tplvalues.render" ( dict "value" .Values.worker.sidecars "context" $) | nindent 8 }}
{{- end }}
volumes:
- name: empty-dir
emptyDir: {}
{{- if or .Values.existingConfigmap .Values.config }}
- name: superset-config
configMap:
name: {{ include "superset.configMapName" . }}
{{- end }}
{{- if .Values.worker.extraVolumes }}
{{- include "common.tplvalues.render" (dict "value" .Values.worker.extraVolumes "context" $) | nindent 8 }}
{{- end }}

View File

@@ -0,0 +1,50 @@
{{- /*
Copyright Broadcom, Inc. All Rights Reserved.
SPDX-License-Identifier: APACHE-2.0
*/}}
{{- if .Values.worker.autoscaling.hpa.enabled }}
apiVersion: {{ include "common.capabilities.hpa.apiVersion" . }}
kind: HorizontalPodAutoscaler
metadata:
name: {{ template "superset.worker.fullname" . }}
namespace: {{ include "common.names.namespace" . | quote }}
labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
app.kubernetes.io/component: celery-worker
app.kubernetes.io/part-of: superset
{{- if .Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
spec:
scaleTargetRef:
apiVersion: {{ include "common.capabilities.deployment.apiVersion" . }}
kind: Deployment
name: {{ template "superset.worker.fullname" . }}
minReplicas: {{ .Values.worker.autoscaling.hpa.minReplicas }}
maxReplicas: {{ .Values.worker.autoscaling.hpa.maxReplicas }}
metrics:
{{- if .Values.worker.autoscaling.hpa.targetMemory }}
- type: Resource
resource:
name: memory
{{- if semverCompare "<1.23-0" (include "common.capabilities.kubeVersion" .) }}
targetAverageUtilization: {{ .Values.worker.autoscaling.hpa.targetMemory }}
{{- else }}
target:
type: Utilization
averageUtilization: {{ .Values.worker.autoscaling.hpa.targetMemory }}
{{- end }}
{{- end }}
{{- if .Values.worker.autoscaling.hpa.targetCPU }}
- type: Resource
resource:
name: cpu
{{- if semverCompare "<1.23-0" (include "common.capabilities.kubeVersion" .) }}
targetAverageUtilization: {{ .Values.worker.autoscaling.hpa.targetCPU }}
{{- else }}
target:
type: Utilization
averageUtilization: {{ .Values.worker.autoscaling.hpa.targetCPU }}
{{- end }}
{{- end }}
{{- end }}

View File

@@ -0,0 +1,63 @@
{{- /*
Copyright Broadcom, Inc. All Rights Reserved.
SPDX-License-Identifier: APACHE-2.0
*/}}
{{- if .Values.worker.networkPolicy.enabled }}
kind: NetworkPolicy
apiVersion: {{ include "common.capabilities.networkPolicy.apiVersion" . }}
metadata:
name: {{ template "superset.worker.fullname" . }}
namespace: {{ include "common.names.namespace" . | quote }}
labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
app.kubernetes.io/component: celery-worker
app.kubernetes.io/part-of: superset
{{- if .Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
spec:
{{- $podLabels := include "common.tplvalues.merge" ( dict "values" ( list .Values.worker.podLabels .Values.commonLabels ) "context" . ) }}
podSelector:
matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 6 }}
app.kubernetes.io/component: celery-worker
app.kubernetes.io/part-of: superset
policyTypes:
- Ingress
- Egress
egress:
{{- if .Values.worker.networkPolicy.allowExternalEgress }}
- {}
{{- else }}
- ports:
# Allow dns resolution
- port: 53
protocol: UDP
- port: 53
protocol: TCP
- ports:
- port: {{ include "superset.redis.port" . }}
{{- if .Values.redis.enabled }}
to:
- podSelector:
matchLabels:
app.kubernetes.io/name: redis
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}
- ports:
- port: {{ include "superset.postgresql.port" . }}
{{- if .Values.postgresql.enabled }}
to:
- podSelector:
matchLabels:
app.kubernetes.io/name: postgresql
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}
{{- if .Values.worker.networkPolicy.extraEgress }}
{{- include "common.tplvalues.render" ( dict "value" .Values.worker.networkPolicy.extraEgress "context" $ ) | nindent 4 }}
{{- end }}
{{- end }}
ingress:
{{- if .Values.worker.networkPolicy.extraIngress }}
{{- include "common.tplvalues.render" ( dict "value" .Values.worker.networkPolicy.extraIngress "context" $ ) | nindent 4 }}
{{- end }}
{{- end }}

View File

@@ -0,0 +1,30 @@
{{- /*
Copyright Broadcom, Inc. All Rights Reserved.
SPDX-License-Identifier: APACHE-2.0
*/}}
{{- if .Values.worker.pdb.create }}
apiVersion: {{ include "common.capabilities.policy.apiVersion" . }}
kind: PodDisruptionBudget
metadata:
name: {{ template "superset.worker.fullname" . }}
namespace: {{ include "common.names.namespace" . | quote }}
labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
app.kubernetes.io/component: celery-worker
app.kubernetes.io/part-of: superset
{{- if .Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
spec:
{{- if .Values.worker.pdb.minAvailable }}
minAvailable: {{ .Values.worker.pdb.minAvailable }}
{{- end }}
{{- if or .Values.worker.pdb.maxUnavailable ( not .Values.worker.pdb.minAvailable ) }}
maxUnavailable: {{ .Values.worker.pdb.maxUnavailable | default 1 }}
{{- end }}
{{- $podLabels := include "common.tplvalues.merge" (dict "values" (list .Values.worker.podLabels .Values.commonLabels) "context" .) }}
selector:
matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 6 }}
app.kubernetes.io/component: celery-worker
app.kubernetes.io/part-of: superset
{{- end }}

View File

@@ -0,0 +1,45 @@
{{- /*
Copyright Broadcom, Inc. All Rights Reserved.
SPDX-License-Identifier: APACHE-2.0
*/}}
{{- if and (.Capabilities.APIVersions.Has "autoscaling.k8s.io/v1/VerticalPodAutoscaler") .Values.worker.autoscaling.vpa.enabled }}
apiVersion: autoscaling.k8s.io/v1
kind: VerticalPodAutoscaler
metadata:
name: {{ include "common.names.fullname" . | trunc 63 | trimSuffix "-" }}
namespace: {{ include "common.names.namespace" . | quote }}
labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
app.kubernetes.io/component: celery-worker
app.kubernetes.io/part-of: superset
{{- if or .Values.worker.autoscaling.vpa.annotations .Values.commonAnnotations }}
{{- $annotations := include "common.tplvalues.merge" ( dict "values" ( list .Values.worker.autoscaling.vpa.annotations .Values.commonAnnotations ) "context" . ) }}
annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }}
{{- end }}
spec:
resourcePolicy:
containerPolicies:
- containerName: celery-worker
{{- with .Values.worker.autoscaling.vpa.controlledResources }}
controlledResources:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.worker.autoscaling.vpa.maxAllowed }}
maxAllowed:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.worker.autoscaling.vpa.minAllowed }}
minAllowed:
{{- toYaml . | nindent 8 }}
{{- end }}
targetRef:
apiVersion: {{ include "common.capabilities.deployment.apiVersion" . }}
kind: "Deployment"
name: {{ template "superset.worker.fullname" . }}
{{- if .Values.worker.autoscaling.vpa.updatePolicy }}
updatePolicy:
{{- with .Values.worker.autoscaling.vpa.updatePolicy.updateMode }}
updateMode: {{ . }}
{{- end }}
{{- end }}
{{- end }}

2255
bitnami/superset/values.yaml Normal file

File diff suppressed because it is too large Load Diff