aboutsummaryrefslogtreecommitdiff
path: root/apps/hello-world/deployment.yaml
blob: 29f3709ae98d302ca6f1c67d6450896977c0ceee (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: hello-world
  namespace: hello-world
spec:
  replicas: 2
  selector:
    matchLabels:
      app: hello-world
  template:
    metadata:
      labels:
        app: hello-world
    spec:
      containers:
      - name: nginx
        image: nginx:alpine
        ports:
        - containerPort: 80
        # Add a custom index page
        lifecycle:
          postStart:
            exec:
              command: ["/bin/sh", "-c", "echo '<html><body><h1>Hello from GitOps! 🚀</h1><p>Deployed via ArgoCD at '$(date)'</p></body></html>' > /usr/share/nginx/html/index.html"]
...