Skip to content
Snippets Groups Projects
Commit 84e49ad0 authored by OZGCloud's avatar OZGCloud
Browse files

set APP_ENV in helm

parent 294130b3
No related branches found
No related tags found
No related merge requests found
......@@ -75,9 +75,7 @@ tools { go 'go-1.22.0' }
chmod +x ./buf
./buf generate
#to compile go statically with these tags, so that the binary is not dynamically linked and from scratch in Dockerfile will work
APP_ENV=production
go build -tags osusergo,netgo cmd/antragsraum-proxy/main.go
'''
}
}
......
http:
server:
port: 8082
port: 8083
grpc:
server:
mock: false
......
......@@ -66,6 +66,7 @@ func LoadConfig(configFilePath ...string) Config {
if env == "" {
env = defaultEnv
}
fmt.Printf("APP_ENV: %v\n", env)
fp := fmt.Sprintf("config/config-%s.yml", env)
......
......@@ -59,7 +59,9 @@ spec:
containers:
- env:
- name: GRPC_SERVER_PORT
value: "{{ .Values.grpc.server.port }}"
value: "{{ ((.Values.grpc).server).port }}"
- name: APP_ENV
value: "production"
{{- with include "app.getCustomList" . }}
{{ . | indent 10 }}
{{- end }}
......
......@@ -31,8 +31,6 @@ image:
name: antragraum-proxy
tag: latest # [default: latest]
grpc:
server:
mock: false
\ No newline at end of file
port: 9090
\ No newline at end of file
......@@ -69,15 +69,20 @@ tests:
path: spec.template.spec.containers[0].env
content:
name: GRPC_SERVER_PORT
value: ""
value: "9090"
- contains:
path: spec.template.spec.containers[0].env
content:
name: APP_ENV
value: "production"
- it: check set envs
set:
grpc:
server:
port: 9090
port: 9091
asserts:
- contains:
path: spec.template.spec.containers[0].env
content:
name: GRPC_SERVER_PORT
value: "9090"
\ No newline at end of file
value: "9091"
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment