summaryrefslogtreecommitdiff
path: root/astroshop-helm/ad/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/ad/templates/deployment.yaml
parent90a62ae7ea5e745b99d8ac8d08ae837bbaedfce5 (diff)
Add tested Helm chart and configuration files for OpenTelemetry demo services
Diffstat (limited to 'astroshop-helm/ad/templates/deployment.yaml')
-rw-r--r--astroshop-helm/ad/templates/deployment.yaml59
1 files changed, 59 insertions, 0 deletions
diff --git a/astroshop-helm/ad/templates/deployment.yaml b/astroshop-helm/ad/templates/deployment.yaml
new file mode 100644
index 0000000..756b98f
--- /dev/null
+++ b/astroshop-helm/ad/templates/deployment.yaml
@@ -0,0 +1,59 @@
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+ namespace: {{ .Values.namespace }}
+ name: {{ include "ad.fullname" . }}
+ labels:
+ app.kubernetes.io/component: adservice
+ app.kubernetes.io/part-of: opentelemetry-demo
+ opentelemetry.io/name: {{ .Values.namespace }}-{{ include "ad.fullname" . }} # Changed this line
+ {{- include "ad.labels" . | nindent 4 }}
+spec:
+ replicas: {{ .Values.opentelemetryDemoAdservice.replicas }}
+ revisionHistoryLimit: {{ .Values.opentelemetryDemoAdservice.revisionHistoryLimit }}
+ selector:
+ matchLabels:
+ opentelemetry.io/name: {{ .Values.namespace }}-{{ include "ad.fullname" . }} # Changed this line
+ {{- include "ad.selectorLabels" . | nindent 6 }}
+ template:
+ metadata:
+ labels:
+ app.kubernetes.io/component: adservice
+ app.kubernetes.io/instance: opentelemetry-demo
+ app.kubernetes.io/name: {{ .Values.namespace }}-{{ include "ad.fullname" . }} # Changed this line
+ opentelemetry.io/name: {{ .Values.namespace }}-{{ include "ad.fullname" . }} # Changed this line
+ {{- include "ad.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.opentelemetryDemoAdservice.adservice.env.otelCollectorName }}
+ - name: OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE
+ value: {{ quote .Values.opentelemetryDemoAdservice.adservice.env.otelExporterOtlpMetricsTemporalityPreference }}
+ - name: AD_PORT
+ value: {{ quote .Values.opentelemetryDemoAdservice.adservice.env.adServicePort }}
+ - name: FLAGD_HOST
+ value: {{ quote .Values.opentelemetryDemoAdservice.adservice.env.flagdHost }}
+ - name: FLAGD_PORT
+ value: {{ quote .Values.opentelemetryDemoAdservice.adservice.env.flagdPort }}
+ - name: OTEL_EXPORTER_OTLP_ENDPOINT
+ value: {{ quote .Values.opentelemetryDemoAdservice.adservice.env.otelExporterOtlpEndpoint }}
+ - name: OTEL_LOGS_EXPORTER
+ value: {{ quote .Values.opentelemetryDemoAdservice.adservice.env.otelLogsExporter }}
+ - name: OTEL_RESOURCE_ATTRIBUTES
+ value: {{ quote .Values.opentelemetryDemoAdservice.adservice.env.otelResourceAttributes }}
+ - name: KUBERNETES_CLUSTER_DOMAIN
+ value: {{ quote .Values.kubernetesClusterDomain }}
+ image: {{ .Values.opentelemetryDemoAdservice.adservice.image.repository }}:{{ .Values.opentelemetryDemoAdservice.adservice.image.tag | default .Chart.AppVersion }}
+ imagePullPolicy: {{ .Values.opentelemetryDemoAdservice.adservice.imagePullPolicy }}
+ name: adservice
+ ports:
+ - containerPort: 8080
+ name: service
+ resources: {{- toYaml .Values.opentelemetryDemoAdservice.adservice.resources | nindent 10 }}
+ serviceAccountName: {{ .Values.serviceAccount.name }}