From 20de602ef8d28f6f7aff9fc71ba1719e3390d456 Mon Sep 17 00:00:00 2001 From: Tommy Date: Wed, 17 Jan 2024 07:41:35 +0100 Subject: [PATCH] chore(hasura) bye. There was a better open source alternative in Graphile willing to provide security without an enterprise license. --- charts/diginext/templates/service.yaml | 11 ++++ charts/hasura-engine/Chart.yaml | 20 ------- charts/hasura-engine/README.md | 1 - .../hasura-engine/extras/externalsecret.yaml | 32 ----------- charts/hasura-engine/templates/_helpers.tpl | 25 --------- .../hasura-engine/templates/deployment.yaml | 55 ------------------- charts/hasura-engine/templates/service.yaml | 14 ----- charts/hasura-engine/values.yaml | 33 ----------- 8 files changed, 11 insertions(+), 180 deletions(-) create mode 100644 charts/diginext/templates/service.yaml delete mode 100644 charts/hasura-engine/Chart.yaml delete mode 100644 charts/hasura-engine/README.md delete mode 100644 charts/hasura-engine/extras/externalsecret.yaml delete mode 100644 charts/hasura-engine/templates/_helpers.tpl delete mode 100644 charts/hasura-engine/templates/deployment.yaml delete mode 100644 charts/hasura-engine/templates/service.yaml delete mode 100644 charts/hasura-engine/values.yaml diff --git a/charts/diginext/templates/service.yaml b/charts/diginext/templates/service.yaml new file mode 100644 index 0000000..38db342 --- /dev/null +++ b/charts/diginext/templates/service.yaml @@ -0,0 +1,11 @@ +--- +apiVersion: v1 +kind: Service +metadata: + name: dx-svc + namespace: dx-server +spec: + ports: + - port: 6969 + selector: + app: dx \ No newline at end of file diff --git a/charts/hasura-engine/Chart.yaml b/charts/hasura-engine/Chart.yaml deleted file mode 100644 index b79bb17..0000000 --- a/charts/hasura-engine/Chart.yaml +++ /dev/null @@ -1,20 +0,0 @@ -apiVersion: v2 -name: hasura-engine -description: GraphQL Engine to make data accessible over a GraphQL API -type: application -version: 0.1.4 -maintainers: -- name: Tommy Skaug - email: tommy@skaug.me -icon: https://avatars.githubusercontent.com/u/13966722?s=200&v=4 -keywords: -- kubernetes -- graphql -- server -- postgres -- web -- api -- rest -sources: -- https://github.com/hasura/graphql-engine -- https://hasura.io/docs/latest/index/ diff --git a/charts/hasura-engine/README.md b/charts/hasura-engine/README.md deleted file mode 100644 index 42979f7..0000000 --- a/charts/hasura-engine/README.md +++ /dev/null @@ -1 +0,0 @@ -# Hasura GraphQL Server diff --git a/charts/hasura-engine/extras/externalsecret.yaml b/charts/hasura-engine/extras/externalsecret.yaml deleted file mode 100644 index 1d83c03..0000000 --- a/charts/hasura-engine/extras/externalsecret.yaml +++ /dev/null @@ -1,32 +0,0 @@ ---- -apiVersion: external-secrets.io/v1beta1 -kind: ExternalSecret -metadata: - name: hasura -spec: - secretStoreRef: - kind: ClusterSecretStore - name: onepassword-connect - target: - name: hasura-secret - creationPolicy: Owner - template: - engineVersion: v2 - data: - # Hasura - HASURA_GRAPHQL_ADMIN_SECRET: "{{ .HASURA_GRAPHQL_ADMIN_SECRET }}" - HASURA_GRAPHQL_DATABASE_URL: |- - postgres://hasura:{{ .HASURA_POSTGRES_PASS }}@postgres-rw.databases.svc.cluster.local/hasura - # Postgres Init - INIT_POSTGRES_DBNAME: hasura - INIT_POSTGRES_HOST: postgres-rw.databases.svc.cluster.local - INIT_POSTGRES_USER: hasura - INIT_POSTGRES_PASS: "{{ .HASURA_POSTGRES_PASS }}" - INIT_POSTGRES_SUPER_PASS: "{{ .POSTGRES_SUPER_PASS }}" - # Vars - PUBLIC_DOMAIN: ${PUBLIC_DOMAIN} - dataFrom: - - extract: - key: hasura - - extract: - key: postgres diff --git a/charts/hasura-engine/templates/_helpers.tpl b/charts/hasura-engine/templates/_helpers.tpl deleted file mode 100644 index 9e93c8c..0000000 --- a/charts/hasura-engine/templates/_helpers.tpl +++ /dev/null @@ -1,25 +0,0 @@ -{{- define "hasura.fullname" -}} -{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} -{{- end }} - -# Define a template for standard labels. -{{/* -Common labels -*/}} -{{- define "hasura.labels" -}} -helm.sh/chart: {{ include "hasura.chart" . }} -app.kubernetes.io/name: {{ include "hasura.fullname" . }} -app.kubernetes.io/instance: {{ .Release.Name }} -app.kubernetes.io/version: {{ .Chart.Version | quote }} -app.kubernetes.io/managed-by: {{ .Release.Service }} -{{- end }} - -# Define a template for the chart name and version. -{{/* -Generate basic labels -*/}} -{{- define "hasura.chart" -}} -{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" -}} -{{- end }} - -# Optionally, add more helper templates as needed. diff --git a/charts/hasura-engine/templates/deployment.yaml b/charts/hasura-engine/templates/deployment.yaml deleted file mode 100644 index 05aef86..0000000 --- a/charts/hasura-engine/templates/deployment.yaml +++ /dev/null @@ -1,55 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: {{ include "hasura.fullname" . }} - labels: - {{- include "hasura.labels" . | nindent 4 }} -spec: - replicas: 1 - selector: - matchLabels: - app: {{ include "hasura.fullname" . }} - template: - metadata: - labels: - app: {{ include "hasura.fullname" . }} - spec: - initContainers: - - name: db-init - image: "{{ .Values.initContainers.dbInit.image.repository }}:{{ .Values.initContainers.dbInit.image.tag }}" - envFrom: - - secretRef: - name: {{ .Values.envFromSecret }} - containers: - - image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" - imagePullPolicy: {{ .Values.image.pullPolicy }} - name: hasura - env: - - name: HASURA_GRAPHQL_ADMIN_INTERNAL_ERRORS - value: "false" - - name: HASURA_GRAPHQL_ENABLE_MAINTENANCE_MODE - value: "false" - - name: HASURA_GRAPHQL_CORS_DOMAIN - value: "{{ .Values.corsDomains }}" - - name: HASURA_GRAPHQL_ENABLE_CONSOLE - value: "{{ .Values.features.console }}" - - name: HASURA_GRAPHQL_DEV_MODE - value: "{{ .Values.features.devMode }}" - - name: HASURA_GRAPHQL_JWT_SECRET - value: "{\"jwk_url\": \"{{ .Values.jwt.jwksUrl }}\"}" - envFrom: - - secretRef: - name: {{ .Values.envFromSecret }} - ports: - - name: http - containerPort: 8080 - protocol: TCP - livenessProbe: - httpGet: - path: /healthz - port: http - readinessProbe: - httpGet: - path: /healthz - port: http - resources: {} diff --git a/charts/hasura-engine/templates/service.yaml b/charts/hasura-engine/templates/service.yaml deleted file mode 100644 index 1b84a70..0000000 --- a/charts/hasura-engine/templates/service.yaml +++ /dev/null @@ -1,14 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: {{ include "hasura.fullname" . }} - labels: - {{- include "hasura.labels" . | nindent 4 }} -spec: - type: {{ .Values.service.type }} - ports: - - port: {{ .Values.service.port }} - targetPort: 8080 - protocol: TCP - selector: - app: {{ include "hasura.fullname" . }} diff --git a/charts/hasura-engine/values.yaml b/charts/hasura-engine/values.yaml deleted file mode 100644 index c7ca7d3..0000000 --- a/charts/hasura-engine/values.yaml +++ /dev/null @@ -1,33 +0,0 @@ -image: - repository: hasura/graphql-engine - tag: v2.36.1 - pullPolicy: IfNotPresent - -initContainers: - dbInit: - image: - repository: ghcr.io/onedr0p/postgres-init - tag: "16" - envFrom: - - secretRef: - name: dispatch-secret - -replicas: "1" - -service: - type: ClusterIP - port: 80 - -features: - devMode: true - console: true - -corsDomains: "*" - -envFromSecret: hasura-secret -admin: - secretKey: HASURA_GRAPHQL_ADMIN_SECRET -jwt: - jwksUrl: HASURA_GRAPHQL_JWT_SECRET -postgres: - secretKey: HASURA_GRAPHQL_DATABASE_URL