-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
20 changed files
with
1,853 additions
and
0 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
<!-- | ||
Licensed to the Apache Software Foundation (ASF) under one | ||
or more contributor license agreements. See the NOTICE file | ||
distributed with this work for additional information | ||
regarding copyright ownership. The ASF licenses this file | ||
to you under the Apache License, Version 2.0 (the | ||
"License"); you may not use this file except in compliance | ||
with the License. You may obtain a copy of the License at | ||
|
||
http://www.apache.org/licenses/LICENSE-2.0 | ||
|
||
Unless required by applicable law or agreed to in writing, | ||
software distributed under the License is distributed on an | ||
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
KIND, either express or implied. See the License for the | ||
specific language governing permissions and limitations | ||
under the License. | ||
--> | ||
|
||
<!-- | ||
NOTE: This file is generated by helm-docs: https://github.com/norwoodj/helm-docs#installation | ||
--> | ||
|
||
{{ template "chart.header" . }} | ||
{{ template "chart.deprecationWarning" . }} | ||
|
||
{{ template "chart.versionBadge" . }} | ||
|
||
{{ template "chart.description" . }} | ||
|
||
{{ template "chart.homepageLine" . }} | ||
|
||
{{ template "chart.sourcesSection" . }} | ||
|
||
## TL;DR | ||
|
||
```console | ||
helm repo add superset http://apache.github.io/superset/ | ||
helm install my-superset superset/superset | ||
``` | ||
|
||
Make sure you set your own `SECRET_KEY` to something unique and secret. This secret key is used by Flask for | ||
securely signing the session cookie and will be used to encrypt sensitive data on Superset's metadata database. | ||
It should be a long random bytes or str. | ||
|
||
On helm this can be set on `extraSecretEnv.SUPERSET_SECRET_KEY` or `configOverrides.secrets` | ||
|
||
{{ template "chart.requirementsSection" . }} | ||
|
||
{{ template "chart.valuesSection" . }} |
103 changes: 103 additions & 0 deletions
103
charts/superset/charts/postgresql/charts/common/templates/validations/_mysql.tpl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,103 @@ | ||
{{/* vim: set filetype=mustache: */}} | ||
{{/* | ||
Validate MySQL required passwords are not empty. | ||
Usage: | ||
{{ include "common.validations.values.mysql.passwords" (dict "secret" "secretName" "subchart" false "context" $) }} | ||
Params: | ||
- secret - String - Required. Name of the secret where MySQL values are stored, e.g: "mysql-passwords-secret" | ||
- subchart - Boolean - Optional. Whether MySQL is used as subchart or not. Default: false | ||
*/}} | ||
{{- define "common.validations.values.mysql.passwords" -}} | ||
{{- $existingSecret := include "common.mysql.values.auth.existingSecret" . -}} | ||
{{- $enabled := include "common.mysql.values.enabled" . -}} | ||
{{- $architecture := include "common.mysql.values.architecture" . -}} | ||
{{- $authPrefix := include "common.mysql.values.key.auth" . -}} | ||
{{- $valueKeyRootPassword := printf "%s.rootPassword" $authPrefix -}} | ||
{{- $valueKeyUsername := printf "%s.username" $authPrefix -}} | ||
{{- $valueKeyPassword := printf "%s.password" $authPrefix -}} | ||
{{- $valueKeyReplicationPassword := printf "%s.replicationPassword" $authPrefix -}} | ||
|
||
{{- if and (or (not $existingSecret) (eq $existingSecret "\"\"")) (eq $enabled "true") -}} | ||
{{- $requiredPasswords := list -}} | ||
|
||
{{- $requiredRootPassword := dict "valueKey" $valueKeyRootPassword "secret" .secret "field" "mysql-root-password" -}} | ||
{{- $requiredPasswords = append $requiredPasswords $requiredRootPassword -}} | ||
|
||
{{- $valueUsername := include "common.utils.getValueFromKey" (dict "key" $valueKeyUsername "context" .context) }} | ||
{{- if not (empty $valueUsername) -}} | ||
{{- $requiredPassword := dict "valueKey" $valueKeyPassword "secret" .secret "field" "mysql-password" -}} | ||
{{- $requiredPasswords = append $requiredPasswords $requiredPassword -}} | ||
{{- end -}} | ||
|
||
{{- if (eq $architecture "replication") -}} | ||
{{- $requiredReplicationPassword := dict "valueKey" $valueKeyReplicationPassword "secret" .secret "field" "mysql-replication-password" -}} | ||
{{- $requiredPasswords = append $requiredPasswords $requiredReplicationPassword -}} | ||
{{- end -}} | ||
|
||
{{- include "common.validations.values.multiple.empty" (dict "required" $requiredPasswords "context" .context) -}} | ||
|
||
{{- end -}} | ||
{{- end -}} | ||
|
||
{{/* | ||
Auxiliary function to get the right value for existingSecret. | ||
Usage: | ||
{{ include "common.mysql.values.auth.existingSecret" (dict "context" $) }} | ||
Params: | ||
- subchart - Boolean - Optional. Whether MySQL is used as subchart or not. Default: false | ||
*/}} | ||
{{- define "common.mysql.values.auth.existingSecret" -}} | ||
{{- if .subchart -}} | ||
{{- .context.Values.mysql.auth.existingSecret | quote -}} | ||
{{- else -}} | ||
{{- .context.Values.auth.existingSecret | quote -}} | ||
{{- end -}} | ||
{{- end -}} | ||
|
||
{{/* | ||
Auxiliary function to get the right value for enabled mysql. | ||
Usage: | ||
{{ include "common.mysql.values.enabled" (dict "context" $) }} | ||
*/}} | ||
{{- define "common.mysql.values.enabled" -}} | ||
{{- if .subchart -}} | ||
{{- printf "%v" .context.Values.mysql.enabled -}} | ||
{{- else -}} | ||
{{- printf "%v" (not .context.Values.enabled) -}} | ||
{{- end -}} | ||
{{- end -}} | ||
|
||
{{/* | ||
Auxiliary function to get the right value for architecture | ||
Usage: | ||
{{ include "common.mysql.values.architecture" (dict "subchart" "true" "context" $) }} | ||
Params: | ||
- subchart - Boolean - Optional. Whether MySQL is used as subchart or not. Default: false | ||
*/}} | ||
{{- define "common.mysql.values.architecture" -}} | ||
{{- if .subchart -}} | ||
{{- .context.Values.mysql.architecture -}} | ||
{{- else -}} | ||
{{- .context.Values.architecture -}} | ||
{{- end -}} | ||
{{- end -}} | ||
|
||
{{/* | ||
Auxiliary function to get the right value for the key auth | ||
Usage: | ||
{{ include "common.mysql.values.key.auth" (dict "subchart" "true" "context" $) }} | ||
Params: | ||
- subchart - Boolean - Optional. Whether MySQL is used as subchart or not. Default: false | ||
*/}} | ||
{{- define "common.mysql.values.key.auth" -}} | ||
{{- if .subchart -}} | ||
mysql.auth | ||
{{- else -}} | ||
auth | ||
{{- end -}} | ||
{{- end -}} |
18 changes: 18 additions & 0 deletions
18
charts/superset/charts/postgresql/templates/read/extended-configmap.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{{- if (include "postgresql.readReplicas.createExtendedConfigmap" .) }} | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: {{ printf "%s-extended-configuration" (include "postgresql.readReplica.fullname" .) }} | ||
namespace: {{ .Release.Namespace | quote }} | ||
labels: {{- include "common.labels.standard" . | nindent 4 }} | ||
app.kubernetes.io/component: read | ||
{{- if .Values.commonLabels }} | ||
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} | ||
{{- end }} | ||
{{- if .Values.commonAnnotations }} | ||
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} | ||
{{- end }} | ||
data: | ||
override.conf: |- | ||
{{- include "common.tplvalues.render" ( dict "value" .Values.readReplicas.extendedConfiguration "context" $ ) | nindent 4 }} | ||
{{- end }} |
16 changes: 16 additions & 0 deletions
16
charts/superset/charts/postgresql/templates/read/metrics-configmap.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{{- if and .Values.metrics.enabled .Values.metrics.customMetrics (eq .Values.architecture "replication") }} | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: {{ printf "%s-metrics" (include "postgresql.readReplica.fullname" .) }} | ||
namespace: {{ .Release.Namespace | quote }} | ||
labels: {{- include "common.labels.standard" . | nindent 4 }} | ||
{{- if .Values.commonLabels }} | ||
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} | ||
{{- end }} | ||
{{- if .Values.commonAnnotations }} | ||
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} | ||
{{- end }} | ||
data: | ||
custom-metrics.yaml: {{ toYaml .Values.metrics.customMetrics | quote }} | ||
{{- end }} |
31 changes: 31 additions & 0 deletions
31
charts/superset/charts/postgresql/templates/read/metrics-svc.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
{{- if and .Values.metrics.enabled (eq .Values.architecture "replication") }} | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: {{ printf "%s-metrics" (include "postgresql.readReplica.fullname" .) }} | ||
namespace: {{ .Release.Namespace | quote }} | ||
labels: {{- include "common.labels.standard" . | nindent 4 }} | ||
app.kubernetes.io/component: metrics-read | ||
{{- if .Values.commonLabels }} | ||
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} | ||
{{- end }} | ||
annotations: | ||
{{- if .Values.commonAnnotations }} | ||
{{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} | ||
{{- end }} | ||
{{- if .Values.metrics.service.annotations }} | ||
{{- include "common.tplvalues.render" ( dict "value" .Values.metrics.service.annotations "context" $ ) | nindent 4 }} | ||
{{- end }} | ||
spec: | ||
type: ClusterIP | ||
sessionAffinity: {{ .Values.metrics.service.sessionAffinity }} | ||
{{- if .Values.metrics.service.clusterIP }} | ||
clusterIP: {{ .Values.metrics.service.clusterIP }} | ||
{{- end }} | ||
ports: | ||
- name: http-metrics | ||
port: {{ .Values.metrics.service.ports.metrics }} | ||
targetPort: http-metrics | ||
selector: {{- include "common.labels.matchLabels" . | nindent 4 }} | ||
app.kubernetes.io/component: read | ||
{{- end }} |
48 changes: 48 additions & 0 deletions
48
charts/superset/charts/postgresql/templates/read/servicemonitor.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
{{- if and .Values.metrics.enabled .Values.metrics.serviceMonitor.enabled (eq .Values.architecture "replication") }} | ||
apiVersion: monitoring.coreos.com/v1 | ||
kind: ServiceMonitor | ||
metadata: | ||
name: {{ include "postgresql.readReplica.fullname" . }} | ||
namespace: {{ default .Release.Namespace .Values.metrics.serviceMonitor.namespace | quote }} | ||
labels: {{- include "common.labels.standard" . | nindent 4 }} | ||
app.kubernetes.io/component: metrics-read | ||
{{- if .Values.metrics.serviceMonitor.labels }} | ||
{{- include "common.tplvalues.render" ( dict "value" .Values.metrics.serviceMonitor.labels "context" $ ) | nindent 4 }} | ||
{{- end }} | ||
{{- if .Values.commonLabels }} | ||
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} | ||
{{- end }} | ||
{{- if .Values.commonAnnotations }} | ||
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} | ||
{{- end }} | ||
spec: | ||
{{- if .Values.metrics.serviceMonitor.jobLabel }} | ||
jobLabel: {{ .Values.metrics.serviceMonitor.jobLabel }} | ||
{{- end }} | ||
selector: | ||
matchLabels: {{- include "common.labels.matchLabels" . | nindent 6 }} | ||
{{- if .Values.metrics.serviceMonitor.selector }} | ||
{{- include "common.tplvalues.render" (dict "value" .Values.metrics.serviceMonitor.selector "context" $) | nindent 6 }} | ||
{{- end }} | ||
app.kubernetes.io/component: metrics-read | ||
endpoints: | ||
- port: http-metrics | ||
{{- if .Values.metrics.serviceMonitor.interval }} | ||
interval: {{ .Values.metrics.serviceMonitor.interval }} | ||
{{- end }} | ||
{{- if .Values.metrics.serviceMonitor.scrapeTimeout }} | ||
scrapeTimeout: {{ .Values.metrics.serviceMonitor.scrapeTimeout }} | ||
{{- end }} | ||
{{- if .Values.metrics.serviceMonitor.relabelings }} | ||
relabelings: {{- include "common.tplvalues.render" ( dict "value" .Values.metrics.serviceMonitor.relabelings "context" $) | nindent 6 }} | ||
{{- end }} | ||
{{- if .Values.metrics.serviceMonitor.metricRelabelings }} | ||
metricRelabelings: {{- include "common.tplvalues.render" ( dict "value" .Values.metrics.serviceMonitor.metricRelabelings "context" $) | nindent 6 }} | ||
{{- end }} | ||
{{- if .Values.metrics.serviceMonitor.honorLabels }} | ||
honorLabels: {{ .Values.metrics.serviceMonitor.honorLabels }} | ||
{{- end }} | ||
namespaceSelector: | ||
matchNames: | ||
- {{ .Release.Namespace | quote }} | ||
{{- end }} |
103 changes: 103 additions & 0 deletions
103
charts/superset/charts/redis/charts/common/templates/validations/_mysql.tpl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,103 @@ | ||
{{/* vim: set filetype=mustache: */}} | ||
{{/* | ||
Validate MySQL required passwords are not empty. | ||
Usage: | ||
{{ include "common.validations.values.mysql.passwords" (dict "secret" "secretName" "subchart" false "context" $) }} | ||
Params: | ||
- secret - String - Required. Name of the secret where MySQL values are stored, e.g: "mysql-passwords-secret" | ||
- subchart - Boolean - Optional. Whether MySQL is used as subchart or not. Default: false | ||
*/}} | ||
{{- define "common.validations.values.mysql.passwords" -}} | ||
{{- $existingSecret := include "common.mysql.values.auth.existingSecret" . -}} | ||
{{- $enabled := include "common.mysql.values.enabled" . -}} | ||
{{- $architecture := include "common.mysql.values.architecture" . -}} | ||
{{- $authPrefix := include "common.mysql.values.key.auth" . -}} | ||
{{- $valueKeyRootPassword := printf "%s.rootPassword" $authPrefix -}} | ||
{{- $valueKeyUsername := printf "%s.username" $authPrefix -}} | ||
{{- $valueKeyPassword := printf "%s.password" $authPrefix -}} | ||
{{- $valueKeyReplicationPassword := printf "%s.replicationPassword" $authPrefix -}} | ||
|
||
{{- if and (or (not $existingSecret) (eq $existingSecret "\"\"")) (eq $enabled "true") -}} | ||
{{- $requiredPasswords := list -}} | ||
|
||
{{- $requiredRootPassword := dict "valueKey" $valueKeyRootPassword "secret" .secret "field" "mysql-root-password" -}} | ||
{{- $requiredPasswords = append $requiredPasswords $requiredRootPassword -}} | ||
|
||
{{- $valueUsername := include "common.utils.getValueFromKey" (dict "key" $valueKeyUsername "context" .context) }} | ||
{{- if not (empty $valueUsername) -}} | ||
{{- $requiredPassword := dict "valueKey" $valueKeyPassword "secret" .secret "field" "mysql-password" -}} | ||
{{- $requiredPasswords = append $requiredPasswords $requiredPassword -}} | ||
{{- end -}} | ||
|
||
{{- if (eq $architecture "replication") -}} | ||
{{- $requiredReplicationPassword := dict "valueKey" $valueKeyReplicationPassword "secret" .secret "field" "mysql-replication-password" -}} | ||
{{- $requiredPasswords = append $requiredPasswords $requiredReplicationPassword -}} | ||
{{- end -}} | ||
|
||
{{- include "common.validations.values.multiple.empty" (dict "required" $requiredPasswords "context" .context) -}} | ||
|
||
{{- end -}} | ||
{{- end -}} | ||
|
||
{{/* | ||
Auxiliary function to get the right value for existingSecret. | ||
Usage: | ||
{{ include "common.mysql.values.auth.existingSecret" (dict "context" $) }} | ||
Params: | ||
- subchart - Boolean - Optional. Whether MySQL is used as subchart or not. Default: false | ||
*/}} | ||
{{- define "common.mysql.values.auth.existingSecret" -}} | ||
{{- if .subchart -}} | ||
{{- .context.Values.mysql.auth.existingSecret | quote -}} | ||
{{- else -}} | ||
{{- .context.Values.auth.existingSecret | quote -}} | ||
{{- end -}} | ||
{{- end -}} | ||
|
||
{{/* | ||
Auxiliary function to get the right value for enabled mysql. | ||
Usage: | ||
{{ include "common.mysql.values.enabled" (dict "context" $) }} | ||
*/}} | ||
{{- define "common.mysql.values.enabled" -}} | ||
{{- if .subchart -}} | ||
{{- printf "%v" .context.Values.mysql.enabled -}} | ||
{{- else -}} | ||
{{- printf "%v" (not .context.Values.enabled) -}} | ||
{{- end -}} | ||
{{- end -}} | ||
|
||
{{/* | ||
Auxiliary function to get the right value for architecture | ||
Usage: | ||
{{ include "common.mysql.values.architecture" (dict "subchart" "true" "context" $) }} | ||
Params: | ||
- subchart - Boolean - Optional. Whether MySQL is used as subchart or not. Default: false | ||
*/}} | ||
{{- define "common.mysql.values.architecture" -}} | ||
{{- if .subchart -}} | ||
{{- .context.Values.mysql.architecture -}} | ||
{{- else -}} | ||
{{- .context.Values.architecture -}} | ||
{{- end -}} | ||
{{- end -}} | ||
|
||
{{/* | ||
Auxiliary function to get the right value for the key auth | ||
Usage: | ||
{{ include "common.mysql.values.key.auth" (dict "subchart" "true" "context" $) }} | ||
Params: | ||
- subchart - Boolean - Optional. Whether MySQL is used as subchart or not. Default: false | ||
*/}} | ||
{{- define "common.mysql.values.key.auth" -}} | ||
{{- if .subchart -}} | ||
mysql.auth | ||
{{- else -}} | ||
auth | ||
{{- end -}} | ||
{{- end -}} |
Oops, something went wrong.