From 97890831db2f2a65e70e07b508f260ae50961030 Mon Sep 17 00:00:00 2001 From: cunningpike <117583036+cunningpike@users.noreply.github.com> Date: Sun, 15 Jan 2023 20:08:59 -0500 Subject: [PATCH 001/125] Create Dockerfile --- container/Dockerfile | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 container/Dockerfile diff --git a/container/Dockerfile b/container/Dockerfile new file mode 100644 index 0000000..b67624d --- /dev/null +++ b/container/Dockerfile @@ -0,0 +1,17 @@ +# Use the official lightweight Python image. +# https://hub.docker.com/_/python +FROM python:slim-bullseye + +# Copy local code to the container image. +ENV APP_HOME /app +WORKDIR $APP_HOME +COPY .. ./ + +# Install production dependencies. +RUN pip install . + +# Run the web service on container startup. Here we use the gunicorn +# webserver, with one worker process and 8 threads. +# For environments with multiple CPU cores, increase the number of workers +# to be equal to the cores available. +ENTRYPOINT ["fediblock-sync"] From ed40843cb9af1d1329a62ef51e4bd3c1b656b989 Mon Sep 17 00:00:00 2001 From: cunningpike <117583036+cunningpike@users.noreply.github.com> Date: Sun, 15 Jan 2023 20:13:13 -0500 Subject: [PATCH 002/125] Create .dockerignore --- container/.dockerignore | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 container/.dockerignore diff --git a/container/.dockerignore b/container/.dockerignore new file mode 100644 index 0000000..8c89c00 --- /dev/null +++ b/container/.dockerignore @@ -0,0 +1,6 @@ +Dockerfile +README.md +*.pyc +*.pyo +*.pyd +__pycache__ From 0f2339b481612e6e82c00691ff3d93b9bf62740b Mon Sep 17 00:00:00 2001 From: cunningpike <117583036+cunningpike@users.noreply.github.com> Date: Sun, 15 Jan 2023 21:41:50 -0500 Subject: [PATCH 003/125] Create .dockerignore --- .dockerignore | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 .dockerignore diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..8c89c00 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,6 @@ +Dockerfile +README.md +*.pyc +*.pyo +*.pyd +__pycache__ From 49da3f192867fa07bdf32ee8f33df6c2de353102 Mon Sep 17 00:00:00 2001 From: cunningpike <117583036+cunningpike@users.noreply.github.com> Date: Sun, 15 Jan 2023 21:42:15 -0500 Subject: [PATCH 004/125] Delete .dockerignore --- container/.dockerignore | 6 ------ 1 file changed, 6 deletions(-) delete mode 100644 container/.dockerignore diff --git a/container/.dockerignore b/container/.dockerignore deleted file mode 100644 index 8c89c00..0000000 --- a/container/.dockerignore +++ /dev/null @@ -1,6 +0,0 @@ -Dockerfile -README.md -*.pyc -*.pyo -*.pyd -__pycache__ From b13a57d81c9faa8c48cc09fe2eb30941b23f345e Mon Sep 17 00:00:00 2001 From: cunningpike <117583036+cunningpike@users.noreply.github.com> Date: Sun, 15 Jan 2023 21:43:15 -0500 Subject: [PATCH 005/125] Create Dockerfile --- Dockerfile | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..9052aa3 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,17 @@ +# Use the official lightweight Python image. +# https://hub.docker.com/_/python +FROM python:slim-bullseye + +# Copy local code to the container image. +ENV APP_HOME /app +WORKDIR $APP_HOME +COPY . ./ + +# Install production dependencies. +RUN pip install . + +# Run the web service on container startup. Here we use the gunicorn +# webserver, with one worker process and 8 threads. +# For environments with multiple CPU cores, increase the number of workers +# to be equal to the cores available. +ENTRYPOINT ["fediblock-sync"] From 9a8f594afacf0856f966b73ca6f36e4fee4ce787 Mon Sep 17 00:00:00 2001 From: cunningpike <117583036+cunningpike@users.noreply.github.com> Date: Sun, 15 Jan 2023 21:43:38 -0500 Subject: [PATCH 006/125] Delete Dockerfile --- container/Dockerfile | 17 ----------------- 1 file changed, 17 deletions(-) delete mode 100644 container/Dockerfile diff --git a/container/Dockerfile b/container/Dockerfile deleted file mode 100644 index b67624d..0000000 --- a/container/Dockerfile +++ /dev/null @@ -1,17 +0,0 @@ -# Use the official lightweight Python image. -# https://hub.docker.com/_/python -FROM python:slim-bullseye - -# Copy local code to the container image. -ENV APP_HOME /app -WORKDIR $APP_HOME -COPY .. ./ - -# Install production dependencies. -RUN pip install . - -# Run the web service on container startup. Here we use the gunicorn -# webserver, with one worker process and 8 threads. -# For environments with multiple CPU cores, increase the number of workers -# to be equal to the cores available. -ENTRYPOINT ["fediblock-sync"] From ef53dee43dd5973d976c82358be2bc1e3759422d Mon Sep 17 00:00:00 2001 From: cunningpike <117583036+cunningpike@users.noreply.github.com> Date: Sun, 15 Jan 2023 21:46:59 -0500 Subject: [PATCH 007/125] Update .dockerignore --- .dockerignore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.dockerignore b/.dockerignore index 8c89c00..a78e7f7 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,5 +1,5 @@ Dockerfile -README.md +#README.md *.pyc *.pyo *.pyd From c0e6c6c0281e330b3e922a88082d6b546e71c5aa Mon Sep 17 00:00:00 2001 From: cunningpike <117583036+cunningpike@users.noreply.github.com> Date: Sun, 15 Jan 2023 21:52:21 -0500 Subject: [PATCH 008/125] Update Dockerfile --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 9052aa3..a0ca53f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,7 +5,7 @@ FROM python:slim-bullseye # Copy local code to the container image. ENV APP_HOME /app WORKDIR $APP_HOME -COPY . ./ +COPY ./ ./ # Install production dependencies. RUN pip install . From ced460146b20558c220afadb1ab86159ee16a516 Mon Sep 17 00:00:00 2001 From: cunningpike <117583036+cunningpike@users.noreply.github.com> Date: Sun, 15 Jan 2023 21:57:48 -0500 Subject: [PATCH 009/125] Update Dockerfile --- Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Dockerfile b/Dockerfile index a0ca53f..d75ef10 100644 --- a/Dockerfile +++ b/Dockerfile @@ -10,6 +10,7 @@ COPY ./ ./ # Install production dependencies. RUN pip install . +USER 1001 # Run the web service on container startup. Here we use the gunicorn # webserver, with one worker process and 8 threads. # For environments with multiple CPU cores, increase the number of workers From 6ec4c918d500b198ce3c316b1920dd7cf9574131 Mon Sep 17 00:00:00 2001 From: cunningpike <117583036+cunningpike@users.noreply.github.com> Date: Mon, 16 Jan 2023 10:36:37 -0500 Subject: [PATCH 010/125] Update Dockerfile --- Dockerfile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index d75ef10..e6f2b9f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,18 +1,18 @@ # Use the official lightweight Python image. # https://hub.docker.com/_/python -FROM python:slim-bullseye +FROM python:slim # Copy local code to the container image. ENV APP_HOME /app WORKDIR $APP_HOME -COPY ./ ./ +#COPY ./ ./ # Install production dependencies. -RUN pip install . +RUN pip install fediblockhole USER 1001 # Run the web service on container startup. Here we use the gunicorn # webserver, with one worker process and 8 threads. # For environments with multiple CPU cores, increase the number of workers # to be equal to the cores available. -ENTRYPOINT ["fediblock-sync"] +#ENTRYPOINT ["fediblock-sync"] From 76db6295e12c80884a24d77333e14ca9235dba34 Mon Sep 17 00:00:00 2001 From: cunningpike <117583036+cunningpike@users.noreply.github.com> Date: Mon, 16 Jan 2023 16:00:47 -0500 Subject: [PATCH 011/125] Create .dockerignore --- container/.dockerignore | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 container/.dockerignore diff --git a/container/.dockerignore b/container/.dockerignore new file mode 100644 index 0000000..a78e7f7 --- /dev/null +++ b/container/.dockerignore @@ -0,0 +1,6 @@ +Dockerfile +#README.md +*.pyc +*.pyo +*.pyd +__pycache__ From 6501ad8c7c881a6e076b92735440ff7f1ba6464d Mon Sep 17 00:00:00 2001 From: cunningpike <117583036+cunningpike@users.noreply.github.com> Date: Mon, 16 Jan 2023 16:01:48 -0500 Subject: [PATCH 012/125] Create Dockerfile --- container/Dockerfile | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 container/Dockerfile diff --git a/container/Dockerfile b/container/Dockerfile new file mode 100644 index 0000000..179d24d --- /dev/null +++ b/container/Dockerfile @@ -0,0 +1,17 @@ +# Use the official lightweight Python image. +# https://hub.docker.com/_/python +FROM python:slim + +# Copy local code to the container image. +ENV APP_HOME /app +WORKDIR $APP_HOME + +# Install production dependencies. +RUN pip install fediblockhole + +USER 1001 +# Run the web service on container startup. Here we use the gunicorn +# webserver, with one worker process and 8 threads. +# For environments with multiple CPU cores, increase the number of workers +# to be equal to the cores available. +ENTRYPOINT ["fediblock-sync"] From cb55a2850b126d56d331f5919576550686a8003d Mon Sep 17 00:00:00 2001 From: cunningpike <117583036+cunningpike@users.noreply.github.com> Date: Mon, 16 Jan 2023 16:02:08 -0500 Subject: [PATCH 013/125] Delete .dockerignore --- .dockerignore | 6 ------ 1 file changed, 6 deletions(-) delete mode 100644 .dockerignore diff --git a/.dockerignore b/.dockerignore deleted file mode 100644 index a78e7f7..0000000 --- a/.dockerignore +++ /dev/null @@ -1,6 +0,0 @@ -Dockerfile -#README.md -*.pyc -*.pyo -*.pyd -__pycache__ From 5e0ac23df802d02a7e1e9d1683741072df48d7e5 Mon Sep 17 00:00:00 2001 From: cunningpike <117583036+cunningpike@users.noreply.github.com> Date: Mon, 16 Jan 2023 16:02:20 -0500 Subject: [PATCH 014/125] Delete Dockerfile --- Dockerfile | 18 ------------------ 1 file changed, 18 deletions(-) delete mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile deleted file mode 100644 index e6f2b9f..0000000 --- a/Dockerfile +++ /dev/null @@ -1,18 +0,0 @@ -# Use the official lightweight Python image. -# https://hub.docker.com/_/python -FROM python:slim - -# Copy local code to the container image. -ENV APP_HOME /app -WORKDIR $APP_HOME -#COPY ./ ./ - -# Install production dependencies. -RUN pip install fediblockhole - -USER 1001 -# Run the web service on container startup. Here we use the gunicorn -# webserver, with one worker process and 8 threads. -# For environments with multiple CPU cores, increase the number of workers -# to be equal to the cores available. -#ENTRYPOINT ["fediblock-sync"] From e2be9b730681a0746f49e556474c414a1088f85a Mon Sep 17 00:00:00 2001 From: cunningpike <117583036+cunningpike@users.noreply.github.com> Date: Sat, 21 Jan 2023 18:55:14 -0500 Subject: [PATCH 015/125] Create cronjob-fediblockhole.yaml --- chart/templates/cronjob-fediblockhole.yaml | 34 ++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 chart/templates/cronjob-fediblockhole.yaml diff --git a/chart/templates/cronjob-fediblockhole.yaml b/chart/templates/cronjob-fediblockhole.yaml new file mode 100644 index 0000000..e4b6cc7 --- /dev/null +++ b/chart/templates/cronjob-fediblockhole.yaml @@ -0,0 +1,34 @@ +{{ if .Values.fediblockhole.cron.sync.enabled -}} +apiVersion: batch/v1 +kind: CronJob +metadata: + name: {{ include "fediblockhole.fullname" . }}-sync + labels: + {{- include "fediblockhole.labels" . | nindent 4 }} +spec: + schedule: {{ .Values.fediblockhole.cron.sync.schedule }} + jobTemplate: + spec: + template: + metadata: + name: {{ include "fediblockhole.fullname" . }}-sync + {{- with .Values.jobAnnotations }} + annotations: + {{- toYaml . | nindent 12 }} + {{- end }} + spec: + restartPolicy: OnFailure + containers: + - name: {{ include "fediblockhole.fullname" . }}-sync + image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" + imagePullPolicy: {{ .Values.image.pullPolicy }} +# command: +# - fediblock +# - -c +# - remove + envFrom: + - configMapRef: + name: {{ include "fediblockhole.fullname" . }}-env + - secretRef: + name: {{ template "fediblockhole.secretName" . }} +{{- end }} From 3a567a7f9e0175ca363959119abf7a0eadee189c Mon Sep 17 00:00:00 2001 From: cunningpike <117583036+cunningpike@users.noreply.github.com> Date: Sat, 21 Jan 2023 18:56:35 -0500 Subject: [PATCH 016/125] Create cronjob-fediblock-sync.yaml --- chart/templates/cronjob-fediblock-sync.yaml | 34 +++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 chart/templates/cronjob-fediblock-sync.yaml diff --git a/chart/templates/cronjob-fediblock-sync.yaml b/chart/templates/cronjob-fediblock-sync.yaml new file mode 100644 index 0000000..e4b6cc7 --- /dev/null +++ b/chart/templates/cronjob-fediblock-sync.yaml @@ -0,0 +1,34 @@ +{{ if .Values.fediblockhole.cron.sync.enabled -}} +apiVersion: batch/v1 +kind: CronJob +metadata: + name: {{ include "fediblockhole.fullname" . }}-sync + labels: + {{- include "fediblockhole.labels" . | nindent 4 }} +spec: + schedule: {{ .Values.fediblockhole.cron.sync.schedule }} + jobTemplate: + spec: + template: + metadata: + name: {{ include "fediblockhole.fullname" . }}-sync + {{- with .Values.jobAnnotations }} + annotations: + {{- toYaml . | nindent 12 }} + {{- end }} + spec: + restartPolicy: OnFailure + containers: + - name: {{ include "fediblockhole.fullname" . }}-sync + image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" + imagePullPolicy: {{ .Values.image.pullPolicy }} +# command: +# - fediblock +# - -c +# - remove + envFrom: + - configMapRef: + name: {{ include "fediblockhole.fullname" . }}-env + - secretRef: + name: {{ template "fediblockhole.secretName" . }} +{{- end }} From 74ab98c4730596bc962159fabcff29d907054ed2 Mon Sep 17 00:00:00 2001 From: cunningpike <117583036+cunningpike@users.noreply.github.com> Date: Sat, 21 Jan 2023 18:56:50 -0500 Subject: [PATCH 017/125] Delete cronjob-fediblockhole.yaml --- chart/templates/cronjob-fediblockhole.yaml | 34 ---------------------- 1 file changed, 34 deletions(-) delete mode 100644 chart/templates/cronjob-fediblockhole.yaml diff --git a/chart/templates/cronjob-fediblockhole.yaml b/chart/templates/cronjob-fediblockhole.yaml deleted file mode 100644 index e4b6cc7..0000000 --- a/chart/templates/cronjob-fediblockhole.yaml +++ /dev/null @@ -1,34 +0,0 @@ -{{ if .Values.fediblockhole.cron.sync.enabled -}} -apiVersion: batch/v1 -kind: CronJob -metadata: - name: {{ include "fediblockhole.fullname" . }}-sync - labels: - {{- include "fediblockhole.labels" . | nindent 4 }} -spec: - schedule: {{ .Values.fediblockhole.cron.sync.schedule }} - jobTemplate: - spec: - template: - metadata: - name: {{ include "fediblockhole.fullname" . }}-sync - {{- with .Values.jobAnnotations }} - annotations: - {{- toYaml . | nindent 12 }} - {{- end }} - spec: - restartPolicy: OnFailure - containers: - - name: {{ include "fediblockhole.fullname" . }}-sync - image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" - imagePullPolicy: {{ .Values.image.pullPolicy }} -# command: -# - fediblock -# - -c -# - remove - envFrom: - - configMapRef: - name: {{ include "fediblockhole.fullname" . }}-env - - secretRef: - name: {{ template "fediblockhole.secretName" . }} -{{- end }} From 2ae713f2285008a18ca6622c9ef8ff629c112aef Mon Sep 17 00:00:00 2001 From: cunningpike <117583036+cunningpike@users.noreply.github.com> Date: Sat, 21 Jan 2023 19:09:08 -0500 Subject: [PATCH 018/125] Create values.yaml --- chart/values.yaml | 70 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100644 chart/values.yaml diff --git a/chart/values.yaml b/chart/values.yaml new file mode 100644 index 0000000..dee498d --- /dev/null +++ b/chart/values.yaml @@ -0,0 +1,70 @@ +image: + repository: ghcr.io/cunningpike/fediblockhole + # https://hub.docker.com/r/tootsuite/mastodon/tags + # + # alternatively, use `latest` for the latest release or `edge` for the image + # built from the most recent commit + # + # tag: latest + tag: "" + # use `Always` when using `latest` tag + pullPolicy: IfNotPresent + +fediblockhole: + cron: + # -- run `tootctl media remove` every week + sync: + # @ignored + enabled: false + # @ignored + schedule: "0 * * * *" + # these must be set manually; autogenerated keys are rotated on each upgrade + secrets: + secret_key_base: "" + otp_secret: "" + vapid: + private_key: "" + public_key: "" + # -- you can also specify the name of an existing Secret + # with keys SECRET_KEY_BASE and OTP_SECRET and + # VAPID_PRIVATE_KEY and VAPID_PUBLIC_KEY + existingSecret: "" +# if you manually change the UID/GID environment variables, ensure these values +# match: +podSecurityContext: + runAsUser: 991 + runAsGroup: 991 + fsGroup: 991 + +# @ignored +securityContext: {} + +# -- Kubernetes manages pods for jobs and pods for deployments differently, so you might +# need to apply different annotations to the two different sets of pods. The annotations +# set with podAnnotations will be added to all deployment-managed pods. +podAnnotations: {} + +# -- The annotations set with jobAnnotations will be added to all job pods. +jobAnnotations: {} + +# -- Default resources for all Deployments and jobs unless overwritten +resources: {} + # We usually recommend not to specify default resources and to leave this as a conscious + # choice for the user. This also increases chances charts run on environments with little + # resources, such as Minikube. If you do want to specify resources, uncomment the following + # lines, adjust them as necessary, and remove the curly braces after 'resources:'. + # limits: + # cpu: 100m + # memory: 128Mi + # requests: + # cpu: 100m + # memory: 128Mi + +# @ignored +nodeSelector: {} + +# @ignored +tolerations: [] + +# -- Affinity for all pods unless overwritten +affinity: {} From 0e0f091fbc0e8c903ab54ea134d8dd64b5686357 Mon Sep 17 00:00:00 2001 From: cunningpike <117583036+cunningpike@users.noreply.github.com> Date: Sat, 21 Jan 2023 19:10:16 -0500 Subject: [PATCH 019/125] Create .helmignore --- chart/.helmignore | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 chart/.helmignore diff --git a/chart/.helmignore b/chart/.helmignore new file mode 100644 index 0000000..0cbed47 --- /dev/null +++ b/chart/.helmignore @@ -0,0 +1,37 @@ +# A helm chart's templates and default values can be packaged into a .tgz file. +# When doing that, not everything should be bundled into the .tgz file. This +# file describes what to not bundle. +# +# Manually added by us +# -------------------- +# +dev-values.yaml +mastodon-*.tgz + + +# Boilerplate .helmignore from `helm create mastodon` +# --------------------------------------------------- +# +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*.orig +*~ +# Various IDEs +.project +.idea/ +*.tmproj +.vscode/ From da4cec415ef4d712cab60e5b8c58c31730d9620f Mon Sep 17 00:00:00 2001 From: cunningpike <117583036+cunningpike@users.noreply.github.com> Date: Sat, 21 Jan 2023 19:15:09 -0500 Subject: [PATCH 020/125] Create Chart.yaml --- chart/Chart.yaml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 chart/Chart.yaml diff --git a/chart/Chart.yaml b/chart/Chart.yaml new file mode 100644 index 0000000..b2196f9 --- /dev/null +++ b/chart/Chart.yaml @@ -0,0 +1,23 @@ +apiVersion: v2 +name: fediblockhole +description: FediBlockHole is a tool for keeping a Mastodon instance blocklist synchronised with remote lists. + +# 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.0.1 + +# 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. +appVersion: v0.4.1 From ceec807d9206c8e6caa15720a0cf69ac31e221a2 Mon Sep 17 00:00:00 2001 From: cunningpike <117583036+cunningpike@users.noreply.github.com> Date: Sat, 21 Jan 2023 19:18:24 -0500 Subject: [PATCH 021/125] Update values.yaml --- chart/values.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/chart/values.yaml b/chart/values.yaml index dee498d..43b3838 100644 --- a/chart/values.yaml +++ b/chart/values.yaml @@ -11,8 +11,10 @@ image: pullPolicy: IfNotPresent fediblockhole: + # location of the configuration file. Default is /etc/default/fediblockhole.conf.toml + conf_file: "" cron: - # -- run `tootctl media remove` every week + # -- run `fediblock-sync` every hour sync: # @ignored enabled: false From 51b0332873ca6ad9c6636da21965542720a661e3 Mon Sep 17 00:00:00 2001 From: cunningpike <117583036+cunningpike@users.noreply.github.com> Date: Sat, 21 Jan 2023 19:20:16 -0500 Subject: [PATCH 022/125] Update cronjob-fediblock-sync.yaml --- chart/templates/cronjob-fediblock-sync.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/chart/templates/cronjob-fediblock-sync.yaml b/chart/templates/cronjob-fediblock-sync.yaml index e4b6cc7..ed10c95 100644 --- a/chart/templates/cronjob-fediblock-sync.yaml +++ b/chart/templates/cronjob-fediblock-sync.yaml @@ -22,10 +22,10 @@ spec: - name: {{ include "fediblockhole.fullname" . }}-sync image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" imagePullPolicy: {{ .Values.image.pullPolicy }} -# command: -# - fediblock -# - -c -# - remove + command: + - fediblock + - -c + - {{ .Values.fediblockhole.conf_file }} envFrom: - configMapRef: name: {{ include "fediblockhole.fullname" . }}-env From 1bd572671be91aa5cf81aac1b3d8b9b2c29e8aed Mon Sep 17 00:00:00 2001 From: cunningpike <117583036+cunningpike@users.noreply.github.com> Date: Sat, 21 Jan 2023 19:28:56 -0500 Subject: [PATCH 023/125] Update cronjob-fediblock-sync.yaml --- chart/templates/cronjob-fediblock-sync.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/chart/templates/cronjob-fediblock-sync.yaml b/chart/templates/cronjob-fediblock-sync.yaml index ed10c95..e3f87d1 100644 --- a/chart/templates/cronjob-fediblock-sync.yaml +++ b/chart/templates/cronjob-fediblock-sync.yaml @@ -31,4 +31,8 @@ spec: name: {{ include "fediblockhole.fullname" . }}-env - secretRef: name: {{ template "fediblockhole.secretName" . }} + volumeMounts: + - name: config + mountPath: "path/in/the/pod/where/to/mount/the/file" + subPath: file.conf {{- end }} From d7803dfd72f82283942d1d4c51456f9668b94852 Mon Sep 17 00:00:00 2001 From: cunningpike <117583036+cunningpike@users.noreply.github.com> Date: Sat, 21 Jan 2023 19:31:38 -0500 Subject: [PATCH 024/125] Update values.yaml --- chart/values.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/chart/values.yaml b/chart/values.yaml index 43b3838..88635a3 100644 --- a/chart/values.yaml +++ b/chart/values.yaml @@ -12,7 +12,9 @@ image: fediblockhole: # location of the configuration file. Default is /etc/default/fediblockhole.conf.toml - conf_file: "" + conf_file: + path: "" + filename: "" cron: # -- run `fediblock-sync` every hour sync: From 4492a0920adaf9ee6058d17a37e8d24db6b307cb Mon Sep 17 00:00:00 2001 From: cunningpike <117583036+cunningpike@users.noreply.github.com> Date: Sat, 21 Jan 2023 19:44:38 -0500 Subject: [PATCH 025/125] Update cronjob-fediblock-sync.yaml --- chart/templates/cronjob-fediblock-sync.yaml | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/chart/templates/cronjob-fediblock-sync.yaml b/chart/templates/cronjob-fediblock-sync.yaml index e3f87d1..0d00df3 100644 --- a/chart/templates/cronjob-fediblock-sync.yaml +++ b/chart/templates/cronjob-fediblock-sync.yaml @@ -25,7 +25,7 @@ spec: command: - fediblock - -c - - {{ .Values.fediblockhole.conf_file }} + - {{ .Values.fediblockhole.conf_file.path }}{{ .Values.fediblockhole.conf_file.filename }} envFrom: - configMapRef: name: {{ include "fediblockhole.fullname" . }}-env @@ -33,6 +33,13 @@ spec: name: {{ template "fediblockhole.secretName" . }} volumeMounts: - name: config - mountPath: "path/in/the/pod/where/to/mount/the/file" - subPath: file.conf + mountPath: "{{ .Values.fediblockhole.conf_file.path }}" + subPath: {{ .Values.fediblockhole.conf_file.filename }} + volumes: + - name: config + configMap: + name: {{ include "fediblockhole.fullname" . }}-env + items: + - key: "{{ .Values.fediblockhole.conf_file.filename }}" + path: "{{ .Values.fediblockhole.conf_file.filename }}" {{- end }} From 71c03becaa34a12538655784781e9a98d6700d4b Mon Sep 17 00:00:00 2001 From: cunningpike <117583036+cunningpike@users.noreply.github.com> Date: Sat, 21 Jan 2023 19:53:03 -0500 Subject: [PATCH 026/125] Create configmap-conf-toml --- chart/templates/configmap-conf-toml | 323 ++++++++++++++++++++++++++++ 1 file changed, 323 insertions(+) create mode 100644 chart/templates/configmap-conf-toml diff --git a/chart/templates/configmap-conf-toml b/chart/templates/configmap-conf-toml new file mode 100644 index 0000000..fae348e --- /dev/null +++ b/chart/templates/configmap-conf-toml @@ -0,0 +1,323 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ include "fediblockhole.fullname" . }}-conf-toml + labels: + {{- include "fediblockhole.labels" . | nindent 4 }} +data: + {{- if .Values.postgresql.enabled }} + DB_HOST: {{ template "mastodon.postgresql.fullname" . }} + DB_PORT: "5432" + {{- else }} + DB_HOST: {{ .Values.postgresql.postgresqlHostname }} + DB_PORT: {{ .Values.postgresql.postgresqlPort | default "5432" | quote }} + {{- end }} + DB_NAME: {{ .Values.postgresql.auth.database }} + DB_POOL: {{ include "mastodon.maxDbPool" . }} + DB_USER: {{ .Values.postgresql.auth.username }} + DEFAULT_LOCALE: {{ .Values.mastodon.locale }} + {{- if .Values.elasticsearch.enabled }} + ES_ENABLED: "true" + ES_HOST: {{ template "mastodon.elasticsearch.fullname" . }}-master-hl + ES_PORT: "9200" + {{- end }} + LOCAL_DOMAIN: {{ .Values.mastodon.local_domain }} + {{- with .Values.mastodon.web_domain }} + WEB_DOMAIN: {{ . }} + {{- end }} + {{- with .Values.mastodon.singleUserMode }} + SINGLE_USER_MODE: "true" + {{- end }} + {{- with .Values.mastodon.authorizedFetch }} + AUTHORIZED_FETCH: {{ . | quote }} + {{- end }} + # https://devcenter.heroku.com/articles/tuning-glibc-memory-behavior + MALLOC_ARENA_MAX: "2" + NODE_ENV: "production" + RAILS_ENV: "production" + {{- if .Values.redis.enabled }} + REDIS_HOST: {{ template "mastodon.redis.fullname" . }}-master + {{- else }} + REDIS_HOST: {{ required "When the redis chart is disabled .Values.redis.hostname is required" .Values.redis.hostname }} + {{- end }} + REDIS_PORT: {{ .Values.redis.port | default "6379" | quote }} + {{- if .Values.mastodon.s3.enabled }} + S3_BUCKET: {{ .Values.mastodon.s3.bucket }} + S3_ENABLED: "true" + S3_ENDPOINT: {{ .Values.mastodon.s3.endpoint }} + S3_HOSTNAME: {{ .Values.mastodon.s3.hostname }} + S3_PROTOCOL: "https" + {{- with .Values.mastodon.s3.region }} + S3_REGION: {{ . }} + {{- end }} + {{- with .Values.mastodon.s3.alias_host }} + S3_ALIAS_HOST: {{ .Values.mastodon.s3.alias_host}} + {{- end }} + {{- end }} + {{- with .Values.mastodon.smtp.auth_method }} + SMTP_AUTH_METHOD: {{ . }} + {{- end }} + {{- with .Values.mastodon.smtp.ca_file }} + SMTP_CA_FILE: {{ . }} + {{- end }} + {{- with .Values.mastodon.smtp.delivery_method }} + SMTP_DELIVERY_METHOD: {{ . }} + {{- end }} + {{- with .Values.mastodon.smtp.domain }} + SMTP_DOMAIN: {{ . }} + {{- end }} + {{- with .Values.mastodon.smtp.enable_starttls }} + SMTP_ENABLE_STARTTLS: {{ . | quote }} + {{- end }} + {{- with .Values.mastodon.smtp.enable_starttls_auto }} + SMTP_ENABLE_STARTTLS_AUTO: {{ . | quote }} + {{- end }} + {{- with .Values.mastodon.smtp.from_address }} + SMTP_FROM_ADDRESS: {{ . }} + {{- end }} + {{- with .Values.mastodon.smtp.login }} + SMTP_LOGIN: {{ . }} + {{- end }} + {{- with .Values.mastodon.smtp.openssl_verify_mode }} + SMTP_OPENSSL_VERIFY_MODE: {{ . }} + {{- end }} + {{- with .Values.mastodon.smtp.password }} + SMTP_PASSWORD: {{ . }} + {{- end }} + {{- with .Values.mastodon.smtp.port }} + SMTP_PORT: {{ . | quote }} + {{- end }} + {{- with .Values.mastodon.smtp.reply_to }} + SMTP_REPLY_TO: {{ . }} + {{- end }} + {{- with .Values.mastodon.smtp.server }} + SMTP_SERVER: {{ . }} + {{- end }} + {{- with .Values.mastodon.smtp.tls }} + SMTP_TLS: {{ . | quote }} + {{- end }} + STREAMING_CLUSTER_NUM: {{ .Values.mastodon.streaming.workers | quote }} + {{- with .Values.mastodon.streaming.base_url }} + STREAMING_API_BASE_URL: {{ . | quote }} + {{- end }} + {{- if .Values.externalAuth.oidc.enabled }} + OIDC_ENABLED: {{ .Values.externalAuth.oidc.enabled | quote }} + OIDC_DISPLAY_NAME: {{ .Values.externalAuth.oidc.display_name }} + OIDC_ISSUER: {{ .Values.externalAuth.oidc.issuer }} + OIDC_DISCOVERY: {{ .Values.externalAuth.oidc.discovery | quote }} + OIDC_SCOPE: {{ .Values.externalAuth.oidc.scope | quote }} + OIDC_UID_FIELD: {{ .Values.externalAuth.oidc.uid_field }} + OIDC_CLIENT_ID: {{ .Values.externalAuth.oidc.client_id }} + OIDC_CLIENT_SECRET: {{ .Values.externalAuth.oidc.client_secret }} + OIDC_REDIRECT_URI: {{ .Values.externalAuth.oidc.redirect_uri }} + OIDC_SECURITY_ASSUME_EMAIL_IS_VERIFIED: {{ .Values.externalAuth.oidc.assume_email_is_verified | quote }} + {{- with .Values.externalAuth.oidc.client_auth_method }} + OIDC_CLIENT_AUTH_METHOD: {{ . }} + {{- end }} + {{- with .Values.externalAuth.oidc.response_type }} + OIDC_RESPONSE_TYPE: {{ . }} + {{- end }} + {{- with .Values.externalAuth.oidc.response_mode }} + OIDC_RESPONSE_MODE: {{ . }} + {{- end }} + {{- with .Values.externalAuth.oidc.display }} + OIDC_DISPLAY: {{ . }} + {{- end }} + {{- with .Values.externalAuth.oidc.prompt }} + OIDC_PROMPT: {{ . }} + {{- end }} + {{- with .Values.externalAuth.oidc.send_nonce }} + OIDC_SEND_NONCE: {{ . }} + {{- end }} + {{- with .Values.externalAuth.oidc.send_scope_to_token_endpoint }} + OIDC_SEND_SCOPE_TO_TOKEN_ENDPOINT: {{ . | quote }} + {{- end }} + {{- with .Values.externalAuth.oidc.idp_logout_redirect_uri }} + OIDC_IDP_LOGOUT_REDIRECT_URI: {{ . }} + {{- end }} + {{- with .Values.externalAuth.oidc.http_scheme }} + OIDC_HTTP_SCHEME: {{ . }} + {{- end }} + {{- with .Values.externalAuth.oidc.host }} + OIDC_HOST: {{ . }} + {{- end }} + {{- with .Values.externalAuth.oidc.port }} + OIDC_PORT: {{ . }} + {{- end }} + {{- with .Values.externalAuth.oidc.jwks_uri }} + OIDC_JWKS_URI: {{ . }} + {{- end }} + {{- with .Values.externalAuth.oidc.auth_endpoint }} + OIDC_AUTH_ENDPOINT: {{ . }} + {{- end }} + {{- with .Values.externalAuth.oidc.token_endpoint }} + OIDC_TOKEN_ENDPOINT: {{ . }} + {{- end }} + {{- with .Values.externalAuth.oidc.user_info_endpoint }} + OIDC_USER_INFO_ENDPOINT: {{ . }} + {{- end }} + {{- with .Values.externalAuth.oidc.end_session_endpoint }} + OIDC_END_SESSION_ENDPOINT: {{ . }} + {{- end }} + {{- end }} + {{- if .Values.externalAuth.saml.enabled }} + SAML_ENABLED: {{ .Values.externalAuth.saml.enabled | quote }} + SAML_ACS_URL: {{ .Values.externalAuth.saml.acs_url }} + SAML_ISSUER: {{ .Values.externalAuth.saml.issuer }} + SAML_IDP_SSO_TARGET_URL: {{ .Values.externalAuth.saml.idp_sso_target_url }} + SAML_IDP_CERT: {{ .Values.externalAuth.saml.idp_cert | quote }} + {{- with .Values.externalAuth.saml.idp_cert_fingerprint }} + SAML_IDP_CERT_FINGERPRINT: {{ . | quote }} + {{- end }} + {{- with .Values.externalAuth.saml.name_identifier_format }} + SAML_NAME_IDENTIFIER_FORMAT: {{ . }} + {{- end }} + {{- with .Values.externalAuth.saml.cert }} + SAML_CERT: {{ . | quote }} + {{- end }} + {{- with .Values.externalAuth.saml.private_key }} + SAML_PRIVATE_KEY: {{ . | quote }} + {{- end }} + {{- with .Values.externalAuth.saml.want_assertion_signed }} + SAML_SECURITY_WANT_ASSERTION_SIGNED: {{ . | quote }} + {{- end }} + {{- with .Values.externalAuth.saml.want_assertion_encrypted }} + SAML_SECURITY_WANT_ASSERTION_ENCRYPTED: {{ . | quote }} + {{- end }} + {{- with .Values.externalAuth.saml.assume_email_is_verified }} + SAML_SECURITY_ASSUME_EMAIL_IS_VERIFIED: {{ . | quote }} + {{- end }} + {{- with .Values.externalAuth.saml.uid_attribute }} + SAML_UID_ATTRIBUTE: {{ . }} + {{- end }} + {{- with .Values.externalAuth.saml.attributes_statements.uid }} + SAML_ATTRIBUTES_STATEMENTS_UID: {{ . | quote }} + {{- end }} + {{- with .Values.externalAuth.saml.attributes_statements.email }} + SAML_ATTRIBUTES_STATEMENTS_EMAIL: {{ . | quote }} + {{- end }} + {{- with .Values.externalAuth.saml.attributes_statements.full_name }} + SAML_ATTRIBUTES_STATEMENTS_FULL_NAME: {{ . | quote }} + {{- end }} + {{- with .Values.externalAuth.saml.attributes_statements.first_name }} + SAML_ATTRIBUTES_STATEMENTS_FIRST_NAME: {{ . | quote }} + {{- end }} + {{- with .Values.externalAuth.saml.attributes_statements.last_name }} + SAML_ATTRIBUTES_STATEMENTS_LAST_NAME: {{ . | quote }} + {{- end }} + {{- with .Values.externalAuth.saml.attributes_statements.verified }} + SAML_ATTRIBUTES_STATEMENTS_VERIFIED: {{ . | quote }} + {{- end }} + {{- with .Values.externalAuth.saml.attributes_statements.verified_email }} + SAML_ATTRIBUTES_STATEMENTS_VERIFIED_EMAIL: {{ . | quote }} + {{- end }} + {{- end }} + {{- with .Values.externalAuth.oauth_global.omniauth_only }} + OMNIAUTH_ONLY: {{ . | quote }} + {{- end }} + {{- if .Values.externalAuth.cas.enabled }} + CAS_ENABLED: {{ .Values.externalAuth.cas.enabled | quote }} + CAS_URL: {{ .Values.externalAuth.cas.url }} + CAS_HOST: {{ .Values.externalAuth.cas.host }} + CAS_PORT: {{ .Values.externalAuth.cas.port }} + CAS_SSL: {{ .Values.externalAuth.cas.ssl | quote }} + {{- with .Values.externalAuth.cas.validate_url }} + CAS_VALIDATE_URL: {{ . }} + {{- end }} + {{- with .Values.externalAuth.cas.callback_url }} + CAS_CALLBACK_URL: {{ . }} + {{- end }} + {{- with .Values.externalAuth.cas.logout_url }} + CAS_LOGOUT_URL: {{ . }} + {{- end }} + {{- with .Values.externalAuth.cas.login_url }} + CAS_LOGIN_URL: {{ . }} + {{- end }} + {{- with .Values.externalAuth.cas.uid_field }} + CAS_UID_FIELD: {{ . | quote }} + {{- end }} + {{- with .Values.externalAuth.cas.ca_path }} + CAS_CA_PATH: {{ . }} + {{- end }} + {{- with .Values.externalAuth.cas.disable_ssl_verification }} + CAS_DISABLE_SSL_VERIFICATION: {{ . | quote }} + {{- end }} + {{- with .Values.externalAuth.cas.assume_email_is_verified }} + CAS_SECURITY_ASSUME_EMAIL_IS_VERIFIED: {{ . | quote }} + {{- end }} + {{- with .Values.externalAuth.cas.keys.uid }} + CAS_UID_KEY: {{ . | quote }} + {{- end }} + {{- with .Values.externalAuth.cas.keys.name }} + CAS_NAME_KEY: {{ . | quote }} + {{- end }} + {{- with .Values.externalAuth.cas.keys.email }} + CAS_EMAIL_KEY: {{ . | quote }} + {{- end }} + {{- with .Values.externalAuth.cas.keys.nickname }} + CAS_NICKNAME_KEY: {{ . | quote }} + {{- end }} + {{- with .Values.externalAuth.cas.keys.first_name }} + CAS_FIRST_NAME_KEY: {{ . | quote }} + {{- end }} + {{- with .Values.externalAuth.cas.keys.last_name }} + CAS_LAST_NAME_KEY: {{ . | quote }} + {{- end }} + {{- with .Values.externalAuth.cas.keys.location }} + CAS_LOCATION_KEY: {{ . | quote }} + {{- end }} + {{- with .Values.externalAuth.cas.keys.image }} + CAS_IMAGE_KEY: {{ . | quote }} + {{- end }} + {{- with .Values.externalAuth.cas.keys.phone }} + CAS_PHONE_KEY: {{ . | quote }} + {{- end }} + {{- end }} + {{- with .Values.externalAuth.pam.enabled }} + PAM_ENABLED: {{ . | quote }} + {{- with .Values.externalAuth.pam.email_domain }} + PAM_EMAIL_DOMAIN: {{ . }} + {{- end }} + {{- with .Values.externalAuth.pam.default_service }} + PAM_DEFAULT_SERVICE: {{ . }} + {{- end }} + {{- with .Values.externalAuth.pam.controlled_service }} + PAM_CONTROLLED_SERVICE: {{ . }} + {{- end }} + {{- end }} + {{- if .Values.externalAuth.ldap.enabled }} + LDAP_ENABLED: {{ .Values.externalAuth.ldap.enabled | quote }} + LDAP_HOST: {{ .Values.externalAuth.ldap.host }} + LDAP_PORT: {{ .Values.externalAuth.ldap.port }} + LDAP_METHOD: {{ .Values.externalAuth.ldap.method }} + {{- with .Values.externalAuth.ldap.base }} + LDAP_BASE: {{ . }} + {{- end }} + {{- with .Values.externalAuth.ldap.bind_on }} + LDAP_BIND_ON: {{ . }} + {{- end }} + {{- with .Values.externalAuth.ldap.password }} + LDAP_PASSWORD: {{ . }} + {{- end }} + {{- with .Values.externalAuth.ldap.uid }} + LDAP_UID: {{ . }} + {{- end }} + {{- with .Values.externalAuth.ldap.mail }} + LDAP_MAIL: {{ . }} + {{- end }} + {{- with .Values.externalAuth.ldap.search_filter }} + LDAP_SEARCH_FILTER: {{ . }} + {{- end }} + {{- with .Values.externalAuth.ldap.uid_conversion.enabled }} + LDAP_UID_CONVERSION_ENABLED: {{ . | quote }} + {{- end }} + {{- with .Values.externalAuth.ldap.uid_conversion.search }} + LDAP_UID_CONVERSION_SEARCH: {{ . }} + {{- end }} + {{- with .Values.externalAuth.ldap.uid_conversion.replace }} + LDAP_UID_CONVERSION_REPLACE: {{ . }} + {{- end }} + {{- end }} + {{- with .Values.mastodon.metrics.statsd.address }} + STATSD_ADDR: {{ . }} + {{- end }} From a111661cafa8ad315aa2d85209d428b0936287a5 Mon Sep 17 00:00:00 2001 From: cunningpike <117583036+cunningpike@users.noreply.github.com> Date: Sat, 21 Jan 2023 19:57:48 -0500 Subject: [PATCH 027/125] Update values.yaml --- chart/values.yaml | 68 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) diff --git a/chart/values.yaml b/chart/values.yaml index 88635a3..a93cf08 100644 --- a/chart/values.yaml +++ b/chart/values.yaml @@ -33,6 +33,74 @@ fediblockhole: # with keys SECRET_KEY_BASE and OTP_SECRET and # VAPID_PRIVATE_KEY and VAPID_PUBLIC_KEY existingSecret: "" + # List of instances to read blocklists from. + # If the instance makes its blocklist public, no authorization token is needed. + # Otherwise, `token` is a Bearer token authorised to read domain_blocks. + # If `admin` = True, use the more detailed admin API, which requires a token with a + # higher level of authorization. + # If `import_fields` are provided, only import these fields from the instance. + # Overrides the global `import_fields` setting. + blocklist_instance_sources: [ + # { domain = 'public.blocklist'}, # an instance with a public list of domain_blocks + # { domain = 'jorts.horse', token = '' }, # user accessible block list + # { domain = 'eigenmagic.net', token = '', admin = true }, # admin access required + ] + + # List of URLs to read csv blocklists from + # Format tells the parser which format to use when parsing the blocklist + # max_severity tells the parser to override any severities that are higher than this value + # import_fields tells the parser to only import that set of fields from a specific source + blocklist_url_sources: [ + # { url = 'file:///path/to/fediblockhole/samples/demo-blocklist-01.csv', format = 'csv' }, + { url = 'https://raw.githubusercontent.com/eigenmagic/fediblockhole/main/samples/demo-blocklist-01.csv', format = 'csv' }, + + ] + + ## These global allowlists override blocks from blocklists + # These are the same format and structure as blocklists, but they take precedence + allowlist_url_sources: [ + { url = 'https://raw.githubusercontent.com/eigenmagic/fediblockhole/main/samples/demo-allowlist-01.csv', format = 'csv' }, + { url = 'https://raw.githubusercontent.com/eigenmagic/fediblockhole/main/samples/demo-allowlist-02.csv', format = 'csv' }, + ] + + # List of instances to write blocklist to + blocklist_instance_destinations: [ + # { domain = 'eigenmagic.net', token = '', max_followed_severity = 'silence'}, + ] + + ## Store a local copy of the remote blocklists after we fetch them + #save_intermediate = true + + ## Directory to store the local blocklist copies + # savedir = '/tmp' + + ## File to save the fully merged blocklist into + # blocklist_savefile = '/tmp/merged_blocklist.csv' + + ## Don't push blocklist to instances, even if they're defined above + # no_push_instance = false + + ## Don't fetch blocklists from URLs, even if they're defined above + # no_fetch_url = false + + ## Don't fetch blocklists from instances, even if they're defined above + # no_fetch_instance = false + + ## Set the mergeplan to use when dealing with overlaps between blocklists + # The default 'max' mergeplan will use the harshest severity block found for a domain. + # The 'min' mergeplan will use the lightest severity block found for a domain. + # mergeplan = 'max' + + ## Set which fields we import + ## 'domain' and 'severity' are always imported, these are additional + ## + import_fields = ['public_comment', 'reject_media', 'reject_reports', 'obfuscate'] + + ## Set which fields we export + ## 'domain' and 'severity' are always exported, these are additional + ## + export_fields = ['public_comment'] + # if you manually change the UID/GID environment variables, ensure these values # match: podSecurityContext: From 7c6cfebf304f16c0b265724a9fd3f6907fbe48da Mon Sep 17 00:00:00 2001 From: cunningpike <117583036+cunningpike@users.noreply.github.com> Date: Sat, 21 Jan 2023 19:59:54 -0500 Subject: [PATCH 028/125] Update and rename configmap-conf-toml to configmap-conf-toml.yaml --- chart/templates/configmap-conf-toml | 323 ----------------------- chart/templates/configmap-conf-toml.yaml | 74 ++++++ 2 files changed, 74 insertions(+), 323 deletions(-) delete mode 100644 chart/templates/configmap-conf-toml create mode 100644 chart/templates/configmap-conf-toml.yaml diff --git a/chart/templates/configmap-conf-toml b/chart/templates/configmap-conf-toml deleted file mode 100644 index fae348e..0000000 --- a/chart/templates/configmap-conf-toml +++ /dev/null @@ -1,323 +0,0 @@ -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ include "fediblockhole.fullname" . }}-conf-toml - labels: - {{- include "fediblockhole.labels" . | nindent 4 }} -data: - {{- if .Values.postgresql.enabled }} - DB_HOST: {{ template "mastodon.postgresql.fullname" . }} - DB_PORT: "5432" - {{- else }} - DB_HOST: {{ .Values.postgresql.postgresqlHostname }} - DB_PORT: {{ .Values.postgresql.postgresqlPort | default "5432" | quote }} - {{- end }} - DB_NAME: {{ .Values.postgresql.auth.database }} - DB_POOL: {{ include "mastodon.maxDbPool" . }} - DB_USER: {{ .Values.postgresql.auth.username }} - DEFAULT_LOCALE: {{ .Values.mastodon.locale }} - {{- if .Values.elasticsearch.enabled }} - ES_ENABLED: "true" - ES_HOST: {{ template "mastodon.elasticsearch.fullname" . }}-master-hl - ES_PORT: "9200" - {{- end }} - LOCAL_DOMAIN: {{ .Values.mastodon.local_domain }} - {{- with .Values.mastodon.web_domain }} - WEB_DOMAIN: {{ . }} - {{- end }} - {{- with .Values.mastodon.singleUserMode }} - SINGLE_USER_MODE: "true" - {{- end }} - {{- with .Values.mastodon.authorizedFetch }} - AUTHORIZED_FETCH: {{ . | quote }} - {{- end }} - # https://devcenter.heroku.com/articles/tuning-glibc-memory-behavior - MALLOC_ARENA_MAX: "2" - NODE_ENV: "production" - RAILS_ENV: "production" - {{- if .Values.redis.enabled }} - REDIS_HOST: {{ template "mastodon.redis.fullname" . }}-master - {{- else }} - REDIS_HOST: {{ required "When the redis chart is disabled .Values.redis.hostname is required" .Values.redis.hostname }} - {{- end }} - REDIS_PORT: {{ .Values.redis.port | default "6379" | quote }} - {{- if .Values.mastodon.s3.enabled }} - S3_BUCKET: {{ .Values.mastodon.s3.bucket }} - S3_ENABLED: "true" - S3_ENDPOINT: {{ .Values.mastodon.s3.endpoint }} - S3_HOSTNAME: {{ .Values.mastodon.s3.hostname }} - S3_PROTOCOL: "https" - {{- with .Values.mastodon.s3.region }} - S3_REGION: {{ . }} - {{- end }} - {{- with .Values.mastodon.s3.alias_host }} - S3_ALIAS_HOST: {{ .Values.mastodon.s3.alias_host}} - {{- end }} - {{- end }} - {{- with .Values.mastodon.smtp.auth_method }} - SMTP_AUTH_METHOD: {{ . }} - {{- end }} - {{- with .Values.mastodon.smtp.ca_file }} - SMTP_CA_FILE: {{ . }} - {{- end }} - {{- with .Values.mastodon.smtp.delivery_method }} - SMTP_DELIVERY_METHOD: {{ . }} - {{- end }} - {{- with .Values.mastodon.smtp.domain }} - SMTP_DOMAIN: {{ . }} - {{- end }} - {{- with .Values.mastodon.smtp.enable_starttls }} - SMTP_ENABLE_STARTTLS: {{ . | quote }} - {{- end }} - {{- with .Values.mastodon.smtp.enable_starttls_auto }} - SMTP_ENABLE_STARTTLS_AUTO: {{ . | quote }} - {{- end }} - {{- with .Values.mastodon.smtp.from_address }} - SMTP_FROM_ADDRESS: {{ . }} - {{- end }} - {{- with .Values.mastodon.smtp.login }} - SMTP_LOGIN: {{ . }} - {{- end }} - {{- with .Values.mastodon.smtp.openssl_verify_mode }} - SMTP_OPENSSL_VERIFY_MODE: {{ . }} - {{- end }} - {{- with .Values.mastodon.smtp.password }} - SMTP_PASSWORD: {{ . }} - {{- end }} - {{- with .Values.mastodon.smtp.port }} - SMTP_PORT: {{ . | quote }} - {{- end }} - {{- with .Values.mastodon.smtp.reply_to }} - SMTP_REPLY_TO: {{ . }} - {{- end }} - {{- with .Values.mastodon.smtp.server }} - SMTP_SERVER: {{ . }} - {{- end }} - {{- with .Values.mastodon.smtp.tls }} - SMTP_TLS: {{ . | quote }} - {{- end }} - STREAMING_CLUSTER_NUM: {{ .Values.mastodon.streaming.workers | quote }} - {{- with .Values.mastodon.streaming.base_url }} - STREAMING_API_BASE_URL: {{ . | quote }} - {{- end }} - {{- if .Values.externalAuth.oidc.enabled }} - OIDC_ENABLED: {{ .Values.externalAuth.oidc.enabled | quote }} - OIDC_DISPLAY_NAME: {{ .Values.externalAuth.oidc.display_name }} - OIDC_ISSUER: {{ .Values.externalAuth.oidc.issuer }} - OIDC_DISCOVERY: {{ .Values.externalAuth.oidc.discovery | quote }} - OIDC_SCOPE: {{ .Values.externalAuth.oidc.scope | quote }} - OIDC_UID_FIELD: {{ .Values.externalAuth.oidc.uid_field }} - OIDC_CLIENT_ID: {{ .Values.externalAuth.oidc.client_id }} - OIDC_CLIENT_SECRET: {{ .Values.externalAuth.oidc.client_secret }} - OIDC_REDIRECT_URI: {{ .Values.externalAuth.oidc.redirect_uri }} - OIDC_SECURITY_ASSUME_EMAIL_IS_VERIFIED: {{ .Values.externalAuth.oidc.assume_email_is_verified | quote }} - {{- with .Values.externalAuth.oidc.client_auth_method }} - OIDC_CLIENT_AUTH_METHOD: {{ . }} - {{- end }} - {{- with .Values.externalAuth.oidc.response_type }} - OIDC_RESPONSE_TYPE: {{ . }} - {{- end }} - {{- with .Values.externalAuth.oidc.response_mode }} - OIDC_RESPONSE_MODE: {{ . }} - {{- end }} - {{- with .Values.externalAuth.oidc.display }} - OIDC_DISPLAY: {{ . }} - {{- end }} - {{- with .Values.externalAuth.oidc.prompt }} - OIDC_PROMPT: {{ . }} - {{- end }} - {{- with .Values.externalAuth.oidc.send_nonce }} - OIDC_SEND_NONCE: {{ . }} - {{- end }} - {{- with .Values.externalAuth.oidc.send_scope_to_token_endpoint }} - OIDC_SEND_SCOPE_TO_TOKEN_ENDPOINT: {{ . | quote }} - {{- end }} - {{- with .Values.externalAuth.oidc.idp_logout_redirect_uri }} - OIDC_IDP_LOGOUT_REDIRECT_URI: {{ . }} - {{- end }} - {{- with .Values.externalAuth.oidc.http_scheme }} - OIDC_HTTP_SCHEME: {{ . }} - {{- end }} - {{- with .Values.externalAuth.oidc.host }} - OIDC_HOST: {{ . }} - {{- end }} - {{- with .Values.externalAuth.oidc.port }} - OIDC_PORT: {{ . }} - {{- end }} - {{- with .Values.externalAuth.oidc.jwks_uri }} - OIDC_JWKS_URI: {{ . }} - {{- end }} - {{- with .Values.externalAuth.oidc.auth_endpoint }} - OIDC_AUTH_ENDPOINT: {{ . }} - {{- end }} - {{- with .Values.externalAuth.oidc.token_endpoint }} - OIDC_TOKEN_ENDPOINT: {{ . }} - {{- end }} - {{- with .Values.externalAuth.oidc.user_info_endpoint }} - OIDC_USER_INFO_ENDPOINT: {{ . }} - {{- end }} - {{- with .Values.externalAuth.oidc.end_session_endpoint }} - OIDC_END_SESSION_ENDPOINT: {{ . }} - {{- end }} - {{- end }} - {{- if .Values.externalAuth.saml.enabled }} - SAML_ENABLED: {{ .Values.externalAuth.saml.enabled | quote }} - SAML_ACS_URL: {{ .Values.externalAuth.saml.acs_url }} - SAML_ISSUER: {{ .Values.externalAuth.saml.issuer }} - SAML_IDP_SSO_TARGET_URL: {{ .Values.externalAuth.saml.idp_sso_target_url }} - SAML_IDP_CERT: {{ .Values.externalAuth.saml.idp_cert | quote }} - {{- with .Values.externalAuth.saml.idp_cert_fingerprint }} - SAML_IDP_CERT_FINGERPRINT: {{ . | quote }} - {{- end }} - {{- with .Values.externalAuth.saml.name_identifier_format }} - SAML_NAME_IDENTIFIER_FORMAT: {{ . }} - {{- end }} - {{- with .Values.externalAuth.saml.cert }} - SAML_CERT: {{ . | quote }} - {{- end }} - {{- with .Values.externalAuth.saml.private_key }} - SAML_PRIVATE_KEY: {{ . | quote }} - {{- end }} - {{- with .Values.externalAuth.saml.want_assertion_signed }} - SAML_SECURITY_WANT_ASSERTION_SIGNED: {{ . | quote }} - {{- end }} - {{- with .Values.externalAuth.saml.want_assertion_encrypted }} - SAML_SECURITY_WANT_ASSERTION_ENCRYPTED: {{ . | quote }} - {{- end }} - {{- with .Values.externalAuth.saml.assume_email_is_verified }} - SAML_SECURITY_ASSUME_EMAIL_IS_VERIFIED: {{ . | quote }} - {{- end }} - {{- with .Values.externalAuth.saml.uid_attribute }} - SAML_UID_ATTRIBUTE: {{ . }} - {{- end }} - {{- with .Values.externalAuth.saml.attributes_statements.uid }} - SAML_ATTRIBUTES_STATEMENTS_UID: {{ . | quote }} - {{- end }} - {{- with .Values.externalAuth.saml.attributes_statements.email }} - SAML_ATTRIBUTES_STATEMENTS_EMAIL: {{ . | quote }} - {{- end }} - {{- with .Values.externalAuth.saml.attributes_statements.full_name }} - SAML_ATTRIBUTES_STATEMENTS_FULL_NAME: {{ . | quote }} - {{- end }} - {{- with .Values.externalAuth.saml.attributes_statements.first_name }} - SAML_ATTRIBUTES_STATEMENTS_FIRST_NAME: {{ . | quote }} - {{- end }} - {{- with .Values.externalAuth.saml.attributes_statements.last_name }} - SAML_ATTRIBUTES_STATEMENTS_LAST_NAME: {{ . | quote }} - {{- end }} - {{- with .Values.externalAuth.saml.attributes_statements.verified }} - SAML_ATTRIBUTES_STATEMENTS_VERIFIED: {{ . | quote }} - {{- end }} - {{- with .Values.externalAuth.saml.attributes_statements.verified_email }} - SAML_ATTRIBUTES_STATEMENTS_VERIFIED_EMAIL: {{ . | quote }} - {{- end }} - {{- end }} - {{- with .Values.externalAuth.oauth_global.omniauth_only }} - OMNIAUTH_ONLY: {{ . | quote }} - {{- end }} - {{- if .Values.externalAuth.cas.enabled }} - CAS_ENABLED: {{ .Values.externalAuth.cas.enabled | quote }} - CAS_URL: {{ .Values.externalAuth.cas.url }} - CAS_HOST: {{ .Values.externalAuth.cas.host }} - CAS_PORT: {{ .Values.externalAuth.cas.port }} - CAS_SSL: {{ .Values.externalAuth.cas.ssl | quote }} - {{- with .Values.externalAuth.cas.validate_url }} - CAS_VALIDATE_URL: {{ . }} - {{- end }} - {{- with .Values.externalAuth.cas.callback_url }} - CAS_CALLBACK_URL: {{ . }} - {{- end }} - {{- with .Values.externalAuth.cas.logout_url }} - CAS_LOGOUT_URL: {{ . }} - {{- end }} - {{- with .Values.externalAuth.cas.login_url }} - CAS_LOGIN_URL: {{ . }} - {{- end }} - {{- with .Values.externalAuth.cas.uid_field }} - CAS_UID_FIELD: {{ . | quote }} - {{- end }} - {{- with .Values.externalAuth.cas.ca_path }} - CAS_CA_PATH: {{ . }} - {{- end }} - {{- with .Values.externalAuth.cas.disable_ssl_verification }} - CAS_DISABLE_SSL_VERIFICATION: {{ . | quote }} - {{- end }} - {{- with .Values.externalAuth.cas.assume_email_is_verified }} - CAS_SECURITY_ASSUME_EMAIL_IS_VERIFIED: {{ . | quote }} - {{- end }} - {{- with .Values.externalAuth.cas.keys.uid }} - CAS_UID_KEY: {{ . | quote }} - {{- end }} - {{- with .Values.externalAuth.cas.keys.name }} - CAS_NAME_KEY: {{ . | quote }} - {{- end }} - {{- with .Values.externalAuth.cas.keys.email }} - CAS_EMAIL_KEY: {{ . | quote }} - {{- end }} - {{- with .Values.externalAuth.cas.keys.nickname }} - CAS_NICKNAME_KEY: {{ . | quote }} - {{- end }} - {{- with .Values.externalAuth.cas.keys.first_name }} - CAS_FIRST_NAME_KEY: {{ . | quote }} - {{- end }} - {{- with .Values.externalAuth.cas.keys.last_name }} - CAS_LAST_NAME_KEY: {{ . | quote }} - {{- end }} - {{- with .Values.externalAuth.cas.keys.location }} - CAS_LOCATION_KEY: {{ . | quote }} - {{- end }} - {{- with .Values.externalAuth.cas.keys.image }} - CAS_IMAGE_KEY: {{ . | quote }} - {{- end }} - {{- with .Values.externalAuth.cas.keys.phone }} - CAS_PHONE_KEY: {{ . | quote }} - {{- end }} - {{- end }} - {{- with .Values.externalAuth.pam.enabled }} - PAM_ENABLED: {{ . | quote }} - {{- with .Values.externalAuth.pam.email_domain }} - PAM_EMAIL_DOMAIN: {{ . }} - {{- end }} - {{- with .Values.externalAuth.pam.default_service }} - PAM_DEFAULT_SERVICE: {{ . }} - {{- end }} - {{- with .Values.externalAuth.pam.controlled_service }} - PAM_CONTROLLED_SERVICE: {{ . }} - {{- end }} - {{- end }} - {{- if .Values.externalAuth.ldap.enabled }} - LDAP_ENABLED: {{ .Values.externalAuth.ldap.enabled | quote }} - LDAP_HOST: {{ .Values.externalAuth.ldap.host }} - LDAP_PORT: {{ .Values.externalAuth.ldap.port }} - LDAP_METHOD: {{ .Values.externalAuth.ldap.method }} - {{- with .Values.externalAuth.ldap.base }} - LDAP_BASE: {{ . }} - {{- end }} - {{- with .Values.externalAuth.ldap.bind_on }} - LDAP_BIND_ON: {{ . }} - {{- end }} - {{- with .Values.externalAuth.ldap.password }} - LDAP_PASSWORD: {{ . }} - {{- end }} - {{- with .Values.externalAuth.ldap.uid }} - LDAP_UID: {{ . }} - {{- end }} - {{- with .Values.externalAuth.ldap.mail }} - LDAP_MAIL: {{ . }} - {{- end }} - {{- with .Values.externalAuth.ldap.search_filter }} - LDAP_SEARCH_FILTER: {{ . }} - {{- end }} - {{- with .Values.externalAuth.ldap.uid_conversion.enabled }} - LDAP_UID_CONVERSION_ENABLED: {{ . | quote }} - {{- end }} - {{- with .Values.externalAuth.ldap.uid_conversion.search }} - LDAP_UID_CONVERSION_SEARCH: {{ . }} - {{- end }} - {{- with .Values.externalAuth.ldap.uid_conversion.replace }} - LDAP_UID_CONVERSION_REPLACE: {{ . }} - {{- end }} - {{- end }} - {{- with .Values.mastodon.metrics.statsd.address }} - STATSD_ADDR: {{ . }} - {{- end }} diff --git a/chart/templates/configmap-conf-toml.yaml b/chart/templates/configmap-conf-toml.yaml new file mode 100644 index 0000000..335611e --- /dev/null +++ b/chart/templates/configmap-conf-toml.yaml @@ -0,0 +1,74 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ include "fediblockhole.fullname" . }}-conf-toml + labels: + {{- include "fediblockhole.labels" . | nindent 4 }} +data: + # List of instances to read blocklists from. + # If the instance makes its blocklist public, no authorization token is needed. + # Otherwise, `token` is a Bearer token authorised to read domain_blocks. + # If `admin` = True, use the more detailed admin API, which requires a token with a + # higher level of authorization. + # If `import_fields` are provided, only import these fields from the instance. + # Overrides the global `import_fields` setting. + blocklist_instance_sources = [ + # { domain = 'public.blocklist'}, # an instance with a public list of domain_blocks + # { domain = 'jorts.horse', token = '' }, # user accessible block list + # { domain = 'eigenmagic.net', token = '', admin = true }, # admin access required + ] + + # List of URLs to read csv blocklists from + # Format tells the parser which format to use when parsing the blocklist + # max_severity tells the parser to override any severities that are higher than this value + # import_fields tells the parser to only import that set of fields from a specific source + blocklist_url_sources = [ + # { url = 'file:///path/to/fediblockhole/samples/demo-blocklist-01.csv', format = 'csv' }, + { url = 'https://raw.githubusercontent.com/eigenmagic/fediblockhole/main/samples/demo-blocklist-01.csv', format = 'csv' }, + + ] + + ## These global allowlists override blocks from blocklists + # These are the same format and structure as blocklists, but they take precedence + allowlist_url_sources = [ + { url = 'https://raw.githubusercontent.com/eigenmagic/fediblockhole/main/samples/demo-allowlist-01.csv', format = 'csv' }, + { url = 'https://raw.githubusercontent.com/eigenmagic/fediblockhole/main/samples/demo-allowlist-02.csv', format = 'csv' }, + ] + + # List of instances to write blocklist to + blocklist_instance_destinations = [ + # { domain = 'eigenmagic.net', token = '', max_followed_severity = 'silence'}, + ] + + ## Store a local copy of the remote blocklists after we fetch them + #save_intermediate = true + + ## Directory to store the local blocklist copies + # savedir = '/tmp' + + ## File to save the fully merged blocklist into + # blocklist_savefile = '/tmp/merged_blocklist.csv' + + ## Don't push blocklist to instances, even if they're defined above + # no_push_instance = false + + ## Don't fetch blocklists from URLs, even if they're defined above + # no_fetch_url = false + + ## Don't fetch blocklists from instances, even if they're defined above + # no_fetch_instance = false + + ## Set the mergeplan to use when dealing with overlaps between blocklists + # The default 'max' mergeplan will use the harshest severity block found for a domain. + # The 'min' mergeplan will use the lightest severity block found for a domain. + # mergeplan = 'max' + + ## Set which fields we import + ## 'domain' and 'severity' are always imported, these are additional + ## + import_fields = ['public_comment', 'reject_media', 'reject_reports', 'obfuscate'] + + ## Set which fields we export + ## 'domain' and 'severity' are always exported, these are additional + ## + export_fields = ['public_comment'] From 1afd1265def3e943655b46fbcda9eb2f59075f87 Mon Sep 17 00:00:00 2001 From: cunningpike <117583036+cunningpike@users.noreply.github.com> Date: Sat, 21 Jan 2023 21:55:37 -0500 Subject: [PATCH 029/125] Update configmap-conf-toml.yaml --- chart/templates/configmap-conf-toml.yaml | 106 +++++++++-------------- 1 file changed, 39 insertions(+), 67 deletions(-) diff --git a/chart/templates/configmap-conf-toml.yaml b/chart/templates/configmap-conf-toml.yaml index 335611e..d07f25d 100644 --- a/chart/templates/configmap-conf-toml.yaml +++ b/chart/templates/configmap-conf-toml.yaml @@ -5,70 +5,42 @@ metadata: labels: {{- include "fediblockhole.labels" . | nindent 4 }} data: - # List of instances to read blocklists from. - # If the instance makes its blocklist public, no authorization token is needed. - # Otherwise, `token` is a Bearer token authorised to read domain_blocks. - # If `admin` = True, use the more detailed admin API, which requires a token with a - # higher level of authorization. - # If `import_fields` are provided, only import these fields from the instance. - # Overrides the global `import_fields` setting. - blocklist_instance_sources = [ - # { domain = 'public.blocklist'}, # an instance with a public list of domain_blocks - # { domain = 'jorts.horse', token = '' }, # user accessible block list - # { domain = 'eigenmagic.net', token = '', admin = true }, # admin access required - ] - - # List of URLs to read csv blocklists from - # Format tells the parser which format to use when parsing the blocklist - # max_severity tells the parser to override any severities that are higher than this value - # import_fields tells the parser to only import that set of fields from a specific source - blocklist_url_sources = [ - # { url = 'file:///path/to/fediblockhole/samples/demo-blocklist-01.csv', format = 'csv' }, - { url = 'https://raw.githubusercontent.com/eigenmagic/fediblockhole/main/samples/demo-blocklist-01.csv', format = 'csv' }, - - ] - - ## These global allowlists override blocks from blocklists - # These are the same format and structure as blocklists, but they take precedence - allowlist_url_sources = [ - { url = 'https://raw.githubusercontent.com/eigenmagic/fediblockhole/main/samples/demo-allowlist-01.csv', format = 'csv' }, - { url = 'https://raw.githubusercontent.com/eigenmagic/fediblockhole/main/samples/demo-allowlist-02.csv', format = 'csv' }, - ] - - # List of instances to write blocklist to - blocklist_instance_destinations = [ - # { domain = 'eigenmagic.net', token = '', max_followed_severity = 'silence'}, - ] - - ## Store a local copy of the remote blocklists after we fetch them - #save_intermediate = true - - ## Directory to store the local blocklist copies - # savedir = '/tmp' - - ## File to save the fully merged blocklist into - # blocklist_savefile = '/tmp/merged_blocklist.csv' - - ## Don't push blocklist to instances, even if they're defined above - # no_push_instance = false - - ## Don't fetch blocklists from URLs, even if they're defined above - # no_fetch_url = false - - ## Don't fetch blocklists from instances, even if they're defined above - # no_fetch_instance = false - - ## Set the mergeplan to use when dealing with overlaps between blocklists - # The default 'max' mergeplan will use the harshest severity block found for a domain. - # The 'min' mergeplan will use the lightest severity block found for a domain. - # mergeplan = 'max' - - ## Set which fields we import - ## 'domain' and 'severity' are always imported, these are additional - ## - import_fields = ['public_comment', 'reject_media', 'reject_reports', 'obfuscate'] - - ## Set which fields we export - ## 'domain' and 'severity' are always exported, these are additional - ## - export_fields = ['public_comment'] + {{- with .Values.fediblockhole.blocklist_instance_sources }} + blocklist_instance_sources: {{ . }} + {{- end }} + {{- with .Values.fediblockhole.blocklist_url_sources }} + blocklist_url_sources: {{ . }} + {{- end }} + {{- with .Values.fediblockhole.allowlist_url_sources }} + allowlist_url_sources: {{ . }} + {{- end }} + {{- with .Values.fediblockhole.blocklist_instance_destinations }} + blocklist_instance_destinations: {{ . }} + {{- end }} + {{- with .Values.fediblockhole.save_intermediate }} + save_intermediate: {{ . }} + {{- end }} + {{- with .Values.fediblockhole.savedir }} + savedir: {{ . }} + {{- end }} + {{- with .Values.fediblockhole.blocklist_savefile }} + blocklist_savefile: {{ . }} + {{- end }} + {{- with .Values.fediblockhole.no_push_instance }} + no_push_instance: {{ . }} + {{- end }} + {{- with .Values.fediblockhole.no_fetch_url }} + no_fetch_url: {{ . }} + {{- end }} + {{- with .Values.fediblockhole.no_fetch_instance }} + no_fetch_instance: {{ . }} + {{- end }} + {{- with .Values.fediblockhole.mergplan }} + mergeplan: {{ . }} + {{- end }} + {{- with .Values.fediblockhole.import_fields }} + import_fields: {{ . }} + {{- end }} + {{- with .Values.fediblockhole.export_fields }} + export_fields: {{ . }} + {{- end }} From 42838731b9ecb294ca86c1131dc06305597c2440 Mon Sep 17 00:00:00 2001 From: cunningpike <117583036+cunningpike@users.noreply.github.com> Date: Sat, 21 Jan 2023 21:58:11 -0500 Subject: [PATCH 030/125] Update cronjob-fediblock-sync.yaml --- chart/templates/cronjob-fediblock-sync.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chart/templates/cronjob-fediblock-sync.yaml b/chart/templates/cronjob-fediblock-sync.yaml index 0d00df3..9196383 100644 --- a/chart/templates/cronjob-fediblock-sync.yaml +++ b/chart/templates/cronjob-fediblock-sync.yaml @@ -28,7 +28,7 @@ spec: - {{ .Values.fediblockhole.conf_file.path }}{{ .Values.fediblockhole.conf_file.filename }} envFrom: - configMapRef: - name: {{ include "fediblockhole.fullname" . }}-env + name: {{ include "fediblockhole.fullname" . }}-conf-toml - secretRef: name: {{ template "fediblockhole.secretName" . }} volumeMounts: From eec6386e905b34b4924cc6b6c9a1d7047a6e4c31 Mon Sep 17 00:00:00 2001 From: cunningpike <117583036+cunningpike@users.noreply.github.com> Date: Sat, 21 Jan 2023 22:02:14 -0500 Subject: [PATCH 031/125] Update values.yaml --- chart/values.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chart/values.yaml b/chart/values.yaml index a93cf08..f4c4c8c 100644 --- a/chart/values.yaml +++ b/chart/values.yaml @@ -1,6 +1,6 @@ image: repository: ghcr.io/cunningpike/fediblockhole - # https://hub.docker.com/r/tootsuite/mastodon/tags + # https://github.com/cunningpike/fediblockhole/pkgs/container/fediblockhole/versions # # alternatively, use `latest` for the latest release or `edge` for the image # built from the most recent commit From bd1a4eca7e4d9243bfd3081203f79616c15fd8cf Mon Sep 17 00:00:00 2001 From: cunningpike <117583036+cunningpike@users.noreply.github.com> Date: Sat, 21 Jan 2023 22:41:01 -0500 Subject: [PATCH 032/125] Update values.yaml --- chart/values.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/chart/values.yaml b/chart/values.yaml index f4c4c8c..5de058c 100644 --- a/chart/values.yaml +++ b/chart/values.yaml @@ -94,12 +94,12 @@ fediblockhole: ## Set which fields we import ## 'domain' and 'severity' are always imported, these are additional ## - import_fields = ['public_comment', 'reject_media', 'reject_reports', 'obfuscate'] + import_fields: ['public_comment', 'reject_media', 'reject_reports', 'obfuscate'] ## Set which fields we export ## 'domain' and 'severity' are always exported, these are additional ## - export_fields = ['public_comment'] + export_fields: ['public_comment'] # if you manually change the UID/GID environment variables, ensure these values # match: From a9628a9a564e099793ad6a0614a3f46d7c846eda Mon Sep 17 00:00:00 2001 From: cunningpike <117583036+cunningpike@users.noreply.github.com> Date: Sat, 21 Jan 2023 22:53:10 -0500 Subject: [PATCH 033/125] Update values.yaml --- chart/values.yaml | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/chart/values.yaml b/chart/values.yaml index 5de058c..5386af1 100644 --- a/chart/values.yaml +++ b/chart/values.yaml @@ -41,9 +41,9 @@ fediblockhole: # If `import_fields` are provided, only import these fields from the instance. # Overrides the global `import_fields` setting. blocklist_instance_sources: [ - # { domain = 'public.blocklist'}, # an instance with a public list of domain_blocks - # { domain = 'jorts.horse', token = '' }, # user accessible block list - # { domain = 'eigenmagic.net', token = '', admin = true }, # admin access required + # { domain: 'public.blocklist'}, # an instance with a public list of domain_blocks + # { domain: 'jorts.horse', token = '' }, # user accessible block list + # { domain: 'eigenmagic.net', token = '', admin = true }, # admin access required ] # List of URLs to read csv blocklists from @@ -51,45 +51,45 @@ fediblockhole: # max_severity tells the parser to override any severities that are higher than this value # import_fields tells the parser to only import that set of fields from a specific source blocklist_url_sources: [ - # { url = 'file:///path/to/fediblockhole/samples/demo-blocklist-01.csv', format = 'csv' }, - { url = 'https://raw.githubusercontent.com/eigenmagic/fediblockhole/main/samples/demo-blocklist-01.csv', format = 'csv' }, + # { url: 'file:///path/to/fediblockhole/samples/demo-blocklist-01.csv', format = 'csv' }, + { url: 'https://raw.githubusercontent.com/eigenmagic/fediblockhole/main/samples/demo-blocklist-01.csv', format = 'csv' }, ] ## These global allowlists override blocks from blocklists # These are the same format and structure as blocklists, but they take precedence allowlist_url_sources: [ - { url = 'https://raw.githubusercontent.com/eigenmagic/fediblockhole/main/samples/demo-allowlist-01.csv', format = 'csv' }, - { url = 'https://raw.githubusercontent.com/eigenmagic/fediblockhole/main/samples/demo-allowlist-02.csv', format = 'csv' }, + { url: 'https://raw.githubusercontent.com/eigenmagic/fediblockhole/main/samples/demo-allowlist-01.csv', format = 'csv' }, + { url: 'https://raw.githubusercontent.com/eigenmagic/fediblockhole/main/samples/demo-allowlist-02.csv', format = 'csv' }, ] # List of instances to write blocklist to blocklist_instance_destinations: [ - # { domain = 'eigenmagic.net', token = '', max_followed_severity = 'silence'}, + # { domain: 'eigenmagic.net', token = '', max_followed_severity = 'silence'}, ] ## Store a local copy of the remote blocklists after we fetch them - #save_intermediate = true + #save_intermediate: true ## Directory to store the local blocklist copies - # savedir = '/tmp' + # savedir: '/tmp' ## File to save the fully merged blocklist into - # blocklist_savefile = '/tmp/merged_blocklist.csv' + # blocklist_savefile: '/tmp/merged_blocklist.csv' ## Don't push blocklist to instances, even if they're defined above - # no_push_instance = false + # no_push_instance: false ## Don't fetch blocklists from URLs, even if they're defined above - # no_fetch_url = false + # no_fetch_url: false ## Don't fetch blocklists from instances, even if they're defined above - # no_fetch_instance = false + # no_fetch_instance: false ## Set the mergeplan to use when dealing with overlaps between blocklists # The default 'max' mergeplan will use the harshest severity block found for a domain. # The 'min' mergeplan will use the lightest severity block found for a domain. - # mergeplan = 'max' + # mergeplan: 'max' ## Set which fields we import ## 'domain' and 'severity' are always imported, these are additional From c12c739fc0bde53a26914d62002c068b4ad43f99 Mon Sep 17 00:00:00 2001 From: cunningpike <117583036+cunningpike@users.noreply.github.com> Date: Sat, 21 Jan 2023 22:56:44 -0500 Subject: [PATCH 034/125] Update values.yaml --- chart/values.yaml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/chart/values.yaml b/chart/values.yaml index 5386af1..458244e 100644 --- a/chart/values.yaml +++ b/chart/values.yaml @@ -42,8 +42,8 @@ fediblockhole: # Overrides the global `import_fields` setting. blocklist_instance_sources: [ # { domain: 'public.blocklist'}, # an instance with a public list of domain_blocks - # { domain: 'jorts.horse', token = '' }, # user accessible block list - # { domain: 'eigenmagic.net', token = '', admin = true }, # admin access required + # { domain: 'jorts.horse', token: '' }, # user accessible block list + # { domain: 'eigenmagic.net', token: '', admin = true }, # admin access required ] # List of URLs to read csv blocklists from @@ -52,20 +52,20 @@ fediblockhole: # import_fields tells the parser to only import that set of fields from a specific source blocklist_url_sources: [ # { url: 'file:///path/to/fediblockhole/samples/demo-blocklist-01.csv', format = 'csv' }, - { url: 'https://raw.githubusercontent.com/eigenmagic/fediblockhole/main/samples/demo-blocklist-01.csv', format = 'csv' }, + { url: 'https://raw.githubusercontent.com/eigenmagic/fediblockhole/main/samples/demo-blocklist-01.csv', format: 'csv' }, ] ## These global allowlists override blocks from blocklists # These are the same format and structure as blocklists, but they take precedence allowlist_url_sources: [ - { url: 'https://raw.githubusercontent.com/eigenmagic/fediblockhole/main/samples/demo-allowlist-01.csv', format = 'csv' }, - { url: 'https://raw.githubusercontent.com/eigenmagic/fediblockhole/main/samples/demo-allowlist-02.csv', format = 'csv' }, + { url: 'https://raw.githubusercontent.com/eigenmagic/fediblockhole/main/samples/demo-allowlist-01.csv', format: 'csv' }, + { url: 'https://raw.githubusercontent.com/eigenmagic/fediblockhole/main/samples/demo-allowlist-02.csv', format: 'csv' }, ] # List of instances to write blocklist to blocklist_instance_destinations: [ - # { domain: 'eigenmagic.net', token = '', max_followed_severity = 'silence'}, + # { domain: 'eigenmagic.net', token: '', max_followed_severity: 'silence'}, ] ## Store a local copy of the remote blocklists after we fetch them From f8389e138d7920383dec39684e7349052ff2073d Mon Sep 17 00:00:00 2001 From: cunningpike <117583036+cunningpike@users.noreply.github.com> Date: Sat, 21 Jan 2023 22:58:01 -0500 Subject: [PATCH 035/125] Update values.yaml --- chart/values.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/chart/values.yaml b/chart/values.yaml index 458244e..de53c5c 100644 --- a/chart/values.yaml +++ b/chart/values.yaml @@ -43,7 +43,7 @@ fediblockhole: blocklist_instance_sources: [ # { domain: 'public.blocklist'}, # an instance with a public list of domain_blocks # { domain: 'jorts.horse', token: '' }, # user accessible block list - # { domain: 'eigenmagic.net', token: '', admin = true }, # admin access required + # { domain: 'eigenmagic.net', token: '', admin: true }, # admin access required ] # List of URLs to read csv blocklists from @@ -51,7 +51,7 @@ fediblockhole: # max_severity tells the parser to override any severities that are higher than this value # import_fields tells the parser to only import that set of fields from a specific source blocklist_url_sources: [ - # { url: 'file:///path/to/fediblockhole/samples/demo-blocklist-01.csv', format = 'csv' }, + # { url: 'file:///path/to/fediblockhole/samples/demo-blocklist-01.csv', format: 'csv' }, { url: 'https://raw.githubusercontent.com/eigenmagic/fediblockhole/main/samples/demo-blocklist-01.csv', format: 'csv' }, ] From 05f9f828f9cd1ebcd3a01270d47bdf1be4ca895b Mon Sep 17 00:00:00 2001 From: cunningpike <117583036+cunningpike@users.noreply.github.com> Date: Sun, 22 Jan 2023 21:23:23 -0500 Subject: [PATCH 036/125] Create _helpers.tpl --- chart/templates/_helpers.tpl | 92 ++++++++++++++++++++++++++++++++++++ 1 file changed, 92 insertions(+) create mode 100644 chart/templates/_helpers.tpl diff --git a/chart/templates/_helpers.tpl b/chart/templates/_helpers.tpl new file mode 100644 index 0000000..2fa1df7 --- /dev/null +++ b/chart/templates/_helpers.tpl @@ -0,0 +1,92 @@ +{{/* vim: set filetype=mustache: */}} +{{/* +Expand the name of the chart. +*/}} +{{- define "fediblockhole.name" -}} +{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }} +{{- end }} + +{{/* +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 "fediblockhole.fullname" -}} +{{- if .Values.fullnameOverride }} +{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }} +{{- else }} +{{- $name := default .Chart.Name .Values.nameOverride }} +{{- if contains $name .Release.Name }} +{{- .Release.Name | trunc 63 | trimSuffix "-" }} +{{- else }} +{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }} +{{- end }} +{{- end }} +{{- end }} + +{{/* +Create chart name and version as used by the chart label. +*/}} +{{- define "fediblockhole.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} +{{- end }} + +{{/* +Common labels +*/}} +{{- define "fediblockhole.labels" -}} +helm.sh/chart: {{ include "fediblockhole.chart" . }} +{{ include "fediblockhole.selectorLabels" . }} +{{- if .Chart.AppVersion }} +app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} +{{- end }} +app.kubernetes.io/managed-by: {{ .Release.Service }} +{{- end }} + +{{/* +Selector labels +*/}} +{{- define "fediblockhole.selectorLabels" -}} +app.kubernetes.io/name: {{ include "fediblockhole.name" . }} +app.kubernetes.io/instance: {{ .Release.Name }} +{{- end }} + +{{/* +Rolling pod annotations +*/}} +{{- define "fediblockhole.rollingPodAnnotations" -}} +rollme: {{ .Release.Revision | quote }} +checksum/config-secrets: {{ include ( print $.Template.BasePath "/secrets.yaml" ) . | sha256sum | quote }} +checksum/config-configmap: {{ include ( print $.Template.BasePath "/configmap-env.yaml" ) . | sha256sum | quote }} +{{- end }} + +{{/* +Create the name of the service account to use +*/}} +{{- define "fediblockhole.serviceAccountName" -}} +{{- if .Values.serviceAccount.create }} +{{- default (include "fediblockhole.fullname" .) .Values.serviceAccount.name }} +{{- else }} +{{- default "default" .Values.serviceAccount.name }} +{{- end }} +{{- end }} + +{{/* +Get the fediblockhole secret. +*/}} +{{- define "fediblockhole.secretName" -}} +{{- if .Values.fediblockhole.secrets.existingSecret }} + {{- printf "%s" (tpl .Values.fediblockhole.secrets.existingSecret $) -}} +{{- else -}} + {{- printf "%s" (include "common.names.fullname" .) -}} +{{- end -}} +{{- end -}} + +{{/* +Return true if a fediblockhole secret object should be created +*/}} +{{- define "fediblockhole.createSecret" -}} +{{- if (not .Values.mastodon.secrets.existingSecret) -}} + {{- true -}} +{{- end -}} +{{- end -}} From 536659bee62eaabcdf41e821236ffe645c4e9d87 Mon Sep 17 00:00:00 2001 From: cunningpike <117583036+cunningpike@users.noreply.github.com> Date: Sun, 22 Jan 2023 21:31:44 -0500 Subject: [PATCH 037/125] Create secrets.yaml --- chart/templates/secrets.yaml | 38 ++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 chart/templates/secrets.yaml diff --git a/chart/templates/secrets.yaml b/chart/templates/secrets.yaml new file mode 100644 index 0000000..b4da9ea --- /dev/null +++ b/chart/templates/secrets.yaml @@ -0,0 +1,38 @@ +{{- if (include "fediblockhole.createSecret" .) -}} +apiVersion: v1 +kind: Secret +metadata: + name: {{ template "fediblockhole.fullname" . }} + labels: + {{- include "fediblockhole.labels" . | nindent 4 }} +type: Opaque +data: + {{- if .Values.fediblockhole.s3.enabled }} + {{- if not .Values.fediblockhole.s3.existingSecret }} + AWS_ACCESS_KEY_ID: "{{ .Values.fediblockhole.s3.access_key | b64enc }}" + AWS_SECRET_ACCESS_KEY: "{{ .Values.fediblockhole.s3.access_secret | b64enc }}" + {{- end }} + {{- end }} + {{- if not .Values.fediblockhole.secrets.existingSecret }} + {{- if not (empty .Values.fediblockhole.secrets.secret_key_base) }} + SECRET_KEY_BASE: "{{ .Values.fediblockhole.secrets.secret_key_base | b64enc }}" + {{- else }} + SECRET_KEY_BASE: {{ required "secret_key_base is required" .Values.fediblockhole.secrets.secret_key_base }} + {{- end }} + {{- if not (empty .Values.fediblockhole.secrets.otp_secret) }} + OTP_SECRET: "{{ .Values.fediblockhole.secrets.otp_secret | b64enc }}" + {{- else }} + OTP_SECRET: {{ required "otp_secret is required" .Values.fediblockhole.secrets.otp_secret }} + {{- end }} + {{- if not (empty .Values.fediblockhole.secrets.vapid.private_key) }} + VAPID_PRIVATE_KEY: "{{ .Values.fediblockhole.secrets.vapid.private_key | b64enc }}" + {{- else }} + VAPID_PRIVATE_KEY: {{ required "vapid.private_key is required" .Values.fediblockhole.secrets.vapid.private_key }} + {{- end }} + {{- if not (empty .Values.fediblockhole.secrets.vapid.public_key) }} + VAPID_PUBLIC_KEY: "{{ .Values.fediblockhole.secrets.vapid.public_key | b64enc }}" + {{- else }} + VAPID_PUBLIC_KEY: {{ required "vapid.public_key is required" .Values.fediblockhole.secrets.vapid.public_key }} + {{- end }} + {{- end }} +{{- end }} From bc775098ffcf7b6b602fa32cff9bd8fb61909213 Mon Sep 17 00:00:00 2001 From: cunningpike <117583036+cunningpike@users.noreply.github.com> Date: Sun, 22 Jan 2023 21:36:49 -0500 Subject: [PATCH 038/125] Update secrets.yaml --- chart/templates/secrets.yaml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/chart/templates/secrets.yaml b/chart/templates/secrets.yaml index b4da9ea..064e1b0 100644 --- a/chart/templates/secrets.yaml +++ b/chart/templates/secrets.yaml @@ -7,12 +7,6 @@ metadata: {{- include "fediblockhole.labels" . | nindent 4 }} type: Opaque data: - {{- if .Values.fediblockhole.s3.enabled }} - {{- if not .Values.fediblockhole.s3.existingSecret }} - AWS_ACCESS_KEY_ID: "{{ .Values.fediblockhole.s3.access_key | b64enc }}" - AWS_SECRET_ACCESS_KEY: "{{ .Values.fediblockhole.s3.access_secret | b64enc }}" - {{- end }} - {{- end }} {{- if not .Values.fediblockhole.secrets.existingSecret }} {{- if not (empty .Values.fediblockhole.secrets.secret_key_base) }} SECRET_KEY_BASE: "{{ .Values.fediblockhole.secrets.secret_key_base | b64enc }}" From 80f9fbdbd3530a9b6d2a62c9ab8fce364741dc8d Mon Sep 17 00:00:00 2001 From: cunningpike <117583036+cunningpike@users.noreply.github.com> Date: Mon, 23 Jan 2023 10:37:19 -0500 Subject: [PATCH 039/125] Update _helpers.tpl --- chart/templates/_helpers.tpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chart/templates/_helpers.tpl b/chart/templates/_helpers.tpl index 2fa1df7..fe1b144 100644 --- a/chart/templates/_helpers.tpl +++ b/chart/templates/_helpers.tpl @@ -86,7 +86,7 @@ Get the fediblockhole secret. Return true if a fediblockhole secret object should be created */}} {{- define "fediblockhole.createSecret" -}} -{{- if (not .Values.mastodon.secrets.existingSecret) -}} +{{- if (not .Values.fediblockhole.secrets.existingSecret) -}} {{- true -}} {{- end -}} {{- end -}} From 8d1a417ba6b9d78acfc669f805f2f3318791ac44 Mon Sep 17 00:00:00 2001 From: cunningpike <117583036+cunningpike@users.noreply.github.com> Date: Mon, 23 Jan 2023 10:47:19 -0500 Subject: [PATCH 040/125] Update _helpers.tpl --- chart/templates/_helpers.tpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chart/templates/_helpers.tpl b/chart/templates/_helpers.tpl index fe1b144..3712d2b 100644 --- a/chart/templates/_helpers.tpl +++ b/chart/templates/_helpers.tpl @@ -57,7 +57,7 @@ Rolling pod annotations {{- define "fediblockhole.rollingPodAnnotations" -}} rollme: {{ .Release.Revision | quote }} checksum/config-secrets: {{ include ( print $.Template.BasePath "/secrets.yaml" ) . | sha256sum | quote }} -checksum/config-configmap: {{ include ( print $.Template.BasePath "/configmap-env.yaml" ) . | sha256sum | quote }} +checksum/config-configmap: {{ include ( print $.Template.BasePath "/configmap-conf-toml.yaml" ) . | sha256sum | quote }} {{- end }} {{/* From e1ea3e441a24e94a471e173895931a79d453d18d Mon Sep 17 00:00:00 2001 From: cunningpike <117583036+cunningpike@users.noreply.github.com> Date: Mon, 23 Jan 2023 10:48:37 -0500 Subject: [PATCH 041/125] Update _helpers.tpl --- chart/templates/_helpers.tpl | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/chart/templates/_helpers.tpl b/chart/templates/_helpers.tpl index 3712d2b..d2b8332 100644 --- a/chart/templates/_helpers.tpl +++ b/chart/templates/_helpers.tpl @@ -60,17 +60,6 @@ checksum/config-secrets: {{ include ( print $.Template.BasePath "/secrets.yaml" checksum/config-configmap: {{ include ( print $.Template.BasePath "/configmap-conf-toml.yaml" ) . | sha256sum | quote }} {{- end }} -{{/* -Create the name of the service account to use -*/}} -{{- define "fediblockhole.serviceAccountName" -}} -{{- if .Values.serviceAccount.create }} -{{- default (include "fediblockhole.fullname" .) .Values.serviceAccount.name }} -{{- else }} -{{- default "default" .Values.serviceAccount.name }} -{{- end }} -{{- end }} - {{/* Get the fediblockhole secret. */}} From 4d12395d96c5d46c611964fc24378273d931fc88 Mon Sep 17 00:00:00 2001 From: cunningpike <117583036+cunningpike@users.noreply.github.com> Date: Mon, 23 Jan 2023 11:02:40 -0500 Subject: [PATCH 042/125] Update Chart.yaml --- chart/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chart/Chart.yaml b/chart/Chart.yaml index b2196f9..2b488f6 100644 --- a/chart/Chart.yaml +++ b/chart/Chart.yaml @@ -15,7 +15,7 @@ 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.0.1 +version: 0.0.2 # 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 From 0a433084ef5bbfef46542f5066b870a73f50f82f Mon Sep 17 00:00:00 2001 From: cunningpike <117583036+cunningpike@users.noreply.github.com> Date: Mon, 23 Jan 2023 11:22:59 -0500 Subject: [PATCH 043/125] Update values.yaml --- chart/values.yaml | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/chart/values.yaml b/chart/values.yaml index de53c5c..e299e67 100644 --- a/chart/values.yaml +++ b/chart/values.yaml @@ -22,17 +22,6 @@ fediblockhole: enabled: false # @ignored schedule: "0 * * * *" - # these must be set manually; autogenerated keys are rotated on each upgrade - secrets: - secret_key_base: "" - otp_secret: "" - vapid: - private_key: "" - public_key: "" - # -- you can also specify the name of an existing Secret - # with keys SECRET_KEY_BASE and OTP_SECRET and - # VAPID_PRIVATE_KEY and VAPID_PUBLIC_KEY - existingSecret: "" # List of instances to read blocklists from. # If the instance makes its blocklist public, no authorization token is needed. # Otherwise, `token` is a Bearer token authorised to read domain_blocks. From 743e6b4dc08062049c855ff5f128d3f11d0d63cf Mon Sep 17 00:00:00 2001 From: cunningpike <117583036+cunningpike@users.noreply.github.com> Date: Mon, 23 Jan 2023 11:24:21 -0500 Subject: [PATCH 044/125] Update cronjob-fediblock-sync.yaml --- chart/templates/cronjob-fediblock-sync.yaml | 2 -- 1 file changed, 2 deletions(-) diff --git a/chart/templates/cronjob-fediblock-sync.yaml b/chart/templates/cronjob-fediblock-sync.yaml index 9196383..1785c25 100644 --- a/chart/templates/cronjob-fediblock-sync.yaml +++ b/chart/templates/cronjob-fediblock-sync.yaml @@ -29,8 +29,6 @@ spec: envFrom: - configMapRef: name: {{ include "fediblockhole.fullname" . }}-conf-toml - - secretRef: - name: {{ template "fediblockhole.secretName" . }} volumeMounts: - name: config mountPath: "{{ .Values.fediblockhole.conf_file.path }}" From df4d4232c0249198657ccfa9b92d9af5bb0b345c Mon Sep 17 00:00:00 2001 From: cunningpike <117583036+cunningpike@users.noreply.github.com> Date: Mon, 23 Jan 2023 11:24:52 -0500 Subject: [PATCH 045/125] Delete secrets.yaml --- chart/templates/secrets.yaml | 32 -------------------------------- 1 file changed, 32 deletions(-) delete mode 100644 chart/templates/secrets.yaml diff --git a/chart/templates/secrets.yaml b/chart/templates/secrets.yaml deleted file mode 100644 index 064e1b0..0000000 --- a/chart/templates/secrets.yaml +++ /dev/null @@ -1,32 +0,0 @@ -{{- if (include "fediblockhole.createSecret" .) -}} -apiVersion: v1 -kind: Secret -metadata: - name: {{ template "fediblockhole.fullname" . }} - labels: - {{- include "fediblockhole.labels" . | nindent 4 }} -type: Opaque -data: - {{- if not .Values.fediblockhole.secrets.existingSecret }} - {{- if not (empty .Values.fediblockhole.secrets.secret_key_base) }} - SECRET_KEY_BASE: "{{ .Values.fediblockhole.secrets.secret_key_base | b64enc }}" - {{- else }} - SECRET_KEY_BASE: {{ required "secret_key_base is required" .Values.fediblockhole.secrets.secret_key_base }} - {{- end }} - {{- if not (empty .Values.fediblockhole.secrets.otp_secret) }} - OTP_SECRET: "{{ .Values.fediblockhole.secrets.otp_secret | b64enc }}" - {{- else }} - OTP_SECRET: {{ required "otp_secret is required" .Values.fediblockhole.secrets.otp_secret }} - {{- end }} - {{- if not (empty .Values.fediblockhole.secrets.vapid.private_key) }} - VAPID_PRIVATE_KEY: "{{ .Values.fediblockhole.secrets.vapid.private_key | b64enc }}" - {{- else }} - VAPID_PRIVATE_KEY: {{ required "vapid.private_key is required" .Values.fediblockhole.secrets.vapid.private_key }} - {{- end }} - {{- if not (empty .Values.fediblockhole.secrets.vapid.public_key) }} - VAPID_PUBLIC_KEY: "{{ .Values.fediblockhole.secrets.vapid.public_key | b64enc }}" - {{- else }} - VAPID_PUBLIC_KEY: {{ required "vapid.public_key is required" .Values.fediblockhole.secrets.vapid.public_key }} - {{- end }} - {{- end }} -{{- end }} From c6a4bbd17052b8bfe2c5df49a49213b165f1cc78 Mon Sep 17 00:00:00 2001 From: cunningpike <117583036+cunningpike@users.noreply.github.com> Date: Mon, 23 Jan 2023 11:26:14 -0500 Subject: [PATCH 046/125] Update _helpers.tpl --- chart/templates/_helpers.tpl | 21 --------------------- 1 file changed, 21 deletions(-) diff --git a/chart/templates/_helpers.tpl b/chart/templates/_helpers.tpl index d2b8332..bf47fd3 100644 --- a/chart/templates/_helpers.tpl +++ b/chart/templates/_helpers.tpl @@ -56,26 +56,5 @@ Rolling pod annotations */}} {{- define "fediblockhole.rollingPodAnnotations" -}} rollme: {{ .Release.Revision | quote }} -checksum/config-secrets: {{ include ( print $.Template.BasePath "/secrets.yaml" ) . | sha256sum | quote }} checksum/config-configmap: {{ include ( print $.Template.BasePath "/configmap-conf-toml.yaml" ) . | sha256sum | quote }} {{- end }} - -{{/* -Get the fediblockhole secret. -*/}} -{{- define "fediblockhole.secretName" -}} -{{- if .Values.fediblockhole.secrets.existingSecret }} - {{- printf "%s" (tpl .Values.fediblockhole.secrets.existingSecret $) -}} -{{- else -}} - {{- printf "%s" (include "common.names.fullname" .) -}} -{{- end -}} -{{- end -}} - -{{/* -Return true if a fediblockhole secret object should be created -*/}} -{{- define "fediblockhole.createSecret" -}} -{{- if (not .Values.fediblockhole.secrets.existingSecret) -}} - {{- true -}} -{{- end -}} -{{- end -}} From 85b6d8b0e06e3605c6e6e1b8b5e28f13dfdbe5af Mon Sep 17 00:00:00 2001 From: cunningpike <117583036+cunningpike@users.noreply.github.com> Date: Mon, 23 Jan 2023 11:26:56 -0500 Subject: [PATCH 047/125] Update Chart.yaml --- chart/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chart/Chart.yaml b/chart/Chart.yaml index 2b488f6..322c786 100644 --- a/chart/Chart.yaml +++ b/chart/Chart.yaml @@ -15,7 +15,7 @@ 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.0.2 +version: 0.0.3 # 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 From 00d3cb80bff896696283c91d6ac3f33f9ec2de24 Mon Sep 17 00:00:00 2001 From: cunningpike <117583036+cunningpike@users.noreply.github.com> Date: Mon, 23 Jan 2023 12:01:33 -0500 Subject: [PATCH 048/125] Update configmap-conf-toml.yaml --- chart/templates/configmap-conf-toml.yaml | 40 +----------------------- 1 file changed, 1 insertion(+), 39 deletions(-) diff --git a/chart/templates/configmap-conf-toml.yaml b/chart/templates/configmap-conf-toml.yaml index d07f25d..f320b67 100644 --- a/chart/templates/configmap-conf-toml.yaml +++ b/chart/templates/configmap-conf-toml.yaml @@ -5,42 +5,4 @@ metadata: labels: {{- include "fediblockhole.labels" . | nindent 4 }} data: - {{- with .Values.fediblockhole.blocklist_instance_sources }} - blocklist_instance_sources: {{ . }} - {{- end }} - {{- with .Values.fediblockhole.blocklist_url_sources }} - blocklist_url_sources: {{ . }} - {{- end }} - {{- with .Values.fediblockhole.allowlist_url_sources }} - allowlist_url_sources: {{ . }} - {{- end }} - {{- with .Values.fediblockhole.blocklist_instance_destinations }} - blocklist_instance_destinations: {{ . }} - {{- end }} - {{- with .Values.fediblockhole.save_intermediate }} - save_intermediate: {{ . }} - {{- end }} - {{- with .Values.fediblockhole.savedir }} - savedir: {{ . }} - {{- end }} - {{- with .Values.fediblockhole.blocklist_savefile }} - blocklist_savefile: {{ . }} - {{- end }} - {{- with .Values.fediblockhole.no_push_instance }} - no_push_instance: {{ . }} - {{- end }} - {{- with .Values.fediblockhole.no_fetch_url }} - no_fetch_url: {{ . }} - {{- end }} - {{- with .Values.fediblockhole.no_fetch_instance }} - no_fetch_instance: {{ . }} - {{- end }} - {{- with .Values.fediblockhole.mergplan }} - mergeplan: {{ . }} - {{- end }} - {{- with .Values.fediblockhole.import_fields }} - import_fields: {{ . }} - {{- end }} - {{- with .Values.fediblockhole.export_fields }} - export_fields: {{ . }} - {{- end }} + {{ (.Files.Glob "fediblockhole.conf.toml").AsConfig | nindent 4 }} From ef2814540c50148bcd01e5184218405fa64e58d4 Mon Sep 17 00:00:00 2001 From: cunningpike <117583036+cunningpike@users.noreply.github.com> Date: Mon, 23 Jan 2023 12:02:43 -0500 Subject: [PATCH 049/125] Create fediblockhole.conf.toml --- chart/templates/fediblockhole.conf.toml | 67 +++++++++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 chart/templates/fediblockhole.conf.toml diff --git a/chart/templates/fediblockhole.conf.toml b/chart/templates/fediblockhole.conf.toml new file mode 100644 index 0000000..e377e97 --- /dev/null +++ b/chart/templates/fediblockhole.conf.toml @@ -0,0 +1,67 @@ +# List of instances to read blocklists from. +# If the instance makes its blocklist public, no authorization token is needed. +# Otherwise, `token` is a Bearer token authorised to read domain_blocks. +# If `admin` = True, use the more detailed admin API, which requires a token with a +# higher level of authorization. +# If `import_fields` are provided, only import these fields from the instance. +# Overrides the global `import_fields` setting. +blocklist_instance_sources = [ + # { domain = 'public.blocklist'}, # an instance with a public list of domain_blocks + # { domain = 'jorts.horse', token = '' }, # user accessible block list + # { domain = 'eigenmagic.net', token = '', admin = true }, # admin access required +] + +# List of URLs to read csv blocklists from +# Format tells the parser which format to use when parsing the blocklist +# max_severity tells the parser to override any severities that are higher than this value +# import_fields tells the parser to only import that set of fields from a specific source +blocklist_url_sources = [ + # { url = 'file:///path/to/fediblockhole/samples/demo-blocklist-01.csv', format = 'csv' }, + { url = 'https://raw.githubusercontent.com/eigenmagic/fediblockhole/main/samples/demo-blocklist-01.csv', format = 'csv' }, + +] + +## These global allowlists override blocks from blocklists +# These are the same format and structure as blocklists, but they take precedence +allowlist_url_sources = [ + { url = 'https://raw.githubusercontent.com/eigenmagic/fediblockhole/main/samples/demo-allowlist-01.csv', format = 'csv' }, + { url = 'https://raw.githubusercontent.com/eigenmagic/fediblockhole/main/samples/demo-allowlist-02.csv', format = 'csv' }, +] + +# List of instances to write blocklist to +blocklist_instance_destinations = [ + # { domain = 'eigenmagic.net', token = '', max_followed_severity = 'silence'}, +] + +## Store a local copy of the remote blocklists after we fetch them +#save_intermediate = true + +## Directory to store the local blocklist copies +# savedir = '/tmp' + +## File to save the fully merged blocklist into +# blocklist_savefile = '/tmp/merged_blocklist.csv' + +## Don't push blocklist to instances, even if they're defined above +# no_push_instance = false + +## Don't fetch blocklists from URLs, even if they're defined above +# no_fetch_url = false + +## Don't fetch blocklists from instances, even if they're defined above +# no_fetch_instance = false + +## Set the mergeplan to use when dealing with overlaps between blocklists +# The default 'max' mergeplan will use the harshest severity block found for a domain. +# The 'min' mergeplan will use the lightest severity block found for a domain. +# mergeplan = 'max' + +## Set which fields we import +## 'domain' and 'severity' are always imported, these are additional +## +import_fields = ['public_comment', 'reject_media', 'reject_reports', 'obfuscate'] + +## Set which fields we export +## 'domain' and 'severity' are always exported, these are additional +## +export_fields = ['public_comment'] From 885bbcca0caa8087af9795de2756b40972ccc415 Mon Sep 17 00:00:00 2001 From: cunningpike <117583036+cunningpike@users.noreply.github.com> Date: Mon, 23 Jan 2023 12:07:15 -0500 Subject: [PATCH 050/125] Update values.yaml --- chart/values.yaml | 67 ----------------------------------------------- 1 file changed, 67 deletions(-) diff --git a/chart/values.yaml b/chart/values.yaml index e299e67..0aa310f 100644 --- a/chart/values.yaml +++ b/chart/values.yaml @@ -22,73 +22,6 @@ fediblockhole: enabled: false # @ignored schedule: "0 * * * *" - # List of instances to read blocklists from. - # If the instance makes its blocklist public, no authorization token is needed. - # Otherwise, `token` is a Bearer token authorised to read domain_blocks. - # If `admin` = True, use the more detailed admin API, which requires a token with a - # higher level of authorization. - # If `import_fields` are provided, only import these fields from the instance. - # Overrides the global `import_fields` setting. - blocklist_instance_sources: [ - # { domain: 'public.blocklist'}, # an instance with a public list of domain_blocks - # { domain: 'jorts.horse', token: '' }, # user accessible block list - # { domain: 'eigenmagic.net', token: '', admin: true }, # admin access required - ] - - # List of URLs to read csv blocklists from - # Format tells the parser which format to use when parsing the blocklist - # max_severity tells the parser to override any severities that are higher than this value - # import_fields tells the parser to only import that set of fields from a specific source - blocklist_url_sources: [ - # { url: 'file:///path/to/fediblockhole/samples/demo-blocklist-01.csv', format: 'csv' }, - { url: 'https://raw.githubusercontent.com/eigenmagic/fediblockhole/main/samples/demo-blocklist-01.csv', format: 'csv' }, - - ] - - ## These global allowlists override blocks from blocklists - # These are the same format and structure as blocklists, but they take precedence - allowlist_url_sources: [ - { url: 'https://raw.githubusercontent.com/eigenmagic/fediblockhole/main/samples/demo-allowlist-01.csv', format: 'csv' }, - { url: 'https://raw.githubusercontent.com/eigenmagic/fediblockhole/main/samples/demo-allowlist-02.csv', format: 'csv' }, - ] - - # List of instances to write blocklist to - blocklist_instance_destinations: [ - # { domain: 'eigenmagic.net', token: '', max_followed_severity: 'silence'}, - ] - - ## Store a local copy of the remote blocklists after we fetch them - #save_intermediate: true - - ## Directory to store the local blocklist copies - # savedir: '/tmp' - - ## File to save the fully merged blocklist into - # blocklist_savefile: '/tmp/merged_blocklist.csv' - - ## Don't push blocklist to instances, even if they're defined above - # no_push_instance: false - - ## Don't fetch blocklists from URLs, even if they're defined above - # no_fetch_url: false - - ## Don't fetch blocklists from instances, even if they're defined above - # no_fetch_instance: false - - ## Set the mergeplan to use when dealing with overlaps between blocklists - # The default 'max' mergeplan will use the harshest severity block found for a domain. - # The 'min' mergeplan will use the lightest severity block found for a domain. - # mergeplan: 'max' - - ## Set which fields we import - ## 'domain' and 'severity' are always imported, these are additional - ## - import_fields: ['public_comment', 'reject_media', 'reject_reports', 'obfuscate'] - - ## Set which fields we export - ## 'domain' and 'severity' are always exported, these are additional - ## - export_fields: ['public_comment'] # if you manually change the UID/GID environment variables, ensure these values # match: From e2d95aab4d50f3239c4bfcb30a012761055404de Mon Sep 17 00:00:00 2001 From: cunningpike <117583036+cunningpike@users.noreply.github.com> Date: Mon, 23 Jan 2023 12:10:34 -0500 Subject: [PATCH 051/125] Update cronjob-fediblock-sync.yaml --- chart/templates/cronjob-fediblock-sync.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chart/templates/cronjob-fediblock-sync.yaml b/chart/templates/cronjob-fediblock-sync.yaml index 1785c25..817af22 100644 --- a/chart/templates/cronjob-fediblock-sync.yaml +++ b/chart/templates/cronjob-fediblock-sync.yaml @@ -36,7 +36,7 @@ spec: volumes: - name: config configMap: - name: {{ include "fediblockhole.fullname" . }}-env + name: {{ include "fediblockhole.fullname" . }}-conf-toml items: - key: "{{ .Values.fediblockhole.conf_file.filename }}" path: "{{ .Values.fediblockhole.conf_file.filename }}" From 5eb8cf103216ddc994799232aca45fc767b7b45c Mon Sep 17 00:00:00 2001 From: cunningpike <117583036+cunningpike@users.noreply.github.com> Date: Mon, 23 Jan 2023 12:28:11 -0500 Subject: [PATCH 052/125] Update configmap-conf-toml.yaml --- chart/templates/configmap-conf-toml.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/chart/templates/configmap-conf-toml.yaml b/chart/templates/configmap-conf-toml.yaml index f320b67..53afe70 100644 --- a/chart/templates/configmap-conf-toml.yaml +++ b/chart/templates/configmap-conf-toml.yaml @@ -5,4 +5,6 @@ metadata: labels: {{- include "fediblockhole.labels" . | nindent 4 }} data: + conf_file_path: {{ .Values.fediblockhole.conf_file.path | default "/etc/default/" | quote }} + conf_file_filename: {{ .Values.fediblockhole.conf_file.filename | default "fediblockhole.conf.toml" | quote }} {{ (.Files.Glob "fediblockhole.conf.toml").AsConfig | nindent 4 }} From 85ed0a2de057d11492785840b1142aa47f30e5d5 Mon Sep 17 00:00:00 2001 From: cunningpike <117583036+cunningpike@users.noreply.github.com> Date: Mon, 23 Jan 2023 12:30:25 -0500 Subject: [PATCH 053/125] Update cronjob-fediblock-sync.yaml --- chart/templates/cronjob-fediblock-sync.yaml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/chart/templates/cronjob-fediblock-sync.yaml b/chart/templates/cronjob-fediblock-sync.yaml index 817af22..bcbf286 100644 --- a/chart/templates/cronjob-fediblock-sync.yaml +++ b/chart/templates/cronjob-fediblock-sync.yaml @@ -25,19 +25,19 @@ spec: command: - fediblock - -c - - {{ .Values.fediblockhole.conf_file.path }}{{ .Values.fediblockhole.conf_file.filename }} + - {{ .Values.fediblockhole.conf_file_path }}{{ .Values.fediblockhole.conf_file_filename }} envFrom: - configMapRef: name: {{ include "fediblockhole.fullname" . }}-conf-toml volumeMounts: - name: config - mountPath: "{{ .Values.fediblockhole.conf_file.path }}" - subPath: {{ .Values.fediblockhole.conf_file.filename }} + mountPath: "{{ .Values.fediblockhole.conf_file_path }}" + subPath: {{ .Values.fediblockhole.conf_file_filename }} volumes: - name: config configMap: name: {{ include "fediblockhole.fullname" . }}-conf-toml items: - - key: "{{ .Values.fediblockhole.conf_file.filename }}" - path: "{{ .Values.fediblockhole.conf_file.filename }}" + - key: "{{ .Values.fediblockhole.conf_file_filename }}" + path: "{{ .Values.fediblockhole.conf_file_filename }}" {{- end }} From a0d307081ae1c12e39bb480139436ac13b84e764 Mon Sep 17 00:00:00 2001 From: cunningpike <117583036+cunningpike@users.noreply.github.com> Date: Mon, 23 Jan 2023 12:31:09 -0500 Subject: [PATCH 054/125] Update configmap-conf-toml.yaml --- chart/templates/configmap-conf-toml.yaml | 2 -- 1 file changed, 2 deletions(-) diff --git a/chart/templates/configmap-conf-toml.yaml b/chart/templates/configmap-conf-toml.yaml index 53afe70..f320b67 100644 --- a/chart/templates/configmap-conf-toml.yaml +++ b/chart/templates/configmap-conf-toml.yaml @@ -5,6 +5,4 @@ metadata: labels: {{- include "fediblockhole.labels" . | nindent 4 }} data: - conf_file_path: {{ .Values.fediblockhole.conf_file.path | default "/etc/default/" | quote }} - conf_file_filename: {{ .Values.fediblockhole.conf_file.filename | default "fediblockhole.conf.toml" | quote }} {{ (.Files.Glob "fediblockhole.conf.toml").AsConfig | nindent 4 }} From a301adae99c08e7af40793b528600e8806584e7b Mon Sep 17 00:00:00 2001 From: cunningpike <117583036+cunningpike@users.noreply.github.com> Date: Mon, 23 Jan 2023 12:38:42 -0500 Subject: [PATCH 055/125] Update _helpers.tpl --- chart/templates/_helpers.tpl | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/chart/templates/_helpers.tpl b/chart/templates/_helpers.tpl index bf47fd3..fcd2e18 100644 --- a/chart/templates/_helpers.tpl +++ b/chart/templates/_helpers.tpl @@ -58,3 +58,21 @@ Rolling pod annotations rollme: {{ .Release.Revision | quote }} checksum/config-configmap: {{ include ( print $.Template.BasePath "/configmap-conf-toml.yaml" ) . | sha256sum | quote }} {{- end }} + +{{/* +Create the default conf file path and filename +*/}} +{{- define "fediblockhole.conf_file_path" -}} +{{- if .Values.fediblockhole.conf_file.path }} +{{- default .Values.fediblockhole.conf_file.path }} +{{- else }} +{{- default "default" "/etc/default/" }} +{{- end }} +{{- end }} +{{- define "fediblockhole.conf_file_filename" -}} +{{- if .Values.fediblockhole.conf_file.filename }} +{{- default .Values.fediblockhole.conf_file.filename }} +{{- else }} +{{- default "default" "fediblockhole.conf.toml" }} +{{- end }} +{{- end }} From ca011825d19f90d80cad19cd5d7c3b1b724450d7 Mon Sep 17 00:00:00 2001 From: cunningpike <117583036+cunningpike@users.noreply.github.com> Date: Mon, 23 Jan 2023 12:39:26 -0500 Subject: [PATCH 056/125] Update Chart.yaml --- chart/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chart/Chart.yaml b/chart/Chart.yaml index 322c786..4d6468e 100644 --- a/chart/Chart.yaml +++ b/chart/Chart.yaml @@ -15,7 +15,7 @@ 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.0.3 +version: 0.0.4 # 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 From f393a2cf044dd8c99d92319ff85fe70a88b5fdcf Mon Sep 17 00:00:00 2001 From: cunningpike <117583036+cunningpike@users.noreply.github.com> Date: Mon, 23 Jan 2023 12:43:55 -0500 Subject: [PATCH 057/125] Update cronjob-fediblock-sync.yaml --- chart/templates/cronjob-fediblock-sync.yaml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/chart/templates/cronjob-fediblock-sync.yaml b/chart/templates/cronjob-fediblock-sync.yaml index bcbf286..8be3992 100644 --- a/chart/templates/cronjob-fediblock-sync.yaml +++ b/chart/templates/cronjob-fediblock-sync.yaml @@ -25,19 +25,19 @@ spec: command: - fediblock - -c - - {{ .Values.fediblockhole.conf_file_path }}{{ .Values.fediblockhole.conf_file_filename }} + - {{- include "fediblockhole.conf_file_path" . }}{{- include "fediblockhole.conf_file_filename" . }} envFrom: - configMapRef: name: {{ include "fediblockhole.fullname" . }}-conf-toml volumeMounts: - name: config - mountPath: "{{ .Values.fediblockhole.conf_file_path }}" - subPath: {{ .Values.fediblockhole.conf_file_filename }} + mountPath: {{- "include fediblockhole.conf_file_path" . | quote }} + subPath: {{- include "fediblockhole.conf_file_filename" . }} volumes: - name: config configMap: name: {{ include "fediblockhole.fullname" . }}-conf-toml items: - - key: "{{ .Values.fediblockhole.conf_file_filename }}" - path: "{{ .Values.fediblockhole.conf_file_filename }}" + - key: {{- include "fediblockhole.conf_file_filename" . | quote }} + path: {{- include "fediblockhole.conf_file_filename" . | quote }} {{- end }} From cec5d6e8151474b8ca5e2bc3fb8712efa5fd1c0c Mon Sep 17 00:00:00 2001 From: cunningpike <117583036+cunningpike@users.noreply.github.com> Date: Mon, 23 Jan 2023 12:44:15 -0500 Subject: [PATCH 058/125] Update Chart.yaml --- chart/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chart/Chart.yaml b/chart/Chart.yaml index 4d6468e..2424b0b 100644 --- a/chart/Chart.yaml +++ b/chart/Chart.yaml @@ -15,7 +15,7 @@ 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.0.4 +version: 0.0.5 # 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 From f8ad543e2d4084e99424583d9dfcac579dc250c4 Mon Sep 17 00:00:00 2001 From: cunningpike <117583036+cunningpike@users.noreply.github.com> Date: Mon, 23 Jan 2023 13:04:40 -0500 Subject: [PATCH 059/125] Update cronjob-fediblock-sync.yaml --- chart/templates/cronjob-fediblock-sync.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chart/templates/cronjob-fediblock-sync.yaml b/chart/templates/cronjob-fediblock-sync.yaml index 8be3992..c01596c 100644 --- a/chart/templates/cronjob-fediblock-sync.yaml +++ b/chart/templates/cronjob-fediblock-sync.yaml @@ -31,7 +31,7 @@ spec: name: {{ include "fediblockhole.fullname" . }}-conf-toml volumeMounts: - name: config - mountPath: {{- "include fediblockhole.conf_file_path" . | quote }} + mountPath: {{- include "fediblockhole.conf_file_path" . | quote }} subPath: {{- include "fediblockhole.conf_file_filename" . }} volumes: - name: config From a5da3641450fb3dbb8884ebc2b846ce8a717861b Mon Sep 17 00:00:00 2001 From: cunningpike <117583036+cunningpike@users.noreply.github.com> Date: Mon, 23 Jan 2023 13:04:58 -0500 Subject: [PATCH 060/125] Update Chart.yaml --- chart/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chart/Chart.yaml b/chart/Chart.yaml index 2424b0b..df1c656 100644 --- a/chart/Chart.yaml +++ b/chart/Chart.yaml @@ -15,7 +15,7 @@ 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.0.5 +version: 0.0.6 # 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 From 4051e26caa20bf35215d79be8191a7947331119c Mon Sep 17 00:00:00 2001 From: cunningpike <117583036+cunningpike@users.noreply.github.com> Date: Mon, 23 Jan 2023 13:09:03 -0500 Subject: [PATCH 061/125] Update cronjob-fediblock-sync.yaml --- chart/templates/cronjob-fediblock-sync.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/chart/templates/cronjob-fediblock-sync.yaml b/chart/templates/cronjob-fediblock-sync.yaml index c01596c..34a60e6 100644 --- a/chart/templates/cronjob-fediblock-sync.yaml +++ b/chart/templates/cronjob-fediblock-sync.yaml @@ -23,9 +23,9 @@ spec: image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" imagePullPolicy: {{ .Values.image.pullPolicy }} command: - - fediblock + - fediblock-sync - -c - - {{- include "fediblockhole.conf_file_path" . }}{{- include "fediblockhole.conf_file_filename" . }} + - "{{- include "fediblockhole.conf_file_path" . }}{{- include "fediblockhole.conf_file_filename" . }}" envFrom: - configMapRef: name: {{ include "fediblockhole.fullname" . }}-conf-toml From 5b94030dbe7107081a3e3e3c7d0daf6965c36c50 Mon Sep 17 00:00:00 2001 From: cunningpike <117583036+cunningpike@users.noreply.github.com> Date: Mon, 23 Jan 2023 13:09:21 -0500 Subject: [PATCH 062/125] Update Chart.yaml --- chart/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chart/Chart.yaml b/chart/Chart.yaml index df1c656..69bcb25 100644 --- a/chart/Chart.yaml +++ b/chart/Chart.yaml @@ -15,7 +15,7 @@ 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.0.6 +version: 0.0.7 # 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 From c86864d94080f5998b3a923d6de41032eb3ed5a8 Mon Sep 17 00:00:00 2001 From: cunningpike <117583036+cunningpike@users.noreply.github.com> Date: Mon, 23 Jan 2023 13:15:33 -0500 Subject: [PATCH 063/125] Update _helpers.tpl --- chart/templates/_helpers.tpl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/chart/templates/_helpers.tpl b/chart/templates/_helpers.tpl index fcd2e18..d69232e 100644 --- a/chart/templates/_helpers.tpl +++ b/chart/templates/_helpers.tpl @@ -66,13 +66,13 @@ Create the default conf file path and filename {{- if .Values.fediblockhole.conf_file.path }} {{- default .Values.fediblockhole.conf_file.path }} {{- else }} -{{- default "default" "/etc/default/" }} +{{- default "/etc/default/" }} {{- end }} {{- end }} {{- define "fediblockhole.conf_file_filename" -}} {{- if .Values.fediblockhole.conf_file.filename }} {{- default .Values.fediblockhole.conf_file.filename }} {{- else }} -{{- default "default" "fediblockhole.conf.toml" }} +{{- default "fediblockhole.conf.toml" }} {{- end }} {{- end }} From f59295a28fa4846c81c40fba887f6471d419031d Mon Sep 17 00:00:00 2001 From: cunningpike <117583036+cunningpike@users.noreply.github.com> Date: Mon, 23 Jan 2023 13:16:24 -0500 Subject: [PATCH 064/125] Update cronjob-fediblock-sync.yaml --- chart/templates/cronjob-fediblock-sync.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chart/templates/cronjob-fediblock-sync.yaml b/chart/templates/cronjob-fediblock-sync.yaml index 34a60e6..b1e1e4e 100644 --- a/chart/templates/cronjob-fediblock-sync.yaml +++ b/chart/templates/cronjob-fediblock-sync.yaml @@ -25,7 +25,7 @@ spec: command: - fediblock-sync - -c - - "{{- include "fediblockhole.conf_file_path" . }}{{- include "fediblockhole.conf_file_filename" . }}" + - {{- include "fediblockhole.conf_file_path" . }}{{- include "fediblockhole.conf_file_filename" . }} envFrom: - configMapRef: name: {{ include "fediblockhole.fullname" . }}-conf-toml From 3fe133a54417361b6619c7afbd6a66ffd0f36c85 Mon Sep 17 00:00:00 2001 From: cunningpike <117583036+cunningpike@users.noreply.github.com> Date: Mon, 23 Jan 2023 13:16:42 -0500 Subject: [PATCH 065/125] Update Chart.yaml --- chart/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chart/Chart.yaml b/chart/Chart.yaml index 69bcb25..d730629 100644 --- a/chart/Chart.yaml +++ b/chart/Chart.yaml @@ -15,7 +15,7 @@ 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.0.7 +version: 0.0.8 # 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 From b0166262be6e3ea942e01a3debb70616fafd1ad4 Mon Sep 17 00:00:00 2001 From: cunningpike <117583036+cunningpike@users.noreply.github.com> Date: Mon, 23 Jan 2023 13:22:04 -0500 Subject: [PATCH 066/125] Update Chart.yaml --- chart/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chart/Chart.yaml b/chart/Chart.yaml index d730629..6bcf8a1 100644 --- a/chart/Chart.yaml +++ b/chart/Chart.yaml @@ -15,7 +15,7 @@ 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.0.8 +version: 0.0.9 # 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 From 2c55d3139709630ffb8b4969c5c9704c0af3dafa Mon Sep 17 00:00:00 2001 From: cunningpike <117583036+cunningpike@users.noreply.github.com> Date: Mon, 23 Jan 2023 13:40:55 -0500 Subject: [PATCH 067/125] Update _helpers.tpl --- chart/templates/_helpers.tpl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/chart/templates/_helpers.tpl b/chart/templates/_helpers.tpl index d69232e..d42cc60 100644 --- a/chart/templates/_helpers.tpl +++ b/chart/templates/_helpers.tpl @@ -64,15 +64,15 @@ Create the default conf file path and filename */}} {{- define "fediblockhole.conf_file_path" -}} {{- if .Values.fediblockhole.conf_file.path }} -{{- default .Values.fediblockhole.conf_file.path }} +{{- .Values.fediblockhole.conf_file.path }} {{- else }} -{{- default "/etc/default/" }} +{{- "/etc/default/" }} {{- end }} {{- end }} {{- define "fediblockhole.conf_file_filename" -}} {{- if .Values.fediblockhole.conf_file.filename }} -{{- default .Values.fediblockhole.conf_file.filename }} +{{- .Values.fediblockhole.conf_file.filename }} {{- else }} -{{- default "fediblockhole.conf.toml" }} +{{- "fediblockhole.conf.toml" }} {{- end }} {{- end }} From 7710c5d7dc4ceebedb1b068c7a9d1ab3b82f68fe Mon Sep 17 00:00:00 2001 From: cunningpike <117583036+cunningpike@users.noreply.github.com> Date: Mon, 23 Jan 2023 13:41:14 -0500 Subject: [PATCH 068/125] Update Chart.yaml --- chart/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chart/Chart.yaml b/chart/Chart.yaml index 6bcf8a1..b22acfa 100644 --- a/chart/Chart.yaml +++ b/chart/Chart.yaml @@ -15,7 +15,7 @@ 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.0.9 +version: 0.0.10 # 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 From 75a5a6a55b3b333cc7164eae18e25f1f043e1170 Mon Sep 17 00:00:00 2001 From: cunningpike <117583036+cunningpike@users.noreply.github.com> Date: Mon, 23 Jan 2023 13:55:08 -0500 Subject: [PATCH 069/125] Update _helpers.tpl --- chart/templates/_helpers.tpl | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/chart/templates/_helpers.tpl b/chart/templates/_helpers.tpl index d42cc60..78e6610 100644 --- a/chart/templates/_helpers.tpl +++ b/chart/templates/_helpers.tpl @@ -63,16 +63,8 @@ checksum/config-configmap: {{ include ( print $.Template.BasePath "/configmap-co Create the default conf file path and filename */}} {{- define "fediblockhole.conf_file_path" -}} -{{- if .Values.fediblockhole.conf_file.path }} -{{- .Values.fediblockhole.conf_file.path }} -{{- else }} -{{- "/etc/default/" }} -{{- end }} +{{- default "/etc/default/" .Values.fediblockhole.conf_file.path }} {{- end }} {{- define "fediblockhole.conf_file_filename" -}} -{{- if .Values.fediblockhole.conf_file.filename }} -{{- .Values.fediblockhole.conf_file.filename }} -{{- else }} -{{- "fediblockhole.conf.toml" }} -{{- end }} +{{- default "fediblockhole.conf.toml" .Values.fediblockhole.conf_file.filename }} {{- end }} From a17461aafc5adc0bc1b6ffe7165a37d5b6fee868 Mon Sep 17 00:00:00 2001 From: cunningpike <117583036+cunningpike@users.noreply.github.com> Date: Mon, 23 Jan 2023 13:57:05 -0500 Subject: [PATCH 070/125] Update Chart.yaml --- chart/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chart/Chart.yaml b/chart/Chart.yaml index b22acfa..107a1e7 100644 --- a/chart/Chart.yaml +++ b/chart/Chart.yaml @@ -15,7 +15,7 @@ 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.0.10 +version: 0.0.11 # 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 From facb997fcec5c4593451d44cdb4633359b2b302c Mon Sep 17 00:00:00 2001 From: cunningpike <117583036+cunningpike@users.noreply.github.com> Date: Mon, 23 Jan 2023 14:25:11 -0500 Subject: [PATCH 071/125] Update cronjob-fediblock-sync.yaml --- chart/templates/cronjob-fediblock-sync.yaml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/chart/templates/cronjob-fediblock-sync.yaml b/chart/templates/cronjob-fediblock-sync.yaml index b1e1e4e..b3d6975 100644 --- a/chart/templates/cronjob-fediblock-sync.yaml +++ b/chart/templates/cronjob-fediblock-sync.yaml @@ -25,19 +25,19 @@ spec: command: - fediblock-sync - -c - - {{- include "fediblockhole.conf_file_path" . }}{{- include "fediblockhole.conf_file_filename" . }} + - {{ include "fediblockhole.conf_file_path" . }}{{ include "fediblockhole.conf_file_filename" . }} envFrom: - configMapRef: name: {{ include "fediblockhole.fullname" . }}-conf-toml volumeMounts: - name: config - mountPath: {{- include "fediblockhole.conf_file_path" . | quote }} - subPath: {{- include "fediblockhole.conf_file_filename" . }} + mountPath: {{ include "fediblockhole.conf_file_path" . | quote }} + subPath: {{ include "fediblockhole.conf_file_filename" . }} volumes: - name: config configMap: name: {{ include "fediblockhole.fullname" . }}-conf-toml items: - - key: {{- include "fediblockhole.conf_file_filename" . | quote }} - path: {{- include "fediblockhole.conf_file_filename" . | quote }} + - key: {{ include "fediblockhole.conf_file_filename" . | quote }} + path: {{ include "fediblockhole.conf_file_filename" . | quote }} {{- end }} From 5ea33252c78727e64bd78f874c074c15541dcfc6 Mon Sep 17 00:00:00 2001 From: cunningpike <117583036+cunningpike@users.noreply.github.com> Date: Mon, 23 Jan 2023 14:25:39 -0500 Subject: [PATCH 072/125] Update Chart.yaml --- chart/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chart/Chart.yaml b/chart/Chart.yaml index 107a1e7..a2853df 100644 --- a/chart/Chart.yaml +++ b/chart/Chart.yaml @@ -15,7 +15,7 @@ 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.0.11 +version: 0.0.12 # 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 From a98bce23d8079e089d9bb6e7aa913e9690aeb047 Mon Sep 17 00:00:00 2001 From: cunningpike <117583036+cunningpike@users.noreply.github.com> Date: Mon, 23 Jan 2023 14:56:16 -0500 Subject: [PATCH 073/125] Update cronjob-fediblock-sync.yaml --- chart/templates/cronjob-fediblock-sync.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/chart/templates/cronjob-fediblock-sync.yaml b/chart/templates/cronjob-fediblock-sync.yaml index b3d6975..26a957b 100644 --- a/chart/templates/cronjob-fediblock-sync.yaml +++ b/chart/templates/cronjob-fediblock-sync.yaml @@ -26,9 +26,9 @@ spec: - fediblock-sync - -c - {{ include "fediblockhole.conf_file_path" . }}{{ include "fediblockhole.conf_file_filename" . }} - envFrom: - - configMapRef: - name: {{ include "fediblockhole.fullname" . }}-conf-toml + # envFrom: + # - configMapRef: + # name: {{ include "fediblockhole.fullname" . }}-conf-toml volumeMounts: - name: config mountPath: {{ include "fediblockhole.conf_file_path" . | quote }} From 0d8c0b88a88132603f5b84ea543901da09211e5f Mon Sep 17 00:00:00 2001 From: cunningpike <117583036+cunningpike@users.noreply.github.com> Date: Mon, 23 Jan 2023 14:56:34 -0500 Subject: [PATCH 074/125] Update Chart.yaml --- chart/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chart/Chart.yaml b/chart/Chart.yaml index a2853df..6cc4b54 100644 --- a/chart/Chart.yaml +++ b/chart/Chart.yaml @@ -15,7 +15,7 @@ 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.0.12 +version: 0.0.13 # 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 From 5e1b3c34276e9f3571fc4281aadcb8a256c7f66e Mon Sep 17 00:00:00 2001 From: cunningpike <117583036+cunningpike@users.noreply.github.com> Date: Mon, 23 Jan 2023 16:18:42 -0500 Subject: [PATCH 075/125] Update Chart.yaml --- chart/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chart/Chart.yaml b/chart/Chart.yaml index 6cc4b54..cae81c0 100644 --- a/chart/Chart.yaml +++ b/chart/Chart.yaml @@ -15,7 +15,7 @@ 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.0.13 +version: 0.0.14 # 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 From 776856ac831e0a26db85ed0763469cea93df68de Mon Sep 17 00:00:00 2001 From: cunningpike <117583036+cunningpike@users.noreply.github.com> Date: Mon, 23 Jan 2023 19:54:25 -0500 Subject: [PATCH 076/125] Update cronjob-fediblock-sync.yaml --- chart/templates/cronjob-fediblock-sync.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chart/templates/cronjob-fediblock-sync.yaml b/chart/templates/cronjob-fediblock-sync.yaml index 26a957b..d623553 100644 --- a/chart/templates/cronjob-fediblock-sync.yaml +++ b/chart/templates/cronjob-fediblock-sync.yaml @@ -25,7 +25,7 @@ spec: command: - fediblock-sync - -c - - {{ include "fediblockhole.conf_file_path" . }}{{ include "fediblockhole.conf_file_filename" . }} + - {{- include "fediblockhole.conf_file_path" . -}}{{- include "fediblockhole.conf_file_filename" . -}} # envFrom: # - configMapRef: # name: {{ include "fediblockhole.fullname" . }}-conf-toml From e48eba9be30645b12e4cba868791e7fc75799a26 Mon Sep 17 00:00:00 2001 From: cunningpike <117583036+cunningpike@users.noreply.github.com> Date: Mon, 23 Jan 2023 19:54:50 -0500 Subject: [PATCH 077/125] Update Chart.yaml --- chart/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chart/Chart.yaml b/chart/Chart.yaml index cae81c0..88cc242 100644 --- a/chart/Chart.yaml +++ b/chart/Chart.yaml @@ -15,7 +15,7 @@ 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.0.14 +version: 0.0.15 # 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 From 3c60fd2b37f669f6b6c87e718346bd4a23df37ce Mon Sep 17 00:00:00 2001 From: cunningpike <117583036+cunningpike@users.noreply.github.com> Date: Mon, 23 Jan 2023 20:02:44 -0500 Subject: [PATCH 078/125] Update cronjob-fediblock-sync.yaml --- chart/templates/cronjob-fediblock-sync.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chart/templates/cronjob-fediblock-sync.yaml b/chart/templates/cronjob-fediblock-sync.yaml index d623553..fb36669 100644 --- a/chart/templates/cronjob-fediblock-sync.yaml +++ b/chart/templates/cronjob-fediblock-sync.yaml @@ -25,7 +25,7 @@ spec: command: - fediblock-sync - -c - - {{- include "fediblockhole.conf_file_path" . -}}{{- include "fediblockhole.conf_file_filename" . -}} + - {{- include "fediblockhole.conf_file_path" . -}}{{- include "fediblockhole.conf_file_filename" . }} # envFrom: # - configMapRef: # name: {{ include "fediblockhole.fullname" . }}-conf-toml From 456a303de26211897173373fcf5e0fb55e1096eb Mon Sep 17 00:00:00 2001 From: cunningpike <117583036+cunningpike@users.noreply.github.com> Date: Mon, 23 Jan 2023 20:03:01 -0500 Subject: [PATCH 079/125] Update Chart.yaml --- chart/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chart/Chart.yaml b/chart/Chart.yaml index 88cc242..08577f0 100644 --- a/chart/Chart.yaml +++ b/chart/Chart.yaml @@ -15,7 +15,7 @@ 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.0.15 +version: 0.0.16 # 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 From 2bb802f2e3fa97d8d7b87043679bd32968e220e6 Mon Sep 17 00:00:00 2001 From: cunningpike <117583036+cunningpike@users.noreply.github.com> Date: Mon, 23 Jan 2023 20:59:30 -0500 Subject: [PATCH 080/125] Update cronjob-fediblock-sync.yaml --- chart/templates/cronjob-fediblock-sync.yaml | 3 --- 1 file changed, 3 deletions(-) diff --git a/chart/templates/cronjob-fediblock-sync.yaml b/chart/templates/cronjob-fediblock-sync.yaml index fb36669..408bb84 100644 --- a/chart/templates/cronjob-fediblock-sync.yaml +++ b/chart/templates/cronjob-fediblock-sync.yaml @@ -26,9 +26,6 @@ spec: - fediblock-sync - -c - {{- include "fediblockhole.conf_file_path" . -}}{{- include "fediblockhole.conf_file_filename" . }} - # envFrom: - # - configMapRef: - # name: {{ include "fediblockhole.fullname" . }}-conf-toml volumeMounts: - name: config mountPath: {{ include "fediblockhole.conf_file_path" . | quote }} From dceef35e9d89795645cf463e021f06dcc029bf70 Mon Sep 17 00:00:00 2001 From: cunningpike <117583036+cunningpike@users.noreply.github.com> Date: Mon, 23 Jan 2023 20:59:50 -0500 Subject: [PATCH 081/125] Update Chart.yaml --- chart/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chart/Chart.yaml b/chart/Chart.yaml index 08577f0..8a2085c 100644 --- a/chart/Chart.yaml +++ b/chart/Chart.yaml @@ -15,7 +15,7 @@ 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.0.16 +version: 0.0.17 # 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 From 65d82b01a3bf8861d102e00d9cfda91007458633 Mon Sep 17 00:00:00 2001 From: cunningpike <117583036+cunningpike@users.noreply.github.com> Date: Tue, 24 Jan 2023 10:44:19 -0500 Subject: [PATCH 082/125] Update .helmignore --- chart/.helmignore | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/chart/.helmignore b/chart/.helmignore index 0cbed47..cc86fd7 100644 --- a/chart/.helmignore +++ b/chart/.helmignore @@ -5,9 +5,7 @@ # Manually added by us # -------------------- # -dev-values.yaml -mastodon-*.tgz - +*.toml # Boilerplate .helmignore from `helm create mastodon` # --------------------------------------------------- From 05ce67f42e264c86c7312c5c7705fde4be0797ed Mon Sep 17 00:00:00 2001 From: cunningpike <117583036+cunningpike@users.noreply.github.com> Date: Tue, 24 Jan 2023 10:50:09 -0500 Subject: [PATCH 083/125] Update Chart.yaml --- chart/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chart/Chart.yaml b/chart/Chart.yaml index 8a2085c..17ed129 100644 --- a/chart/Chart.yaml +++ b/chart/Chart.yaml @@ -15,7 +15,7 @@ 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.0.17 +version: 0.0.18 # 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 From 5c903e534c65dc38c5adf912926ab5776e7b473e Mon Sep 17 00:00:00 2001 From: cunningpike <117583036+cunningpike@users.noreply.github.com> Date: Tue, 24 Jan 2023 11:55:18 -0500 Subject: [PATCH 084/125] Rename chart/templates/fediblockhole.conf.toml to chart/fediblockhole.conf.toml --- chart/{templates => }/fediblockhole.conf.toml | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename chart/{templates => }/fediblockhole.conf.toml (100%) diff --git a/chart/templates/fediblockhole.conf.toml b/chart/fediblockhole.conf.toml similarity index 100% rename from chart/templates/fediblockhole.conf.toml rename to chart/fediblockhole.conf.toml From cdd7c277debab804bf71388ab367710335cb6fb8 Mon Sep 17 00:00:00 2001 From: cunningpike <117583036+cunningpike@users.noreply.github.com> Date: Tue, 24 Jan 2023 11:55:40 -0500 Subject: [PATCH 085/125] Update .helmignore --- chart/.helmignore | 1 - 1 file changed, 1 deletion(-) diff --git a/chart/.helmignore b/chart/.helmignore index cc86fd7..c47a352 100644 --- a/chart/.helmignore +++ b/chart/.helmignore @@ -5,7 +5,6 @@ # Manually added by us # -------------------- # -*.toml # Boilerplate .helmignore from `helm create mastodon` # --------------------------------------------------- From 3eb8fe5e911f6a9b479fee226fe318f2f90b75d0 Mon Sep 17 00:00:00 2001 From: cunningpike <117583036+cunningpike@users.noreply.github.com> Date: Tue, 24 Jan 2023 11:56:13 -0500 Subject: [PATCH 086/125] Update Chart.yaml --- chart/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chart/Chart.yaml b/chart/Chart.yaml index 17ed129..7bcf1b7 100644 --- a/chart/Chart.yaml +++ b/chart/Chart.yaml @@ -15,7 +15,7 @@ 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.0.18 +version: 0.0.19 # 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 From afdb355bad2f772bd0c0464fc007e0cdef874583 Mon Sep 17 00:00:00 2001 From: cunningpike <117583036+cunningpike@users.noreply.github.com> Date: Tue, 24 Jan 2023 12:38:18 -0500 Subject: [PATCH 087/125] Update cronjob-fediblock-sync.yaml --- chart/templates/cronjob-fediblock-sync.yaml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/chart/templates/cronjob-fediblock-sync.yaml b/chart/templates/cronjob-fediblock-sync.yaml index 408bb84..3a026d0 100644 --- a/chart/templates/cronjob-fediblock-sync.yaml +++ b/chart/templates/cronjob-fediblock-sync.yaml @@ -25,16 +25,16 @@ spec: command: - fediblock-sync - -c - - {{- include "fediblockhole.conf_file_path" . -}}{{- include "fediblockhole.conf_file_filename" . }} - volumeMounts: - - name: config - mountPath: {{ include "fediblockhole.conf_file_path" . | quote }} - subPath: {{ include "fediblockhole.conf_file_filename" . }} + - "{{- include "fediblockhole.conf_file_path" . -}}{{- include "fediblockhole.conf_file_filename" . -}}" + volumeMounts: + - name: config + mountPath: {{ include "fediblockhole.conf_file_path" . | quote }} + subPath: {{ include "fediblockhole.conf_file_filename" . }} volumes: - name: config configMap: name: {{ include "fediblockhole.fullname" . }}-conf-toml items: - key: {{ include "fediblockhole.conf_file_filename" . | quote }} - path: {{ include "fediblockhole.conf_file_filename" . | quote }} + path: {{ include "fediblockhole.conf_file_filename" . | quote }} {{- end }} From ed280ed6f88f88d1b6869a1b27ec5ccb18bf1062 Mon Sep 17 00:00:00 2001 From: cunningpike <117583036+cunningpike@users.noreply.github.com> Date: Tue, 24 Jan 2023 12:38:39 -0500 Subject: [PATCH 088/125] Update Chart.yaml --- chart/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chart/Chart.yaml b/chart/Chart.yaml index 7bcf1b7..a70ad58 100644 --- a/chart/Chart.yaml +++ b/chart/Chart.yaml @@ -15,7 +15,7 @@ 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.0.19 +version: 0.0.20 # 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 From 934db7b71bbefb35433a5df4d76f033afd4f234d Mon Sep 17 00:00:00 2001 From: cunningpike <117583036+cunningpike@users.noreply.github.com> Date: Tue, 24 Jan 2023 13:11:19 -0500 Subject: [PATCH 089/125] Update Chart.yaml --- chart/Chart.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/chart/Chart.yaml b/chart/Chart.yaml index a70ad58..4f0ddcb 100644 --- a/chart/Chart.yaml +++ b/chart/Chart.yaml @@ -15,9 +15,9 @@ 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.0.20 +version: 0.0.21 # 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. -appVersion: v0.4.1 +appVersion: 0.4.1 From dc1bf6f9a030394c8c9d953d16b01354ce508446 Mon Sep 17 00:00:00 2001 From: cunningpike <117583036+cunningpike@users.noreply.github.com> Date: Tue, 24 Jan 2023 13:37:56 -0500 Subject: [PATCH 090/125] Update cronjob-fediblock-sync.yaml --- chart/templates/cronjob-fediblock-sync.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chart/templates/cronjob-fediblock-sync.yaml b/chart/templates/cronjob-fediblock-sync.yaml index 3a026d0..3f34b8d 100644 --- a/chart/templates/cronjob-fediblock-sync.yaml +++ b/chart/templates/cronjob-fediblock-sync.yaml @@ -29,7 +29,7 @@ spec: volumeMounts: - name: config mountPath: {{ include "fediblockhole.conf_file_path" . | quote }} - subPath: {{ include "fediblockhole.conf_file_filename" . }} + # subPath: {{ include "fediblockhole.conf_file_filename" . }} volumes: - name: config configMap: From 12113af4bbfdd39c62cbcc6f6709233365c49ff6 Mon Sep 17 00:00:00 2001 From: cunningpike <117583036+cunningpike@users.noreply.github.com> Date: Tue, 24 Jan 2023 13:38:17 -0500 Subject: [PATCH 091/125] Update Chart.yaml --- chart/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chart/Chart.yaml b/chart/Chart.yaml index 4f0ddcb..8111c04 100644 --- a/chart/Chart.yaml +++ b/chart/Chart.yaml @@ -15,7 +15,7 @@ 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.0.21 +version: 0.0.22 # 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 From 0e67cd3fdbfda02ad74d1eb36f19981e034d59e5 Mon Sep 17 00:00:00 2001 From: cunningpike <117583036+cunningpike@users.noreply.github.com> Date: Tue, 24 Jan 2023 22:22:46 -0500 Subject: [PATCH 092/125] Update cronjob-fediblock-sync.yaml --- chart/templates/cronjob-fediblock-sync.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/chart/templates/cronjob-fediblock-sync.yaml b/chart/templates/cronjob-fediblock-sync.yaml index 3f34b8d..b19302b 100644 --- a/chart/templates/cronjob-fediblock-sync.yaml +++ b/chart/templates/cronjob-fediblock-sync.yaml @@ -29,7 +29,6 @@ spec: volumeMounts: - name: config mountPath: {{ include "fediblockhole.conf_file_path" . | quote }} - # subPath: {{ include "fediblockhole.conf_file_filename" . }} volumes: - name: config configMap: From 88ae33aa0ddd85bdc5be6b03e8184d71bffac4f9 Mon Sep 17 00:00:00 2001 From: cunningpike <117583036+cunningpike@users.noreply.github.com> Date: Tue, 24 Jan 2023 22:23:02 -0500 Subject: [PATCH 093/125] Update Chart.yaml --- chart/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chart/Chart.yaml b/chart/Chart.yaml index 8111c04..1f6a770 100644 --- a/chart/Chart.yaml +++ b/chart/Chart.yaml @@ -15,7 +15,7 @@ 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.0.22 +version: 0.0.23 # 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 From fa407cafb77cb15fc951cdda166f264830077e3b Mon Sep 17 00:00:00 2001 From: cunningpike <117583036+cunningpike@users.noreply.github.com> Date: Wed, 25 Jan 2023 14:36:42 -0500 Subject: [PATCH 094/125] Update Chart.yaml --- chart/Chart.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/chart/Chart.yaml b/chart/Chart.yaml index 1f6a770..85e47e7 100644 --- a/chart/Chart.yaml +++ b/chart/Chart.yaml @@ -15,9 +15,9 @@ 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.0.23 +version: 1.0.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. -appVersion: 0.4.1 +appVersion: 0.4.2 From 769b3fd3d61fbdcb6743d01c0647f0ce921ec5bd Mon Sep 17 00:00:00 2001 From: cunningpike <117583036+cunningpike@users.noreply.github.com> Date: Mon, 6 Feb 2023 11:42:53 -0500 Subject: [PATCH 095/125] Removed static reference to conf file --- chart/templates/_helpers.tpl | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/chart/templates/_helpers.tpl b/chart/templates/_helpers.tpl index 78e6610..a416d2d 100644 --- a/chart/templates/_helpers.tpl +++ b/chart/templates/_helpers.tpl @@ -51,14 +51,6 @@ app.kubernetes.io/name: {{ include "fediblockhole.name" . }} app.kubernetes.io/instance: {{ .Release.Name }} {{- end }} -{{/* -Rolling pod annotations -*/}} -{{- define "fediblockhole.rollingPodAnnotations" -}} -rollme: {{ .Release.Revision | quote }} -checksum/config-configmap: {{ include ( print $.Template.BasePath "/configmap-conf-toml.yaml" ) . | sha256sum | quote }} -{{- end }} - {{/* Create the default conf file path and filename */}} @@ -68,3 +60,11 @@ Create the default conf file path and filename {{- define "fediblockhole.conf_file_filename" -}} {{- default "fediblockhole.conf.toml" .Values.fediblockhole.conf_file.filename }} {{- end }} + +{{/* +Rolling pod annotations +*/}} +{{- define "fediblockhole.rollingPodAnnotations" -}} +rollme: {{ .Release.Revision | quote }} +checksum/config-configmap: {{- include "fediblockhole.conf_file_path" . -}}{{- include "fediblockhole.conf_file_filename" . -}} | sha256sum | quote }} +{{- end }} From 56fbe062bb7b59b3bcf5906397948ad7d6fc092a Mon Sep 17 00:00:00 2001 From: cunningpike <117583036+cunningpike@users.noreply.github.com> Date: Mon, 6 Feb 2023 11:57:17 -0500 Subject: [PATCH 096/125] Reverted previous change --- chart/templates/_helpers.tpl | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/chart/templates/_helpers.tpl b/chart/templates/_helpers.tpl index a416d2d..78e6610 100644 --- a/chart/templates/_helpers.tpl +++ b/chart/templates/_helpers.tpl @@ -51,6 +51,14 @@ app.kubernetes.io/name: {{ include "fediblockhole.name" . }} app.kubernetes.io/instance: {{ .Release.Name }} {{- end }} +{{/* +Rolling pod annotations +*/}} +{{- define "fediblockhole.rollingPodAnnotations" -}} +rollme: {{ .Release.Revision | quote }} +checksum/config-configmap: {{ include ( print $.Template.BasePath "/configmap-conf-toml.yaml" ) . | sha256sum | quote }} +{{- end }} + {{/* Create the default conf file path and filename */}} @@ -60,11 +68,3 @@ Create the default conf file path and filename {{- define "fediblockhole.conf_file_filename" -}} {{- default "fediblockhole.conf.toml" .Values.fediblockhole.conf_file.filename }} {{- end }} - -{{/* -Rolling pod annotations -*/}} -{{- define "fediblockhole.rollingPodAnnotations" -}} -rollme: {{ .Release.Revision | quote }} -checksum/config-configmap: {{- include "fediblockhole.conf_file_path" . -}}{{- include "fediblockhole.conf_file_filename" . -}} | sha256sum | quote }} -{{- end }} From e15b9005729216e6b4c896342234699e3a873285 Mon Sep 17 00:00:00 2001 From: cunningpike <117583036+cunningpike@users.noreply.github.com> Date: Wed, 8 Feb 2023 14:28:19 -0500 Subject: [PATCH 097/125] Added history limits --- chart/values.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/chart/values.yaml b/chart/values.yaml index 0aa310f..ab8b3f4 100644 --- a/chart/values.yaml +++ b/chart/values.yaml @@ -22,6 +22,8 @@ fediblockhole: enabled: false # @ignored schedule: "0 * * * *" + failedJobsHistoryLimit: 1 + successfulJobsHistoryLimit: 3 # if you manually change the UID/GID environment variables, ensure these values # match: From c601d02f9325002b31160570c90593ab351929c9 Mon Sep 17 00:00:00 2001 From: cunningpike <117583036+cunningpike@users.noreply.github.com> Date: Wed, 8 Feb 2023 14:29:49 -0500 Subject: [PATCH 098/125] Update cronjob-fediblock-sync.yaml --- chart/templates/cronjob-fediblock-sync.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/chart/templates/cronjob-fediblock-sync.yaml b/chart/templates/cronjob-fediblock-sync.yaml index b19302b..41ef63b 100644 --- a/chart/templates/cronjob-fediblock-sync.yaml +++ b/chart/templates/cronjob-fediblock-sync.yaml @@ -7,6 +7,8 @@ metadata: {{- include "fediblockhole.labels" . | nindent 4 }} spec: schedule: {{ .Values.fediblockhole.cron.sync.schedule }} + failedJobsHistoryLimit: {{ .Values.fediblockhole.cron.sync.failedJobsHistoryLimit }} + successfulJobsHistoryLimit: {{ .Values.fediblockhole.cron.sync.successfulJobsHistoryLimit }} jobTemplate: spec: template: From 3d76de04aaa98d2174eb1939ea2778f3b7bebe43 Mon Sep 17 00:00:00 2001 From: cunningpike <117583036+cunningpike@users.noreply.github.com> Date: Tue, 21 Feb 2023 14:27:41 -0500 Subject: [PATCH 099/125] Update values.yaml --- chart/values.yaml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/chart/values.yaml b/chart/values.yaml index 0aa310f..e660da9 100644 --- a/chart/values.yaml +++ b/chart/values.yaml @@ -15,6 +15,15 @@ fediblockhole: conf_file: path: "" filename: "" + # location of the local allowlist file. Default is /etc/default/allowlist.csv. + # This file should at a minimum contain the web_domain of your own instance. + allow_file: + path: "" + filename: "" + # location of the local blocklist file. Default is /etc/default/blocklist.csv + block_file: + path: "" + filename: "" cron: # -- run `fediblock-sync` every hour sync: From 5fb81fa227f667f958ffa78d982f31e0a50087bc Mon Sep 17 00:00:00 2001 From: cunningpike <117583036+cunningpike@users.noreply.github.com> Date: Tue, 21 Feb 2023 14:30:14 -0500 Subject: [PATCH 100/125] Update _helpers.tpl --- chart/templates/_helpers.tpl | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/chart/templates/_helpers.tpl b/chart/templates/_helpers.tpl index 78e6610..6501d6a 100644 --- a/chart/templates/_helpers.tpl +++ b/chart/templates/_helpers.tpl @@ -68,3 +68,23 @@ Create the default conf file path and filename {{- define "fediblockhole.conf_file_filename" -}} {{- default "fediblockhole.conf.toml" .Values.fediblockhole.conf_file.filename }} {{- end }} + +{{/* +Create the default allowlist file path and filename +*/}} +{{- define "fediblockhole.allow_file_path" -}} +{{- default "/etc/default/" .Values.fediblockhole.allow_file.path }} +{{- end }} +{{- define "fediblockhole.allow_file_filename" -}} +{{- default "allowlist.csv" .Values.fediblockhole.allow_file.filename }} +{{- end }} + +{{/* +Create the default blocklist file path and filename +*/}} +{{- define "fediblockhole.block_file_path" -}} +{{- default "/etc/default/" .Values.fediblockhole.block_file.path }} +{{- end }} +{{- define "fediblockhole.block_file_filename" -}} +{{- default "blocklist.csv" .Values.fediblockhole.block_file.filename }} +{{- end }} From d1bd8dc5a238123856458beee9defa9a9c839ef7 Mon Sep 17 00:00:00 2001 From: cunningpike <117583036+cunningpike@users.noreply.github.com> Date: Tue, 21 Feb 2023 14:35:06 -0500 Subject: [PATCH 101/125] Update cronjob-fediblock-sync.yaml --- chart/templates/cronjob-fediblock-sync.yaml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/chart/templates/cronjob-fediblock-sync.yaml b/chart/templates/cronjob-fediblock-sync.yaml index b19302b..8e18aee 100644 --- a/chart/templates/cronjob-fediblock-sync.yaml +++ b/chart/templates/cronjob-fediblock-sync.yaml @@ -29,6 +29,10 @@ spec: volumeMounts: - name: config mountPath: {{ include "fediblockhole.conf_file_path" . | quote }} + - name: allow + mountPath: {{ include "fediblockhole.allow_file_path" . | quote }} + - name: block + mountPath: {{ include "fediblockhole.block_file_path" . | quote }} volumes: - name: config configMap: @@ -36,4 +40,16 @@ spec: items: - key: {{ include "fediblockhole.conf_file_filename" . | quote }} path: {{ include "fediblockhole.conf_file_filename" . | quote }} + - name: allow + configMap: + name: {{ include "fediblockhole.fullname" . }}-allow-csv + items: + - key: {{ include "fediblockhole.allow_file_filename" . | quote }} + path: {{ include "fediblockhole.allow_file_filename" . | quote }} + - name: config + configMap: + name: {{ include "fediblockhole.fullname" . }}-block-csv + items: + - key: {{ include "fediblockhole.block_file_filename" . | quote }} + path: {{ include "fediblockhole.block_file_filename" . | quote }} {{- end }} From b000b5e03a13bab0879ad95bcce80d746137fd42 Mon Sep 17 00:00:00 2001 From: cunningpike <117583036+cunningpike@users.noreply.github.com> Date: Tue, 21 Feb 2023 14:47:46 -0500 Subject: [PATCH 102/125] Update values.yaml --- chart/values.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chart/values.yaml b/chart/values.yaml index e660da9..3fb9ca8 100644 --- a/chart/values.yaml +++ b/chart/values.yaml @@ -20,7 +20,7 @@ fediblockhole: allow_file: path: "" filename: "" - # location of the local blocklist file. Default is /etc/default/blocklist.csv + # location of the local blocklist file. block_file: path: "" filename: "" From 190787a69a77585beb818e45e8999981ce79de40 Mon Sep 17 00:00:00 2001 From: cunningpike <117583036+cunningpike@users.noreply.github.com> Date: Tue, 21 Feb 2023 14:51:17 -0500 Subject: [PATCH 103/125] Update _helpers.tpl --- chart/templates/_helpers.tpl | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/chart/templates/_helpers.tpl b/chart/templates/_helpers.tpl index 6501d6a..3ee4c22 100644 --- a/chart/templates/_helpers.tpl +++ b/chart/templates/_helpers.tpl @@ -80,11 +80,13 @@ Create the default allowlist file path and filename {{- end }} {{/* -Create the default blocklist file path and filename +Create the blocklist file path and filename */}} +{{- if .Values.fediblockhole.block_file.path && .Values.fediblockhole.block_file.filename }} {{- define "fediblockhole.block_file_path" -}} -{{- default "/etc/default/" .Values.fediblockhole.block_file.path }} +{{- .Values.fediblockhole.block_file.path }} {{- end }} {{- define "fediblockhole.block_file_filename" -}} -{{- default "blocklist.csv" .Values.fediblockhole.block_file.filename }} +{{- .Values.fediblockhole.block_file.filename }} +{{- end }} {{- end }} From df052f2c0c30eeb8ca1868cd86eb547d4b6ecd2c Mon Sep 17 00:00:00 2001 From: cunningpike <117583036+cunningpike@users.noreply.github.com> Date: Tue, 21 Feb 2023 15:00:37 -0500 Subject: [PATCH 104/125] Update cronjob-fediblock-sync.yaml --- chart/templates/cronjob-fediblock-sync.yaml | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/chart/templates/cronjob-fediblock-sync.yaml b/chart/templates/cronjob-fediblock-sync.yaml index 8e18aee..c9c6774 100644 --- a/chart/templates/cronjob-fediblock-sync.yaml +++ b/chart/templates/cronjob-fediblock-sync.yaml @@ -31,8 +31,10 @@ spec: mountPath: {{ include "fediblockhole.conf_file_path" . | quote }} - name: allow mountPath: {{ include "fediblockhole.allow_file_path" . | quote }} + {{- with fediblockhole.block_file_path }} - name: block - mountPath: {{ include "fediblockhole.block_file_path" . | quote }} + mountPath: {{ . | quote }} + {{ end }} volumes: - name: config configMap: @@ -46,10 +48,14 @@ spec: items: - key: {{ include "fediblockhole.allow_file_filename" . | quote }} path: {{ include "fediblockhole.allow_file_filename" . | quote }} - - name: config + {{- with fediblockhole.block_file_path }} + - name: block configMap: name: {{ include "fediblockhole.fullname" . }}-block-csv + {{- with fediblockhole.block_file_filename }} items: - - key: {{ include "fediblockhole.block_file_filename" . | quote }} - path: {{ include "fediblockhole.block_file_filename" . | quote }} + - key: {{ . | quote }} + path: {{ . | quote }} + {{ end }} + {{end }} {{- end }} From 1b0be929573a181842dd9287eaa2888e5b0e4d89 Mon Sep 17 00:00:00 2001 From: cunningpike <117583036+cunningpike@users.noreply.github.com> Date: Tue, 21 Feb 2023 15:51:56 -0500 Subject: [PATCH 105/125] Update Dockerfile --- container/Dockerfile | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/container/Dockerfile b/container/Dockerfile index 179d24d..3659567 100644 --- a/container/Dockerfile +++ b/container/Dockerfile @@ -10,8 +10,5 @@ WORKDIR $APP_HOME RUN pip install fediblockhole USER 1001 -# Run the web service on container startup. Here we use the gunicorn -# webserver, with one worker process and 8 threads. -# For environments with multiple CPU cores, increase the number of workers -# to be equal to the cores available. +# Set the command on start to fediblock-sync. ENTRYPOINT ["fediblock-sync"] From 4b2dc0b5c8b16b2be22b030da00c25f9b394051f Mon Sep 17 00:00:00 2001 From: cunningpike <117583036+cunningpike@users.noreply.github.com> Date: Tue, 21 Feb 2023 16:06:51 -0500 Subject: [PATCH 106/125] Update Chart.yaml --- chart/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chart/Chart.yaml b/chart/Chart.yaml index 85e47e7..399127e 100644 --- a/chart/Chart.yaml +++ b/chart/Chart.yaml @@ -15,7 +15,7 @@ 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: 1.0.0 +version: 1.0.1 # 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 From 7f5b9c54d90592cac20ea2c9923a15f2b43dee15 Mon Sep 17 00:00:00 2001 From: cunningpike <117583036+cunningpike@users.noreply.github.com> Date: Tue, 21 Feb 2023 16:15:48 -0500 Subject: [PATCH 107/125] Update _helpers.tpl --- chart/templates/_helpers.tpl | 2 -- 1 file changed, 2 deletions(-) diff --git a/chart/templates/_helpers.tpl b/chart/templates/_helpers.tpl index 3ee4c22..8ae0364 100644 --- a/chart/templates/_helpers.tpl +++ b/chart/templates/_helpers.tpl @@ -82,11 +82,9 @@ Create the default allowlist file path and filename {{/* Create the blocklist file path and filename */}} -{{- if .Values.fediblockhole.block_file.path && .Values.fediblockhole.block_file.filename }} {{- define "fediblockhole.block_file_path" -}} {{- .Values.fediblockhole.block_file.path }} {{- end }} {{- define "fediblockhole.block_file_filename" -}} {{- .Values.fediblockhole.block_file.filename }} {{- end }} -{{- end }} From 403a8d34164b47c9455ae0e0f0c820d2063ff4c1 Mon Sep 17 00:00:00 2001 From: cunningpike <117583036+cunningpike@users.noreply.github.com> Date: Tue, 21 Feb 2023 16:16:59 -0500 Subject: [PATCH 108/125] Update Chart.yaml --- chart/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chart/Chart.yaml b/chart/Chart.yaml index 399127e..aa3b67b 100644 --- a/chart/Chart.yaml +++ b/chart/Chart.yaml @@ -15,7 +15,7 @@ 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: 1.0.1 +version: 1.0.2 # 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 From 5ef72706d40e70269c8b0951cde1aa041f2fb568 Mon Sep 17 00:00:00 2001 From: cunningpike <117583036+cunningpike@users.noreply.github.com> Date: Tue, 21 Feb 2023 16:40:59 -0500 Subject: [PATCH 109/125] Update _helpers.tpl --- chart/templates/_helpers.tpl | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/chart/templates/_helpers.tpl b/chart/templates/_helpers.tpl index 8ae0364..2edd816 100644 --- a/chart/templates/_helpers.tpl +++ b/chart/templates/_helpers.tpl @@ -78,13 +78,3 @@ Create the default allowlist file path and filename {{- define "fediblockhole.allow_file_filename" -}} {{- default "allowlist.csv" .Values.fediblockhole.allow_file.filename }} {{- end }} - -{{/* -Create the blocklist file path and filename -*/}} -{{- define "fediblockhole.block_file_path" -}} -{{- .Values.fediblockhole.block_file.path }} -{{- end }} -{{- define "fediblockhole.block_file_filename" -}} -{{- .Values.fediblockhole.block_file.filename }} -{{- end }} From ae17f46fd6612c72ccbc1897368fc2cd3a426b3d Mon Sep 17 00:00:00 2001 From: cunningpike <117583036+cunningpike@users.noreply.github.com> Date: Tue, 21 Feb 2023 16:43:17 -0500 Subject: [PATCH 110/125] Update cronjob-fediblock-sync.yaml --- chart/templates/cronjob-fediblock-sync.yaml | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/chart/templates/cronjob-fediblock-sync.yaml b/chart/templates/cronjob-fediblock-sync.yaml index 2069563..bf5b390 100644 --- a/chart/templates/cronjob-fediblock-sync.yaml +++ b/chart/templates/cronjob-fediblock-sync.yaml @@ -33,9 +33,9 @@ spec: mountPath: {{ include "fediblockhole.conf_file_path" . | quote }} - name: allow mountPath: {{ include "fediblockhole.allow_file_path" . | quote }} - {{- with fediblockhole.block_file_path }} + {{- with .Values.fediblockhole.block_file }} - name: block - mountPath: {{ . | quote }} + mountPath: {{ .path | quote }} {{ end }} volumes: - name: config @@ -50,14 +50,12 @@ spec: items: - key: {{ include "fediblockhole.allow_file_filename" . | quote }} path: {{ include "fediblockhole.allow_file_filename" . | quote }} - {{- with fediblockhole.block_file_path }} + {{- with .Values.fediblockhole.block_file }} - name: block configMap: name: {{ include "fediblockhole.fullname" . }}-block-csv - {{- with fediblockhole.block_file_filename }} items: - - key: {{ . | quote }} - path: {{ . | quote }} - {{ end }} + - key: {{ .filename | quote }} + path: {{ .filename | quote }} {{end }} {{- end }} From 93c163cfc2bc0af0a853bb6f4ae1f660a0cb36d8 Mon Sep 17 00:00:00 2001 From: cunningpike <117583036+cunningpike@users.noreply.github.com> Date: Tue, 21 Feb 2023 16:43:35 -0500 Subject: [PATCH 111/125] Update Chart.yaml --- chart/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chart/Chart.yaml b/chart/Chart.yaml index aa3b67b..4f780a2 100644 --- a/chart/Chart.yaml +++ b/chart/Chart.yaml @@ -15,7 +15,7 @@ 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: 1.0.2 +version: 1.0.3 # 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 From d957164c7631e1c6b463653ebb6c77fc129c9260 Mon Sep 17 00:00:00 2001 From: cunningpike <117583036+cunningpike@users.noreply.github.com> Date: Tue, 21 Feb 2023 16:46:18 -0500 Subject: [PATCH 112/125] Update cronjob-fediblock-sync.yaml --- chart/templates/cronjob-fediblock-sync.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chart/templates/cronjob-fediblock-sync.yaml b/chart/templates/cronjob-fediblock-sync.yaml index bf5b390..a8f0638 100644 --- a/chart/templates/cronjob-fediblock-sync.yaml +++ b/chart/templates/cronjob-fediblock-sync.yaml @@ -53,7 +53,7 @@ spec: {{- with .Values.fediblockhole.block_file }} - name: block configMap: - name: {{ include "fediblockhole.fullname" . }}-block-csv + name: fediblockhole-block-csv items: - key: {{ .filename | quote }} path: {{ .filename | quote }} From 10a624c02612d440c310dfa9b6b3516a297ce50b Mon Sep 17 00:00:00 2001 From: cunningpike <117583036+cunningpike@users.noreply.github.com> Date: Tue, 21 Feb 2023 16:46:35 -0500 Subject: [PATCH 113/125] Update Chart.yaml --- chart/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chart/Chart.yaml b/chart/Chart.yaml index 4f780a2..c398821 100644 --- a/chart/Chart.yaml +++ b/chart/Chart.yaml @@ -15,7 +15,7 @@ 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: 1.0.3 +version: 1.0.4 # 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 From 29ea3ad3dd33cab12aa746d2e6833b548936cedc Mon Sep 17 00:00:00 2001 From: cunningpike <117583036+cunningpike@users.noreply.github.com> Date: Tue, 21 Feb 2023 19:29:42 -0500 Subject: [PATCH 114/125] Update cronjob-fediblock-sync.yaml --- chart/templates/cronjob-fediblock-sync.yaml | 22 ++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/chart/templates/cronjob-fediblock-sync.yaml b/chart/templates/cronjob-fediblock-sync.yaml index a8f0638..1fd373f 100644 --- a/chart/templates/cronjob-fediblock-sync.yaml +++ b/chart/templates/cronjob-fediblock-sync.yaml @@ -31,11 +31,13 @@ spec: volumeMounts: - name: config mountPath: {{ include "fediblockhole.conf_file_path" . | quote }} + {{- with .Values.fediblockhole.allow_file.path }} - name: allow - mountPath: {{ include "fediblockhole.allow_file_path" . | quote }} - {{- with .Values.fediblockhole.block_file }} + mountPath: {{ . | quote }} + {{ end }} + {{- with .Values.fediblockhole.block_file.path }} - name: block - mountPath: {{ .path | quote }} + mountPath: {{ . | quote }} {{ end }} volumes: - name: config @@ -44,18 +46,20 @@ spec: items: - key: {{ include "fediblockhole.conf_file_filename" . | quote }} path: {{ include "fediblockhole.conf_file_filename" . | quote }} + {{- with .Values.fediblockhole.allow_file.filename }} - name: allow configMap: - name: {{ include "fediblockhole.fullname" . }}-allow-csv + name: fediblockhole-allow-csv items: - - key: {{ include "fediblockhole.allow_file_filename" . | quote }} - path: {{ include "fediblockhole.allow_file_filename" . | quote }} - {{- with .Values.fediblockhole.block_file }} + - key: {{ . | quote }} + path: {{ . | quote }} + {{ end }} + {{- with .Values.fediblockhole.block_file.filename }} - name: block configMap: name: fediblockhole-block-csv items: - - key: {{ .filename | quote }} - path: {{ .filename | quote }} + - key: {{ . | quote }} + path: {{ . | quote }} {{end }} {{- end }} From 48a3e63073413445918cfab90fb320d6ffb48ff6 Mon Sep 17 00:00:00 2001 From: cunningpike <117583036+cunningpike@users.noreply.github.com> Date: Tue, 21 Feb 2023 19:30:17 -0500 Subject: [PATCH 115/125] Update _helpers.tpl --- chart/templates/_helpers.tpl | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/chart/templates/_helpers.tpl b/chart/templates/_helpers.tpl index 2edd816..78e6610 100644 --- a/chart/templates/_helpers.tpl +++ b/chart/templates/_helpers.tpl @@ -68,13 +68,3 @@ Create the default conf file path and filename {{- define "fediblockhole.conf_file_filename" -}} {{- default "fediblockhole.conf.toml" .Values.fediblockhole.conf_file.filename }} {{- end }} - -{{/* -Create the default allowlist file path and filename -*/}} -{{- define "fediblockhole.allow_file_path" -}} -{{- default "/etc/default/" .Values.fediblockhole.allow_file.path }} -{{- end }} -{{- define "fediblockhole.allow_file_filename" -}} -{{- default "allowlist.csv" .Values.fediblockhole.allow_file.filename }} -{{- end }} From 10fa29815a45664005438f93417925a99795185c Mon Sep 17 00:00:00 2001 From: cunningpike <117583036+cunningpike@users.noreply.github.com> Date: Tue, 21 Feb 2023 19:34:49 -0500 Subject: [PATCH 116/125] Update values.yaml --- chart/values.yaml | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/chart/values.yaml b/chart/values.yaml index 674af2b..9b60593 100644 --- a/chart/values.yaml +++ b/chart/values.yaml @@ -15,15 +15,17 @@ fediblockhole: conf_file: path: "" filename: "" - # location of the local allowlist file. Default is /etc/default/allowlist.csv. - # This file should at a minimum contain the web_domain of your own instance. + # Location of a local allowlist file. It is recommended that this file should at a + # minimum contain the web_domain of your own instance. allow_file: - path: "" - filename: "" - # location of the local blocklist file. - block_file: - path: "" - filename: "" + # Optionally, uncomment and set a path other than "/etc/default/" + # path: "" + # Uncomment to set the name of the file + filename: "allowlist.csv" + # Location of a local blocklist file. + # block_file: + # path: "" + # filename: "" cron: # -- run `fediblock-sync` every hour sync: From 6d0ff1b21024ed4a7793b50ce5a1a1ff438b241b Mon Sep 17 00:00:00 2001 From: cunningpike <117583036+cunningpike@users.noreply.github.com> Date: Tue, 21 Feb 2023 19:35:07 -0500 Subject: [PATCH 117/125] Update Chart.yaml --- chart/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chart/Chart.yaml b/chart/Chart.yaml index c398821..ef8399c 100644 --- a/chart/Chart.yaml +++ b/chart/Chart.yaml @@ -15,7 +15,7 @@ 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: 1.0.4 +version: 1.0.5 # 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 From be539ac52bced9738fd782f5773e75369ad86010 Mon Sep 17 00:00:00 2001 From: cunningpike <117583036+cunningpike@users.noreply.github.com> Date: Tue, 21 Feb 2023 19:39:54 -0500 Subject: [PATCH 118/125] Update values.yaml --- chart/values.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/chart/values.yaml b/chart/values.yaml index 9b60593..b601571 100644 --- a/chart/values.yaml +++ b/chart/values.yaml @@ -17,11 +17,11 @@ fediblockhole: filename: "" # Location of a local allowlist file. It is recommended that this file should at a # minimum contain the web_domain of your own instance. - allow_file: + # allow_file: # Optionally, uncomment and set a path other than "/etc/default/" # path: "" # Uncomment to set the name of the file - filename: "allowlist.csv" + # filename: "" # Location of a local blocklist file. # block_file: # path: "" From 7d7be64120d2be48f0a02db86c927274ade2628f Mon Sep 17 00:00:00 2001 From: cunningpike <117583036+cunningpike@users.noreply.github.com> Date: Tue, 21 Feb 2023 19:42:10 -0500 Subject: [PATCH 119/125] Update Chart.yaml --- chart/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chart/Chart.yaml b/chart/Chart.yaml index ef8399c..a32d890 100644 --- a/chart/Chart.yaml +++ b/chart/Chart.yaml @@ -15,7 +15,7 @@ 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: 1.0.5 +version: 1.0.6 # 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 From bacd24f800df5fa58fae420280c6b501a7daa96d Mon Sep 17 00:00:00 2001 From: cunningpike <117583036+cunningpike@users.noreply.github.com> Date: Tue, 21 Feb 2023 19:47:04 -0500 Subject: [PATCH 120/125] Update values.yaml --- chart/values.yaml | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/chart/values.yaml b/chart/values.yaml index b601571..4cdbe14 100644 --- a/chart/values.yaml +++ b/chart/values.yaml @@ -17,15 +17,19 @@ fediblockhole: filename: "" # Location of a local allowlist file. It is recommended that this file should at a # minimum contain the web_domain of your own instance. - # allow_file: - # Optionally, uncomment and set a path other than "/etc/default/" - # path: "" - # Uncomment to set the name of the file - # filename: "" + allow_file: + # Optionally, set a path other than "/etc/default/" + path: "" + # Optionally, set the name of the file. This should match the data key in the + # associated ConfigMap + filename: "" # Location of a local blocklist file. - # block_file: - # path: "" - # filename: "" + block_file: + # Optionally, set a path other than "/etc/default/" + path: "" + # Optionally, set the name of the file. This should match the data key in the + # associated ConfigMap + filename: "" cron: # -- run `fediblock-sync` every hour sync: From 098958a916433aa85a1d02bc414f32f984b3ad77 Mon Sep 17 00:00:00 2001 From: cunningpike <117583036+cunningpike@users.noreply.github.com> Date: Tue, 21 Feb 2023 19:48:27 -0500 Subject: [PATCH 121/125] Update Chart.yaml --- chart/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chart/Chart.yaml b/chart/Chart.yaml index a32d890..d7c2d97 100644 --- a/chart/Chart.yaml +++ b/chart/Chart.yaml @@ -15,7 +15,7 @@ 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: 1.0.6 +version: 1.0.7 # 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 From bd79f5558cc40a5d27cba13b1c6dfbb5271e95e4 Mon Sep 17 00:00:00 2001 From: cunningpike <117583036+cunningpike@users.noreply.github.com> Date: Tue, 21 Feb 2023 20:20:10 -0500 Subject: [PATCH 122/125] Update cronjob-fediblock-sync.yaml --- chart/templates/cronjob-fediblock-sync.yaml | 39 +++++++++++---------- 1 file changed, 21 insertions(+), 18 deletions(-) diff --git a/chart/templates/cronjob-fediblock-sync.yaml b/chart/templates/cronjob-fediblock-sync.yaml index 1fd373f..f738222 100644 --- a/chart/templates/cronjob-fediblock-sync.yaml +++ b/chart/templates/cronjob-fediblock-sync.yaml @@ -30,14 +30,17 @@ spec: - "{{- include "fediblockhole.conf_file_path" . -}}{{- include "fediblockhole.conf_file_filename" . -}}" volumeMounts: - name: config - mountPath: {{ include "fediblockhole.conf_file_path" . | quote }} - {{- with .Values.fediblockhole.allow_file.path }} - - name: allow - mountPath: {{ . | quote }} + mountPath: "{{- include "fediblockhole.conf_file_path" . -}}{{- include "fediblockhole.conf_file_filename" . -}}" + subPath: "{{- include "fediblockhole.conf_file_filename" . -}}" + {{ if .Values.fediblockhole.allow_file.filename }} + - name: allowfile + mountPath: "{{- include "fediblockhole.conf_file_path" . -}}{{- .Values.fediblockhole.allow_file.filename -}}" + subPath: "{{- .Values.fediblockhole.allow_file.filename -}}" {{ end }} - {{- with .Values.fediblockhole.block_file.path }} - - name: block - mountPath: {{ . | quote }} + {{ if .Values.fediblockhole.block_file.filename }} + - name: blockfile + mountPath: "{{- include "fediblockhole.conf_file_path" . -}}{{- .Values.fediblockhole.block_file.filename -}}" + subPath: "{{- .Values.fediblockhole.block_file.filename -}}" {{ end }} volumes: - name: config @@ -46,20 +49,20 @@ spec: items: - key: {{ include "fediblockhole.conf_file_filename" . | quote }} path: {{ include "fediblockhole.conf_file_filename" . | quote }} - {{- with .Values.fediblockhole.allow_file.filename }} - - name: allow + {{ if .Values.fediblockhole.allow_file.filename }} + - name: allowfile configMap: - name: fediblockhole-allow-csv + name: {{ include "fediblockhole.fullname" . }}-allow-csv items: - - key: {{ . | quote }} - path: {{ . | quote }} + - key: {{ .Values.fediblockhole.allow_file.filename | quote }} + path: {{ .Values.fediblockhole.allow_file.filename | quote }} {{ end }} - {{- with .Values.fediblockhole.block_file.filename }} - - name: block + {{ if .Values.fediblockhole.block_file.filename }} + - name: blockfile configMap: - name: fediblockhole-block-csv + name: {{ include "fediblockhole.fullname" . }}-block-csv items: - - key: {{ . | quote }} - path: {{ . | quote }} - {{end }} + - key: {{ .Values.fediblockhole.block_file.filename | quote }} + path: {{ .Values.fediblockhole.block_file.filename | quote }} + {{ end }} {{- end }} From 558bf26fc583e6c9889b5a64e6da571be002e17c Mon Sep 17 00:00:00 2001 From: cunningpike <117583036+cunningpike@users.noreply.github.com> Date: Tue, 21 Feb 2023 20:21:20 -0500 Subject: [PATCH 123/125] Update values.yaml --- chart/values.yaml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/chart/values.yaml b/chart/values.yaml index 4cdbe14..74643c1 100644 --- a/chart/values.yaml +++ b/chart/values.yaml @@ -18,15 +18,11 @@ fediblockhole: # Location of a local allowlist file. It is recommended that this file should at a # minimum contain the web_domain of your own instance. allow_file: - # Optionally, set a path other than "/etc/default/" - path: "" # Optionally, set the name of the file. This should match the data key in the # associated ConfigMap filename: "" # Location of a local blocklist file. block_file: - # Optionally, set a path other than "/etc/default/" - path: "" # Optionally, set the name of the file. This should match the data key in the # associated ConfigMap filename: "" From 538c81f8244c0a70a249cc9da64a959c6dd05040 Mon Sep 17 00:00:00 2001 From: cunningpike <117583036+cunningpike@users.noreply.github.com> Date: Tue, 21 Feb 2023 20:23:12 -0500 Subject: [PATCH 124/125] Update Chart.yaml --- chart/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chart/Chart.yaml b/chart/Chart.yaml index d7c2d97..38485de 100644 --- a/chart/Chart.yaml +++ b/chart/Chart.yaml @@ -15,7 +15,7 @@ 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: 1.0.7 +version: 1.0.8 # 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 From ed1971ea34a174f1ac56c6a19445e6d95b3546cc Mon Sep 17 00:00:00 2001 From: cunningpike <117583036+cunningpike@users.noreply.github.com> Date: Tue, 21 Feb 2023 20:35:45 -0500 Subject: [PATCH 125/125] Added optional local files for allows and blocks The values.yaml file now contains optional allow_file and block_file filenames. These are loaded from ConfigMaps the same way as the conf.toml file is. --- chart/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chart/Chart.yaml b/chart/Chart.yaml index 38485de..1fb2e5c 100644 --- a/chart/Chart.yaml +++ b/chart/Chart.yaml @@ -15,7 +15,7 @@ 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: 1.0.8 +version: 1.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