Skip to content

Commit

Permalink
moved the configurations into testkube-cloud api and ui
Browse files Browse the repository at this point in the history
  • Loading branch information
emamihe committed Aug 18, 2023
1 parent 6f92575 commit 2b609fc
Show file tree
Hide file tree
Showing 11 changed files with 69 additions and 141 deletions.
9 changes: 9 additions & 0 deletions charts/testkube-cloud-api/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,15 @@ spec:
- name: {{ $k }}
value: "{{ $v }}"
{{- end}}
{{- if .Values.externalSecrets.enabled -}}
{{- range $key, $value := .Values.externalSecrets.keys }}
- name: {{ $value }}
valueFrom:
secretKeyRef:
key: {{ $value }}
name: api-external-secrets
{{ end }}
{{- end}}
ports:
- name: {{ if .Values.api.tls.serveHTTPS }}https{{ else }}http{{ end }}
containerPort: {{ if .Values.api.tls.serveHTTPS }}{{ .Values.api.tls.apiPort }}{{ else }}8090{{ end }}
Expand Down
21 changes: 21 additions & 0 deletions charts/testkube-cloud-api/templates/external-secret.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{{- if .Values.externalSecrets.enabled -}}
apiVersion: external-secrets.io/v1beta1
kind: ExternalSecret
metadata:
name: api-external-secrets
spec:
data:
{{- range $key, $value := .Values.externalSecrets.keys }}
- remoteRef:
key: {{ $value }}
secretKey: {{ $key }}
{{ end }}
refreshInterval: 60s
secretStoreRef:
kind: ClusterSecretStore
name: secret-store
target:
creationPolicy: Owner
deletionPolicy: Retain
name: api-external-secrets
{{- end }}
4 changes: 4 additions & 0 deletions charts/testkube-cloud-api/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,10 @@ api:
# -- Comma-separated list of allowed external redirect URIs (example: `https://cloud.testkube.xyz,http://localhost:3000`)
allowedExternalRedirectURIs: ""

externalSecrets:
enabled: false
keys:
OPENAPI_KEY: open-api-key
serviceAccount:
# -- Toggle whether to create a ServiceAccount resource
create: false
Expand Down
23 changes: 0 additions & 23 deletions charts/testkube-cloud-secrets/.helmignore

This file was deleted.

24 changes: 0 additions & 24 deletions charts/testkube-cloud-secrets/Chart.yaml

This file was deleted.

48 changes: 0 additions & 48 deletions charts/testkube-cloud-secrets/README.md

This file was deleted.

43 changes: 0 additions & 43 deletions charts/testkube-cloud-secrets/templates/external-secret.yaml

This file was deleted.

3 changes: 0 additions & 3 deletions charts/testkube-cloud-secrets/values.yaml

This file was deleted.

9 changes: 9 additions & 0 deletions charts/testkube-cloud-ui/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,15 @@ spec:
- name: REACT_APP_DISABLE_TELEMETRY
value: "true"
{{- end }}
{{- if .Values.externalSecrets.enabled -}}
{{- range $key, $value := .Values.externalSecrets.keys }}
- name: {{ $value }}
valueFrom:
secretKeyRef:
key: {{ $value }}
name: ui-external-secrets
{{ end }}
{{- end}}
livenessProbe:
httpGet:
path: /
Expand Down
21 changes: 21 additions & 0 deletions charts/testkube-cloud-ui/templates/external-secret.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{{- if .Values.externalSecrets.enabled -}}
apiVersion: external-secrets.io/v1beta1
kind: ExternalSecret
metadata:
name: ui-external-secrets
spec:
data:
{{- range $key, $value := .Values.externalSecrets.keys }}
- remoteRef:
key: {{ $value }}
secretKey: {{ $key }}
{{ end }}
refreshInterval: 60s
secretStoreRef:
kind: ClusterSecretStore
name: secret-store
target:
creationPolicy: Owner
deletionPolicy: Retain
name: ui-external-secrets
{{- end }}
5 changes: 5 additions & 0 deletions charts/testkube-cloud-ui/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,11 @@ ui:
# -- Force disabling telemetry on the UI
disableTelemetry: false

externalSecrets:
enabled: false
keys:
OPENAPI_KEY: open-api-key

serviceAccount:
# -- Toggle whether to create ServiceAccount resource
create: false
Expand Down

0 comments on commit 2b609fc

Please sign in to comment.