feat(stable): BREAKING CHANGE migrate to new common part 1 (#7900)

**Description**
Part 1 of the migration to new common on the stable train.
This basically breaks most/all charts requiring a reinstall on SCALE as
well.

Helm users shouldn't need a reinstall but could migrate their
values.yaml modification manually besides backing-up and porting the
databases.

There be Dragons basically, as we obviously cannot 100% go over
each-and-every single app in the stable train like we did in the
enterprise train.

**⚙️ Type of change**

- [x] ⚙️ 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?**
Via CI and manually validation in a lot of cases where the CI did not
correctly check things.
Additional catalog item creation tooling for local testing has been
added as well.

**📃 Notes:**
There will be issues in the future but we should get as much working
well as we can.

**✔️ 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
- [x] 📄 I have made corresponding changes to the documentation
- [x] ⚠️ My changes generate no new warnings
- [x] 🧪 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._
This commit is contained in:
Kjeld Schouten-Lebbing
2023-04-11 12:07:17 +02:00
committed by GitHub
parent 14bc83d3c7
commit 0b726419d4
1146 changed files with 15731 additions and 17107 deletions
+3 -7
View File
@@ -1,7 +1,7 @@
apiVersion: v2
appVersion: "5.0.4"
kubeVersion: ">=1.16.0-0"
version: 6.0.32
version: 7.0.0
name: redmine
description: Redmine is a flexible project management web application written using Ruby on Rails framework.
type: application
@@ -19,11 +19,8 @@ sources:
dependencies:
- name: common
repository: https://library-charts.truecharts.org
version: 11.1.2
- condition: postgresql.enabled
name: postgresql
repository: https://deps.truecharts.org/
version: 11.0.31
version: 12.2.32
maintainers:
- email: info@truecharts.org
name: TrueCharts
@@ -32,4 +29,3 @@ annotations:
truecharts.org/catagories: |
- productivity
truecharts.org/SCALE-support: "true"
truecharts.org/grade: U
+10 -14
View File
@@ -10,6 +10,7 @@ questions:
# Include{replicas1}
# Include{podSpec}
# Include{containerMain}
# Include{containerBasic}
# Include{containerAdvanced}
@@ -32,15 +33,10 @@ questions:
schema:
type: boolean
default: false
# Include{containerConfig}
# Include{serviceRoot}
- variable: main
label: "Main Service"
description: "The Primary service on which the healthcheck runs, often the webUI"
schema:
additional_attrs: true
type: dict
attrs:
# Include{serviceMain}
# Include{serviceSelectorLoadBalancer}
# Include{serviceSelectorExtras}
- variable: main
@@ -89,16 +85,16 @@ questions:
schema:
type: int
default: 568
- variable: runAsGroup
label: "runAsGroup"
description: "The groupID this App of the user running the application"
schema:
type: int
default: 568
- variable: runAsGroup
label: "runAsGroup"
description: "The groupID this App of the user running the application"
schema:
type: int
default: 568
# Include{securityContextContainer}
# Include{securityContextAdvanced}
# Include{securityContextPod}
- variable: fsGroup
- variable: fsGroup
label: "fsGroup"
description: "The group that should own ALL storage."
schema:
@@ -0,0 +1 @@
{{- include "tc.v1.common.lib.chart.notes" $ -}}
+6 -12
View File
@@ -1,20 +1,14 @@
{{/* Define the secrets */}}
{{- define "redmine.secrets" -}}
---
apiVersion: v1
kind: Secret
type: Opaque
metadata:
name: redmine-secrets
{{- $redmineprevious := lookup "v1" "Secret" .Release.Namespace "redmine-secrets" }}
{{- $secret_key_base := "" }}
{{- $secretName := (printf "%s-redmine-secrets" (include "tc.v1.common.lib.chart.names.fullname" $)) }}
{{- $redmineprevious := lookup "v1" "Secret" .Release.Namespace $secretName }}
enabled: true
data:
{{- if $redmineprevious}}
REDMINE_SECRET_KEY_BASE: {{ index $redmineprevious.data "REDMINE_SECRET_KEY_BASE" }}
{{- if $redmineprevious }}
REDMINE_SECRET_KEY_BASE: {{ index $redmineprevious.data "REDMINE_SECRET_KEY_BASE" | b64dec }}
{{- else }}
{{- $secret_key_base := randAlphaNum 80 }}
REDMINE_SECRET_KEY_BASE: {{ $secret_key_base | b64enc }}
REDMINE_SECRET_KEY_BASE: {{ $secret_key_base }}
{{- end }}
{{- end -}}
+6 -3
View File
@@ -1,8 +1,11 @@
{{/* Make sure all variables are set properly */}}
{{- include "tc.common.loader.init" . }}
{{- include "tc.v1.common.loader.init" . }}
{{/* Render secrets for redmine */}}
{{- include "redmine.secrets" . }}
{{- $secrets := include "redmine.secrets" . | fromYaml -}}
{{- if $secrets -}}
{{- $_ := set .Values.secret "secrets" $secrets -}}
{{- end -}}
{{/* Render the templates */}}
{{ include "tc.common.loader.apply" . }}
{{ include "tc.v1.common.loader.apply" . }}
+34 -33
View File
@@ -2,52 +2,53 @@ image:
repository: tccr.io/truecharts/redmine
pullPolicy: IfNotPresent
tag: 5.0.4@sha256:d1c1d5d4560e9165491d7691f3b0f617536b4b6fda2896d38d67e87cd81c71a7
env:
REDMINE_DB_DATABASE: "{{ .Values.postgresql.postgresqlDatabase }}"
REDMINE_DB_USERNAME: "{{ .Values.postgresql.postgresqlUsername }}"
REDMINE_DB_PORT: "5432"
# Anything but empty means true, empty means false
REDMINE_NO_DB_MIGRATE: '{{ ternary "true" "" .Values.redmine.no_db_migrate }}'
REDMINE_PLUGINS_MIGRATE: '{{ ternary "true" "" .Values.redmine.plugins_migrate }}'
REDMINE_DB_PASSWORD:
secretKeyRef:
name: dbcreds
key: postgresql-password
REDMINE_DB_POSTGRES:
secretKeyRef:
name: dbcreds
key: plainhost
REDMINE_SECRET_KEY_BASE:
secretKeyRef:
name: redmine-secrets
key: REDMINE_SECRET_KEY_BASE
redmine:
plugins_migrate: true
no_db_migrate: false
securityContext:
readOnlyRootFilesystem: false
service:
main:
ports:
main:
port: 10171
targetPort: 3000
persistence:
data:
enabled: true
mountPath: "/usr/src/redmine/files"
# Enabled postgres
postgresql:
enabled: true
existingSecret: "dbcreds"
postgresqlUsername: redmine
postgresqlDatabase: redmine
cnpg:
main:
enabled: true
user: redmine
database: redmine
portal:
enabled: true
open:
enabled: true
securityContext:
container:
readOnlyRootFilesystem: false
workload:
main:
podSpec:
containers:
main:
env:
REDMINE_DB_DATABASE: "{{ .Values.cnpg.main.database }}"
REDMINE_DB_USERNAME: "{{ .Values.cnpg.main.user }}"
REDMINE_DB_PORT: "5432"
# Anything but empty means true, empty means false
REDMINE_NO_DB_MIGRATE: '{{ ternary "true" "" .Values.redmine.no_db_migrate }}'
REDMINE_PLUGINS_MIGRATE: '{{ ternary "true" "" .Values.redmine.plugins_migrate }}'
REDMINE_DB_PASSWORD:
secretKeyRef:
name: cnpg-main-user
key: password
REDMINE_DB_POSTGRES:
secretKeyRef:
name: cnpg-main-urls
key: host
REDMINE_SECRET_KEY_BASE:
secretKeyRef:
name: secrets
key: REDMINE_SECRET_KEY_BASE