-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move deployment artifacts for Superset
Previously our superset deployment pulled from the kustomize artifacts in the upstream odh-contrib-manifests repo. To simplify the deployment of superset, this pulls all of the artifacts into this repo.
- Loading branch information
Showing
43 changed files
with
609 additions
and
75 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
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 |
---|---|---|
|
@@ -4,4 +4,3 @@ kind: Kustomization | |
|
||
resources: | ||
- dh-dev-trino | ||
- dh-dev-superset |
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 |
---|---|---|
|
@@ -4,4 +4,3 @@ kind: Kustomization | |
|
||
resources: | ||
- dh-prod-trino | ||
- dh-prod-superset |
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 |
---|---|---|
|
@@ -4,4 +4,3 @@ kind: Kustomization | |
|
||
resources: | ||
- dh-stage-trino | ||
- dh-stage-superset |
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,98 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: superset | ||
labels: | ||
app: superset | ||
spec: | ||
replicas: 1 | ||
selector: | ||
matchLabels: | ||
deployment: superset | ||
template: | ||
metadata: | ||
labels: | ||
app: superset | ||
deployment: superset | ||
spec: | ||
initContainers: | ||
- name: superset-init | ||
env: | ||
- name: SUPERSET_CONFIG_PATH | ||
value: /etc/superset/superset_config.py | ||
- name: POSTGRESQL_USERNAME | ||
valueFrom: | ||
secretKeyRef: | ||
key: database-user | ||
name: $(superset_db_secret) | ||
- name: POSTGRESQL_PASSWORD | ||
valueFrom: | ||
secretKeyRef: | ||
key: database-password | ||
name: $(superset_db_secret) | ||
- name: POSTGRESQL_DATABASE | ||
valueFrom: | ||
secretKeyRef: | ||
key: database-name | ||
name: $(superset_db_secret) | ||
envFrom: | ||
- secretRef: | ||
name: $(superset_secret) | ||
image: superset | ||
command: ['sh', '-c', "sleep 30; superset-init --username $SUPERSET_ADMIN_USER --firstname $SUPERSET_ADMIN_FNAME --lastname $SUPERSET_ADMIN_LNAME --email $SUPERSET_ADMIN_EMAIL --password $SUPERSET_ADMIN_PASSWORD"] | ||
volumeMounts: | ||
- mountPath: /etc/superset | ||
name: superset-config | ||
containers: | ||
- name: superset | ||
env: | ||
- name: SUPERSET_ADDITIONAL_CONFIG | ||
value: /etc/superset/superset_additional_config.py | ||
- name: SUPERSET_SECRET_KEY | ||
valueFrom: | ||
secretKeyRef: | ||
key: SUPERSET_SECRET_KEY | ||
name: $(superset_secret) | ||
- name: POSTGRESQL_USERNAME | ||
valueFrom: | ||
secretKeyRef: | ||
key: database-user | ||
name: $(superset_db_secret) | ||
- name: POSTGRESQL_PASSWORD | ||
valueFrom: | ||
secretKeyRef: | ||
key: database-password | ||
name: $(superset_db_secret) | ||
- name: POSTGRESQL_DATABASE | ||
valueFrom: | ||
secretKeyRef: | ||
key: database-name | ||
name: $(superset_db_secret) | ||
- name: SUPERSET_CONFIG_PATH | ||
value: /etc/superset/superset_config.py | ||
image: superset | ||
ports: | ||
- containerPort: 8088 | ||
protocol: TCP | ||
volumeMounts: | ||
- mountPath: "/etc/certs" | ||
name: trino-route-certificate-secret | ||
readOnly: true | ||
- mountPath: /etc/superset | ||
name: superset-config | ||
resources: | ||
requests: | ||
cpu: $(superset_cpu_requests) | ||
memory: $(superset_memory_requests) | ||
limits: | ||
cpu: $(superset_cpu_limits) | ||
memory: $(superset_memory_limits) | ||
serviceAccountName: superset | ||
volumes: | ||
- name: superset-config | ||
configMap: | ||
name: superset-config-py | ||
defaultMode: 420 | ||
- name: trino-route-certificate-secret | ||
secret: | ||
secretName: trino-route-certificate-secret |
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,125 @@ | ||
apiVersion: kustomize.config.k8s.io/v1beta1 | ||
kind: Kustomization | ||
resources: | ||
- secret-superset.yaml | ||
- deployment.yaml | ||
- service.yaml | ||
- route.yaml | ||
- supersetdb-deployment.yaml | ||
- supersetdb-pvc.yaml | ||
- supersetdb-secret.yaml | ||
- supersetdb-service.yaml | ||
- superset-rbac-viewer-role.yaml | ||
- superset-rbac-viewer-rolebinding.yaml | ||
- superset-service-account.yaml | ||
|
||
commonLabels: | ||
opendatahub.io/component: "true" | ||
component.opendatahub.io/name: superset | ||
app: superset | ||
app.kubernetes.io/part-of: superset | ||
|
||
generators: | ||
- ./secret-generator.yaml | ||
|
||
configMapGenerator: | ||
- name: superset-config | ||
envs: | ||
- params.env | ||
- name: superset-config-py | ||
files: | ||
- superset_config.py | ||
- superset_additional_config.py | ||
|
||
vars: | ||
- name: superset_secret | ||
objref: | ||
name: superset-config | ||
kind: ConfigMap | ||
apiVersion: v1 | ||
fieldref: | ||
fieldpath: data.superset_secret | ||
- name: superset_db_secret | ||
objref: | ||
name: superset-config | ||
kind: ConfigMap | ||
apiVersion: v1 | ||
fieldref: | ||
fieldpath: data.superset_db_secret | ||
- name: superset_memory_requests | ||
objref: | ||
name: superset-config | ||
kind: ConfigMap | ||
apiVersion: v1 | ||
fieldref: | ||
fieldpath: data.superset_memory_requests | ||
- name: superset_memory_limits | ||
objref: | ||
name: superset-config | ||
kind: ConfigMap | ||
apiVersion: v1 | ||
fieldref: | ||
fieldpath: data.superset_memory_limits | ||
- name: superset_cpu_requests | ||
objref: | ||
name: superset-config | ||
kind: ConfigMap | ||
apiVersion: v1 | ||
fieldref: | ||
fieldpath: data.superset_cpu_requests | ||
- name: superset_cpu_limits | ||
objref: | ||
name: superset-config | ||
kind: ConfigMap | ||
apiVersion: v1 | ||
fieldref: | ||
fieldpath: data.superset_cpu_limits | ||
- name: superset_db_memory_requests | ||
objref: | ||
name: superset-config | ||
kind: ConfigMap | ||
apiVersion: v1 | ||
fieldref: | ||
fieldpath: data.superset_db_memory_requests | ||
- name: superset_db_memory_limits | ||
objref: | ||
name: superset-config | ||
kind: ConfigMap | ||
apiVersion: v1 | ||
fieldref: | ||
fieldpath: data.superset_db_memory_limits | ||
- name: superset_db_cpu_requests | ||
objref: | ||
name: superset-config | ||
kind: ConfigMap | ||
apiVersion: v1 | ||
fieldref: | ||
fieldpath: data.superset_db_cpu_requests | ||
- name: superset_db_cpu_limits | ||
objref: | ||
name: superset-config | ||
kind: ConfigMap | ||
apiVersion: v1 | ||
fieldref: | ||
fieldpath: data.superset_db_cpu_limits | ||
- name: storage_class | ||
objref: | ||
name: superset-config | ||
kind: ConfigMap | ||
apiVersion: v1 | ||
fieldref: | ||
fieldpath: data.storage_class | ||
|
||
configurations: | ||
- params.yaml | ||
|
||
generatorOptions: | ||
disableNameSuffixHash: true | ||
|
||
images: | ||
- name: superset | ||
newName: quay.io/opendatahub/superset | ||
newTag: "1.5.2-ubi" | ||
- name: supersetdb | ||
newName: quay.io/internaldatahub/postgresql-96-centos7 | ||
newTag: "9.6" |
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,11 @@ | ||
storage_class=default | ||
superset_secret=superset | ||
superset_db_secret=supersetdb | ||
superset_memory_requests=1Gi | ||
superset_memory_limits=2Gi | ||
superset_cpu_requests=300m | ||
superset_cpu_limits=2 | ||
superset_db_memory_requests=300Mi | ||
superset_db_memory_limits=1Gi | ||
superset_db_cpu_requests=300m | ||
superset_db_cpu_limits=1 |
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,24 @@ | ||
--- | ||
varReference: | ||
- path: data | ||
kind: ConfigMap | ||
- path: stringData | ||
kind: Secret | ||
- path: metadata/annotations/volume.beta.kubernetes.io\/storage-class | ||
kind: PersistentVolumeClaim | ||
- path: spec/template/spec/containers[]/resources/requests/cpu | ||
kind: Deployment | ||
- path: spec/template/spec/containers[]/resources/limits/cpu | ||
kind: Deployment | ||
- path: spec/template/spec/containers[]/resources/requests/memory | ||
kind: Deployment | ||
- path: spec/template/spec/containers[]/resources/limits/memory | ||
kind: Deployment | ||
- path: spec/template/spec/containers[]/envFrom/secretRef/name | ||
kind: Deployment | ||
- path: spec/template/spec/initContainers[]/envFrom/secretRef/name | ||
kind: Deployment | ||
- path: spec/template/spec/containers[]/env[]/valueFrom/secretKeyRef/name | ||
kind: Deployment | ||
- path: spec/template/spec/initContainers[]/env[]/valueFrom/secretKeyRef/name | ||
kind: Deployment |
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,15 @@ | ||
apiVersion: route.openshift.io/v1 | ||
kind: Route | ||
metadata: | ||
name: superset | ||
labels: | ||
app: superset | ||
spec: | ||
port: | ||
targetPort: 8088-tcp | ||
to: | ||
kind: Service | ||
name: superset | ||
tls: | ||
insecureEdgeTerminationPolicy: Redirect | ||
termination: edge |
File renamed without changes.
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,13 @@ | ||
apiVersion: v1 | ||
kind: Secret | ||
metadata: | ||
name: superset | ||
labels: | ||
app: superset | ||
stringData: | ||
SUPERSET_ADMIN_USER: admin | ||
SUPERSET_ADMIN_FNAME: admin | ||
SUPERSET_ADMIN_LNAME: admin | ||
SUPERSET_ADMIN_EMAIL: [email protected] | ||
SUPERSET_ADMIN_PASSWORD: admin | ||
SUPERSET_SECRET_KEY: thisISaSECRET_1234 |
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,7 @@ | ||
apiVersion: v1 | ||
kind: ServiceAccount | ||
metadata: | ||
name: superset | ||
labels: | ||
app: superset | ||
service: superset |
Oops, something went wrong.