diff --git a/charts/incubator/hasty-paste/Chart.yaml b/charts/incubator/hasty-paste/Chart.yaml index 4b74b8c879b..d606ce7c0a0 100644 --- a/charts/incubator/hasty-paste/Chart.yaml +++ b/charts/incubator/hasty-paste/Chart.yaml @@ -1,7 +1,7 @@ kubeVersion: ">=1.24.0" apiVersion: v2 name: hasty-paste -version: 0.0.14 +version: 1.0.0 appVersion: 1.9.0 description: A fast and minimal paste bin, written in Python using Quart. home: https://truecharts.org/charts/incubator/hasty-paste @@ -24,14 +24,14 @@ keywords: - Network-Other dependencies: - name: common - version: 11.1.2 + version: 15.3.1 repository: https://library-charts.truecharts.org condition: "" alias: "" tags: [] import-values: [] - name: redis - version: 5.0.33 + version: 6.0.66 repository: https://deps.truecharts.org condition: redis.enabled alias: "" diff --git a/charts/incubator/hasty-paste/templates/_secret.tpl b/charts/incubator/hasty-paste/templates/_secrets.tpl similarity index 74% rename from charts/incubator/hasty-paste/templates/_secret.tpl rename to charts/incubator/hasty-paste/templates/_secrets.tpl index 3f4388a79ca..5737de68fb8 100644 --- a/charts/incubator/hasty-paste/templates/_secret.tpl +++ b/charts/incubator/hasty-paste/templates/_secrets.tpl @@ -1,22 +1,13 @@ {{/* Define the secret */}} -{{- define "hastyPaste.secret" -}} - -{{- $secretName := printf "%s-secret" (include "tc.common.names.fullname" .) }} - ---- -apiVersion: v1 -kind: Secret -type: Opaque -metadata: - name: {{ $secretName }} - labels: - {{- include "tc.common.labels" . | nindent 4 }} -stringData: +{{- define "hastypaste.secrets" -}} +{{- $secretName := (printf "%s-hastypaste-secrets" (include "tc.v1.common.lib.chart.names.fullname" $)) }} +enabled: true +data: {{- $redis := .Values.redis -}} - {{- $redisPass := $redis.redisPassword | trimAll "\"" -}} - {{- $redisUser := $redis.redisUsername }} - {{- $redisURL := $redis.url.plain | trimAll "\"" }} - CACHE__REDIS_URI: {{ printf "redis://%v:%v@%v/0" $redisUser $redisPass $redisURL | quote }} + {{- $redisPass := $redis.creds.redisPassword | trimAll "\"" -}} + {{- $redisUser := $redis.username }} + {{- $redisURL := $redis.creds.plainhost | trimAll "\"" }} + CACHE__REDIS_URI: {{ printf "redis://%v:%v@%v:6379/0" $redisUser $redisPass $redisURL | quote }} CACHE__ENABLE: "true" PORT: {{ .Values.service.main.ports.main.port | quote }} TIME_ZONE: {{ .Values.TZ }} diff --git a/charts/incubator/hasty-paste/templates/common.yaml b/charts/incubator/hasty-paste/templates/common.yaml index dcbd8e10a96..4553ecbfb46 100644 --- a/charts/incubator/hasty-paste/templates/common.yaml +++ b/charts/incubator/hasty-paste/templates/common.yaml @@ -1,8 +1,11 @@ {{/* Make sure all variables are set properly */}} -{{- include "tc.common.loader.init" . }} +{{- include "tc.v1.common.loader.init" . }} -{{/* Render config */}} -{{- include "hastyPaste.secret" . }} +{{/* Render secrets for hastyPaste */}} +{{- $secrets := include "hastypaste.secrets" . | fromYaml -}} +{{- if $secrets -}} + {{- $_ := set .Values.secret "hastypaste-secrets" $secrets -}} +{{- end -}} {{/* Render the templates */}} -{{ include "tc.common.loader.apply" . }} +{{ include "tc.v1.common.loader.apply" . }} diff --git a/charts/incubator/hasty-paste/values.yaml b/charts/incubator/hasty-paste/values.yaml index fb0cfbab53b..c07720be382 100644 --- a/charts/incubator/hasty-paste/values.yaml +++ b/charts/incubator/hasty-paste/values.yaml @@ -1,7 +1,7 @@ image: - repository: tccr.io/truecharts/hasty-paste + repository: ghcr.io/enchant97/hasty-paste pullPolicy: IfNotPresent - tag: 1.9.0@sha256:428aec44d95d061a8d357fa122175e067703b906483c9168a9b95cdb66c107da + tag: 1.9.0@sha256:fbbb670ac9b201bf0a47feaa7b1588b5b5c4657bbf49518f9534f12e8e80ce3d hastyPaste: new_at_index: false @@ -23,41 +23,45 @@ hastyPaste: css_file: "" hide_version: false -envFrom: - - secretRef: - name: '{{ include "tc.common.names.fullname" . }}-secret' - -probes: - liveness: - enabled: true - custom: true - spec: - exec: - command: - - /bin/sh - - health-check.sh - readiness: - enabled: true - custom: true - spec: - exec: - command: - - /bin/sh - - health-check.sh - startup: - enabled: true - custom: true - spec: - exec: - command: - - /bin/sh - - health-check.sh +workload: + main: + podSpec: + containers: + main: + envFrom: + - secretRef: + name: "hastypaste-secrets" + probes: + liveness: + enabled: true + custom: true + spec: + exec: + command: + - /bin/sh + - health-check.sh + readiness: + enabled: true + custom: true + spec: + exec: + command: + - /bin/sh + - health-check.sh + startup: + enabled: true + custom: true + spec: + exec: + command: + - /bin/sh + - health-check.sh service: main: ports: main: - protocol: HTTP + protocol: http port: 10601 persistence: @@ -67,8 +71,8 @@ persistence: redis: enabled: true - existingSecret: rediscreds - redisUsername: default + username: default portal: - enabled: true + open: + enabled: true