~johnhamelink/k8s-grocy

375fcddaa5c121b6a180ef1e7dc91448201defb5 — John Hamelink 3 months ago
Added Grocy k8s configuration
4 files changed, 77 insertions(+), 0 deletions(-)

A deployment.yml
A ingress.yml
A pvc.yml
A service.yml
A  => deployment.yml +35 -0
@@ 1,35 @@
---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: grocy
spec:
  replicas: 1
  selector:
    matchLabels:
      name: grocy
  template:
    metadata:
      labels:
        name: grocy
    spec:
      containers:
      - name: grocy
        imagePullPolicy: Always
        image: linuxserver/grocy:latest
        ports:
          - containerPort: 9283
        volumeMounts:
          - name: db
            mountPath: /var/www/data
        env:
          - name: PUID
            value: "1000"
          - name: PGID
            value: "1000"
          - name: TZ
            value: "Europe/London"
      volumes:
        - name: db
          persistentVolumeClaim:
            claimName: grocy

A  => ingress.yml +20 -0
@@ 1,20 @@
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: grocy
  annotations:
    kubernetes.io/ingress.class: "nginx"
    cert-manager.io/cluster-issuer: "letsencrypt-production"
spec:
  tls:
    - hosts:
        - grocy.johnhame.link
      secretName: grocy-tls
  rules:
  - host: grocy.johnhame.link
    http:
      paths:
      - path: /
        backend:
          serviceName: grocy
          servicePort: 80

A  => pvc.yml +10 -0
@@ 1,10 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: grocy
spec:
  accessModes:
    - ReadWriteOnce
  resources:
    requests:
      storage: 1Gi

A  => service.yml +12 -0
@@ 1,12 @@
---
apiVersion: v1
kind: Service
metadata:
  name: grocy
spec:
  ports:
    - name: http
      port: 80
      targetPort: 80
  selector:
    name: grocy