/k8s

To get this branch, use:
bzr branch https://code.breezy-vcs.org/k8s
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
---
apiVersion: apps/v1
kind: Deployment
metadata:
 name: homepage
 labels:
    app.kubernetes.io/instance: breezy-site
spec:
 strategy:
   rollingUpdate:
     maxSurge: 1
     maxUnavailable: 1
   type: RollingUpdate
 replicas: 2
 selector:
   matchLabels:
     app: homepage
 template:
   metadata:
     labels:
       app: homepage
   spec:
     nodeSelector:
       kubernetes.io/arch: amd64
     containers:
       - name: homepage
         image: ghcr.io/breezy-team/homepage:latest
         imagePullPolicy: Always
         command:
           - node
           - /usr/bin/node-static
           - -a
           - 0.0.0.0
           - /code/output
         resources:
           limits:
             cpu: "500m"
             memory: "2Gi"
           requests:
             memory: "10M"
         ports:
           - containerPort: 8080
     imagePullSecrets:
      - name: ghcr-private
---
apiVersion: v1
kind: Service
metadata:
  name: homepage
  namespace: breezy
  labels:
    app.kubernetes.io/instance: breezy-site
spec:
  ports:
    - port: 8080
  selector:
    app: homepage
  type: ClusterIP
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: homepage
  namespace: breezy
  annotations:
    cert-manager.io/cluster-issuer: "letsencrypt-prod"
  labels:
    app.kubernetes.io/instance: breezy-site
spec:
  ingressClassName: nginx
  tls:
  - hosts:
    - www.breezy-vcs.org
    - breezy-vcs.org
    secretName: homepage-tls
  rules:
  - host: breezy-vcs.org
    http:
      paths:
      - backend:
          service:
            name: homepage
            port:
              number: 8080
        path: /
        pathType: Prefix
  - host: www.breezy-vcs.org
    http:
      paths:
      - backend:
          service:
            name: homepage
            port:
              number: 8080
        path: /
        pathType: Prefix