Compare commits

...

2 Commits
0.0.3 ... 0.0.4

Author SHA1 Message Date
abc25a8e7f deployment
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
ci/woodpecker/tag/woodpecker Pipeline was successful
2025-01-27 19:03:21 +01:00
5660eba61c deployment snippet
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
2025-01-27 19:00:32 +01:00
2 changed files with 62 additions and 17 deletions

View File

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

View File

@ -38,9 +38,9 @@ kubectl create secret generic pv-stats \
--from-literal=OIDC_CLIENT_SECRETS="$OIDC_CLIENT_SECRETS" | \ --from-literal=OIDC_CLIENT_SECRETS="$OIDC_CLIENT_SECRETS" | \
kubectl apply -f - -n $NAMESPACE kubectl apply -f - -n $NAMESPACE
# cat $DEPLOYMENT_DIR/deploy-yml.tmpl | \ cat $DEPLOYMENT_DIR/deploy-yml.tmpl | \
# sed -e 's,%IMAGE%,'$IMAGE_NAME':'$IMAGE_TAG','g | \ sed -e 's,%IMAGE%,'$IMAGE_NAME':'$IMAGE_TAG','g | \
# kubectl apply -f - -n $NAMESPACE kubectl apply -f - -n $NAMESPACE
popd > /dev/null popd > /dev/null