This commit is contained in:
Julien Cabillot
2021-10-12 19:15:46 -04:00
parent 5ebf39e0ae
commit f68fd6f67b
6 changed files with 50 additions and 43 deletions

View File

@@ -15,7 +15,7 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes # 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. # to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/) # Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.0.1 version: 0.0.3
# This is the version number of the application being deployed. This version number should be # 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 # incremented each time you make changes to the application. Versions are not expected to

View File

@@ -1,27 +1,10 @@
apiVersion: v1 apiVersion: v1
kind: ConfigMap kind: ConfigMap
metadata: metadata:
# TODO: truc full name ici ? name: {{ include "gotify.fullname" . }}
name: "gotify" labels:
# Pas de labels ? {{- include "gotify.labels" . | nindent 4 }}
{{- with .Values.env }}
data: data:
GOTIFY_DATABASE_CONNECTION: data/gotify.db {{- toYaml . | nindent 2 }}
GOTIFY_DATABASE_DIALECT: sqlite3 {{- end }}
GOTIFY_PASSSTRENGTH: "10"
GOTIFY_PLUGINSDIR: data/plugins
GOTIFY_SERVER_KEEPALIVEPERIODSECONDS: "0"
GOTIFY_SERVER_LISTENADDR: ""
GOTIFY_SERVER_PORT: "80"
GOTIFY_SERVER_RESPONSEHEADERS: 'X-Custom-Header: "custom value"'
GOTIFY_SERVER_SSL_CERTFILE: ""
GOTIFY_SERVER_SSL_CERTKEY: ""
GOTIFY_SERVER_SSL_ENABLED: "false"
GOTIFY_SERVER_SSL_LETSENCRYPT_ACCEPTTOS: "false"
GOTIFY_SERVER_SSL_LETSENCRYPT_CACHE: certs
GOTIFY_SERVER_SSL_LETSENCRYPT_ENABLED: "false"
GOTIFY_SERVER_SSL_LISTENADDR: ""
GOTIFY_SERVER_SSL_PORT: "443"
GOTIFY_SERVER_SSL_REDIRECTTOHTTPS: "true"
GOTIFY_SERVER_STREAM_PINGPERIODSECONDS: "45"
GOTIFY_UPLOADEDIMAGESDIR: data/images
TZ: America/Los_Angeles

View File

@@ -1,9 +1,9 @@
apiVersion: apps/v1 apiVersion: apps/v1
kind: Deployment kind: Deployment
metadata: metadata:
name: {{ include "fullname" . }} name: {{ include "gotify.fullname" . }}
labels: labels:
{{- include "labels" . | nindent 4 }} {{- include "gotify.labels" . | nindent 4 }}
spec: spec:
{{- if not .Values.autoscaling.enabled }} {{- if not .Values.autoscaling.enabled }}
replicas: {{ .Values.replicaCount }} replicas: {{ .Values.replicaCount }}
@@ -11,7 +11,7 @@ spec:
# TODO: il manque strategy.type = RollingUpdate # TODO: il manque strategy.type = RollingUpdate
selector: selector:
matchLabels: matchLabels:
{{- include "selectorLabels" . | nindent 6 }} {{- include "gotify.selectorLabels" . | nindent 6 }}
template: template:
metadata: metadata:
{{- with .Values.podAnnotations }} {{- with .Values.podAnnotations }}
@@ -19,7 +19,7 @@ spec:
{{- toYaml . | nindent 8 }} {{- toYaml . | nindent 8 }}
{{- end }} {{- end }}
labels: labels:
{{- include "selectorLabels" . | nindent 8 }} {{- include "gotify.selectorLabels" . | nindent 8 }}
spec: spec:
{{- with .Values.imagePullSecrets }} {{- with .Values.imagePullSecrets }}
imagePullSecrets: imagePullSecrets:
@@ -34,11 +34,11 @@ spec:
{{- toYaml .Values.securityContext | nindent 12 }} {{- toYaml .Values.securityContext | nindent 12 }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.image.pullPolicy }} imagePullPolicy: {{ .Values.image.pullPolicy }}
env: envFrom:
- configMapRef: - configMapRef:
name: {{ include "fullname" . }} name: {{ include "gotify.fullname" . }}
- secretRef: - secretRef:
name: {{ include "fullname" . }} name: {{ include "gotify.fullname" . }}
ports: ports:
- name: http - name: http
containerPort: 80 containerPort: 80
@@ -51,10 +51,6 @@ spec:
httpGet: httpGet:
path: / path: /
port: http port: http
# TODO: pas de volume mount ?
# TODO: ça sert à quoi encore ça ? :)
#resources:
# {{- toYaml .Values.resources | nindent 12 }}
{{- with .Values.nodeSelector }} {{- with .Values.nodeSelector }}
nodeSelector: nodeSelector:
{{- toYaml . | nindent 8 }} {{- toYaml . | nindent 8 }}

View File

@@ -1,8 +1,10 @@
apiVersion: v1 apiVersion: v1
kind: Secret kind: Secret
metadata: metadata:
# TODO: pas de label ici ? name: {{ include "gotify.fullname" . }}
name: {{ $fullName }} labels:
{{- include "gotify.labels" . | nindent 4 }}
type: Opaque
data: data:
user: {{ .Values.user }} user: {{ .Values.user | b64enc | quote }}
pass: {{ .Values.pass }} pass: {{ .Values.pass | b64enc | quote }}

View File

@@ -1,9 +1,9 @@
apiVersion: v1 apiVersion: v1
kind: Service kind: Service
metadata: metadata:
name: {{ include "fullname" . }} name: {{ include "gotify.fullname" . }}
labels: labels:
{{- include "labels" . | nindent 4 }} {{- include "gotify.labels" . | nindent 4 }}
spec: spec:
type: {{ .Values.service.type }} type: {{ .Values.service.type }}
ports: ports:
@@ -12,4 +12,4 @@ spec:
protocol: TCP protocol: TCP
name: http name: http
selector: selector:
{{- include "selectorLabels" . | nindent 4 }} {{- include "gotify.selectorLabels" . | nindent 4 }}

View File

@@ -15,6 +15,9 @@ nameOverride: ""
fullnameOverride: "" fullnameOverride: ""
automountServiceAccountToken: false automountServiceAccountToken: false
user: "admin"
pass: "admin"
serviceAccount: serviceAccount:
# Specifies whether a service account should be created # Specifies whether a service account should be created
create: false create: false
@@ -61,7 +64,7 @@ ingress:
ingressroute: ingressroute:
enabled: false enabled: false
host: 'chart-example.local' host: 'chart-example.local'
adminauth: 'dXNlcjpwYXNzd29yZA==' adminauth: ''
tls: [] tls: []
annotations: {} annotations: {}
@@ -89,3 +92,26 @@ nodeSelector: {}
tolerations: [] tolerations: []
affinity: {} affinity: {}
# TODO: pv/pvc for sqlite
env:
GOTIFY_DATABASE_CONNECTION: data/gotify.db
GOTIFY_DATABASE_DIALECT: sqlite3
GOTIFY_PASSSTRENGTH: "10"
GOTIFY_PLUGINSDIR: data/plugins
GOTIFY_SERVER_KEEPALIVEPERIODSECONDS: "0"
GOTIFY_SERVER_LISTENADDR: ""
GOTIFY_SERVER_PORT: "80"
#GOTIFY_SERVER_RESPONSEHEADERS: 'X-Custom-Header: "custom value"'
#GOTIFY_SERVER_SSL_CERTFILE: ""
#GOTIFY_SERVER_SSL_CERTKEY: ""
#GOTIFY_SERVER_SSL_ENABLED: "false"
#GOTIFY_SERVER_SSL_LETSENCRYPT_ACCEPTTOS: "false"
#GOTIFY_SERVER_SSL_LETSENCRYPT_CACHE: certs
##GOTIFY_SERVER_SSL_LETSENCRYPT_ENABLED: "false"
#GOTIFY_SERVER_SSL_LISTENADDR: ""
#GOTIFY_SERVER_SSL_PORT: "443"
#GOTIFY_SERVER_SSL_REDIRECTTOHTTPS: "true"
GOTIFY_SERVER_STREAM_PINGPERIODSECONDS: "45"
GOTIFY_UPLOADEDIMAGESDIR: data/images
TZ: America/New_York