-
Notifications
You must be signed in to change notification settings - Fork 347
Expand file tree
/
Copy pathapp-instance.yml
More file actions
91 lines (90 loc) · 4.18 KB
/
app-instance.yml
File metadata and controls
91 lines (90 loc) · 4.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
{{- define "app-instance.influxdb" -}}
apiVersion: kubecfg.dev/v1alpha1
kind: AppInstance
metadata:
name: {{.Values.nameOverride | default .Release.Name}}
namespace: {{.Values.namespaceOverride | default .Release.Namespace}}
spec:
pause: {{.Values.pause }}
imagePullSecrets: {{.Values.imagePullSecrets | toYaml | nindent 2}}
package:
image: "{{.Values.fullnameOverride | default "us-docker.pkg.dev/influxdb2-artifacts/clustered/influxdb"}}:{{ .Values.image.tag | default .Chart.AppVersion }}"
apiVersion: influxdata.com/v1alpha1
spec:
{{- if .Values.hostingEnvironment}}
hostingEnvironment:
{{- if hasKey .Values.hostingEnvironment "aws"}}
aws: {{.Values.hostingEnvironment.aws | include "mapTrim" | trim | nindent 10}}
{{- else if hasKey .Values.hostingEnvironment "openshift"}}
openshift: {{.Values.hostingEnvironment.openshift | include "mapTrim" | trim | nindent 10}}
{{- else if hasKey .Values.hostingEnvironment "gke"}}
gke: {{.Values.hostingEnvironment.gke | include "mapTrim" | trim | nindent 10}}
{{- end }}
{{- end}}
catalog:
dsn:
valueFrom:
secretKeyRef:
name: {{(required "missing catalog.dsn.SecretName" .Values.catalog.dsn.SecretName)}}
key: {{required "missing catalog.dsn.SecretKey" .Values.catalog.dsn.SecretKey}}
{{- if or .Values.images.overrides .Values.images.registryOverride}}
images:
{{- with .Values.images.overrides }}
overrides: {{ . | toYaml | nindent 8 }}
{{- end }}
{{- if .Values.images.registryOverride}}
registryOverride: {{.Values.images.registryOverride}}
{{- end}}
{{- end}}
objectStore:
bucket: {{required "missing objectStore.bucket" .Values.objectStore.bucket}}
{{- if hasKey .Values.objectStore "s3"}}
s3: {{- .Values.objectStore.s3 | include "mapTrim" | trim | nindent 10 }}
{{- else if hasKey .Values.objectStore "azure"}}
azure: {{- .Values.objectStore.azure | include "mapTrim" | trim | nindent 10}}
{{- else if hasKey .Values.objectStore "google"}}
google: {{- .Values.objectStore.google | include "mapTrim" | trim | nindent 10}}
{{- end}}
ingesterStorage:{{.Values.ingesterStorage | include "mapTrim" | trim | nindent 8}}
monitoringStorage:{{.Values.monitoringStorage | include "mapTrim" | trim | nindent 8}}
ingress:{{- .Values.ingress | include "mapTrim" | trim | nindent 8 -}}
{{- $components := (.Values.components | include "mapTrim" | fromYaml)}}
{{- if $components}}
components:{{$components | toYaml | trim | nindent 8}}
{{- end}}
{{- $resources := (.Values.resources | include "mapTrim" | fromYaml)}}
{{- if $resources}}
resources:{{$resources | toYaml | trim | nindent 8}}
{{- end}}
admin:
users: {{required "missing admin.users" .Values.admin.users | toYaml | nindent 8}}
dsn: {{required "missing admin.dsn" .Values.admin.dsn | toYaml | nindent 10}}
identityProvider: {{required "missing admin.identityProvider" .Values.admin.identityProvider}}
jwksEndpoint: {{required "missing admin.jwksEndpoint" .Values.admin.jwksEndpoint}}
{{- if .Values.useCustomEgress}}
egress:
customCertificates: {{.Values.egress.customCertificates | toYaml | nindent 12}}
{{- end}}
{{- if .Values.featureFlags}}
featureFlags: {{.Values.featureFlags | toYaml | nindent 6}}
{{- end}}
{{- if .Values.observability.serviceMonitor}}
observability:
serviceMonitor:
interval: {{required "missing observability.serviceMonitor.interval" .Values.observability.serviceMonitor.interval}}
scrapeTimeout: {{required "missing observability.serviceMonitor.scrapeTimeout" .Values.observability.serviceMonitor.scrapeTimeout}}
{{- end}}
---
{{- end }}
{{- if .Values.kubitSingleNamespace}}
apiVersion: v1
kind: ConfigMap
metadata:
name: app-instance
namespace: {{ .Values.namespaceOverride | default .Release.Namespace }}
data:
app-instance: |
{{ include "app-instance.influxdb" . | fromYaml | toJson }}
{{- else }}
{{ include "app-instance.influxdb" . }}
{{- end }}