diff --git a/actual/Chart.yaml b/actual/Chart.yaml deleted file mode 100644 index 76e16bc9865653ca6ec08de3f6007c6c7f1b6a08..0000000000000000000000000000000000000000 --- a/actual/Chart.yaml +++ /dev/null @@ -1,6 +0,0 @@ -apiVersion: v2 -name: actual -description: Helm Chart for actual -type: application -version: 1.1.0 -appVersion: "sha-529c42c-alpine" diff --git a/actual/templates/configmap.yaml b/actual/templates/configmap.yaml deleted file mode 100644 index 1a53ff3813647671a9e7881052ff9d5aa62c6ebf..0000000000000000000000000000000000000000 --- a/actual/templates/configmap.yaml +++ /dev/null @@ -1,16 +0,0 @@ -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 }}" - } diff --git a/actual/templates/service.yaml b/actual/templates/service.yaml deleted file mode 100644 index 0f89c2e82efef3414b14ee23b250b7ef2c568a12..0000000000000000000000000000000000000000 --- a/actual/templates/service.yaml +++ /dev/null @@ -1,15 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: {{ include "actual-helm.fullname" . }} - labels: - {{- include "actual-helm.labels" . | nindent 4 }} -spec: - type: {{ .Values.service.type }} - ports: - - port: 80 - targetPort: http - protocol: TCP - name: http - selector: - {{- include "actual-helm.selectorLabels" . | nindent 4 }} diff --git a/jellyfin/Chart.yaml b/jellyfin/Chart.yaml index bc1c7f9467126e93b19510d45dbe3c62914d18e4..b5acde40931107e698e117f3b49e98a1d8f03b6e 100644 --- a/jellyfin/Chart.yaml +++ b/jellyfin/Chart.yaml @@ -2,5 +2,5 @@ apiVersion: v2 name: jellyfin description: Helm Chart for Jellyfin type: application -version: 1.2.0 -appVersion: "10.8.7" +version: 1.3.0 +appVersion: "10.8.10" diff --git a/mastodon/Chart.yaml b/mastodon/Chart.yaml index eb6c614804e0f52051c4ead6efc2c1bf063d23af..e122deb371931bbaeaa862af3bff69320a387ad8 100644 --- a/mastodon/Chart.yaml +++ b/mastodon/Chart.yaml @@ -2,5 +2,5 @@ apiVersion: v2 name: mastodon description: Helm Chart for mastodon type: application -version: 0.4.0 -appVersion: "v4.0" +version: 0.4.2 +appVersion: "v4.1" diff --git a/mastodon/templates/replicaset-tootctl.yaml b/mastodon/templates/deployment-tootctl.yaml similarity index 84% rename from mastodon/templates/replicaset-tootctl.yaml rename to mastodon/templates/deployment-tootctl.yaml index f9544bf8dedf1c0f9de7853d41d62d1b926764fe..c839a5c1be988199e8fba6bc274a42f7a6208c84 100644 --- a/mastodon/templates/replicaset-tootctl.yaml +++ b/mastodon/templates/deployment-tootctl.yaml @@ -1,21 +1,25 @@ apiVersion: apps/v1 -kind: ReplicaSet +kind: Deployment metadata: name: {{ include "mastodon-helm.fullname" . }}-tootctl labels: component: tootctl {{- include "mastodon-helm.labels" . | nindent 4 }} spec: + replicas: {{ .Values.replicaCount }} selector: matchLabels: component: tootctl - {{- include "mastodon-helm.labels" . | nindent 6 }} + {{- include "mastodon-helm.selectorLabels" . | nindent 6 }} template: metadata: - name: {{ include "mastodon-helm.fullname" . }}-tootctl + {{- with .Values.podAnnotations }} + annotations: + {{- toYaml . | nindent 8 }} + {{- end }} labels: component: tootctl - {{- include "mastodon-helm.labels" . | nindent 8 }} + {{- include "mastodon-helm.selectorLabels" . | nindent 8 }} spec: {{- with .Values.imagePullSecrets }} imagePullSecrets: diff --git a/mastodon/values.yaml b/mastodon/values.yaml index 442bdbe73fa3ded7cf2e4819a272173c8c02fe5e..125d5eca6b3a24e3bd9dcb1cfe0d44fdb23d5f1d 100644 --- a/mastodon/values.yaml +++ b/mastodon/values.yaml @@ -6,7 +6,7 @@ fullnameOverride: "" web: repository: tootsuite/mastodon - pullPolicy: IfNotPresent + pullPolicy: Always tag: "" resources: limits: @@ -18,7 +18,7 @@ web: streaming: repository: tootsuite/mastodon - pullPolicy: IfNotPresent + pullPolicy: Always tag: "" resources: limits: @@ -30,7 +30,7 @@ streaming: sidekiq: repository: tootsuite/mastodon - pullPolicy: IfNotPresent + pullPolicy: Always tag: "" resources: limits: diff --git a/postgresql/Chart.yaml b/postgresql/Chart.yaml index 65074a00d394ca65bea60a6846ff1dc6c8a996cb..b61c3835e9f0b0cea0638c540d4eaa3c7ff84555 100644 --- a/postgresql/Chart.yaml +++ b/postgresql/Chart.yaml @@ -2,5 +2,5 @@ apiVersion: v2 name: postgresql description: Helm Chart for postgresql type: application -version: 1.3.0 +version: 1.4.0 appVersion: "15" diff --git a/postgresql/templates/secret.yaml b/postgresql/templates/secret.yaml index 03682e90b21ece54e31a13cbda50add3461ba546..12d4513f178ac5db13e6016dbed8d7c4dfdf68c2 100644 --- a/postgresql/templates/secret.yaml +++ b/postgresql/templates/secret.yaml @@ -8,14 +8,5 @@ metadata: labels: {{- include "postgresql-helm.labels" . | nindent 4 }} type: Opaque -data: - {{ 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 }} +stringData: postgres-password: "{{ .Values.postgresPassword }}" - {{ end }} diff --git a/postgresql/templates/service.yaml b/postgresql/templates/service.yaml index fd327079367e868b5a8dc5623c67d844372569da..cebf99c9bac0086fc2017f80662286d182fc764d 100644 --- a/postgresql/templates/service.yaml +++ b/postgresql/templates/service.yaml @@ -2,6 +2,12 @@ apiVersion: v1 kind: Service metadata: name: {{ include "postgresql-helm.fullname" . }} + {{ if .Values.exporter.enabled }} + annotations: + prometheus.io/path: "/metrics" + prometheus.io/port: "9187" + prometheus.io/scrape: "true" + {{ end }} labels: {{- include "postgresql-helm.labels" . | nindent 4 }} spec: @@ -11,5 +17,11 @@ spec: targetPort: sql protocol: TCP name: sql + {{ if .Values.exporter.enabled }} + - port: 9187 + targetPort: metrics + protocol: TCP + name: metrics + {{ end }} selector: {{- include "postgresql-helm.selectorLabels" . | nindent 4 }} diff --git a/postgresql/templates/statefulset.yaml b/postgresql/templates/statefulset.yaml index 0e684eda3c25d3a9df410b64846e19b6409da287..ff4496be8d71a2302107c5751f21020c6713f530 100644 --- a/postgresql/templates/statefulset.yaml +++ b/postgresql/templates/statefulset.yaml @@ -62,7 +62,7 @@ spec: command: - sh - -c - - exec pg_isready --host localhost + - pg_isready --host localhost && psql -c "ALTER USER postgres WITH PASSWORD '${POSTGRES_PASSWORD}';" livenessProbe: exec: command: @@ -93,6 +93,43 @@ spec: name: certs subPath: tls.key {{- 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 }} nodeSelector: {{- toYaml . | nindent 8 }} diff --git a/postgresql/values.yaml b/postgresql/values.yaml index 84b1c63432671ab1f4d4398dc7bc50e48e348261..68115af6090752b97846bd073b84b89a64cb63cf 100644 --- a/postgresql/values.yaml +++ b/postgresql/values.yaml @@ -12,8 +12,7 @@ fullnameOverride: "" volume: |- emptyDir: {} -# if left empty, one will be auto-generated -postgresPassword: "" +postgresPassword: "hunter2" tls: enabled: false @@ -29,6 +28,12 @@ securityContext: runAsUser: 70 runAsGroup: 70 +exporter: + enabled: true + repository: quay.io/prometheuscommunity/postgres-exporter + tag: "v0.12.0" + resources: {} + resources: {} # limits: # cpu: 500m diff --git a/powerdns/Chart.yaml b/powerdns/Chart.yaml index 7dd77ffa1be3a2914092ea6455caa2cb4e164e6b..a947170786f0af826ada8e44bd22cc9a4381ed3f 100644 --- a/powerdns/Chart.yaml +++ b/powerdns/Chart.yaml @@ -2,5 +2,5 @@ apiVersion: v2 name: powerdns description: Helm Chart for powerdns-Core type: application -version: 1.0.2 -appVersion: "4.7.3" +version: 1.0.3 +appVersion: "4.7.4" diff --git a/quassel-search/Chart.yaml b/quassel-search/Chart.yaml new file mode 100644 index 0000000000000000000000000000000000000000..1782f89878636ba4699e5e13e9dcab9816fc7e44 --- /dev/null +++ b/quassel-search/Chart.yaml @@ -0,0 +1,6 @@ +apiVersion: v2 +name: quassel-search +description: Helm Chart for quassel-search +type: application +version: 1.0.0 +appVersion: "014d624e" diff --git a/actual/pipeline.yml b/quassel-search/pipeline.yml similarity index 66% rename from actual/pipeline.yml rename to quassel-search/pipeline.yml index a245712d4f2f3a4e1fa153fc19e1de658671d7ee..8703f0d01f3366bcf52c7c651cc7a996d884b29b 100644 --- a/actual/pipeline.yml +++ b/quassel-search/pipeline.yml @@ -1,21 +1,21 @@ -lint-actual: +lint-quassel-search: stage: lint rules: - changes: - - actual/**/* + - quassel-search/**/* script: - - helm lint actual + - helm lint quassel-search -release-actual: +release-quassel-search: stage: release needs: - - lint-actual + - lint-quassel-search rules: - if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH' changes: - - actual/**/* + - quassel-search/**/* script: - apk add --no-cache 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 cm-push actual repo + - helm cm-push quassel-search repo diff --git a/actual/templates/_helpers.tpl b/quassel-search/templates/_helpers.tpl similarity index 72% rename from actual/templates/_helpers.tpl rename to quassel-search/templates/_helpers.tpl index 65f41dc70d25bb362ad8a0d9449f2fe7b361128b..96ce3646555dd6f59524d46fbcb47eef5e109bdf 100644 --- a/actual/templates/_helpers.tpl +++ b/quassel-search/templates/_helpers.tpl @@ -1,7 +1,7 @@ {{/* Expand the name of the chart. */}} -{{- define "actual-helm.name" -}} +{{- define "quassel-search-helm.name" -}} {{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }} {{- end }} @@ -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). 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 }} {{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }} {{- else }} @@ -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. */}} -{{- define "actual-helm.chart" -}} +{{- define "quassel-search-helm.chart" -}} {{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} {{- end }} {{/* Common labels */}} -{{- define "actual-helm.labels" -}} -helm.sh/chart: {{ include "actual-helm.chart" . }} -{{ include "actual-helm.selectorLabels" . }} +{{- define "quassel-search-helm.labels" -}} +helm.sh/chart: {{ include "quassel-search-helm.chart" . }} +{{ include "quassel-search-helm.selectorLabels" . }} {{- if .Chart.AppVersion }} app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} {{- end }} @@ -45,12 +45,12 @@ app.kubernetes.io/managed-by: {{ .Release.Service }} {{/* Selector labels */}} -{{- define "actual-helm.selectorLabels" -}} -app.kubernetes.io/name: {{ include "actual-helm.name" . }} +{{- define "quassel-search-helm.selectorLabels" -}} +app.kubernetes.io/name: {{ include "quassel-search-helm.name" . }} app.kubernetes.io/instance: {{ .Release.Name }} {{- end }} -{{- define "actual-helm.sslPath" -}} +{{- define "quassel-search-helm.sslPath" -}} /certs {{- end }} diff --git a/actual/templates/deployment.yaml b/quassel-search/templates/deployment.yaml similarity index 60% rename from actual/templates/deployment.yaml rename to quassel-search/templates/deployment.yaml index cd4919ee6074e0164ae2e27c9fda42ebc52b32eb..ae0ca474d5eb11760439a5a1ed1f5674d7638cb8 100644 --- a/actual/templates/deployment.yaml +++ b/quassel-search/templates/deployment.yaml @@ -1,14 +1,14 @@ apiVersion: apps/v1 kind: Deployment metadata: - name: {{ include "actual-helm.fullname" . }} + name: {{ include "quassel-search-helm.fullname" . }} labels: - {{- include "actual-helm.labels" . | nindent 4 }} + {{- include "quassel-search-helm.labels" . | nindent 4 }} spec: replicas: {{ .Values.replicaCount }} selector: matchLabels: - {{- include "actual-helm.selectorLabels" . | nindent 6 }} + {{- include "quassel-search-helm.selectorLabels" . | nindent 6 }} template: metadata: {{- with .Values.podAnnotations }} @@ -16,7 +16,7 @@ spec: {{- toYaml . | nindent 8 }} {{- end }} labels: - {{- include "actual-helm.selectorLabels" . | nindent 8 }} + {{- include "quassel-search-helm.selectorLabels" . | nindent 8 }} spec: {{- with .Values.imagePullSecrets }} imagePullSecrets: @@ -25,11 +25,11 @@ spec: securityContext: {{- toYaml .Values.podSecurityContext | nindent 8 }} volumes: - - name: data - {{- .Values.volume | nindent 10 }} + - name: tmp + emptyDir: {} - name: config - configMap: - name: {{ include "actual-helm.fullname" . }} + secret: + secretName: {{ include "quassel-search-helm.fullname" . }} containers: - name: {{ .Chart.Name }} securityContext: @@ -41,25 +41,31 @@ spec: containerPort: 8080 protocol: TCP startupProbe: - httpGet: - path: / - port: http + exec: + command: + - curl + - "--fail" + - http://127.0.0.1:8080/fpm-ping livenessProbe: - httpGet: - path: / - port: http + exec: + command: + - curl + - "--fail" + - http://127.0.0.1:8080/fpm-ping readinessProbe: - httpGet: - path: / - port: http + exec: + command: + - curl + - "--fail" + - http://127.0.0.1:8080/fpm-ping resources: {{- toYaml .Values.resources | nindent 12 }} volumeMounts: - - mountPath: "/app/config.json" + - mountPath: "/run" + name: tmp + - mountPath: "/var/www/html/qrs_config.php" name: config - subPath: "config.json" - - mountPath: "/data" - name: data + subPath: "config.php" {{- with .Values.nodeSelector }} nodeSelector: {{- toYaml . | nindent 8 }} diff --git a/actual/templates/ingress.yaml b/quassel-search/templates/ingress.yaml similarity index 68% rename from actual/templates/ingress.yaml rename to quassel-search/templates/ingress.yaml index 5d57e507f51114e007d61d811879917a40591c03..fec0aab8d16688b19e426f912ff37e13754086bc 100644 --- a/actual/templates/ingress.yaml +++ b/quassel-search/templates/ingress.yaml @@ -1,9 +1,9 @@ apiVersion: networking.k8s.io/v1 kind: Ingress metadata: - name: {{ include "actual-helm.fullname" . }} + name: {{ include "quassel-search-helm.fullname" . }} labels: - {{- include "actual-helm.labels" . | nindent 4 }} + {{- include "quassel-search-helm.labels" . | nindent 4 }} annotations: {{- .Values.ingress.annotations | toYaml | nindent 4 }} spec: @@ -14,7 +14,7 @@ spec: - path: "{{ .Values.ingress.path }}" backend: service: - name: {{ include "actual-helm.fullname" . }} + name: {{ include "quassel-search-helm.fullname" . }} port: name: http pathType: Prefix diff --git a/quassel-search/templates/secret.yaml b/quassel-search/templates/secret.yaml new file mode 100644 index 0000000000000000000000000000000000000000..86d9fb4b0d148bfa38de3ac6e31335f44e5430f9 --- /dev/null +++ b/quassel-search/templates/secret.yaml @@ -0,0 +1,28 @@ +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 }}'); + diff --git a/quassel-search/templates/service.yaml b/quassel-search/templates/service.yaml new file mode 100644 index 0000000000000000000000000000000000000000..7d9faec9f65c302936e2692e2e8ee75adfed9319 --- /dev/null +++ b/quassel-search/templates/service.yaml @@ -0,0 +1,15 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{ include "quassel-search-helm.fullname" . }} + labels: + {{- include "quassel-search-helm.labels" . | nindent 4 }} +spec: + type: {{ .Values.service.type }} + ports: + - port: 80 + targetPort: http + protocol: TCP + name: http + selector: + {{- include "quassel-search-helm.selectorLabels" . | nindent 4 }} diff --git a/actual/values.yaml b/quassel-search/values.yaml similarity index 63% rename from actual/values.yaml rename to quassel-search/values.yaml index 253f364650ae7a87f371153dc195ed714d9ec870..b3f0b0c90620b114ddf48a999b27f61af8c01866 100644 --- a/actual/values.yaml +++ b/quassel-search/values.yaml @@ -1,7 +1,7 @@ replicaCount: 1 image: - repository: jlongster/actual-server + repository: k8r.eu/justjanne/quassel-rest-search pullPolicy: IfNotPresent tag: "" @@ -9,10 +9,13 @@ imagePullSecrets: [ ] nameOverride: "" fullnameOverride: "" -syncMode: simple - -volume: |- - emptyDir: {} +config: + postgres: + hostname: "localhost" + port: 5432 + database: "quassel" + username: "quassel" + password: "hunter2" service: type: ClusterIP @@ -20,6 +23,7 @@ service: ingress: host: "example.com" path: "/" + origins: [ ] annotations: { } podAnnotations: { } @@ -36,11 +40,11 @@ securityContext: resources: limits: - cpu: 500m - memory: 512Mi + cpu: 200m + memory: 128M requests: - cpu: 10m - memory: 64Mi + cpu: 50m + memory: 64M nodeSelector: { }