Skip to content

Commit

Permalink
Remove InfluxDB provisioning (#126)
Browse files Browse the repository at this point in the history
  • Loading branch information
khvn26 committed Apr 19, 2023
1 parent 142e232 commit 3b54e53
Show file tree
Hide file tree
Showing 8 changed files with 4 additions and 95 deletions.
1 change: 0 additions & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ jobs:
# See https://github.com/Flagsmith/flagsmith-charts/issues/105
run: |
helm repo add stable https://charts.helm.sh/stable
helm repo add influxdb2 https://helm.influxdata.com/
helm repo add kiwigrid https://kiwigrid.github.io
- name: Run chart-releaser
Expand Down
7 changes: 2 additions & 5 deletions charts/flagsmith/Chart.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,8 @@ dependencies:
- name: postgresql
repository: https://charts.helm.sh/stable
version: 8.6.4
- name: influxdb2
repository: https://helm.influxdata.com/
version: 2.0.0
- name: graphite
repository: https://kiwigrid.github.io
version: 0.7.3
digest: sha256:08185ea3318322a875104ec4b2daca39b264587868ea3ebc5053c1bf6dd7576f
generated: "2022-10-25T21:11:00.806235474+01:00"
digest: sha256:8bc448a10024c967f8c9f7572ac0971c66d4ae91addfbb1edd3ce84a0a89907f
generated: "2023-04-19T12:21:04.196+01:00"
5 changes: 0 additions & 5 deletions charts/flagsmith/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,6 @@ dependencies:
repository: https://charts.helm.sh/stable
version: 8.6.4
condition: postgresql.enabled
- name: influxdb2
repository: https://helm.influxdata.com/
# pinned due to issue https://github.com/influxdata/helm-charts/issues/350
version: 2.0.0
condition: influxdb2.enabled
- name: graphite
repository: https://kiwigrid.github.io
version: 0.7.3
Expand Down
6 changes: 1 addition & 5 deletions charts/flagsmith/ci/e2e-test-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,9 @@ _destructiveTests:

frontend:
extraEnv:
SLACK_TOKEN: "${SLACK_TOKEN}"
SLACK_TOKEN: '${SLACK_TOKEN}'

api:
extraEnv:
EMAIL_BACKEND: 'django.core.mail.backends.console.EmailBackend'
FE_E2E_TEST_USER_EMAIL: [email protected]
influxdb2:
# Needed to set this for the tests to not fail. Possibly related to
# https://github.com/Flagsmith/flagsmith/issues/340
enabled: false
11 changes: 0 additions & 11 deletions charts/flagsmith/ci/influxdb-test-values.yaml

This file was deleted.

14 changes: 1 addition & 13 deletions charts/flagsmith/templates/_api_environment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,7 @@
secretKeyRef:
name: {{ template "flagsmith.fullname" . }}
key: DJANGO_SECRET_KEY
{{- if .Values.influxdb2.enabled }}
- name: INFLUXDB_URL
value: http://{{- template "flagsmith.influxdb.hostname" . -}}:80
- name: INFLUXDB_BUCKET
value: {{ .Values.influxdb2.adminUser.bucket }}
- name: INFLUXDB_ORG
value: {{ .Values.influxdb2.adminUser.organization }}
- name: INFLUXDB_TOKEN
valueFrom:
secretKeyRef:
name: {{ template "flagsmith.influxdb.fullname" . }}-auth
key: admin-token
{{- else if .Values.influxdbExternal.enabled }}
{{- if .Values.influxdbExternal.enabled }}
- name: INFLUXDB_URL
value: {{ .Values.influxdbExternal.url | required "Must specify a URL for an external InfluxDB" }}
- name: INFLUXDB_BUCKET
Expand Down
34 changes: 0 additions & 34 deletions charts/flagsmith/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -170,38 +170,6 @@ PgBouncer hostname
{{- printf "%s-%s" .Release.Name "pgbouncer" -}}.{{ .Release.Namespace }}.svc.cluster.local
{{- end -}}

{{/*
Expand the name of the chart.
*/}}
{{- define "flagsmith.influxdb.name" -}}
{{- default "influxdb2" .Values.influxdb2.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 "flagsmith.influxdb.fullname" -}}
{{- if .Values.influxdb2.fullnameOverride -}}
{{- .Values.influxdb2.fullnameOverride | trunc 63 | trimSuffix "-" -}}
{{- else -}}
{{- $name := default "influxdb2" .Values.influxdb2.nameOverride -}}
{{- if contains $name .Release.Name -}}
{{- .Release.Name | trunc 63 | trimSuffix "-" -}}
{{- else -}}
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{- end -}}
{{- end -}}

{{/*
Influxdb hostname
*/}}
{{- define "flagsmith.influxdb.hostname" -}}
{{ template "flagsmith.influxdb.fullname" . }}.{{ .Release.Namespace }}.svc.cluster.local
{{- 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).
Expand Down Expand Up @@ -238,8 +206,6 @@ Frontend environment
value: {{ .Values._destructiveTests.testToken | quote }}
- name: FLAGSMITH_API
value: {{ include "flagsmith.fullname" . }}-api.{{ .Release.Namespace }}:{{ .Values.service.api.port }}/api/v1/
- name: ENABLE_INFLUXDB_FEATURES
value: {{ .Values.influxdb2.enabled | ternary "true" "false" | squote }}
{{- end }}
{{- range $envName, $envValue := .Values.frontend.extraEnv }}
- name: {{ $envName }}
Expand Down
21 changes: 0 additions & 21 deletions charts/flagsmith/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -230,27 +230,6 @@ pgbouncer:
successThreshold: 1
timeoutSeconds: 2

influxdb2:
enabled: false
adminUser:
organization: 'influxdata'
bucket: 'default'
user: 'admin'
retention_policy: '0s'
## Leave empty to generate a random password and token.
## Or fill any of these values to use fixed values.
password: ''
token: ''
persistence:
enabled: false
# storageClass: "-"
# accessMode: ReadWriteOnce
# size: 50Gi
resources: {}
nodeSelector: {}
tolerations: []
affinity: {}

influxdbExternal:
enabled: false
url: null
Expand Down

0 comments on commit 3b54e53

Please sign in to comment.