initial commit
Some checks failed
CI Pipeline / Build and Test (push) Successful in 4s
Security Scanning / Trivy — Filesystem & Dependency Scan (push) Failing after 7s
Security Scanning / Gitleaks — Secret Scan (push) Failing after 7s
Security Scanning / Security Summary (push) Failing after 3s
Build and Publish TechDocs / build-and-publish (push) Successful in 1m2s
Some checks failed
CI Pipeline / Build and Test (push) Successful in 4s
Security Scanning / Trivy — Filesystem & Dependency Scan (push) Failing after 7s
Security Scanning / Gitleaks — Secret Scan (push) Failing after 7s
Security Scanning / Security Summary (push) Failing after 3s
Build and Publish TechDocs / build-and-publish (push) Successful in 1m2s
Change-Id: I8e318861a258686ddc53dda08858f74c573a6520
This commit is contained in:
21
chart/templates/NOTES.txt
Normal file
21
chart/templates/NOTES.txt
Normal file
@@ -0,0 +1,21 @@
|
||||
=======================================================================================
|
||||
|
||||
|
||||
██████╗ ████████╗███████╗██╗ ██████╗ ███████╗███╗ ███╗ ██████╗
|
||||
██╔═══██╗╚══██╔══╝██╔════╝██║ ██╔══██╗██╔════╝████╗ ████║██╔═══██╗
|
||||
██║ ██║ ██║ █████╗ ██║ ██║ ██║█████╗ ██╔████╔██║██║ ██║
|
||||
██║ ██║ ██║ ██╔══╝ ██║ ██║ ██║██╔══╝ ██║╚██╔╝██║██║ ██║
|
||||
╚██████╔╝ ██║ ███████╗███████╗ ██████╔╝███████╗██║ ╚═╝ ██║╚██████╔╝
|
||||
╚═════╝ ╚═╝ ╚══════╝╚══════╝ ╚═════╝ ╚══════╝╚═╝ ╚═╝ ╚═════╝
|
||||
|
||||
|
||||
- All services are available via the Frontend proxy: http://localhost:8080
|
||||
by running these commands:
|
||||
kubectl --namespace {{ .Release.Namespace }} port-forward svc/frontend-proxy 8080:8080
|
||||
|
||||
The following services are available at these paths after the frontend-proxy service is exposed with port forwarding:
|
||||
Webstore http://localhost:8080/
|
||||
Jaeger UI http://localhost:8080/jaeger/ui/
|
||||
Grafana http://localhost:8080/grafana/
|
||||
Load Generator UI http://localhost:8080/loadgen/
|
||||
Feature Flags UI http://localhost:8080/feature/
|
||||
84
chart/templates/_helpers.tpl
Normal file
84
chart/templates/_helpers.tpl
Normal file
@@ -0,0 +1,84 @@
|
||||
{{/*
|
||||
Expand the name of the chart.
|
||||
*/}}
|
||||
{{- define "otel-demo.name" -}}
|
||||
{{- default .Release.Name | trunc 63 | trimSuffix "-" }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Create chart name and version as used by the chart label.
|
||||
*/}}
|
||||
{{- define "otel-demo.chart" -}}
|
||||
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Common labels
|
||||
*/}}
|
||||
{{- define "otel-demo.labels" -}}
|
||||
helm.sh/chart: {{ include "otel-demo.chart" . }}
|
||||
{{ include "otel-demo.selectorLabels" . }}
|
||||
{{ include "otel-demo.workloadLabels" . }}
|
||||
app.kubernetes.io/part-of: opentelemetry-demo
|
||||
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
||||
{{- end }}
|
||||
|
||||
|
||||
|
||||
{{/*
|
||||
Workload (Pod) labels
|
||||
*/}}
|
||||
{{- define "otel-demo.workloadLabels" -}}
|
||||
{{- if .Chart.AppVersion }}
|
||||
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
|
||||
{{- end }}
|
||||
{{- if .name }}
|
||||
app.kubernetes.io/component: {{ .name}}
|
||||
app.kubernetes.io/name: {{ .name }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
|
||||
|
||||
|
||||
{{/*
|
||||
Selector labels
|
||||
*/}}
|
||||
{{- define "otel-demo.selectorLabels" -}}
|
||||
{{- if .name }}
|
||||
opentelemetry.io/name: {{ .name }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{- define "otel-demo.envOverriden" -}}
|
||||
{{- $mergedEnvs := list }}
|
||||
{{- $envOverrides := default (list) .envOverrides }}
|
||||
|
||||
{{- range .env }}
|
||||
{{- $currentEnv := . }}
|
||||
{{- $hasOverride := false }}
|
||||
{{- range $envOverrides }}
|
||||
{{- if eq $currentEnv.name .name }}
|
||||
{{- $mergedEnvs = append $mergedEnvs . }}
|
||||
{{- $envOverrides = without $envOverrides . }}
|
||||
{{- $hasOverride = true }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if not $hasOverride }}
|
||||
{{- $mergedEnvs = append $mergedEnvs $currentEnv }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- $mergedEnvs = concat $mergedEnvs $envOverrides }}
|
||||
{{- mustToJson $mergedEnvs }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Create the name of the service account to use
|
||||
*/}}
|
||||
{{- define "otel-demo.serviceAccountName" -}}
|
||||
{{- if .serviceAccount.create }}
|
||||
{{- default (include "otel-demo.name" .) .serviceAccount.name }}
|
||||
{{- else }}
|
||||
{{- default "default" .serviceAccount.name }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
310
chart/templates/_objects.tpl
Normal file
310
chart/templates/_objects.tpl
Normal file
@@ -0,0 +1,310 @@
|
||||
{{/*
|
||||
Demo component Deployment template
|
||||
*/}}
|
||||
{{- define "otel-demo.deployment" }}
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: {{ .name }}
|
||||
labels:
|
||||
{{- include "otel-demo.labels" . | nindent 4 }}
|
||||
spec:
|
||||
replicas: {{ .replicas | default .defaultValues.replicas }}
|
||||
revisionHistoryLimit: {{ .revisionHistoryLimit | default .defaultValues.revisionHistoryLimit }}
|
||||
selector:
|
||||
matchLabels:
|
||||
{{- include "otel-demo.selectorLabels" . | nindent 6 }}
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
{{- include "otel-demo.selectorLabels" . | nindent 8 }}
|
||||
{{- include "otel-demo.workloadLabels" . | nindent 8 }}
|
||||
{{- if .podLabels }}
|
||||
{{- toYaml .podLabels | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- if .podAnnotations }}
|
||||
annotations:
|
||||
{{- toYaml .podAnnotations | nindent 8 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
{{- if or .defaultValues.image.pullSecrets ((.imageOverride).pullSecrets) }}
|
||||
imagePullSecrets:
|
||||
{{- ((.imageOverride).pullSecrets) | default .defaultValues.image.pullSecrets | toYaml | nindent 8}}
|
||||
{{- end }}
|
||||
serviceAccountName: {{ include "otel-demo.serviceAccountName" .}}
|
||||
{{- $schedulingRules := .schedulingRules | default dict }}
|
||||
{{- if or .defaultValues.schedulingRules.nodeSelector $schedulingRules.nodeSelector}}
|
||||
nodeSelector:
|
||||
{{- $schedulingRules.nodeSelector | default .defaultValues.schedulingRules.nodeSelector | toYaml | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- if or .defaultValues.schedulingRules.affinity $schedulingRules.affinity}}
|
||||
affinity:
|
||||
{{- $schedulingRules.affinity | default .defaultValues.schedulingRules.affinity | toYaml | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- if or .defaultValues.schedulingRules.tolerations $schedulingRules.tolerations}}
|
||||
tolerations:
|
||||
{{- $schedulingRules.tolerations | default .defaultValues.schedulingRules.tolerations | toYaml | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- if or .defaultValues.podSecurityContext .podSecurityContext }}
|
||||
securityContext:
|
||||
{{- .podSecurityContext | default .defaultValues.podSecurityContext | toYaml | nindent 8 }}
|
||||
{{- end}}
|
||||
containers:
|
||||
- name: {{ .name }}
|
||||
image: '{{ ((.imageOverride).repository) | default .defaultValues.image.repository }}:{{ ((.imageOverride).tag) | default (printf "%s-%s" (default .Chart.AppVersion .defaultValues.image.tag) .name) }}'
|
||||
imagePullPolicy: {{ ((.imageOverride).pullPolicy) | default .defaultValues.image.pullPolicy }}
|
||||
{{- if .command }}
|
||||
command:
|
||||
{{- .command | toYaml | nindent 12 -}}
|
||||
{{- end }}
|
||||
{{- if or .ports .service}}
|
||||
ports:
|
||||
{{- include "otel-demo.pod.ports" . | nindent 12 }}
|
||||
{{- end }}
|
||||
env:
|
||||
{{- include "otel-demo.pod.env" . | nindent 12 }}
|
||||
resources:
|
||||
{{- .resources | toYaml | nindent 12 }}
|
||||
{{- if or .defaultValues.securityContext .securityContext }}
|
||||
securityContext:
|
||||
{{- .securityContext | default .defaultValues.securityContext | toYaml | nindent 12 }}
|
||||
{{- end}}
|
||||
{{- if .livenessProbe }}
|
||||
livenessProbe:
|
||||
{{- .livenessProbe | toYaml | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- if .readinessProbe }}
|
||||
readinessProbe:
|
||||
{{- .readinessProbe | toYaml | nindent 12 }}
|
||||
{{- end }}
|
||||
volumeMounts:
|
||||
{{- if .additionalVolumeMounts }}
|
||||
{{- tpl (toYaml .additionalVolumeMounts) . | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- range .mountedConfigMaps }}
|
||||
- name: {{ .name | lower }}
|
||||
mountPath: {{ .mountPath }}
|
||||
{{- if .subPath }}
|
||||
subPath: {{ .subPath }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- range .mountedEmptyDirs }}
|
||||
- name: {{ .name | lower }}
|
||||
mountPath: {{ .mountPath }}
|
||||
{{- if .subPath }}
|
||||
subPath: {{ .subPath }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- range .sidecarContainers }}
|
||||
{{- $sidecar := set . "name" (.name | lower)}}
|
||||
{{- $sidecar := set . "Chart" $.Chart }}
|
||||
{{- $sidecar := set . "Release" $.Release }}
|
||||
{{- $sidecar := set . "defaultValues" $.defaultValues }}
|
||||
- name: {{ .name }}
|
||||
image: '{{ ((.imageOverride).repository) | default .defaultValues.image.repository }}:{{ ((.imageOverride).tag) | default (printf "%s-%s" (default .Chart.AppVersion .defaultValues.image.tag) .name) }}'
|
||||
imagePullPolicy: {{ ((.imageOverride).pullPolicy) | default .defaultValues.image.pullPolicy }}
|
||||
{{- if .command }}
|
||||
command:
|
||||
{{- .command | toYaml | nindent 12 -}}
|
||||
{{- end }}
|
||||
{{- if or .ports .service }}
|
||||
ports:
|
||||
{{- include "otel-demo.pod.ports" . | nindent 12 }}
|
||||
{{- end }}
|
||||
env:
|
||||
{{- include "otel-demo.pod.env" . | nindent 12 }}
|
||||
{{- if .resources }}
|
||||
resources:
|
||||
{{- .resources | toYaml | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- if or .defaultValues.securityContext .securityContext }}
|
||||
securityContext:
|
||||
{{- .securityContext | default .defaultValues.securityContext | toYaml | nindent 12 }}
|
||||
{{- end}}
|
||||
{{- if .livenessProbe }}
|
||||
livenessProbe:
|
||||
{{- .livenessProbe | toYaml | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- if .readinessProbe }}
|
||||
readinessProbe:
|
||||
{{- .readinessProbe | toYaml | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- if .volumeMounts }}
|
||||
volumeMounts:
|
||||
{{- .volumeMounts | toYaml | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if .initContainers }}
|
||||
initContainers:
|
||||
{{- tpl (toYaml .initContainers) . | nindent 8 }}
|
||||
{{- end}}
|
||||
volumes:
|
||||
{{- range .mountedConfigMaps }}
|
||||
- name: {{ .name | lower}}
|
||||
configMap:
|
||||
{{- if .existingConfigMap }}
|
||||
name: {{ tpl .existingConfigMap $ }}
|
||||
{{- else }}
|
||||
name: {{ $.name }}-{{ .name | lower }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- range .mountedEmptyDirs }}
|
||||
- name: {{ .name | lower}}
|
||||
emptyDir: {}
|
||||
{{- end }}
|
||||
{{- if .additionalVolumes }}
|
||||
{{- tpl (toYaml .additionalVolumes) . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Demo component Service template
|
||||
*/}}
|
||||
{{- define "otel-demo.service" }}
|
||||
{{- if or .ports .service}}
|
||||
{{- $service := .service | default dict }}
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: {{ .name }}
|
||||
labels:
|
||||
{{- include "otel-demo.labels" . | nindent 4 }}
|
||||
{{- with $service.annotations }}
|
||||
annotations:
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
type: {{ $service.type | default "ClusterIP" }}
|
||||
ports:
|
||||
{{- if .ports }}
|
||||
{{- range .ports }}
|
||||
- port: {{ .value }}
|
||||
name: {{ .name}}
|
||||
targetPort: {{ .value }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{- if and .service .service.port }}
|
||||
- port: {{ .service.port}}
|
||||
name: tcp-service
|
||||
targetPort: {{ .service.port }}
|
||||
{{- if .service.nodePort }}
|
||||
nodePort: {{ .service.nodePort }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{- range $i, $sidecar := .sidecarContainers }}
|
||||
{{- if .ports }}
|
||||
{{- range .ports }}
|
||||
- port: {{ .value }}
|
||||
name: {{ .name}}
|
||||
targetPort: {{ .value }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{- if and .service .service.port }}
|
||||
- port: {{ .service.port}}
|
||||
name: tcp-service-{{ $i }}
|
||||
targetPort: {{ .service.port }}
|
||||
{{- if .service.nodePort }}
|
||||
nodePort: {{ .service.nodePort }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
selector:
|
||||
{{- include "otel-demo.selectorLabels" . | nindent 4 }}
|
||||
{{- end}}
|
||||
{{- end}}
|
||||
|
||||
{{/*
|
||||
Demo component ConfigMap template
|
||||
*/}}
|
||||
{{- define "otel-demo.configmap" }}
|
||||
{{- range .mountedConfigMaps }}
|
||||
{{- if .data }}
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: {{ $.name }}-{{ .name | lower }}
|
||||
labels:
|
||||
{{- include "otel-demo.labels" $ | nindent 4 }}
|
||||
data:
|
||||
{{- .data | toYaml | nindent 2}}
|
||||
{{- end}}
|
||||
{{- end}}
|
||||
{{- end}}
|
||||
|
||||
{{/*
|
||||
Demo component Ingress template
|
||||
*/}}
|
||||
{{- define "otel-demo.ingress" }}
|
||||
{{- $hasIngress := false}}
|
||||
{{- if .ingress }}
|
||||
{{- if .ingress.enabled }}
|
||||
{{- $hasIngress = true }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- $hasServicePorts := false}}
|
||||
{{- if .service }}
|
||||
{{- if .service.port }}
|
||||
{{- $hasServicePorts = true }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if and $hasIngress (or .ports $hasServicePorts) }}
|
||||
{{- $ingresses := list .ingress }}
|
||||
{{- if .ingress.additionalIngresses }}
|
||||
{{- $ingresses := concat $ingresses .ingress.additionalIngresses -}}
|
||||
{{- end }}
|
||||
{{- range $ingresses }}
|
||||
---
|
||||
apiVersion: "networking.k8s.io/v1"
|
||||
kind: Ingress
|
||||
metadata:
|
||||
{{- if .name }}
|
||||
name: {{ $.name }}-{{ .name | lower }}
|
||||
{{- else }}
|
||||
name: {{ $.name }}
|
||||
{{- end }}
|
||||
labels:
|
||||
{{- include "otel-demo.labels" $ | nindent 4 }}
|
||||
{{- if .annotations }}
|
||||
annotations:
|
||||
{{ toYaml .annotations | nindent 4 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
{{- if .ingressClassName }}
|
||||
ingressClassName: {{ .ingressClassName }}
|
||||
{{- end -}}
|
||||
{{- if .tls }}
|
||||
tls:
|
||||
{{- range .tls }}
|
||||
- hosts:
|
||||
{{- range .hosts }}
|
||||
- {{ . | quote }}
|
||||
{{- end }}
|
||||
{{- with .secretName }}
|
||||
secretName: {{ . }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
rules:
|
||||
{{- range .hosts }}
|
||||
- host: {{ .host | quote }}
|
||||
http:
|
||||
paths:
|
||||
{{- range .paths }}
|
||||
- path: {{ .path }}
|
||||
pathType: {{ .pathType }}
|
||||
backend:
|
||||
service:
|
||||
name: {{ $.name }}
|
||||
port:
|
||||
number: {{ .port }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end}}
|
||||
{{- end}}
|
||||
{{- end}}
|
||||
63
chart/templates/_pod.tpl
Normal file
63
chart/templates/_pod.tpl
Normal file
@@ -0,0 +1,63 @@
|
||||
{{/*
|
||||
Get Pod Env
|
||||
- Merges default environment variables (if used) with component environment variables.
|
||||
- If using defaults, will pull out OTEL_RESOURCE_ATTRIBUTES from the list to be reused later.
|
||||
- An environment variable named OTEL_RESOURCE_ATTRIBUTES_EXTRA will have its value appended to the value of the
|
||||
OTEL_RESOURCE_ATTRIBUTES environment variable if it exists.
|
||||
- The OTEL_RESOURCES_ATTRIBUTES environment variable will typically use Kubernetes environment variable expansion and
|
||||
should be last.
|
||||
*/}}
|
||||
{{- define "otel-demo.pod.env" -}}
|
||||
{{- $resourceAttributesEnv := dict }}
|
||||
{{- $allEnvs := list }}
|
||||
|
||||
{{- if .useDefault.env }}
|
||||
{{- $defaultEnvs := include "otel-demo.envOverriden" (dict "env" .defaultValues.env "envOverrides" .defaultValues.envOverrides) | mustFromJson }}
|
||||
{{- range $defaultEnvs }}
|
||||
{{- if eq .name "OTEL_RESOURCE_ATTRIBUTES" }}
|
||||
{{- $resourceAttributesEnv = . }}
|
||||
{{- else }}
|
||||
{{- $allEnvs = append $allEnvs . }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{- if or .env .envOverrides }}
|
||||
{{- $localEnvs := include "otel-demo.envOverriden" . | mustFromJson }}
|
||||
{{- range $localEnvs }}
|
||||
{{- if eq .name "OTEL_RESOURCE_ATTRIBUTES" }}
|
||||
{{- $resourceAttributesEnv = . }}
|
||||
{{- else if and $resourceAttributesEnv (eq .name "OTEL_RESOURCE_ATTRIBUTES_EXTRA") }}
|
||||
{{- $newValue := (printf "%s,%s" (get $resourceAttributesEnv "value") .value) }}
|
||||
{{- $resourceAttributesEnv = dict "name" "OTEL_RESOURCE_ATTRIBUTES" "value" $newValue }}
|
||||
{{- else }}
|
||||
{{- $allEnvs = append $allEnvs . }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{- if $resourceAttributesEnv }}
|
||||
{{- $allEnvs = append $allEnvs $resourceAttributesEnv }}
|
||||
{{- end }}
|
||||
|
||||
{{- tpl (toYaml $allEnvs) . }}
|
||||
{{- end }}
|
||||
|
||||
|
||||
{{/*
|
||||
Get Pod ports
|
||||
*/}}
|
||||
{{- define "otel-demo.pod.ports" -}}
|
||||
{{- if .ports }}
|
||||
{{- range $port := .ports }}
|
||||
- containerPort: {{ $port.value }}
|
||||
name: {{ $port.name}}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if .service }}
|
||||
{{- if .service.port }}
|
||||
- containerPort: {{.service.port}}
|
||||
name: service
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
18
chart/templates/component.yaml
Normal file
18
chart/templates/component.yaml
Normal file
@@ -0,0 +1,18 @@
|
||||
{{- range $name, $config := .Values.components }}
|
||||
{{- $config := set . "Capabilities" $.Capabilities }}
|
||||
{{- $config := set . "Template" $.Template }}
|
||||
{{- $config := set . "name" ($name | lower) }}
|
||||
{{- $config := set . "Release" $.Release }}
|
||||
{{- $config := set . "Chart" $.Chart }}
|
||||
{{- $config := set . "serviceAccount" $.Values.serviceAccount }}
|
||||
{{- $config := set . "observability" $.Values.observability }}
|
||||
{{- $config := set . "defaultValues" $.Values.default }}
|
||||
|
||||
{{- if $config.enabled -}}
|
||||
{{- include "otel-demo.deployment" $config -}}
|
||||
{{- include "otel-demo.service" $config -}}
|
||||
{{- include "otel-demo.ingress" $config -}}
|
||||
{{- include "otel-demo.configmap" $config -}}
|
||||
{{ end }}
|
||||
|
||||
{{- end }}
|
||||
11
chart/templates/flagd-config.yaml
Normal file
11
chart/templates/flagd-config.yaml
Normal file
@@ -0,0 +1,11 @@
|
||||
{{- if .Values.components.flagd.enabled -}}
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: flagd-config
|
||||
namespace: {{ .Release.Namespace }}
|
||||
labels:
|
||||
{{- include "otel-demo.labels" . | nindent 4 }}
|
||||
data:
|
||||
{{ (.Files.Glob "flagd/*.json").AsConfig | nindent 2 }}
|
||||
{{- end }}
|
||||
42
chart/templates/grafana-config.yaml
Normal file
42
chart/templates/grafana-config.yaml
Normal file
@@ -0,0 +1,42 @@
|
||||
{{- if .Values.grafana.enabled -}}
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: grafana-alerting
|
||||
namespace: {{ .Release.Namespace }}
|
||||
labels:
|
||||
{{- include "otel-demo.labels" . | nindent 4 }}
|
||||
grafana_alert: "1"
|
||||
data:
|
||||
{{ (.Files.Glob "grafana/provisioning/alerting/*.yaml").AsConfig | nindent 2 }}
|
||||
|
||||
{{- range $path, $_ := .Files.Glob "grafana/provisioning/dashboards/*.json" }}
|
||||
{{- $name := base $path | trimSuffix ".json" }}
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: grafana-dashboard-{{ $name | lower }}
|
||||
namespace: {{ $.Release.Namespace }}
|
||||
labels:
|
||||
{{- include "otel-demo.labels" $ | nindent 4 }}
|
||||
grafana_dashboard: "1"
|
||||
data:
|
||||
{{ $name }}.json: |-
|
||||
{{ $.Files.Get $path | indent 4 }}
|
||||
{{- end }}
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: grafana-datasources
|
||||
namespace: {{ .Release.Namespace }}
|
||||
labels:
|
||||
{{- include "otel-demo.labels" . | nindent 4 }}
|
||||
grafana_datasource: "1"
|
||||
data:
|
||||
{{ (.Files.Glob "grafana/provisioning/datasources/*.yaml").AsConfig | nindent 2 }}
|
||||
|
||||
{{- end }}
|
||||
11
chart/templates/posgresql-init-config.yaml
Normal file
11
chart/templates/posgresql-init-config.yaml
Normal file
@@ -0,0 +1,11 @@
|
||||
{{- if .Values.components.postgresql.enabled -}}
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: postgresql-init
|
||||
namespace: {{ .Release.Namespace }}
|
||||
labels:
|
||||
{{- include "otel-demo.labels" . | nindent 4 }}
|
||||
data:
|
||||
{{ (.Files.Glob "postgresql/*.sql").AsConfig | nindent 2 }}
|
||||
{{- end }}
|
||||
15
chart/templates/serviceaccount.yaml
Normal file
15
chart/templates/serviceaccount.yaml
Normal file
@@ -0,0 +1,15 @@
|
||||
{{- if .Values.serviceAccount.create -}}
|
||||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
{{- $_ := set . "serviceAccount" .Values.serviceAccount }}
|
||||
name: {{ include "otel-demo.serviceAccountName" . }}
|
||||
labels:
|
||||
{{- include "otel-demo.labels" . | nindent 4 }}
|
||||
{{- if .Values.serviceAccount.annotations }}
|
||||
annotations:
|
||||
{{- range $key, $value := .Values.serviceAccount.annotations }}
|
||||
{{- printf "%s: %s" $key (tpl $value $ | quote) | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
Reference in New Issue
Block a user