deployment snippet
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful

This commit is contained in:
Wolfgang Hottgenroth 2025-01-27 19:00:32 +01:00
parent 6cb8a65a21
commit 5660eba61c
Signed by: wn
GPG Key ID: 18FDFA577A8871AD

View File

@ -1,17 +1,62 @@
apiVersion: batch/v1
kind: CronJob
apiVersion: apps/v1
kind: Deployment
metadata:
name: pv-energy-calculator
name: nutri
labels:
app: nutri
spec:
schedule: "15 * * * *"
jobTemplate:
replicas: 1
selector:
matchLabels:
app: nutri
template:
metadata:
labels:
app: nutri
spec:
template:
spec:
restartPolicy: OnFailure
containers:
- name: pv-energy-calculator
image: %IMAGE%
envFrom:
- secretRef:
name: pv-energy-calculator
containers:
- name: nutri
image: %IMAGE%
envFrom:
- secretRef:
name: nutri-secrets
ports:
- containerPort: 8080
protocol: TCP
---
apiVersion: v1
kind: Service
metadata:
name: nutri
spec:
type: ClusterIP
selector:
app: nutri
ports:
- name: http
targetPort: 8080
port: 80
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: nutri
annotations:
cert-manager.io/cluster-issuer: letsencrypt-production-http
spec:
tls:
- hosts:
- nutri%POSTFIX%.hottis.de
secretName: nutri-cert
rules:
- host: nutri%POSTFIX%.hottis.de
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: nutri
port:
number: 80