diff --git a/charts/metabase/.helmignore b/charts/metabase/.helmignore deleted file mode 100644 index 0e8a0eb..0000000 --- a/charts/metabase/.helmignore +++ /dev/null @@ -1,23 +0,0 @@ -# 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/ diff --git a/charts/metabase/Chart.yaml b/charts/metabase/Chart.yaml deleted file mode 100644 index 8614eea..0000000 --- a/charts/metabase/Chart.yaml +++ /dev/null @@ -1,12 +0,0 @@ -apiVersion: v2 -name: metabase -description: A Helm chart for Metabase -type: application -version: 0.1.1 -appVersion: "0.43.4" -dependencies: - - name: patroni - version: 1.5.1 - repository: https://bcgov.github.io/sso-helm-charts - tags: - - patroni-enabled diff --git a/charts/metabase/templates/NOTES.txt b/charts/metabase/templates/NOTES.txt deleted file mode 100644 index da0b4c4..0000000 --- a/charts/metabase/templates/NOTES.txt +++ /dev/null @@ -1,22 +0,0 @@ -1. Get the application URL by running these commands: -{{- if .Values.ingress.enabled }} -{{- range $host := .Values.ingress.hosts }} - {{- range .paths }} - http{{ if $.Values.ingress.tls }}s{{ end }}://{{ $host.host }}{{ .path }} - {{- end }} -{{- end }} -{{- else if contains "NodePort" .Values.service.type }} - export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "metabase.fullname" . }}) - export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}") - echo http://$NODE_IP:$NODE_PORT -{{- else if contains "LoadBalancer" .Values.service.type }} - NOTE: It may take a few minutes for the LoadBalancer IP to be available. - You can watch the status of by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include "metabase.fullname" . }}' - export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "metabase.fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}") - echo http://$SERVICE_IP:{{ .Values.service.port }} -{{- else if contains "ClusterIP" .Values.service.type }} - export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "metabase.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}") - export CONTAINER_PORT=$(kubectl get pod --namespace {{ .Release.Namespace }} $POD_NAME -o jsonpath="{.spec.containers[0].ports[0].containerPort}") - echo "Visit http://127.0.0.1:8080 to use your application" - kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 8080:$CONTAINER_PORT -{{- end }} diff --git a/charts/metabase/templates/_helpers.tpl b/charts/metabase/templates/_helpers.tpl deleted file mode 100644 index 2c839d4..0000000 --- a/charts/metabase/templates/_helpers.tpl +++ /dev/null @@ -1,62 +0,0 @@ -{{/* -Expand the name of the chart. -*/}} -{{- define "metabase.name" -}} -{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }} -{{- end }} - -{{/* -Create a default fully qualified app name. -We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). -If release name contains chart name it will be used as a full name. -*/}} -{{- define "metabase.fullname" -}} -{{- if .Values.fullnameOverride }} -{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }} -{{- else }} -{{- $name := default .Chart.Name .Values.nameOverride }} -{{- if contains $name .Release.Name }} -{{- .Release.Name | trunc 63 | trimSuffix "-" }} -{{- else }} -{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }} -{{- end }} -{{- end }} -{{- end }} - -{{/* -Create chart name and version as used by the chart label. -*/}} -{{- define "metabase.chart" -}} -{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} -{{- end }} - -{{/* -Common labels -*/}} -{{- define "metabase.labels" -}} -helm.sh/chart: {{ include "metabase.chart" . }} -{{ include "metabase.selectorLabels" . }} -{{- if .Chart.AppVersion }} -app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} -{{- end }} -app.kubernetes.io/managed-by: {{ .Release.Service }} -{{- end }} - -{{/* -Selector labels -*/}} -{{- define "metabase.selectorLabels" -}} -app.kubernetes.io/name: {{ include "metabase.name" . }} -app.kubernetes.io/instance: {{ .Release.Name }} -{{- end }} - -{{/* -Create the name of the service account to use -*/}} -{{- define "metabase.serviceAccountName" -}} -{{- if .Values.serviceAccount.create }} -{{- default (include "metabase.fullname" .) .Values.serviceAccount.name }} -{{- else }} -{{- default "default" .Values.serviceAccount.name }} -{{- end }} -{{- end }} diff --git a/charts/metabase/templates/deployment.yaml b/charts/metabase/templates/deployment.yaml deleted file mode 100644 index 3bffa94..0000000 --- a/charts/metabase/templates/deployment.yaml +++ /dev/null @@ -1,158 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: {{ include "metabase.fullname" . }} - labels: {{ include "metabase.labels" . | nindent 4 }} -spec: - {{- if not .Values.autoscaling.enabled }} - replicas: {{ .Values.replicaCount }} - {{- end }} - selector: - matchLabels: - {{- include "metabase.selectorLabels" . | nindent 6 }} - template: - metadata: - annotations: - {{- with .Values.podAnnotations }} - {{- toYaml . | nindent 8 }} - {{- end }} - labels: - {{- include "metabase.selectorLabels" . | nindent 8 }} - spec: - {{- with .Values.imagePullSecrets }} - imagePullSecrets: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- if .Values.serviceAccount.create -}} - serviceAccountName: {{ include "metabase.serviceAccountName" . }} - {{- end }} - securityContext: - {{- toYaml .Values.podSecurityContext | nindent 8 }} - containers: - - name: {{ .Chart.Name }} - securityContext: - {{- toYaml .Values.securityContext | nindent 12 }} - image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" - imagePullPolicy: {{ .Values.image.pullPolicy }} - env: - - name: MB_JETTY_HOST - value: {{ .Values.listen.host | quote }} - - name: MB_JETTY_PORT - value: {{ .Values.listen.port | quote }} - {{- if .Values.ssl.enabled }} - - name: MB_JETTY_SSL - value: true - - name: MB_JETTY_SSL_Port - value: {{ .Values.ssl.port | quote }} - - name: MB_JETTY_SSL_Keystore - valueFrom: - secretKeyRef: - name: {{ template "metabase.fullname" . }}-ssl - key: keystore - - name: MB_JETTY_SSL_Keystore_Password - valueFrom: - secretKeyRef: - name: {{ template "metabase.fullname" . }}-ssl - key: password - {{- end }} - {{- if .Values.jetty }} - {{- range $key, $value := .Values.jetty }} - - name: MB_JETTY_{{ $key | upper }} - value: {{ $value | quote }} - {{- end }} - {{- end }} - - name: MB_DB_TYPE - value: {{ .Values.database.type | lower }} - {{- if .Values.database.encryptionKey }} - - name: MB_ENCRYPTION_SECRET_KEY - valueFrom: - secretKeyRef: - name: {{ template "metabase.fullname" . }}-database - key: encryptionKey - {{- end }} - {{- if ne (.Values.database.type | lower) "h2" }} - {{- if or .Values.database.existingSecretConnectionURIKey .Values.database.connectionURI }} - - name: MB_DB_CONNECTION_URI - valueFrom: - secretKeyRef: - name: {{ or .Values.database.existingSecret (printf "%s-database" (include "metabase.fullname" .)) }} - key: {{ or .Values.database.existingSecretConnectionURIKey "connectionURI" }} - {{- else }} - - name: MB_DB_HOST - value: {{ .Values.database.host | quote }} - - name: MB_DB_PORT - value: {{ .Values.database.port | quote }} - - name: MB_DB_DBNAME - value: {{ .Values.database.dbname | quote }} - - name: MB_DB_USER - valueFrom: - secretKeyRef: - name: {{ or .Values.database.existingSecret (printf "%s-database" (include "metabase.fullname" .)) }} - key: {{ or .Values.database.existingSecretUsernameKey "username" }} - - name: MB_DB_PASS - valueFrom: - secretKeyRef: - name: {{ or .Values.database.existingSecret (printf "%s-database" (include "metabase.fullname" .)) }} - key: {{ or .Values.database.existingSecretPasswordKey "password" }} - {{- end }} - {{- end }} - - name: MB_PASSWORD_COMPLEXITY - value: {{ .Values.password.complexity }} - - name: MB_PASSWORD_LENGTH - value: {{ .Values.password.length | quote }} - - name: JAVA_TIMEZONE - value: {{ .Values.timeZone }} - {{- if .Values.javaOpts }} - - name: JAVA_OPTS - value: {{ .Values.javaOpts | quote }} - {{- end }} - {{- if .Values.pluginsDirectory }} - - name: MB_PLUGINS_DIR - value: {{ .Values.pluginsDirectory | quote }} - {{- end }} - - name: MB_EMOJI_IN_LOGS - value: {{ .Values.emojiLogging | quote }} - {{- if .Values.siteUrl }} - - name: MB_SITE_URL - value: {{ .Values.siteUrl | quote }} - {{- end }} - {{- if .Values.session.maxSessionAge }} - - name: MAX_SESSION_AGE - value: {{ .Values.session.maxSessionAge | quote }} - {{- end }} - {{- if .Values.session.sessionCookies }} - - name: MB_SESSION_COOKIES - value: {{ .Values.session.sessionCookies | quote }} - {{- end }} - ports: - - name: http - containerPort: {{ .Values.service.internalPort }} - protocol: TCP - livenessProbe: - httpGet: - path: / - port: http - initialDelaySeconds: {{ .Values.livenessProbe.initialDelaySeconds }} - timeoutSeconds: {{ .Values.livenessProbe.timeoutSeconds }} - failureThreshold: {{ .Values.livenessProbe.failureThreshold }} - readinessProbe: - httpGet: - path: / - port: http - initialDelaySeconds: {{ .Values.readinessProbe.initialDelaySeconds }} - timeoutSeconds: {{ .Values.readinessProbe.timeoutSeconds }} - periodSeconds: {{ .Values.readinessProbe.periodSeconds }} - resources: - {{- toYaml .Values.resources | nindent 12 }} - {{- with .Values.nodeSelector }} - nodeSelector: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.affinity }} - affinity: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.tolerations }} - tolerations: - {{- toYaml . | nindent 8 }} - {{- end }} diff --git a/charts/metabase/templates/ingress.yaml b/charts/metabase/templates/ingress.yaml deleted file mode 100644 index efa45d1..0000000 --- a/charts/metabase/templates/ingress.yaml +++ /dev/null @@ -1,60 +0,0 @@ -{{- if .Values.ingress.enabled -}} -{{- $fullName := include "metabase.fullname" . -}} -{{- $svcPort := .Values.service.port -}} -{{- if and .Values.ingress.className (not (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion)) }} - {{- if not (hasKey .Values.ingress.annotations "kubernetes.io/ingress.class") }} - {{- $_ := set .Values.ingress.annotations "kubernetes.io/ingress.class" .Values.ingress.className}} - {{- end }} -{{- end }} -{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion -}} -apiVersion: networking.k8s.io/v1 -{{- else if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}} -apiVersion: networking.k8s.io/v1beta1 -{{- else -}} -apiVersion: extensions/v1beta1 -{{- end }} -kind: Ingress -metadata: - name: {{ $fullName }} - labels: {{ include "metabase.labels" . | nindent 4 }} - {{- with .Values.ingress.annotations }} - annotations: - {{- toYaml . | nindent 4 }} - {{- end }} -spec: - {{- if and .Values.ingress.className (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion) }} - ingressClassName: {{ .Values.ingress.className }} - {{- end }} - {{- if .Values.ingress.tls }} - tls: - {{- range .Values.ingress.tls }} - - hosts: - {{- range .hosts }} - - {{ . | quote }} - {{- end }} - secretName: {{ .secretName }} - {{- end }} - {{- end }} - rules: - {{- range .Values.ingress.hosts }} - - host: {{ .host | quote }} - http: - paths: - {{- range .paths }} - - path: {{ .path }} - {{- if and .pathType (semverCompare ">=1.18-0" $.Capabilities.KubeVersion.GitVersion) }} - pathType: {{ .pathType }} - {{- end }} - backend: - {{- if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.GitVersion }} - service: - name: {{ $fullName }} - port: - number: {{ $svcPort }} - {{- else }} - serviceName: {{ $fullName }} - servicePort: {{ $svcPort }} - {{- end }} - {{- end }} - {{- end }} -{{- end }} diff --git a/charts/metabase/templates/openshift/route.yaml b/charts/metabase/templates/openshift/route.yaml deleted file mode 100644 index b886451..0000000 --- a/charts/metabase/templates/openshift/route.yaml +++ /dev/null @@ -1,15 +0,0 @@ -apiVersion: route.openshift.io/v1 -kind: Route -metadata: - name: {{ include "metabase.fullname" . }} - labels: {{ include "metabase.labels" . | nindent 4 }} - annotations: - haproxy.router.openshift.io/balance: roundrobin - haproxy.router.openshift.io/disable_cookies: 'true' -spec: - tls: - insecureEdgeTerminationPolicy: Redirect - termination: edge - to: - kind: Service - name: {{ include "metabase.fullname" . }} diff --git a/charts/metabase/templates/service.yaml b/charts/metabase/templates/service.yaml deleted file mode 100644 index 6fc3627..0000000 --- a/charts/metabase/templates/service.yaml +++ /dev/null @@ -1,21 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: {{ include "metabase.fullname" . }} - labels: {{ include "metabase.labels" . | nindent 4 }} -{{- if .Values.service.annotations }} - annotations: -{{ toYaml .Values.service.annotations | indent 4 }} -{{- end }} -spec: - type: {{ .Values.service.type }} - ports: - - port: {{ .Values.service.externalPort }} - targetPort: {{ .Values.service.internalPort }} -{{- if .Values.service.nodePort }} - nodePort: {{ .Values.service.nodePort }} -{{- end}} - protocol: TCP - name: {{ .Values.service.name }} - selector: - {{- include "metabase.selectorLabels" . | nindent 4 }} diff --git a/charts/metabase/templates/serviceaccount.yaml b/charts/metabase/templates/serviceaccount.yaml deleted file mode 100644 index 634369d..0000000 --- a/charts/metabase/templates/serviceaccount.yaml +++ /dev/null @@ -1,12 +0,0 @@ -{{- if .Values.serviceAccount.create -}} -apiVersion: v1 -kind: ServiceAccount -metadata: - name: {{ include "metabase.serviceAccountName" . }} - labels: - {{- include "metabase.labels" . | nindent 4 }} - {{- with .Values.serviceAccount.annotations }} - annotations: - {{- toYaml . | nindent 4 }} - {{- end }} -{{- end }} diff --git a/charts/metabase/values.yaml b/charts/metabase/values.yaml deleted file mode 100644 index ecc5824..0000000 --- a/charts/metabase/values.yaml +++ /dev/null @@ -1,173 +0,0 @@ -# Default values for metabase. -# This is a YAML-formatted file. -# Declare variables to be passed into your templates. - -replicaCount: 1 - -image: - repository: metabase/metabase - pullPolicy: Always - # Overrides the image tag whose default is the chart appVersion. - tag: "v0.43.4" - -imagePullSecrets: [] -nameOverride: "" -fullnameOverride: "" - -# Config Jetty web server -listen: - host: "0.0.0.0" - port: 3000 - -ssl: - # If you have an ssl certificate and would prefer to have Metabase run over HTTPS - enabled: false - # port: 8443 - # keyStore: |- - # << JKS KEY STORE >> - # keyStorePassword: storepass - -jetty: -# maxThreads: 254 -# minThreads: 8 -# maxQueued: -1 -# maxIdleTime: 60000 - -# Backend database -database: - type: postgres - host: metabase-patroni - port: 5432 - dbname: metabase - existingSecret: metabase-patroni-appusers - existingSecretUsernameKey: username-appuser1 - existingSecretPasswordKey: password-appuser1 - -patroni: - replicaCount: 3 - - image: - repository: ghcr.io/junminahn/spilo - pullPolicy: Always - tag: 2.1-p5 - - postgresMajorVersion: 14 - - project: metabase - nameOverride: metabase-patroni - fullnameOverride: metabase-patroni - - additionalCredentials: - - username: metabase - password: - - persistentVolume: - size: 2Gi - - podDisruptionBudget: - enabled: true - -password: - # Changing Metabase password complexity: - # weak: no character constraints - # normal: at least 1 digit (default) - # strong: minimum 8 characters w/ 2 lowercase, 2 uppercase, 1 digit, and 1 special character - complexity: normal - length: 6 - -timeZone: America/Vancouver -emojiLogging: true -# javaOpts: -# pluginsDirectory: -# siteUrl: - -session: {} - # maxSessionAge: - # sessionCookies: - -livenessProbe: - initialDelaySeconds: 120 - timeoutSeconds: 30 - failureThreshold: 6 - -readinessProbe: - initialDelaySeconds: 30 - timeoutSeconds: 3 - periodSeconds: 5 - -serviceAccount: - # Specifies whether a service account should be created - create: false - # Annotations to add to the service account - annotations: {} - # The name of the service account to use. - # If not set and create is true, a name is generated using the fullname template - name: "" - -podAnnotations: {} - -podSecurityContext: {} - # fsGroup: 2000 - -securityContext: {} - # capabilities: - # drop: - # - ALL - # readOnlyRootFilesystem: true - # runAsNonRoot: true - # runAsUser: 1000 - -service: - name: metabase - type: ClusterIP - externalPort: 80 - internalPort: 3000 - # Used to fix NodePort when service.type: NodePort. - nodePort: - annotations: {} - # Used to add custom annotations to the Service. - # service.beta.kubernetes.io/aws-load-balancer-internal: "0.0.0.0/0" - -ingress: - enabled: false - className: "" - annotations: {} - # kubernetes.io/ingress.class: nginx - # kubernetes.io/tls-acme: "true" - hosts: [] - # - host: chart-example.local - # paths: - # - path: / - # pathType: ImplementationSpecific - tls: [] - # - secretName: chart-example-tls - # hosts: - # - chart-example.local - -resources: {} - # We usually recommend not to specify default resources and to leave this as a conscious - # choice for the user. This also increases chances charts run on environments with little - # resources, such as Minikube. If you do want to specify resources, uncomment the following - # lines, adjust them as necessary, and remove the curly braces after 'resources:'. - # limits: - # cpu: 100m - # memory: 128Mi - # requests: - # cpu: 100m - # memory: 128Mi - -autoscaling: - enabled: false - minReplicas: 1 - maxReplicas: 100 - targetCPUUtilizationPercentage: 80 - # targetMemoryUtilizationPercentage: 80 - -nodeSelector: {} - -tolerations: [] - -affinity: {} - -tags: - patroni-enabled: true