migrate(shiori): Migrate to New Common (#11539)

**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._
This commit is contained in:
StevenMcElligott 2023-08-15 01:16:18 -04:00 committed by GitHub
parent 2c19d67783
commit 7dbcd6174c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 30 additions and 50 deletions

View File

@ -3,11 +3,7 @@ appVersion: "1.5.4"
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: 14.0.1
deprecated: false
description: A simple bookmark manager built with Go.
home: https://truecharts.org/charts/incubator/shiori
@ -28,7 +24,7 @@ sources:
- https://github.com/go-shiori/shiori
- https://github.com/go-shiori/shiori/pkgs/container/shiori
type: application
version: 12.0.0
version: 13.0.0
annotations:
truecharts.org/catagories: |
- media

View File

@ -1,23 +0,0 @@
{{/* Define the secret */}}
{{- define "shiori.secret" -}}
{{- $secretName := printf "%s-secret" (include "tc.common.names.fullname" .) }}
---
apiVersion: v1
kind: Secret
metadata:
name: {{ $secretName }}
labels:
{{- include "tc.common.labels" . | nindent 4 }}
stringData:
SHIORI_DIR: {{ .Values.persistence.data.mountPath }}
{{/* Database */}}
SHIORI_DBMS: "postgresql"
SHIORI_PG_PORT: "5432"
SHIORI_PG_USER: {{ .Values.postgresql.postgresqlUsername }}
SHIORI_PG_PASS: {{ .Values.postgresql.postgresqlPassword | trimAll "\"" }}
SHIORI_PG_NAME: {{ .Values.postgresql.postgresqlDatabase }}
SHIORI_PG_HOST: {{ .Values.postgresql.url.plain | trimAll "\"" }}
{{- end -}}

View File

@ -1,8 +1 @@
{{/* Make sure all variables are set properly */}}
{{- include "tc.common.loader.init" . }}
{{/* Render secret */}}
{{- include "shiori.secret" . }}
{{/* Render the templates */}}
{{ include "tc.common.loader.apply" . }}
{{ include "tc.v1.common.loader.all" . }}

View File

@ -1,12 +1,27 @@
image:
repository: tccr.io/truecharts/shiori
pullPolicy: IfNotPresent
tag: 1.5.4@sha256:d0d145787855f00b81752433cb3cfa047c833926b55a14f845cbe8dbc42b8800
envFrom:
- secretRef:
name: '{{ include "tc.common.names.fullname" . }}-secret'
tag: v1.5.5@sha256:2aa3fe6e09d5cb801e998a93f3f6ce13e0e7f8e75d567666a800939c6be3a474
workload:
main:
podSpec:
containers:
main:
env:
SHIORI_DIR: "{{ .Values.persistence.data.mountPath }}"
SHIORI_DBMS: "postgresql"
SHIORI_PG_PORT: "5432"
SHIORI_PG_USER: "{{ .Values.cnpg.main.user }}"
SHIORI_PG_NAME: "{{ .Values.cnpg.main.database }}"
SHIORI_PG_HOST:
secretKeyRef:
name: cnpg-main-urls
key: host
SHIORI_PG_PASS:
secretKeyRef:
name: cnpg-main-user
key: password
service:
main:
ports:
@ -18,14 +33,13 @@ persistence:
data:
enabled: true
mountPath: /data
varrun:
enabled: true
postgresql:
enabled: true
existingSecret: dbcreds
postgresqlUsername: shiori
postgresqlDatabase: shiori
cnpg:
main:
enabled: true
user: shiori
password: shiori
portal:
enabled: true
open:
enabled: true