From 3b248733f408a280340144d9d48fd0378d4b93ed Mon Sep 17 00:00:00 2001 From: miwr Date: Mon, 14 Apr 2025 13:59:08 +0200 Subject: [PATCH] local thing --- .../stacks/ref-implementation/silly-game.yaml | 4 +- .../silly-game/configmap.yaml | 17 ++++++++ .../silly-game/deployment.yaml | 41 +++++++++++++++++++ 3 files changed, 60 insertions(+), 2 deletions(-) create mode 100644 template/stacks/ref-implementation/silly-game/configmap.yaml create mode 100644 template/stacks/ref-implementation/silly-game/deployment.yaml diff --git a/template/stacks/ref-implementation/silly-game.yaml b/template/stacks/ref-implementation/silly-game.yaml index 5a0dc60..8483758 100644 --- a/template/stacks/ref-implementation/silly-game.yaml +++ b/template/stacks/ref-implementation/silly-game.yaml @@ -10,9 +10,9 @@ metadata: spec: project: default source: - repoURL: https://forgejo.edf-bootstrap.cx.fg1.ffm.osc.live/DevFW-CICD/michals-silly-game-backend/src/branch/main/k8 + repoURL: https://{{{ .Env.DOMAIN_GITEA }}}/giteaAdmin/edfbuilder targetRevision: HEAD - path: . + path: "stacks/ref-implementation/silly-game" destination: server: "https://kubernetes.default.svc" namespace: silly-game diff --git a/template/stacks/ref-implementation/silly-game/configmap.yaml b/template/stacks/ref-implementation/silly-game/configmap.yaml new file mode 100644 index 0000000..9926ee7 --- /dev/null +++ b/template/stacks/ref-implementation/silly-game/configmap.yaml @@ -0,0 +1,17 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: silly-game-config + namespace: silly-game +data: + game-config.properties: | + spring.application.name=silly-game + + spring.mail.host=mailhog.mailhog.svc.cluster.local + spring.mail.port=1025 + spring.mail.username= + spring.mail.password= + spring.mail.properties.mail.smtp.auth=false + spring.mail.properties.mail.smtp.starttls.enable=false + + cors.allowed-origin=http://silly-game-service.silly-game.svc.cluster.local \ No newline at end of file diff --git a/template/stacks/ref-implementation/silly-game/deployment.yaml b/template/stacks/ref-implementation/silly-game/deployment.yaml new file mode 100644 index 0000000..14450c5 --- /dev/null +++ b/template/stacks/ref-implementation/silly-game/deployment.yaml @@ -0,0 +1,41 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: silly-game-deployment + namespace: silly-game +spec: + replicas: 1 + selector: + matchLabels: + app: silly-game + template: + metadata: + labels: + app: silly-game + spec: + containers: + - name: silly-game + image: forgejo.edf-bootstrap.cx.fg1.ffm.osc.live/devfw-cicd/michals-silly-game-backend:main + ports: + - containerPort: 8080 + volumeMounts: + - name: config-volume + mountPath: /config + volumes: + - name: config-volume + configMap: + name: silly-game-config + +--- + +apiVersion: v1 +kind: Service +metadata: + name: silly-game-service + namespace: silly-game +spec: + selector: + app: silly-game + ports: + - port: 80 + targetPort: 8080 \ No newline at end of file