Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add env vars to deployment #1

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,14 @@ Add the MAD Coolstore chart repository.
helm repo add mad-coolstore-microservice https://rh-mad-workshop.github.io/coolstore-microservice-helm
```

## Installation

Install the chart:

```shell
helm install coolstore mad-coolstore-microservice/coolstore-microservice -n <namespace> --wait
```

## Chart source

All chart source material including chart readme files are found under the [chart-source directory](/chart-source/).
7 changes: 7 additions & 0 deletions chart-source/common/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,11 @@ spec:
protocol: TCP
name: http
resources: {}
{{- if .Values.app.runtime.env }}
env:
{{- range $key, $val := .Values.app.runtime.env }}
- name: {{ $key }}
value: {{ tpl $val $ }}
{{- end }}
{{- end }}
restartPolicy: Always
12 changes: 11 additions & 1 deletion chart-source/coolstore/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ orders:
containerPort: 8080
servicePort: 8080
portName: http
env:
MANAGEMENT_OTLP_TRACING_ENDPOINT: http://otel-collector:4318/v1/traces
MANAGEMENT_TRACING_SAMPLING_PROBABILITY: '1.0'
SPRING_APPLICATION_NAME: orders

gateway:
enabled: true
Expand All @@ -34,6 +38,10 @@ gateway:
containerPort: 8080
servicePort: 8080
portName: http
env:
MANAGEMENT_OTLP_TRACING_ENDPOINT: http://otel-collector:4318/v1/traces
MANAGEMENT_TRACING_SAMPLING_PROBABILITY: '1.0'
SPRING_APPLICATION_NAME: gateway

frontend:
enabled: true
Expand Down Expand Up @@ -61,11 +69,13 @@ inventory:
containerPort: 8080
servicePort: 8080
portName: http
env:
QUARKUS_OTEL_EXPORTER_OTLP_TRACES_ENDPOINT: http://otel-collector:4317
QUARKUS_APPLICATION_NAME: inventory
inventoryDb:
name: postgresql-inventory
replicaCount: 1
image: quay.io/openshiftlabs/coolstore-microservice-inventory-postgresql:10

imagePullPolicy: IfNotPresent
pgsqlUser: inventory
pgsqlPassword: inventory
Expand Down