add: configmap, ingress + update deployment with env refs
This commit is contained in:
@@ -20,4 +20,5 @@ spec:
|
|||||||
prune: true
|
prune: true
|
||||||
selfHeal: true
|
selfHeal: true
|
||||||
syncOptions:
|
syncOptions:
|
||||||
- CreateNamespace=true
|
- CreateNamespace=true
|
||||||
|
#kubectl apply -f argocd/apps/moj-servis.app.yaml -n argocd
|
||||||
9
k8s/moj-servis/configmap.yaml
Normal file
9
k8s/moj-servis/configmap.yaml
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: ConfigMap
|
||||||
|
metadata:
|
||||||
|
name: moj-servis-config
|
||||||
|
namespace: student-fsusak03
|
||||||
|
data:
|
||||||
|
SERVICE_NAME: "moj-servis"
|
||||||
|
LOG_LEVEL: "info"
|
||||||
|
WELCOME_MSG: "Pozdrav iz FPMOZ k3s clustera!"
|
||||||
@@ -17,4 +17,25 @@ spec:
|
|||||||
- name: filip-susak-moj-servis
|
- name: filip-susak-moj-servis
|
||||||
image: git.fpmoz.sum.ba/fsusak03/filipsusak:latest
|
image: git.fpmoz.sum.ba/fsusak03/filipsusak:latest
|
||||||
ports:
|
ports:
|
||||||
- containerPort: 8000
|
- containerPort: 8000
|
||||||
|
envFrom:
|
||||||
|
- configMapRef:
|
||||||
|
name: moj-servis-config
|
||||||
|
env:
|
||||||
|
- name: DB_PASSWORD
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: moj-servis-secret
|
||||||
|
key: DB_PASSWORD
|
||||||
|
- name: API_KEY
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: moj-servis-secret
|
||||||
|
key: API_KEY
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
memory: "64Mi"
|
||||||
|
cpu: "50m"
|
||||||
|
limits:
|
||||||
|
memory: "128Mi"
|
||||||
|
cpu: "200m"
|
||||||
19
k8s/moj-servis/ingress.yaml
Normal file
19
k8s/moj-servis/ingress.yaml
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
apiVersion: networking.k8s.io/v1
|
||||||
|
kind: Ingress
|
||||||
|
metadata:
|
||||||
|
name: moj-servis-ingress
|
||||||
|
namespace: student-fsusak03
|
||||||
|
annotations:
|
||||||
|
traefik.ingress.kubernetes.io/router.entrypoints: web
|
||||||
|
spec:
|
||||||
|
rules:
|
||||||
|
- host: fsusak03.argocd.fpmoz.sum.ba
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: Prefix
|
||||||
|
backend:
|
||||||
|
service:
|
||||||
|
name: filip-susak-moj-servis-svc
|
||||||
|
port:
|
||||||
|
number: 80
|
||||||
Reference in New Issue
Block a user