Fix deployment.yaml
This commit is contained in:
@@ -4,6 +4,7 @@ kind: Deployment
|
|||||||
metadata:
|
metadata:
|
||||||
name: hello-gin
|
name: hello-gin
|
||||||
spec:
|
spec:
|
||||||
|
# siin on deploymenti tase
|
||||||
replicas: 3
|
replicas: 3
|
||||||
selector:
|
selector:
|
||||||
matchLabels:
|
matchLabels:
|
||||||
@@ -13,12 +14,25 @@ spec:
|
|||||||
labels:
|
labels:
|
||||||
app: hello-gin
|
app: hello-gin
|
||||||
spec:
|
spec:
|
||||||
|
securityContext: # podi tase
|
||||||
|
fsGroup: 2000
|
||||||
|
runAsGroup: 3000
|
||||||
|
runAsUser: 1000
|
||||||
enableServiceLinks: false
|
enableServiceLinks: false
|
||||||
imagePullSecrets:
|
imagePullSecrets:
|
||||||
- name: imgcred
|
- name: imgcred
|
||||||
containers:
|
containers:
|
||||||
- name: hello-gin
|
- name: hello-gin
|
||||||
image: harbor.codemowers.eu/laurivosandi/hello-gin:latest
|
image: harbor.codemowers.eu/{{ .Values.username }}/hello-gin:latest
|
||||||
|
resources:
|
||||||
|
requests: # Kube scheduleri jaoks, need peaks olema miinimumid
|
||||||
|
cpu: 2m # rate(container_cpu_usage_seconds_total{container="hello-gin"}[1m])
|
||||||
|
memory: 15Mi # container_memory_usage_bytes{container="hello-gin"}
|
||||||
|
limits:
|
||||||
|
cpu: 200m # CPU throttling
|
||||||
|
memory: 100Mi # OOM-kill tapab
|
||||||
|
securityContext: # container tase
|
||||||
|
readOnlyRootFilesystem: true
|
||||||
env:
|
env:
|
||||||
- name: USERNAME
|
- name: USERNAME
|
||||||
value: {{ .Values.username }}
|
value: {{ .Values.username }}
|
||||||
|
|||||||
Reference in New Issue
Block a user