forked from innovacion/Mayacontigo
add healthcheck to remaining apps
This commit is contained in:
42
apps/pyme/.k8s/deployment.yaml
Normal file
42
apps/pyme/.k8s/deployment.yaml
Normal file
@@ -0,0 +1,42 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: mayacontigo-pyme
|
||||
namespace: apps
|
||||
labels:
|
||||
app: mayacontigo-pyme
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: mayacontigo-pyme
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: mayacontigo-pyme
|
||||
spec:
|
||||
imagePullSecrets:
|
||||
- name: gitea-registry-cred
|
||||
containers:
|
||||
- name: mayacontigo-pyme
|
||||
image: gitea.ia-innovacion.work/innovacion/mayacontigo-pyme:latest
|
||||
env:
|
||||
- name: VAULT_TOKEN
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: mayacontigo-pyme-secret
|
||||
key: VAULT_TOKEN
|
||||
ports:
|
||||
- containerPort: 80
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /
|
||||
port: 80
|
||||
initialDelaySeconds: 5
|
||||
periodSeconds: 10
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /
|
||||
port: 80
|
||||
initialDelaySeconds: 15
|
||||
periodSeconds: 20
|
||||
19
apps/pyme/.k8s/ingress.yaml
Normal file
19
apps/pyme/.k8s/ingress.yaml
Normal file
@@ -0,0 +1,19 @@
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: mayacontigo-pyme-ingress
|
||||
annotations:
|
||||
nginx.ingress.kubernetes.io/rewrite-target: /
|
||||
spec:
|
||||
ingressClassName: nginx
|
||||
rules:
|
||||
- host: mayacontigo-pyme.app.ia-innovacion.work
|
||||
http:
|
||||
paths:
|
||||
- path: /
|
||||
pathType: Prefix
|
||||
backend:
|
||||
service:
|
||||
name: mayacontigo-pyme-service
|
||||
port:
|
||||
number: 80
|
||||
17
apps/pyme/.k8s/secrets.yaml
Normal file
17
apps/pyme/.k8s/secrets.yaml
Normal file
@@ -0,0 +1,17 @@
|
||||
apiVersion: external-secrets.io/v1
|
||||
kind: ExternalSecret
|
||||
metadata:
|
||||
name: mayacontigo-pyme-vault
|
||||
namespace: apps
|
||||
spec:
|
||||
refreshInterval: "15s"
|
||||
secretStoreRef:
|
||||
name: vault-backend
|
||||
kind: ClusterSecretStore
|
||||
target:
|
||||
name: mayacontigo-pyme-secret
|
||||
data:
|
||||
- secretKey: VAULT_TOKEN
|
||||
remoteRef:
|
||||
key: mayacontigo-pyme
|
||||
property: VAULT_TOKEN
|
||||
14
apps/pyme/.k8s/service.yaml
Normal file
14
apps/pyme/.k8s/service.yaml
Normal file
@@ -0,0 +1,14 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: mayacontigo-pyme-service
|
||||
labels:
|
||||
app: mayacontigo-pyme
|
||||
spec:
|
||||
selector:
|
||||
app: mayacontigo-pyme
|
||||
ports:
|
||||
- port: 80
|
||||
targetPort: 80
|
||||
protocol: TCP
|
||||
type: ClusterIP
|
||||
Reference in New Issue
Block a user