-
-
Notifications
You must be signed in to change notification settings - Fork 615
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(plausible): migrate to new common chart and upgrade to v2 (#11186)
**Description** * cherry-picked changes from my PR that were never merged into from `port/incubator` into `master`: #7810 * Added config options for Plausible v2.0.0 * Migrated to new common chart TODO: - [x] upgrade questions.yaml to new common chart - [x] migrate common.yaml / _env.tpl to new common chart format ⚒️ Fixes # <!--(issue)--> **⚙️ Type of change** - [ ] ⚙️ Feature/App addition - [X] 🪛 Bugfix - [X]⚠️ Breaking change (fix or feature that would cause existing functionality to not work as expected) - [X] 🔃 Refactor of current code **🧪 How Has This Been Tested?** <!-- Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration --> **📃 Notes:** <!-- Please enter any other relevant information here --> **✔️ Checklist:** - [X] ⚖️ My code follows the style guidelines of this project - [X] 👀 I have performed a self-review of my own code - [X] #️⃣ I have commented my code, particularly in hard-to-understand areas - [ ] 📄 I have made corresponding changes to the documentation - [ ]⚠️ My changes generate no new warnings - [ ] 🧪 I have added tests to this description that prove my fix is effective or that my feature works - [X] ⬆️ I increased versions for any altered app according to semantic versioning **➕ App addition** If this PR is an app addition please make sure you have done the following. - [ ] 🪞 I have opened a PR on [truecharts/containers](https://github.com/truecharts/containers) adding the container to TrueCharts mirror repo. - [ ] 🖼️ I have added an icon in the Chart's root directory called `icon.png` --- _Please don't blindly check all the boxes. Read them and only check those that apply. Those checkboxes are there for the reviewer to see what is this all about and the status of this PR with a quick glance._ --------- Signed-off-by: Stavros Kois <47820033+stavros-k@users.noreply.github.com> Co-authored-by: Stavros Kois <47820033+stavros-k@users.noreply.github.com>
- Loading branch information
1 parent
b29c953
commit 5b1058a
Showing
8 changed files
with
244 additions
and
180 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{{- define "plausible.configmap" -}} | ||
enabled: true | ||
data: | ||
BASE_URL: {{ .Values.plausible.BASE_URL | quote }} | ||
DISABLE_REGISTRATION: {{ .Values.plausible.DISABLE_REGISTRATION | quote }} | ||
LOG_FAILED_LOGIN_ATTEMPTS: {{ .Values.plausible.LOG_FAILED_LOGIN_ATTEMPTS | quote }} | ||
|
||
CLICKHOUSE_FLUSH_INTERVAL_MS: {{ .Values.plausible.CLICKHOUSE_FLUSH_INTERVAL_MS | quote }} | ||
CLICKHOUSE_MAX_BUFFER_SIZE: {{ .Values.plausible.CLICKHOUSE_MAX_BUFFER_SIZE | quote }} | ||
|
||
SMTP_HOST_ADDR: {{ .Values.plausible.SMTP_HOST_ADDR | quote }} | ||
SMTP_HOST_PORT: {{ .Values.plausible.SMTP_HOST_PORT | quote }} | ||
SMTP_HOST_SSL_ENABLED: {{ .Values.plausible.SMTP_HOST_SSL_ENABLED | quote }} | ||
SMTP_RETRIES: {{ .Values.plausible.SMTP_RETRIES | quote }} | ||
MAILER_ADAPTER: {{ .Values.plausible.MAILER_ADAPTER | quote }} | ||
MAILGUN_BASE_URI: {{ .Values.plausible.MAILGUN_BASE_URI | quote }} | ||
|
||
MAXMIND_EDITION: {{ .Values.plausible.MAXMIND_EDITION | quote }} | ||
|
||
LOG_LEVEL: {{ .Values.plausible.LOG_LEVEL | quote }} | ||
{{- end }} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
{{- define "plausible.secret" -}} | ||
enabled: true | ||
data: | ||
{{- with (lookup "v1" "Secret" .Release.Namespace "plausible-secret") }} | ||
SECRET_KEY_BASE: {{ index .data "SECRET_KEY_BASE" | b64dec }} | ||
{{- else }} | ||
{{- /* The plain value of SECRET_KEY_BASE is also base64 encoded */}} | ||
SECRET_KEY_BASE: {{ randAlphaNum 86 | b64enc }} | ||
{{- end }} | ||
|
||
DATABASE_URL: {{ .Values.cnpg.main.creds.std }} | ||
CLICKHOUSE_DATABASE_URL: {{ .Values.clickhouse.creds.complete }} | ||
|
||
MAILER_EMAIL: {{ .Values.plausible.MAILER_EMAIL | quote }} | ||
MAILER_NAME: {{ .Values.plausible.MAILER_NAME | quote }} | ||
SMTP_USER_NAME: {{ .Values.plausible.SMTP_USER_NAME | quote }} | ||
SMTP_USER_PWD: {{ .Values.plausible.SMTP_USER_PWD | quote }} | ||
POSTMARK_API_KEY: {{ .Values.plausible.POSTMARK_API_KEY | quote }} | ||
MAILGUN_API_KEY: {{ .Values.plausible.MAILGUN_API_KEY | quote }} | ||
MAILGUN_DOMAIN: {{ .Values.plausible.MAILGUN_DOMAIN | quote }} | ||
MANDRILL_API_KEY: {{ .Values.plausible.MANDRILL_API_KEY | quote }} | ||
SENDGRID_API_KEY: {{ .Values.plausible.SENDGRID_API_KEY | quote }} | ||
|
||
MAXMIND_LICENSE_KEY: {{ .Values.plausible.MAXMIND_LICENSE_KEY | quote }} | ||
|
||
GOOGLE_CLIENT_ID: {{ .Values.plausible.GOOGLE_CLIENT_ID | quote }} | ||
GOOGLE_CLIENT_SECRET: {{ .Values.plausible.GOOGLE_CLIENT_SECRET | quote }} | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,17 @@ | ||
{{/* Make sure all variables are set properly */}} | ||
{{- include "tc.common.loader.init" . }} | ||
{{- include "tc.v1.common.loader.init" . }} | ||
|
||
{{/* Plausible environment variables */}} | ||
{{- include "plausible.env" . }} | ||
{{/* Render Plausible configmap */}} | ||
{{- $config := include "plausible.configmap" . | fromYaml -}} | ||
{{- if $config -}} | ||
{{- $_ := set .Values.configmap "plausible-config" $config -}} | ||
{{- end -}} | ||
|
||
{{/* Render Plausible secret */}} | ||
{{- $secret := include "plausible.secret" . | fromYaml -}} | ||
{{- if $secret -}} | ||
{{- $_ := set .Values.secret "plausible-secret" $secret -}} | ||
{{- end -}} | ||
|
||
{{/* Render the templates */}} | ||
{{ include "tc.common.loader.apply" . }} | ||
{{ include "tc.v1.common.loader.apply" . }} |
Oops, something went wrong.