diff --git a/grocy/Chart.yaml b/grocy/Chart.yaml new file mode 100644 index 0000000..ddd55cc --- /dev/null +++ b/grocy/Chart.yaml @@ -0,0 +1,24 @@ +apiVersion: v2 +name: grocy +description: A Helm chart for deploying the grocy erp system on kubernetes. + +# A chart can be either an 'application' or a 'library' chart. +# +# Application charts are a collection of templates that can be packaged into versioned archives +# to be deployed. +# +# Library charts provide useful utilities or functions for the chart developer. They're included as +# a dependency of application charts to inject those utilities and functions into the rendering +# pipeline. Library charts do not define any templates and therefore cannot be deployed. +type: application + +# This is the chart version. This version number should be incremented each time you make changes +# to the chart and its templates, including the app version. +# Versions are expected to follow Semantic Versioning (https://semver.org/) +version: 0.1.0 + +# This is the version number of the application being deployed. This version number should be +# incremented each time you make changes to the application. Versions are not expected to +# follow Semantic Versioning. They should reflect the version the application is using. +# It is recommended to use it with quotes. +appVersion: "3.3.0" diff --git a/grocy/templates/deployment.yaml b/grocy/templates/deployment.yaml new file mode 100644 index 0000000..3df9c74 --- /dev/null +++ b/grocy/templates/deployment.yaml @@ -0,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: ghcr.io/linuxserver/grocy:latest + ports: + - containerPort: 9283 + volumeMounts: + - name: db + mountPath: /config + env: + - name: PUID + value: "1000" + - name: PGID + value: "1000" + - name: TZ + value: "Pacific/Auckland" + volumes: + - name: db + persistentVolumeClaim: + claimName: grocy diff --git a/grocy/templates/ingress.yaml b/grocy/templates/ingress.yaml new file mode 100644 index 0000000..02496b7 --- /dev/null +++ b/grocy/templates/ingress.yaml @@ -0,0 +1,29 @@ +--- +kind: Ingress +apiVersion: networking.k8s.io/v1 +metadata: + name: grocy + annotations: + kubernetes.io/ingress.class: nginx + cert-manager.io/cluster-issuer: "letsencrypt-prod" + nginx.ingress.kubernetes.io/configuration-snippet: | + more_set_headers "X-XSS-Protection: 1"; + more_set_headers "X-Content-Type-Options: nosniff"; + more_set_headers "X-Frame-Options: SAMEORIGIN"; + more_set_headers "Content-Security-Policy: frame-src 'self'; default-src 'self'; script-src 'self' 'unsafe-inline' 'unsafe-eval' https://nextcloud.jamma.life https://maxcdn.bootstrapcdn.com https://ajax.googleapis.com; img-src 'self' data: https://secure.gravatar.com; style-src 'self' 'unsafe-inline' https://maxcdn.bootstrapcdn.com https://fonts.googleapis.com; font-src 'self' data: https://maxcdn.bootstrapcdn.com https://fonts.gstatic.com; form-action 'self'; upgrade-insecure-requests"; + more_set_headers "Referrer-Policy: strict-origin-when-cross-origin"; + more_set_headers "Permissions-Policy: geolocation=(none);midi=(self);notifications=(self);push=(self);sync-xhr=();microphone=(none);camera=(none);magnetometer=(none);gyroscope=(none);speaker=(self);vibrate=(self);fullscreen=(self);payment=(none);"; + more_clear_headers "X-Powered-By"; + spec: + tls: + - hosts: + - grocy.jamma.life + secretName: tls-jamma-grocy + rules: + - host: grocy.jamma.life + http: + paths: + - path: / + backend: + serviceName: grocy + servicePort: 80 diff --git a/grocy/templates/pvc.yaml b/grocy/templates/pvc.yaml new file mode 100644 index 0000000..a467988 --- /dev/null +++ b/grocy/templates/pvc.yaml @@ -0,0 +1,10 @@ +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: grocy +spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 2Gi diff --git a/grocy/templates/service.yaml b/grocy/templates/service.yaml new file mode 100644 index 0000000..14254af --- /dev/null +++ b/grocy/templates/service.yaml @@ -0,0 +1,12 @@ +--- +apiVersion: v1 +kind: Service +metadata: + name: grocy +spec: + ports: + - name: http + port: 80 + targetPort: 80 + selector: + name: grocy diff --git a/grocy/values.yaml b/grocy/values.yaml new file mode 100644 index 0000000..ebf6be8 --- /dev/null +++ b/grocy/values.yaml @@ -0,0 +1 @@ +replicaCount: 1