Skip to content
Snippets Groups Projects
Verified Commit 5c0c8ff8 authored by Janne Mareike Koschinski's avatar Janne Mareike Koschinski
Browse files

feat: sync recent updates

parent 2926c90c
No related branches found
No related tags found
No related merge requests found
Showing
with 184 additions and 98 deletions
apiVersion: v2
name: actual
description: Helm Chart for actual
type: application
version: 1.1.0
appVersion: "sha-529c42c-alpine"
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ include "actual-helm.fullname" . }}
labels:
{{- include "actual-helm.labels" . | nindent 4 }}
data:
"config.json": |-
{
"mode": "production",
"port": 8080,
"hostname": "0.0.0.0",
"serverFiles": "/data/server-files",
"userFiles": "/data/user-files",
"sync": "{{ .Values.syncMode }}"
}
...@@ -2,5 +2,5 @@ apiVersion: v2 ...@@ -2,5 +2,5 @@ apiVersion: v2
name: jellyfin name: jellyfin
description: Helm Chart for Jellyfin description: Helm Chart for Jellyfin
type: application type: application
version: 1.2.0 version: 1.3.0
appVersion: "10.8.7" appVersion: "10.8.10"
...@@ -2,5 +2,5 @@ apiVersion: v2 ...@@ -2,5 +2,5 @@ apiVersion: v2
name: mastodon name: mastodon
description: Helm Chart for mastodon description: Helm Chart for mastodon
type: application type: application
version: 0.4.0 version: 0.4.2
appVersion: "v4.0" appVersion: "v4.1"
apiVersion: apps/v1 apiVersion: apps/v1
kind: ReplicaSet kind: Deployment
metadata: metadata:
name: {{ include "mastodon-helm.fullname" . }}-tootctl name: {{ include "mastodon-helm.fullname" . }}-tootctl
labels: labels:
component: tootctl component: tootctl
{{- include "mastodon-helm.labels" . | nindent 4 }} {{- include "mastodon-helm.labels" . | nindent 4 }}
spec: spec:
replicas: {{ .Values.replicaCount }}
selector: selector:
matchLabels: matchLabels:
component: tootctl component: tootctl
{{- include "mastodon-helm.labels" . | nindent 6 }} {{- include "mastodon-helm.selectorLabels" . | nindent 6 }}
template: template:
metadata: metadata:
name: {{ include "mastodon-helm.fullname" . }}-tootctl {{- with .Values.podAnnotations }}
annotations:
{{- toYaml . | nindent 8 }}
{{- end }}
labels: labels:
component: tootctl component: tootctl
{{- include "mastodon-helm.labels" . | nindent 8 }} {{- include "mastodon-helm.selectorLabels" . | nindent 8 }}
spec: spec:
{{- with .Values.imagePullSecrets }} {{- with .Values.imagePullSecrets }}
imagePullSecrets: imagePullSecrets:
......
...@@ -6,7 +6,7 @@ fullnameOverride: "" ...@@ -6,7 +6,7 @@ fullnameOverride: ""
web: web:
repository: tootsuite/mastodon repository: tootsuite/mastodon
pullPolicy: IfNotPresent pullPolicy: Always
tag: "" tag: ""
resources: resources:
limits: limits:
...@@ -18,7 +18,7 @@ web: ...@@ -18,7 +18,7 @@ web:
streaming: streaming:
repository: tootsuite/mastodon repository: tootsuite/mastodon
pullPolicy: IfNotPresent pullPolicy: Always
tag: "" tag: ""
resources: resources:
limits: limits:
...@@ -30,7 +30,7 @@ streaming: ...@@ -30,7 +30,7 @@ streaming:
sidekiq: sidekiq:
repository: tootsuite/mastodon repository: tootsuite/mastodon
pullPolicy: IfNotPresent pullPolicy: Always
tag: "" tag: ""
resources: resources:
limits: limits:
......
...@@ -2,5 +2,5 @@ apiVersion: v2 ...@@ -2,5 +2,5 @@ apiVersion: v2
name: postgresql name: postgresql
description: Helm Chart for postgresql description: Helm Chart for postgresql
type: application type: application
version: 1.3.0 version: 1.4.0
appVersion: "15" appVersion: "15"
...@@ -8,14 +8,5 @@ metadata: ...@@ -8,14 +8,5 @@ metadata:
labels: labels:
{{- include "postgresql-helm.labels" . | nindent 4 }} {{- include "postgresql-helm.labels" . | nindent 4 }}
type: Opaque type: Opaque
data: stringData:
{{ if empty .Values.postgresPassword }}
# retrieve the secret data using lookup function and when not exists, return an empty dictionary / map as result
{{- $secretObj := (lookup "v1" "Secret" .Release.Namespace $fullname) | default dict }}
{{- $secretData := (get $secretObj "data") | default dict }}
# set $secret to existing secret data or generate a random one when not exists
{{- $secretValue := (get $secretData $fullname) | default (randAlphaNum 48 | b64enc) }}
postgres-password: {{ $secretValue | quote }}
{{ else }}
postgres-password: "{{ .Values.postgresPassword }}" postgres-password: "{{ .Values.postgresPassword }}"
{{ end }}
...@@ -2,6 +2,12 @@ apiVersion: v1 ...@@ -2,6 +2,12 @@ apiVersion: v1
kind: Service kind: Service
metadata: metadata:
name: {{ include "postgresql-helm.fullname" . }} name: {{ include "postgresql-helm.fullname" . }}
{{ if .Values.exporter.enabled }}
annotations:
prometheus.io/path: "/metrics"
prometheus.io/port: "9187"
prometheus.io/scrape: "true"
{{ end }}
labels: labels:
{{- include "postgresql-helm.labels" . | nindent 4 }} {{- include "postgresql-helm.labels" . | nindent 4 }}
spec: spec:
...@@ -11,5 +17,11 @@ spec: ...@@ -11,5 +17,11 @@ spec:
targetPort: sql targetPort: sql
protocol: TCP protocol: TCP
name: sql name: sql
{{ if .Values.exporter.enabled }}
- port: 9187
targetPort: metrics
protocol: TCP
name: metrics
{{ end }}
selector: selector:
{{- include "postgresql-helm.selectorLabels" . | nindent 4 }} {{- include "postgresql-helm.selectorLabels" . | nindent 4 }}
...@@ -62,7 +62,7 @@ spec: ...@@ -62,7 +62,7 @@ spec:
command: command:
- sh - sh
- -c - -c
- exec pg_isready --host localhost - pg_isready --host localhost && psql -c "ALTER USER postgres WITH PASSWORD '${POSTGRES_PASSWORD}';"
livenessProbe: livenessProbe:
exec: exec:
command: command:
...@@ -93,6 +93,43 @@ spec: ...@@ -93,6 +93,43 @@ spec:
name: certs name: certs
subPath: tls.key subPath: tls.key
{{- end }} {{- end }}
{{ if .Values.exporter.enabled }}
- name: exporter
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
image: "{{ .Values.exporter.repository }}:{{ .Values.exporter.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
env:
- name: PG_EXPORTER_AUTO_DISCOVER_DATABASES
value: "true"
- name: DATA_SOURCE_URI
value: "localhost"
- name: DATA_SOURCE_USER
value: "postgres"
- name: DATA_SOURCE_PASS
valueFrom:
secretKeyRef:
key: "postgres-password"
name: {{ include "postgresql-helm.fullname" . }}
ports:
- name: metrics
containerPort: 9187
protocol: TCP
startupProbe:
httpGet:
port: metrics
path: /metrics
livenessProbe:
httpGet:
port: metrics
path: /metrics
readinessProbe:
httpGet:
port: metrics
path: /metrics
resources:
{{- toYaml .Values.exporter.resources | nindent 12 }}
{{ end }}
{{- with .Values.nodeSelector }} {{- with .Values.nodeSelector }}
nodeSelector: nodeSelector:
{{- toYaml . | nindent 8 }} {{- toYaml . | nindent 8 }}
......
...@@ -12,8 +12,7 @@ fullnameOverride: "" ...@@ -12,8 +12,7 @@ fullnameOverride: ""
volume: |- volume: |-
emptyDir: {} emptyDir: {}
# if left empty, one will be auto-generated postgresPassword: "hunter2"
postgresPassword: ""
tls: tls:
enabled: false enabled: false
...@@ -29,6 +28,12 @@ securityContext: ...@@ -29,6 +28,12 @@ securityContext:
runAsUser: 70 runAsUser: 70
runAsGroup: 70 runAsGroup: 70
exporter:
enabled: true
repository: quay.io/prometheuscommunity/postgres-exporter
tag: "v0.12.0"
resources: {}
resources: {} resources: {}
# limits: # limits:
# cpu: 500m # cpu: 500m
......
...@@ -2,5 +2,5 @@ apiVersion: v2 ...@@ -2,5 +2,5 @@ apiVersion: v2
name: powerdns name: powerdns
description: Helm Chart for powerdns-Core description: Helm Chart for powerdns-Core
type: application type: application
version: 1.0.2 version: 1.0.3
appVersion: "4.7.3" appVersion: "4.7.4"
apiVersion: v2
name: quassel-search
description: Helm Chart for quassel-search
type: application
version: 1.0.0
appVersion: "014d624e"
lint-actual: lint-quassel-search:
stage: lint stage: lint
rules: rules:
- changes: - changes:
- actual/**/* - quassel-search/**/*
script: script:
- helm lint actual - helm lint quassel-search
release-actual: release-quassel-search:
stage: release stage: release
needs: needs:
- lint-actual - lint-quassel-search
rules: rules:
- if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH' - if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH'
changes: changes:
- actual/**/* - quassel-search/**/*
script: script:
- apk add --no-cache git - apk add --no-cache git
- helm plugin install https://github.com/chartmuseum/helm-push.git - helm plugin install https://github.com/chartmuseum/helm-push.git
- helm repo add --username gitlab-ci-token --password $CI_JOB_TOKEN repo ${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/helm/stable - helm repo add --username gitlab-ci-token --password $CI_JOB_TOKEN repo ${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/helm/stable
- helm cm-push actual repo - helm cm-push quassel-search repo
{{/* {{/*
Expand the name of the chart. Expand the name of the chart.
*/}} */}}
{{- define "actual-helm.name" -}} {{- define "quassel-search-helm.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }} {{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
{{- end }} {{- end }}
...@@ -10,7 +10,7 @@ Create a default fully qualified app name. ...@@ -10,7 +10,7 @@ Create a default fully qualified app name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
If release name contains chart name it will be used as a full name. If release name contains chart name it will be used as a full name.
*/}} */}}
{{- define "actual-helm.fullname" -}} {{- define "quassel-search-helm.fullname" -}}
{{- if .Values.fullnameOverride }} {{- if .Values.fullnameOverride }}
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }} {{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
{{- else }} {{- else }}
...@@ -26,16 +26,16 @@ If release name contains chart name it will be used as a full name. ...@@ -26,16 +26,16 @@ If release name contains chart name it will be used as a full name.
{{/* {{/*
Create chart name and version as used by the chart label. Create chart name and version as used by the chart label.
*/}} */}}
{{- define "actual-helm.chart" -}} {{- define "quassel-search-helm.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} {{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
{{- end }} {{- end }}
{{/* {{/*
Common labels Common labels
*/}} */}}
{{- define "actual-helm.labels" -}} {{- define "quassel-search-helm.labels" -}}
helm.sh/chart: {{ include "actual-helm.chart" . }} helm.sh/chart: {{ include "quassel-search-helm.chart" . }}
{{ include "actual-helm.selectorLabels" . }} {{ include "quassel-search-helm.selectorLabels" . }}
{{- if .Chart.AppVersion }} {{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }} {{- end }}
...@@ -45,12 +45,12 @@ app.kubernetes.io/managed-by: {{ .Release.Service }} ...@@ -45,12 +45,12 @@ app.kubernetes.io/managed-by: {{ .Release.Service }}
{{/* {{/*
Selector labels Selector labels
*/}} */}}
{{- define "actual-helm.selectorLabels" -}} {{- define "quassel-search-helm.selectorLabels" -}}
app.kubernetes.io/name: {{ include "actual-helm.name" . }} app.kubernetes.io/name: {{ include "quassel-search-helm.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }} app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }} {{- end }}
{{- define "actual-helm.sslPath" -}} {{- define "quassel-search-helm.sslPath" -}}
/certs /certs
{{- end }} {{- end }}
apiVersion: apps/v1 apiVersion: apps/v1
kind: Deployment kind: Deployment
metadata: metadata:
name: {{ include "actual-helm.fullname" . }} name: {{ include "quassel-search-helm.fullname" . }}
labels: labels:
{{- include "actual-helm.labels" . | nindent 4 }} {{- include "quassel-search-helm.labels" . | nindent 4 }}
spec: spec:
replicas: {{ .Values.replicaCount }} replicas: {{ .Values.replicaCount }}
selector: selector:
matchLabels: matchLabels:
{{- include "actual-helm.selectorLabels" . | nindent 6 }} {{- include "quassel-search-helm.selectorLabels" . | nindent 6 }}
template: template:
metadata: metadata:
{{- with .Values.podAnnotations }} {{- with .Values.podAnnotations }}
...@@ -16,7 +16,7 @@ spec: ...@@ -16,7 +16,7 @@ spec:
{{- toYaml . | nindent 8 }} {{- toYaml . | nindent 8 }}
{{- end }} {{- end }}
labels: labels:
{{- include "actual-helm.selectorLabels" . | nindent 8 }} {{- include "quassel-search-helm.selectorLabels" . | nindent 8 }}
spec: spec:
{{- with .Values.imagePullSecrets }} {{- with .Values.imagePullSecrets }}
imagePullSecrets: imagePullSecrets:
...@@ -25,11 +25,11 @@ spec: ...@@ -25,11 +25,11 @@ spec:
securityContext: securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }} {{- toYaml .Values.podSecurityContext | nindent 8 }}
volumes: volumes:
- name: data - name: tmp
{{- .Values.volume | nindent 10 }} emptyDir: {}
- name: config - name: config
configMap: secret:
name: {{ include "actual-helm.fullname" . }} secretName: {{ include "quassel-search-helm.fullname" . }}
containers: containers:
- name: {{ .Chart.Name }} - name: {{ .Chart.Name }}
securityContext: securityContext:
...@@ -41,25 +41,31 @@ spec: ...@@ -41,25 +41,31 @@ spec:
containerPort: 8080 containerPort: 8080
protocol: TCP protocol: TCP
startupProbe: startupProbe:
httpGet: exec:
path: / command:
port: http - curl
- "--fail"
- http://127.0.0.1:8080/fpm-ping
livenessProbe: livenessProbe:
httpGet: exec:
path: / command:
port: http - curl
- "--fail"
- http://127.0.0.1:8080/fpm-ping
readinessProbe: readinessProbe:
httpGet: exec:
path: / command:
port: http - curl
- "--fail"
- http://127.0.0.1:8080/fpm-ping
resources: resources:
{{- toYaml .Values.resources | nindent 12 }} {{- toYaml .Values.resources | nindent 12 }}
volumeMounts: volumeMounts:
- mountPath: "/app/config.json" - mountPath: "/run"
name: tmp
- mountPath: "/var/www/html/qrs_config.php"
name: config name: config
subPath: "config.json" subPath: "config.php"
- mountPath: "/data"
name: data
{{- with .Values.nodeSelector }} {{- with .Values.nodeSelector }}
nodeSelector: nodeSelector:
{{- toYaml . | nindent 8 }} {{- toYaml . | nindent 8 }}
......
apiVersion: networking.k8s.io/v1 apiVersion: networking.k8s.io/v1
kind: Ingress kind: Ingress
metadata: metadata:
name: {{ include "actual-helm.fullname" . }} name: {{ include "quassel-search-helm.fullname" . }}
labels: labels:
{{- include "actual-helm.labels" . | nindent 4 }} {{- include "quassel-search-helm.labels" . | nindent 4 }}
annotations: annotations:
{{- .Values.ingress.annotations | toYaml | nindent 4 }} {{- .Values.ingress.annotations | toYaml | nindent 4 }}
spec: spec:
...@@ -14,7 +14,7 @@ spec: ...@@ -14,7 +14,7 @@ spec:
- path: "{{ .Values.ingress.path }}" - path: "{{ .Values.ingress.path }}"
backend: backend:
service: service:
name: {{ include "actual-helm.fullname" . }} name: {{ include "quassel-search-helm.fullname" . }}
port: port:
name: http name: http
pathType: Prefix pathType: Prefix
apiVersion: v1
kind: Secret
metadata:
name: {{ include "quassel-search-helm.fullname" . }}
labels:
{{- include "quassel-search-helm.labels" . | nindent 4 }}
stringData:
"config.php": |-
<?php
define('qrs_db_host', '{{ .Values.config.postgres.hostname }}');
define('qrs_db_port', {{ .Values.config.postgres.port }});
define('qrs_db_name', '{{ .Values.config.postgres.database }}');
// Only change this if you know what you are doing
define('qrs_db_connector', null);
define('qrs_db_user', '{{ .Values.config.postgres.username }}');
define('qrs_db_pass', '{{ .Values.config.postgres.password }}');
define('qrs_db_option_tsqueryfunction', "websearchto_tsquery_multilang(:query)");
// Timeout in milliseconds
define('qrs_db_option_timeout', 5000);
define('qrs_backend', 'pgsql-smart');
define('qrs_enable_ranking', false);
define('qrs_path_prefix', '{{ .Values.ingress.path }}');
apiVersion: v1 apiVersion: v1
kind: Service kind: Service
metadata: metadata:
name: {{ include "actual-helm.fullname" . }} name: {{ include "quassel-search-helm.fullname" . }}
labels: labels:
{{- include "actual-helm.labels" . | nindent 4 }} {{- include "quassel-search-helm.labels" . | nindent 4 }}
spec: spec:
type: {{ .Values.service.type }} type: {{ .Values.service.type }}
ports: ports:
...@@ -12,4 +12,4 @@ spec: ...@@ -12,4 +12,4 @@ spec:
protocol: TCP protocol: TCP
name: http name: http
selector: selector:
{{- include "actual-helm.selectorLabels" . | nindent 4 }} {{- include "quassel-search-helm.selectorLabels" . | nindent 4 }}
replicaCount: 1 replicaCount: 1
image: image:
repository: jlongster/actual-server repository: k8r.eu/justjanne/quassel-rest-search
pullPolicy: IfNotPresent pullPolicy: IfNotPresent
tag: "" tag: ""
...@@ -9,10 +9,13 @@ imagePullSecrets: [ ] ...@@ -9,10 +9,13 @@ imagePullSecrets: [ ]
nameOverride: "" nameOverride: ""
fullnameOverride: "" fullnameOverride: ""
syncMode: simple config:
postgres:
volume: |- hostname: "localhost"
emptyDir: {} port: 5432
database: "quassel"
username: "quassel"
password: "hunter2"
service: service:
type: ClusterIP type: ClusterIP
...@@ -20,6 +23,7 @@ service: ...@@ -20,6 +23,7 @@ service:
ingress: ingress:
host: "example.com" host: "example.com"
path: "/" path: "/"
origins: [ ]
annotations: { } annotations: { }
podAnnotations: { } podAnnotations: { }
...@@ -36,11 +40,11 @@ securityContext: ...@@ -36,11 +40,11 @@ securityContext:
resources: resources:
limits: limits:
cpu: 500m cpu: 200m
memory: 512Mi memory: 128M
requests: requests:
cpu: 10m cpu: 50m
memory: 64Mi memory: 64M
nodeSelector: { } nodeSelector: { }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment