cloud-demo/apps/hello-app/deployment.yaml
CodeGit 4ea6d8b9e5
Some checks failed
terraform / validate (push) Failing after 37s
Updated project to improve guidance
2026-09-03 19:06:27 +01:00

65 lines
1.7 KiB
YAML

# This app's own Deployment/Service/Ingress, hand-written rather than a
# Helm chart (see README.md "Why it's structured this way") — there's no
# upstream chart to track since the image is built by this repo's own CI
# (.forgejo/workflows/build-hello-app.yml).
apiVersion: apps/v1
kind: Deployment
metadata:
name: hello-app
namespace: hello-app
spec:
replicas: 1
selector:
matchLabels:
app: hello-app
template:
metadata:
labels:
app: hello-app
spec:
# Uncomment if the hello-app package is set to private in Forgejo
# (see docs/03-flux.md step 6).
# imagePullSecrets:
# - name: forgejo-registry
containers:
- name: hello-app
# Not a comment — this exact-format annotation is how Flux's
# image-automation "Setters" strategy (image-automation.yaml's
# ImageUpdateAutomation) finds this line and knows to rewrite the
# tag below in place, rather than needing this field templated.
# "hello-app:hello-app" is "<namespace>:<ImagePolicy name>".
# {"$imagepolicy": "hello-app:hello-app"}
image: git.boglabob.com/codegit/hello-app:latest
ports:
- containerPort: 80
---
apiVersion: v1
kind: Service
metadata:
name: hello-app
namespace: hello-app
spec:
selector:
app: hello-app
ports:
- port: 80
targetPort: 80
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: hello-app
namespace: hello-app
spec:
ingressClassName: traefik
rules:
- host: hello.boglabob.com
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: hello-app
port:
number: 80