migrate(fireshare): Migrate to new common (#15638)

**Description**

Another one to new common

⚒️ 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._

---------

Signed-off-by: Xstar97TheNoob <9399967+xstar97@users.noreply.github.com>
Co-authored-by: Xstar97TheNoob <9399967+xstar97@users.noreply.github.com>
This commit is contained in:
StevenMcElligott
2023-12-04 11:26:52 -05:00
committed by GitHub
parent e03191e0fa
commit e37799fdf7
4 changed files with 44 additions and 43 deletions

View File

@@ -1,8 +1,8 @@
kubeVersion: ">=1.24.0"
apiVersion: v2
name: fireshare
version: 2.0.13
appVersion: 1.2.8
version: 3.0.0
appVersion: 1.2.15
description: Share your game clips, videos, or other media via unique links.
home: https://truecharts.org/charts/incubator/fireshare
icon: https://truecharts.org/img/hotlink-ok/chart-icons/fireshare.png
@@ -18,13 +18,13 @@ maintainers:
keywords:
- fireshare
dependencies:
- name: common
version: 11.1.2
repository: https://library-charts.truecharts.org
condition: ""
alias: ""
tags: []
import-values: []
- name: common
version: 15.3.1
repository: https://library-charts.truecharts.org
condition: ""
alias: ""
tags: []
import-values: []
annotations:
max_scale_version: 23.10.1
min_scale_version: 22.12.4

View File

@@ -1,17 +1,13 @@
{{/* Define the secrets */}}
{{- define "fireshare.secrets" -}}
---
{{- $secretName := (printf "%s-fireshare-secrets" (include "tc.v1.common.lib.chart.names.fullname" $)) }}
apiVersion: v1
kind: Secret
type: Opaque
metadata:
name: fireshare-secrets
{{- $secretKey := randAlphaNum 32 -}}
{{- with lookup "v1" "Secret" .Release.Namespace $secretName -}}
{{- $secretKey = index .data "SECRET_KEY" | b64dec -}}
{{- end }}
enabled: true
data:
{{- with (lookup "v1" "Secret" .Release.Namespace "fireshare-secrets") }}
SECRET_KEY: {{ index .data "SECRET_KEY" }}
{{- else }}
SECRET_KEY: {{ randAlphaNum 32 | b64enc }}
{{- end }}
SECRET_KEY: {{ $secretKey }}
{{- end -}}

View File

@@ -1,7 +1,10 @@
{{- include "tc.common.loader.init" . }}
{{- include "tc.v1.common.loader.init" . -}}
{{/* Render secrets for fireshare */}}
{{- include "fireshare.secrets" . }}
{{- $secrets := include "fireshare.secrets" . | fromYaml -}}
{{- if $secrets -}}
{{- $_ := set .Values.secret "fireshare-secrets" $secrets -}}
{{- end -}}
{{/* Render the templates */}}
{{ include "tc.common.loader.apply" . }}
{{- include "tc.v1.common.loader.apply" . -}}

View File

@@ -1,32 +1,33 @@
image:
pullPolicy: IfNotPresent
repository: tccr.io/truecharts/fireshare
tag: 1.2.8@sha256:9a8893666987d6a2a0ee18281ef55632630d3eee904886194372f9fe2961c068
podSecurityContext:
runAsGroup: 0
runAsUser: 0
repository: shaneisrael/fireshare
tag: 1.2.15@sha256:7b567c9c5b58b471700641a03bdb45d87fee1f18940e08d364c0b4d07a91b878
securityContext:
readOnlyRootFilesystem: false
runAsNonRoot: false
container:
readOnlyRootFilesystem: false
runAsUser: 0
runAsGroup: 0
secretEnv:
ADMIN_PASSWORD: "changeme"
env:
SECRET_KEY:
secretKeyRef:
name: fireshare-secrets
key: SECRET_KEY
MINUTES_BETWEEN_VIDEO_SCANS: 5
workload:
main:
podSpec:
containers:
main:
env:
SECRET_KEY:
secretKeyRef:
name: fireshare-secrets
key: SECRET_KEY
MINUTES_BETWEEN_VIDEO_SCANS: 5
ADMIN_PASSWORD: "changeme"
service:
main:
ports:
main:
port: 10287
protocol: HTTP
protocol: http
targetPort: 80
persistence:
@@ -41,4 +42,5 @@ persistence:
mountPath: /videos
portal:
enabled: true
open:
enabled: true