2 Commits

Author SHA1 Message Date
7b527a9242 use kubectl, fix 12
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
ci/woodpecker/tag/woodpecker Pipeline was successful
2023-11-17 16:32:29 +01:00
608156280d use kubectl, fix 11
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
ci/woodpecker/tag/woodpecker Pipeline was successful
2023-11-17 16:30:22 +01:00
2 changed files with 52 additions and 2 deletions

View File

@ -22,7 +22,7 @@ steps:
- printf "$KUBE_CONFIG_CONTENT" > /tmp/kubeconfig
- export KUBECONFIG=/tmp/kubeconfig
- cd $CI_WORKSPACE
- cat deploy-yml.tmpl | sed -e 's,%IMAGE%,gitea.hottis.de/'$CI_REPO':'$CI_COMMIT_TAG',' > deploy.yml
- cat deploy.yml
- pwd
- cat deployment/deploy-yml.tmpl | sed -e 's,%IMAGE%,gitea.hottis.de/'$CI_REPO':'$CI_COMMIT_TAG','
when:
- event: tag

View File

@ -0,0 +1,50 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: sinkserver
namespace: mainscnt
labels:
app: sinkserver
spec:
replicas: 1
selector:
matchLabels:
app: sinkserver
template:
metadata:
labels:
app: sinkserver
spec:
containers:
- name: sinkserver
image: %IMAGE%
ports:
- containerPort: 20169
protocol: UDP
env:
- name: PGHOST
valueFrom:
configMapKeyRef:
name: sinkserver-config
key: dbhost
- name: PGPASSWORD
valueFrom:
secretKeyRef:
name: sinkserver-secret
key: dbpass
---
apiVersion: v1
kind: Service
metadata:
name: sinkserver
namespace: mainscnt
labels:
app: sinkserver
spec:
type: LoadBalancer
selector:
app: sinkserver
ports:
- protocol: UDP
port: 20169
targetPort: 20169