add: configmap, ingress + update deployment with env refs
This commit is contained in:
10
k8s/moj-servis/configmap.yaml
Normal file
10
k8s/moj-servis/configmap.yaml
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
# k8s/moj-servis/configmap.yaml
|
||||||
|
apiVersion: v1
|
||||||
|
kind: ConfigMap
|
||||||
|
metadata:
|
||||||
|
name: moj-servis-config
|
||||||
|
namespace: student-nikolahrkac
|
||||||
|
data:
|
||||||
|
SERVICE_NAME: "moj-servis"
|
||||||
|
LOG_LEVEL: "info"
|
||||||
|
WELCOME_MSG: "Pozdrav iz FPMOZ k3s clustera!"
|
||||||
@@ -19,6 +19,16 @@ spec:
|
|||||||
image: git.fpmoz.sum.ba/nikolahrkac/moj-servis:2.0
|
image: git.fpmoz.sum.ba/nikolahrkac/moj-servis:2.0
|
||||||
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
|
||||||
|
|
||||||
resources:
|
resources:
|
||||||
requests:
|
requests:
|
||||||
memory: "64Mi"
|
memory: "64Mi"
|
||||||
|
|||||||
20
k8s/moj-servis/ingress.yaml
Normal file
20
k8s/moj-servis/ingress.yaml
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
# k8s/moj-servis/ingress.yaml
|
||||||
|
apiVersion: networking.k8s.io/v1
|
||||||
|
kind: Ingress
|
||||||
|
metadata:
|
||||||
|
name: moj-servis-ingress
|
||||||
|
namespace: student-nikolahrkac
|
||||||
|
annotations:
|
||||||
|
traefik.ingress.kubernetes.io/router.entrypoints: web
|
||||||
|
spec:
|
||||||
|
rules:
|
||||||
|
- host: nikolahrkac.argocd.fpmoz.sum.ba
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: Prefix
|
||||||
|
backend:
|
||||||
|
service:
|
||||||
|
name: moj-servis-svc
|
||||||
|
port:
|
||||||
|
number: 80
|
||||||
Reference in New Issue
Block a user