Skip to content

Commit

Permalink
feat(stable): BREAKING CHANGE migrate to new common part 3 (#8151)
Browse files Browse the repository at this point in the history
**Description**
<!--
Please include a summary of the change and which issue is fixed. Please
also include relevant motivation and context. List any dependencies that
are required for this change.
-->
⚒️ Fixes  # <!--(issue)-->

**⚙️ Type of change**

- [ ] ⚙️ Feature/App addition
- [ ] 🪛 Bugfix
- [ ] ⚠️ Breaking change (fix or feature that would cause existing
functionality to not work as expected)
- [ ] 🔃 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:**

- [ ] ⚖️ My code follows the style guidelines of this project
- [ ] 👀 I have performed a self-review of my own code
- [ ] #️⃣ 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
- [ ] ⬆️ 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._
  • Loading branch information
Ornias1993 committed Apr 29, 2023
1 parent 030fcbb commit 28f1a3e
Show file tree
Hide file tree
Showing 84 changed files with 1,070 additions and 961 deletions.
10 changes: 3 additions & 7 deletions charts/stable/airsonic-advanced/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,8 @@ appVersion: "11.0.0"
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.6.1

description: Airsonic is a Free and Open Source community driven media server
home: https://truecharts.org/charts/stable/airsonic-advanced
icon: https://truecharts.org/img/hotlink-ok/chart-icons/airsonic-advanced.png
Expand All @@ -22,9 +19,8 @@ name: airsonic-advanced
sources:
- https://github.com/truecharts/charts/tree/master/charts/stable/airsonic-advanced
- https://github.com/airsonic/airsonic-advanced
version: 7.0.23
version: 9.0.0
annotations:
truecharts.org/catagories: |
- media
truecharts.org/SCALE-support: "true"
truecharts.org/grade: U
57 changes: 29 additions & 28 deletions charts/stable/airsonic-advanced/questions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,30 +10,31 @@ questions:
# Include{replicas1}
# Include{podSpec}
# Include{containerMain}

- variable: env
group: "App Configuration"
label: "Image Environment"
schema:
additional_attrs: true
type: dict
attrs:
- variable: JAVA_OPTS
label: "JAVA_OPTS"
description: "JAVA_OPTS"
schema:
type: string
default: ""
- variable: CONTEXT_PATH
label: "CONTEXT_PATH"
description: "CONTEXT_PATH"
schema:
type: string
required: true
default: "/"
# Include{containerBasic}
# Include{containerAdvanced}

- variable: env
group: "App Configuration"
label: "Image Environment"
schema:
additional_attrs: true
type: dict
attrs:
- variable: JAVA_OPTS
label: "JAVA_OPTS"
description: "JAVA_OPTS"
schema:
type: string
default: ""
- variable: CONTEXT_PATH
label: "CONTEXT_PATH"
description: "CONTEXT_PATH"
schema:
type: string
required: true
default: "/"
# Include{containerConfig}
# Include{podOptions}
# Include{serviceRoot}
- variable: main
label: "Main Service"
Expand Down Expand Up @@ -114,16 +115,16 @@ questions:
schema:
type: int
default: 0
- variable: runAsGroup
label: "runAsGroup"
description: "The groupID this App of the user running the application"
schema:
type: int
default: 0
- variable: runAsGroup
label: "runAsGroup"
description: "The groupID of the user running the application"
schema:
type: int
default: 0
# Include{securityContextContainer}
# Include{securityContextAdvanced}
# Include{securityContextPod}
- variable: fsGroup
- variable: fsGroup
label: "fsGroup"
description: "The group that should own ALL storage."
schema:
Expand Down
1 change: 1 addition & 0 deletions charts/stable/airsonic-advanced/templates/NOTES.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{{- include "tc.v1.common.lib.chart.notes" $ -}}
2 changes: 1 addition & 1 deletion charts/stable/airsonic-advanced/templates/common.yaml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{{ include "tc.common.loader.all" . }}
{{ include "tc.v1.common.loader.all" . }}
74 changes: 44 additions & 30 deletions charts/stable/airsonic-advanced/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,56 +4,70 @@ image:
pullPolicy: IfNotPresent

securityContext:
readOnlyRootFilesystem: false
runAsNonRoot: false
container:
readOnlyRootFilesystem: false
runAsNonRoot: true
runAsUser: 568
runAsGroup: 568

podSecurityContext:
runAsUser: 0
runAsGroup: 0
workload:
main:
podSpec:
containers:
main:
probes:
liveness:
type: tcp
readiness:
type: tcp
startup:
type: tcp
env:
AIRSONIC_DIR: "/"
# -- For passing additional java options. For some reverse proxies, you may need to pass `JAVA_OPTS=-Dserver.use-forward-headers=true` for airsonic to generate the proper URL schemes.

env:
AIRSONIC_DIR: "/"
# -- For passing additional java options. For some reverse proxies, you may need to pass `JAVA_OPTS=-Dserver.use-forward-headers=true` for airsonic to generate the proper URL schemes.
JAVA_OPTS:
CONTEXT_PATH: "/"
spring_liquibase_parameters_userTableQuote: '"'
spring_datasource_username: "{{ .Values.postgresql.postgresqlUsername }}"
spring_datasource_url:
secretKeyRef:
name: dbcreds
key: jdbc
spring_datasource_password:
secretKeyRef:
name: dbcreds
key: postgresql-password
JAVA_OPTS:
CONTEXT_PATH: "/"
spring_liquibase_parameters_userTableQuote: '"'
spring_datasource_username: "{{ .Values.cnpg.main.user }}"
spring_datasource_url:
secretKeyRef:
name: cnpg-main-urls
key: jdbc
spring_datasource_password:
secretKeyRef:
name: cnpg-main-user
key: password

service:
main:
ports:
main:
port: 10122
protocol: http
targetPort: 4040

# Enabled postgres
postgresql:
enabled: true
existingSecret: "dbcreds"
postgresqlUsername: airsonic-advanced
postgresqlDatabase: airsonic-advanced
cnpg:
main:
enabled: true
user: airsonic-advanced
database: airsonic-advanced

persistence:
config:
enabled: true
mountPath: "/airsonic"
mountPath: /airsonic
music:
enabled: true
mountPath: "/music"
mountPath: /music
podcasts:
enabled: true
mountPath: "/podcasts"
mountPath: /podcasts
playlists:
enabled: true
mountPath: "/playlists"
mountPath: /playlists

portal:
enabled: true
open:
enabled: true
9 changes: 4 additions & 5 deletions charts/stable/anonaddy/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ appVersion: "0.13.13"
dependencies:
- name: common
repository: https://library-charts.truecharts.org
version: 11.1.2
version: 12.6.1
- condition: mariadb.enabled
name: mariadb
repository: https://deps.truecharts.org/
version: 5.0.35
version: 7.0.5
- condition: redis.enabled
name: redis
repository: https://deps.truecharts.org
version: 5.0.33
version: 6.0.21
description: "Protect your email from spam using disposable addresses."
home: https://truecharts.org/charts/stable/anonaddy
icon: https://truecharts.org/img/hotlink-ok/chart-icons/anonaddy.png
Expand All @@ -26,9 +26,8 @@ name: anonaddy
sources:
- https://github.com/truecharts/charts/tree/master/charts/stable/anonaddy
- https://github.com/anonaddy/docker
version: 12.0.24
version: 13.0.0
annotations:
truecharts.org/catagories: |
- email
truecharts.org/SCALE-support: "true"
truecharts.org/grade: U
43 changes: 22 additions & 21 deletions charts/stable/anonaddy/questions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,23 +10,24 @@ questions:
# Include{replicas1}
# Include{podSpec}
# Include{containerMain}

- variable: env
group: "App Configuration"
label: "Image Environment"
schema:
additional_attrs: true
type: dict
attrs:
- variable: ANONADDY_DOMAIN
label: "ANONADDY_DOMAIN"
schema:
type: string
default: ""
required: true
# Include{containerBasic}
# Include{containerAdvanced}

- variable: env
group: "App Configuration"
label: "Image Environment"
schema:
additional_attrs: true
type: dict
attrs:
- variable: ANONADDY_DOMAIN
label: "ANONADDY_DOMAIN"
schema:
type: string
default: ""
required: true
# Include{containerConfig}
# Include{podOptions}
# Include{serviceRoot}
- variable: main
label: "Main Service"
Expand Down Expand Up @@ -105,16 +106,16 @@ questions:
schema:
type: int
default: 0
- variable: runAsGroup
label: "runAsGroup"
description: "The groupID this App of the user running the application"
schema:
type: int
default: 0
- variable: runAsGroup
label: "runAsGroup"
description: "The groupID of the user running the application"
schema:
type: int
default: 0
# Include{securityContextContainer}
# Include{securityContextAdvanced}
# Include{securityContextPod}
- variable: fsGroup
- variable: fsGroup
label: "fsGroup"
description: "The group that should own ALL storage."
schema:
Expand Down
1 change: 1 addition & 0 deletions charts/stable/anonaddy/templates/NOTES.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{{- include "tc.v1.common.lib.chart.notes" $ -}}
9 changes: 1 addition & 8 deletions charts/stable/anonaddy/templates/_appkey.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,7 @@
This template generates a random password and ensures it persists across updates/edits to the chart
*/}}
{{- define "anonaddy.appkey" -}}
---
apiVersion: v1
kind: Secret
type: Opaque
metadata:
labels:
{{- include "tc.common.labels" . | nindent 4 }}
name: appkey
enabled: true
{{- $keyprevious := lookup "v1" "Secret" .Release.Namespace "appkey" }}
{{- $appkey := "" }}
{{- $secret := "" }}
Expand Down
10 changes: 6 additions & 4 deletions charts/stable/anonaddy/templates/common.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
{{/* Make sure all variables are set properly */}}
{{- include "tc.common.loader.init" . }}
{{- include "tc.v1.common.loader.init" . }}

{{/* Render appkey for anonaddy */}}
{{- include "anonaddy.appkey" . }}

{{- $secret := include "anonaddy.appkey" . | fromYaml -}}
{{- if $secret -}}
{{- $_ := set .Values.secret "appkey" $secret -}}
{{- end -}}

{{/* Render the templates */}}
{{ include "tc.common.loader.apply" . }}
{{ include "tc.v1.common.loader.apply" . }}

0 comments on commit 28f1a3e

Please sign in to comment.