First iteration of static grocy helm chart without templating.

This commit is contained in:
2022-05-01 09:57:23 +12:00
parent 13dcad1e2b
commit 4a7bae8c27
6 changed files with 111 additions and 0 deletions

24
grocy/Chart.yaml Normal file
View File

@ -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"

View File

@ -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

View File

@ -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

10
grocy/templates/pvc.yaml Normal file
View File

@ -0,0 +1,10 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: grocy
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 2Gi

View File

@ -0,0 +1,12 @@
---
apiVersion: v1
kind: Service
metadata:
name: grocy
spec:
ports:
- name: http
port: 80
targetPort: 80
selector:
name: grocy

1
grocy/values.yaml Normal file
View File

@ -0,0 +1 @@
replicaCount: 1