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