From df2bd058309ac234eebdad3b0682a137e27dfc44 Mon Sep 17 00:00:00 2001 From: Saumit Date: Sat, 4 Oct 2025 01:36:57 +0530 Subject: Add tested Helm chart and configuration files for OpenTelemetry demo services --- astroshop-helm/shipping/templates/deployment.yaml | 66 +++++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 astroshop-helm/shipping/templates/deployment.yaml (limited to 'astroshop-helm/shipping/templates/deployment.yaml') diff --git a/astroshop-helm/shipping/templates/deployment.yaml b/astroshop-helm/shipping/templates/deployment.yaml new file mode 100644 index 0000000..b042e99 --- /dev/null +++ b/astroshop-helm/shipping/templates/deployment.yaml @@ -0,0 +1,66 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + namespace: {{ .Values.namespace }} + name: {{ include "shipping.fullname" . }} + labels: + app.kubernetes.io/component: shippingservice + app.kubernetes.io/part-of: opentelemetry-demo + opentelemetry.io/name: {{ .Values.namespace }}-{{ include "shipping.fullname" . }} + {{- include "shipping.labels" . | nindent 4 }} +spec: + replicas: {{ .Values.opentelemetryDemoShippingservice.replicas }} + revisionHistoryLimit: {{ .Values.opentelemetryDemoShippingservice.revisionHistoryLimit + }} + selector: + matchLabels: + opentelemetry.io/name: {{ .Values.namespace }}-{{ include "shipping.fullname" . }} + {{- include "shipping.selectorLabels" . | nindent 6 }} + template: + metadata: + labels: + app.kubernetes.io/component: shippingservice + app.kubernetes.io/instance: opentelemetry-demo + app.kubernetes.io/name: {{ .Values.namespace }}-{{ include "shipping.fullname" . }} + opentelemetry.io/name: {{ .Values.namespace }}-{{ include "shipping.fullname" . }} + {{- include "shipping.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.opentelemetryDemoShippingservice.shippingservice.env.otelCollectorName + }} + - name: OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE + value: {{ quote .Values.opentelemetryDemoShippingservice.shippingservice.env.otelExporterOtlpMetricsTemporalityPreference + }} + - name: SHIPPING_PORT + value: {{ quote .Values.opentelemetryDemoShippingservice.shippingservice.env.shippingServicePort + }} + - name: QUOTE_ADDR + value: {{ quote .Values.opentelemetryDemoShippingservice.shippingservice.env.quoteServiceAddr + }} + - name: OTEL_EXPORTER_OTLP_ENDPOINT + value: {{ quote .Values.opentelemetryDemoShippingservice.shippingservice.env.otelExporterOtlpEndpoint + }} + - name: OTEL_RESOURCE_ATTRIBUTES + value: {{ quote .Values.opentelemetryDemoShippingservice.shippingservice.env.otelResourceAttributes + }} + - name: KUBERNETES_CLUSTER_DOMAIN + value: {{ quote .Values.kubernetesClusterDomain }} + image: '{{ .Values.opentelemetryDemoShippingservice.shippingservice.image.repository + }}:{{ .Values.opentelemetryDemoShippingservice.shippingservice.image.tag | default + .Chart.AppVersion }}' + imagePullPolicy: {{ .Values.opentelemetryDemoShippingservice.shippingservice.imagePullPolicy + }} + name: shippingservice + ports: + - containerPort: 8080 + name: service + resources: {{- toYaml .Values.opentelemetryDemoShippingservice.shippingservice.resources + | nindent 10 }} + serviceAccountName: {{ .Values.serviceAccount.name }} -- cgit v1.2.3