diff --git a/charts/incubator/nitter/Chart.yaml b/charts/incubator/nitter/Chart.yaml index f85b7ad0ff7..052edcad9c5 100644 --- a/charts/incubator/nitter/Chart.yaml +++ b/charts/incubator/nitter/Chart.yaml @@ -3,11 +3,11 @@ appVersion: "latest" dependencies: - name: common repository: https://library-charts.truecharts.org - version: 11.1.2 + version: 14.3.5 - condition: redis.enabled name: redis repository: https://deps.truecharts.org - version: 5.0.33 + version: 6.0.66 deprecated: false description: A free and open source alternative Twitter front-end focused on privacy and performance. home: https://truecharts.org/charts/incubator/nitter @@ -25,7 +25,7 @@ sources: - https://github.com/truecharts/charts/tree/master/charts/incubator/nitter - https://github.com/zedeus/nitter type: application -version: 1.0.12 +version: 2.0.0 annotations: truecharts.org/category: media truecharts.org/SCALE-support: "true" diff --git a/charts/incubator/nitter/questions.yaml b/charts/incubator/nitter/questions.yaml index 6bd40218db0..07f48986256 100644 --- a/charts/incubator/nitter/questions.yaml +++ b/charts/incubator/nitter/questions.yaml @@ -10,6 +10,7 @@ questions: # Include{replicas1} # Include{podSpec} # Include{containerMain} + # Include{containerBasic} # Include{containerAdvanced} @@ -172,6 +173,7 @@ questions: schema: type: boolean default: false + # Include{containerConfig} # Include{serviceRoot} - variable: main @@ -214,27 +216,27 @@ questions: # Include{ingressList} # Include{securityContextRoot} - - variable: runAsUser - label: runAsUser - description: The UserID 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 + - variable: runAsUser + label: "runAsUser" + description: "The UserID of the user running the application" + schema: + type: int + default: 568 + - variable: runAsGroup + label: "runAsGroup" + description: "The groupID of the user running the application" + schema: + type: int + default: 568 # Include{securityContextContainer} # Include{securityContextAdvanced} # Include{securityContextPod} - - variable: fsGroup - label: fsGroup - description: The group that should own ALL storage. - schema: - type: int - default: 568 + - variable: fsGroup + label: "fsGroup" + description: "The group that should own ALL storage." + schema: + type: int + default: 568 # Include{resources} # Include{advanced} @@ -242,4 +244,4 @@ questions: # Include{codeserver} # Include{netshoot} # Include{vpn} -# Include{documentation} +# Include{documentation} \ No newline at end of file diff --git a/charts/incubator/nitter/templates/NOTES.txt b/charts/incubator/nitter/templates/NOTES.txt new file mode 100644 index 00000000000..efcb74cb772 --- /dev/null +++ b/charts/incubator/nitter/templates/NOTES.txt @@ -0,0 +1 @@ +{{- include "tc.v1.common.lib.chart.notes" $ -}} diff --git a/charts/incubator/nitter/templates/_configmap.tpl b/charts/incubator/nitter/templates/_configmap.tpl new file mode 100644 index 00000000000..aaa03b9b4eb --- /dev/null +++ b/charts/incubator/nitter/templates/_configmap.tpl @@ -0,0 +1,59 @@ +{{/* Define the configmap */}} +{{- define "nitter.configmaps" -}} +{{- $fullname := (include "tc.v1.common.lib.chart.names.fullname" $) -}} + +{{- $config := .Values.nitter.config -}} +{{- $general := .Values.nitter.general -}} +{{- $cache := .Values.nitter.cache -}} +{{- $preferences := .Values.nitter.preferences -}} + +{{- $redisHost := .Values.redis.creds.plainhost | trimAll "\"" -}} +{{- $redisPass := .Values.redis.creds.redisPassword | trimAll "\"" -}} + +{{- $hmacKey := randAlphaNum 32 -}} + + {{- with lookup "v1" "Secret" .Release.Namespace $fullname -}} + {{- $hmacKey = index .data "hmacKey" | b64dec -}} + {{- end }} + +nitter-config: + enabled: true + data: + nitter.conf: | + [Server] + https = false + address = "0.0.0.0" + staticDir = "./public" + port = {{ .Values.service.main.ports.main.port }} + httpMaxConnections = {{ $general.httpMaxConnections }} + title = {{ $general.title | quote }} + hostname = {{ $general.hostname | quote }} + + [Cache] + redisPort = 6379 + redisConnections = 20 + redisMaxConnections = 30 + redisHost = {{ $redisHost }} + redisPassword = {{ $redisPass }} + listMinutes = {{ $cache.listMinutes }} + rssMinutes = {{ $cache.rssMinutes }} + + [Config] + hmacKey: {{ $hmacKey | quote }} + base64Media = {{ $config.base64Media }} + enableRSS = {{ $config.enableRSS }} + enableDebug = {{ $config.enableDebug }} + proxy = {{ $config.proxy | quote }} + proxyAuth = {{ $config.proxyAuth | quote }} + tokenCount = {{ $config.tokenCount }} + + [Preferences] + theme = {{ $preferences.theme | quote }} + replaceTwitter = {{ $preferences.replaceTwitter | quote }} + replaceYouTube = {{ $preferences.replaceYouTube | quote }} + replaceReddit = {{ $preferences.replaceReddit | quote }} + replaceInstagram = {{ $preferences.replaceInstagram | quote }} + proxyVideos = {{ $preferences.proxyVideos }} + hlsPlayback = {{ $preferences.hlsPlayback }} + infiniteScroll = {{ $preferences.infiniteScroll }} +{{- end -}} diff --git a/charts/incubator/nitter/templates/_secret.tpl b/charts/incubator/nitter/templates/_secret.tpl deleted file mode 100644 index 446290e83bb..00000000000 --- a/charts/incubator/nitter/templates/_secret.tpl +++ /dev/null @@ -1,70 +0,0 @@ -{{/* Define the configmap */}} -{{- define "nitter.secret" -}} - -{{- $secretName := printf "%s-nitter-secret" (include "tc.common.names.fullname" .) }} -{{- $storageSecretName := printf "%s-nitter-storage-secret" (include "tc.common.names.fullname" .) }} - -{{- $hmacKey := "" -}} -{{- with (lookup "v1" "Secret" .Release.Namespace $storageSecretName) -}} - {{- $hmacKey = (index .data "hmacKey") | b64dec -}} -{{- else -}} - {{- $hmacKey = randAlphaNum 32 -}} -{{- end }} - ---- -apiVersion: v1 -kind: Secret -type: Opaque -metadata: - name: {{ $storageSecretName }} - labels: - {{- include "tc.common.labels" . | nindent 4 }} -data: {{/* Store to reuse */}} - hmacKey: {{ $hmacKey | b64enc }} ---- -apiVersion: v1 -kind: Secret -type: Opaque -metadata: - name: {{ $secretName }} - labels: - {{- include "tc.common.labels" . | nindent 4 }} -stringData: - nitter.conf: | - [Server] - https = false - address = "0.0.0.0" - staticDir = "./public" - port = {{ .Values.service.main.ports.main.port }} - httpMaxConnections = {{ .Values.nitter.general.httpMaxConnections }} - title = {{ .Values.nitter.general.title | quote }} - hostname = {{ .Values.nitter.general.hostname | quote }} - - [Cache] - redisPort = 6379 - redisConnections = 20 - redisMaxConnections = 30 - redisHost = {{ .Values.redis.url.plain | trimAll "\"" | quote }} - redisPassword = {{ .Values.redis.redisPassword | trimAll "\"" | quote }} - listMinutes = {{ .Values.nitter.cache.listMinutes }} - rssMinutes = {{ .Values.nitter.cache.rssMinutes }} - - [Config] - hmacKey: {{ $hmacKey | quote }} - base64Media = {{ .Values.nitter.config.base64Media }} - enableRSS = {{ .Values.nitter.config.enableRSS }} - enableDebug = {{ .Values.nitter.config.enableDebug }} - proxy = {{ .Values.nitter.config.proxy | quote }} - proxyAuth = {{ .Values.nitter.config.proxyAuth | quote }} - tokenCount = {{ .Values.nitter.config.tokenCount }} - - [Preferences] - theme = {{ .Values.nitter.preferences.theme | quote }} - replaceTwitter = {{ .Values.nitter.preferences.replaceTwitter | quote }} - replaceYouTube = {{ .Values.nitter.preferences.replaceYouTube | quote }} - replaceReddit = {{ .Values.nitter.preferences.replaceReddit | quote }} - replaceInstagram = {{ .Values.nitter.preferences.replaceInstagram | quote }} - proxyVideos = {{ .Values.nitter.preferences.proxyVideos }} - hlsPlayback = {{ .Values.nitter.preferences.hlsPlayback }} - infiniteScroll = {{ .Values.nitter.preferences.infiniteScroll }} -{{- end }} diff --git a/charts/incubator/nitter/templates/common.yaml b/charts/incubator/nitter/templates/common.yaml index 10ba5789515..417d6ac78cd 100644 --- a/charts/incubator/nitter/templates/common.yaml +++ b/charts/incubator/nitter/templates/common.yaml @@ -1,7 +1,11 @@ {{/* Make sure all variables are set properly */}} -{{- include "tc.common.loader.init" . }} +{{- include "tc.v1.common.loader.init" . -}} -{{- include "nitter.secret" . -}} +{{/* Render configmaps for all pods */}} +{{- $configmaps := include "nitter.configmaps" . | fromYaml -}} +{{- if $configmaps -}} + {{- $_ := mustMergeOverwrite .Values.configmap $configmaps -}} +{{- end -}} {{/* Render the templates */}} -{{ include "tc.common.loader.apply" . }} +{{- include "tc.v1.common.loader.apply" . -}} diff --git a/charts/incubator/nitter/values.yaml b/charts/incubator/nitter/values.yaml index 277db284489..8dee6abe2be 100644 --- a/charts/incubator/nitter/values.yaml +++ b/charts/incubator/nitter/values.yaml @@ -1,7 +1,14 @@ image: - repository: tccr.io/truecharts/nitter + repository: zedeus/nitter pullPolicy: IfNotPresent - tag: latest@sha256:9e85cc3257d422391d01af3a322827929d755918720fcfaea90a04dbb3bde8e9 + tag: latest@sha256:c0275459df4de2331a1ceac61c42be30a8731e168f582851134b5ec25af75171 + +service: + main: + ports: + main: + protocol: http + port: 10606 nitter: general: @@ -28,35 +35,36 @@ nitter: hlsPlayback: false infiniteScroll: false -probes: - liveness: - type: HTTP - path: / - readiness: - type: HTTP - path: / - startup: - type: HTTP - path: / - -service: +workload: main: - ports: - main: - protocol: HTTP - port: 10606 + podSpec: + containers: + main: + probes: + liveness: + enabled: true + type: http + path: / + readiness: + enabled: true + type: http + path: / + startup: + enabled: true + type: tcp persistence: - nitter-conf: + nitter-config: enabled: true + type: configmap + objectName: nitter-config mountPath: /src/nitter.conf - type: secret - objectName: '{{ template "tc.common.names.fullname" . }}-nitter-secret' subPath: nitter.conf + readOnly: true redis: enabled: true - existingSecret: rediscreds portal: - enabled: true + open: + enabled: true