cloud-demo/apps/hello-app/deployment.yaml
fluxcdbot 2337bc4dbf chore(hello-app): auto-update image
git.boglabob.com/codegit/hello-app:main-eeb92c5-1788522079
2026-09-04 11:41:27 +00:00

67 lines
2 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
# The trailing comment on the image line below (not this one) is
# how Flux's image-automation "Setters" strategy finds this field
# and knows to rewrite the tag in place, rather than needing it
# templated. It must be a trailing comment on the image: line
# itself - Flux's YAML parser attaches comments to the node on
# their own line, so a marker on a line above never associates
# with the field below it and silently never matches anything.
# "hello-app:hello-app" is "<namespace>:<ImagePolicy name>".
image: git.boglabob.com/codegit/hello-app:main-eeb92c5-1788522079 # {"$imagepolicy": "hello-app:hello-app"}
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