summaryrefslogtreecommitdiff
path: root/astroshop-helm/accounting/templates/deployment.yaml
diff options
context:
space:
mode:
authorSaumit <justsaumit@protonmail.com>2025-10-04 01:36:57 +0530
committerSaumit <justsaumit@protonmail.com>2025-10-04 01:36:57 +0530
commitdf2bd058309ac234eebdad3b0682a137e27dfc44 (patch)
tree39be2243787c3bdd595ae123766565f80a8a039c /astroshop-helm/accounting/templates/deployment.yaml
parent90a62ae7ea5e745b99d8ac8d08ae837bbaedfce5 (diff)
Add tested Helm chart and configuration files for OpenTelemetry demo services
Diffstat (limited to 'astroshop-helm/accounting/templates/deployment.yaml')
-rw-r--r--astroshop-helm/accounting/templates/deployment.yaml74
1 files changed, 74 insertions, 0 deletions
diff --git a/astroshop-helm/accounting/templates/deployment.yaml b/astroshop-helm/accounting/templates/deployment.yaml
new file mode 100644
index 0000000..37484e7
--- /dev/null
+++ b/astroshop-helm/accounting/templates/deployment.yaml
@@ -0,0 +1,74 @@
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+ namespace: {{ .Values.namespace }}
+ name: {{ include "accounting.fullname" . }}
+ labels:
+ app.kubernetes.io/component: accountingservice
+ app.kubernetes.io/part-of: opentelemetry-demo
+ opentelemetry.io/name: {{ .Values.namespace }}-{{ include "accounting.fullname" . }}
+ {{- include "accounting.labels" . | nindent 4 }}
+spec:
+ replicas: {{ .Values.opentelemetryDemoAccountingservice.replicas }}
+ revisionHistoryLimit: {{ .Values.opentelemetryDemoAccountingservice.revisionHistoryLimit
+ }}
+ selector:
+ matchLabels:
+ opentelemetry.io/name: {{ .Values.namespace }}-{{ include "accounting.fullname" . }}
+ {{- include "accounting.selectorLabels" . | nindent 6 }}
+ template:
+ metadata:
+ labels:
+ app.kubernetes.io/component: accountingservice
+ app.kubernetes.io/instance: opentelemetry-demo
+ app.kubernetes.io/name: {{ .Values.namespace }}-{{ include "accounting.fullname" . }}
+ opentelemetry.io/name: {{ .Values.namespace }}-{{ include "accounting.fullname" . }}
+ {{- include "accounting.selectorLabels" . | nindent 8 }}
+ spec:
+ containers:
+ - env:
+ - name: OTEL_SERVICE_NAME
+ valueFrom:
+ fieldRef:
+ apiVersion: v1
+ fieldPath: metadata.labels['app.kubernetes.io/component']
+ - name: OTEL_COLLECTOR_NAME
+ value: {{ quote .Values.opentelemetryDemoAccountingservice.accountingservice.env.otelCollectorName
+ }}
+ - name: OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE
+ value: {{ quote .Values.opentelemetryDemoAccountingservice.accountingservice.env.otelExporterOtlpMetricsTemporalityPreference
+ }}
+ - name: KAFKA_ADDR
+ value: {{ quote .Values.opentelemetryDemoAccountingservice.accountingservice.env.kafkaServiceAddr
+ }}
+ - name: OTEL_EXPORTER_OTLP_ENDPOINT
+ value: {{ quote .Values.opentelemetryDemoAccountingservice.accountingservice.env.otelExporterOtlpEndpoint
+ }}
+ - name: OTEL_RESOURCE_ATTRIBUTES
+ value: {{ quote .Values.opentelemetryDemoAccountingservice.accountingservice.env.otelResourceAttributes
+ }}
+ - name: KUBERNETES_CLUSTER_DOMAIN
+ value: {{ quote .Values.kubernetesClusterDomain }}
+ image: '{{ .Values.opentelemetryDemoAccountingservice.accountingservice.image.repository
+ }}:{{ .Values.opentelemetryDemoAccountingservice.accountingservice.image.tag |
+ default .Chart.AppVersion }}'
+ imagePullPolicy: {{ .Values.opentelemetryDemoAccountingservice.accountingservice.imagePullPolicy
+ }}
+ name: accountingservice
+ resources: {{- toYaml .Values.opentelemetryDemoAccountingservice.accountingservice.resources
+ | nindent 10 }}
+ initContainers:
+ - command:
+ - sh
+ - -c
+ - until nc -z -v -w30 opentelemetry-demo-kafka 9092; do echo waiting for kafka;
+ sleep 2; done;
+ env:
+ - name: KUBERNETES_CLUSTER_DOMAIN
+ value: {{ quote .Values.kubernetesClusterDomain }}
+ image: '{{ .Values.opentelemetryDemoAccountingservice.waitForKafka.image.repository
+ }}:{{ .Values.opentelemetryDemoAccountingservice.waitForKafka.image.tag | default
+ .Chart.AppVersion }}'
+ name: wait-for-kafka
+ resources: {}
+ serviceAccountName: {{ .Values.serviceAccount.name }}