all repos — infra @ 586f406a30787fd0c45fc122967f2a9a632280a6

infrastructure manifests and setup notes

apps/honk/honk.yaml (view raw)

 1apiVersion: apps/v1
 2kind: Deployment
 3metadata:
 4  name: honk
 5  labels:
 6    app: honk
 7spec:
 8  selector:
 9    matchLabels:
10      app: honk
11  template:
12    metadata:
13      labels:
14        app: honk
15    spec:
16      securityContext:
17        runAsUser: 1000
18        runAsGroup: 3000
19        fsGroup: 2000
20      containers:
21        - name: honk
22          image: sini:5000/honk:latest
23          imagePullPolicy: Always
24          volumeMounts:
25            - name: data
26              mountPath: /data
27              readOnly: false
28          ports:
29            - name: http
30              containerPort: 8080
31          args:
32            - -datadir
33            - /data
34      volumes:
35        - name: data
36          persistentVolumeClaim:
37            claimName: honk-data
38---
39apiVersion: v1
40kind: PersistentVolumeClaim
41metadata:
42  name: honk-data
43spec:
44  storageClassName: local-path
45  accessModes:
46    - ReadWriteOnce
47  resources:
48    requests:
49      storage: 5Gi
50---
51apiVersion: v1
52kind: Service
53metadata:
54  name: honk
55spec:
56  selector:
57    app: honk
58  ports:
59    - name: honk-http
60      port: 8080
61      targetPort: 8080
62---
63apiVersion: networking.k8s.io/v1
64kind: Ingress
65metadata:
66  name: h.icyphox.sh
67  namespace: default
68  annotations:
69    cert-manager.io/cluster-issuer: "letsencrypt-prod"
70    nginx.ingress.kubernetes.io/proxy-body-size: "50m"
71spec:
72  ingressClassName: nginx
73  tls:
74    - hosts:
75      - h.icyphox.sh
76      secretName: h-icyphox-sh-tls
77  rules:
78  - host: h.icyphox.sh
79    http:
80      paths:
81      - path: /
82        pathType: Prefix
83        backend:
84          service:
85            name: honk
86            port:
87              number: 8080