feat(nitter) add nitter (#5910)

* feat(nitter) add nitter

* fix hmacKey

* update hmacKey

* remove excess code

* fix qui descriptions + hmacKey variable

* Update charts/incubator/nitter/values.yaml

Co-authored-by: Stavros Kois <47820033+stavros-k@users.noreply.github.com>
Signed-off-by: Xstar97 <Xstar97@users.noreply.github.com>

* Update charts/incubator/nitter/values.yaml

Signed-off-by: Stavros Kois <47820033+stavros-k@users.noreply.github.com>

* Update charts/incubator/nitter/templates/_configmap.tpl

Signed-off-by: Stavros Kois <47820033+stavros-k@users.noreply.github.com>

* Update charts/incubator/nitter/templates/_configmap.tpl

Co-authored-by: Stavros Kois <47820033+stavros-k@users.noreply.github.com>
Signed-off-by: Xstar97 <Xstar97@users.noreply.github.com>

* Update charts/incubator/nitter/templates/_configmap.tpl

Co-authored-by: Stavros Kois <47820033+stavros-k@users.noreply.github.com>
Signed-off-by: Xstar97 <Xstar97@users.noreply.github.com>

* Update charts/incubator/nitter/values.yaml

Signed-off-by: Stavros Kois <47820033+stavros-k@users.noreply.github.com>

* Update charts/incubator/nitter/values.yaml

Co-authored-by: Stavros Kois <47820033+stavros-k@users.noreply.github.com>
Signed-off-by: Xstar97 <Xstar97@users.noreply.github.com>

* Update charts/incubator/nitter/values.yaml

Co-authored-by: Stavros Kois <47820033+stavros-k@users.noreply.github.com>
Signed-off-by: Xstar97 <Xstar97@users.noreply.github.com>

* Update charts/incubator/nitter/templates/_configmap.tpl

Co-authored-by: Stavros Kois <47820033+stavros-k@users.noreply.github.com>
Signed-off-by: Xstar97 <Xstar97@users.noreply.github.com>

* Update charts/incubator/nitter/templates/_configmap.tpl

Co-authored-by: Stavros Kois <47820033+stavros-k@users.noreply.github.com>
Signed-off-by: Xstar97 <Xstar97@users.noreply.github.com>

* Apply suggestions from code review

Signed-off-by: Stavros Kois <47820033+stavros-k@users.noreply.github.com>

* Apply suggestions from code review

Signed-off-by: Stavros Kois <47820033+stavros-k@users.noreply.github.com>

* Update charts/incubator/nitter/templates/_configmap.tpl

Signed-off-by: Stavros Kois <47820033+stavros-k@users.noreply.github.com>

* Update charts/incubator/nitter/values.yaml

Signed-off-by: Stavros Kois <47820033+stavros-k@users.noreply.github.com>

* Update charts/incubator/nitter/values.yaml

Co-authored-by: Stavros Kois <47820033+stavros-k@users.noreply.github.com>
Signed-off-by: Xstar97 <Xstar97@users.noreply.github.com>

* Update charts/incubator/nitter/values.yaml

Signed-off-by: Stavros Kois <47820033+stavros-k@users.noreply.github.com>

* adjust secret

* tpl

* ui

* no need for persistence

* add http probe

* fix quests

* hm

* secret

* ofc...

* hostname

Signed-off-by: Xstar97 <Xstar97@users.noreply.github.com>
Signed-off-by: Stavros Kois <47820033+stavros-k@users.noreply.github.com>
Co-authored-by: Stavros Kois <47820033+stavros-k@users.noreply.github.com>
Co-authored-by: Stavros kois <s.kois@outlook.com>
This commit is contained in:
Xstar97 2023-01-01 12:13:57 -05:00 committed by GitHub
parent f0d845f2b3
commit 54ef71fe28
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 462 additions and 0 deletions

View File

@ -0,0 +1,30 @@
# Patterns to ignore when building packages.
# This supports shell glob matching, relative path matching, and
# negation (prefixed with !). Only one pattern per line.
.DS_Store
# Common VCS dirs
.git/
.gitignore
.bzr/
.bzrignore
.hg/
.hgignore
.svn/
# Common backup files
*.swp
*.bak
*.tmp
*~
# Various IDEs
.project
.idea/
*.tmproj
.vscode/
# OWNERS file for Kubernetes
OWNERS
# helm-docs templates
*.gotmpl
# docs folder
/docs
# icon
icon.png

View File

@ -0,0 +1 @@
# Changelog

View File

@ -0,0 +1,33 @@
apiVersion: v2
appVersion: "latest"
dependencies:
- name: common
repository: https://library-charts.truecharts.org
version: 11.1.2
- condition: redis.enabled
name: redis
repository: https://charts.truecharts.org
version: 5.0.22
deprecated: false
description: A free and open source alternative Twitter front-end focused on privacy and performance.
home: https://truecharts.org/charts/incubator/nitter
icon: https://truecharts.org/img/hotlink-ok/chart-icons/nitter.png
keywords:
- nitter
- libre
kubeVersion: ">=1.16.0-0"
maintainers:
- email: info@truecharts.org
name: TrueCharts
url: https://truecharts.org
name: nitter
sources:
- https://github.com/truecharts/charts/tree/master/charts/incubator/nitter
- https://github.com/zedeus/nitter
type: application
version: 1.0.0
annotations:
truecharts.org/catagories: |
- media
truecharts.org/SCALE-support: "true"
truecharts.org/grade: U

View File

@ -0,0 +1 @@
# README

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

View File

@ -0,0 +1,257 @@
# Include{groups}
portals:
open:
# Include{portalLink}
questions:
# Include{global}
# Include{controller}
# Include{replicas}
# Include{replica1}
# Include{controllerExpertExtraArgs}
- variable: nitter
group: App Configuration
label: Nitter Configuration
schema:
additional_attrs: true
type: dict
attrs:
- variable: general
label: General
schema:
additional_attrs: true
type: dict
attrs:
- variable: title
label: Website Title
schema:
type: string
required: true
default: Nitter
- variable: hostname
label: Hostname
schema:
type: string
required: true
default: localhost:10606
- variable: httpMaxConnections
label: HTTP Max Connections
schema:
type: int
required: true
default: 100
- variable: cache
label: Cache
schema:
additional_attrs: true
type: dict
attrs:
- variable: listMinutes
label: List Minutes
description: How long to cache list info (not the tweets, so keep it high).
schema:
type: int
required: true
default: 240
- variable: rssMinutes
label: RSS Minutes
description: How long to cache rss queries.
schema:
type: int
required: true
default: 10
- variable: config
label: Configuration
schema:
additional_attrs: true
type: dict
attrs:
- variable: base64Media
label: Base64 Encoding
description: Enable base64 encoding for proxied media urls.
schema:
type: boolean
default: false
- variable: enableRSS
label: Enable RSS
description: Uncheck to disable RSS feeds.
schema:
type: boolean
default: true
- variable: enableDebug
label: Enable Debug
description: Enable request logs and debug endpoints.
schema:
type: boolean
default: false
- variable: proxy
label: Proxy
description: http/https url, SOCKS proxies are not supported.
schema:
type: string
default: ""
- variable: proxyAuth
label: Proxy Auth
schema:
type: string
default: ""
- variable: tokenCount
label: Token Count
description: Minimum amount of usable tokens that are used to authorize API requests.
schema:
type: int
required: true
default: 10
- variable: preferences
label: Preferences
schema:
additional_attrs: true
type: dict
attrs:
- variable: theme
label: Theme
schema:
type: string
required: true
default: nitter
enum:
- value: auto
description: Auto
- value: auto_(twitter)
description: Auto (Twitter)
- value: black
description: Black
- value: dracula
description: Dracula
- value: mastodon
description: Mastodon
- value: nitter
description: Nitter
- value: pleroma
description: Pleroma
- value: twitter
description: Twitter
- value: twitter_dark
description: Twitter Dark
- variable: replaceTwitter
label: Replace Twitter
schema:
type: string
default: nitter.net
- variable: replaceYouTube
label: Replace YouTube
schema:
type: string
default: piped.video
- variable: replaceReddit
label: Replace Reddit
schema:
type: string
default: teddit.net
- variable: replaceInstagram
label: Replace Instagram
schema:
type: string
default: ""
- variable: proxyVideos
label: Proxy Videos
schema:
type: boolean
default: true
- variable: hlsPlayback
label: HLS PlayBack
schema:
type: boolean
default: false
- variable: infiniteScroll
label: infinite Scroll
schema:
type: boolean
default: false
# Include{containerConfig}
# Include{serviceRoot}
- variable: main
label: Main Service
description: The Primary service on which the healthcheck runs, often the webUI
schema:
additional_attrs: true
type: dict
attrs:
# Include{serviceSelectorLoadBalancer}
# Include{serviceSelectorExtras}
- variable: main
label: Main Service Port Configuration
schema:
additional_attrs: true
type: dict
attrs:
- variable: port
label: Port
description: This port exposes the container port on the service
schema:
type: int
default: 10606
required: true
# Include{serviceExpertRoot}
default: false
# Include{serviceExpert}
# Include{serviceList}
# Include{persistenceList}
# Include{ingressRoot}
- variable: main
label: Main Ingress
schema:
additional_attrs: true
type: dict
attrs:
# Include{ingressDefault}
# Include{ingressTLS}
# Include{ingressTraefik}
# Include{ingressList}
# Include{security}
# Include{securityContextAdvancedRoot}
- variable: privileged
label: Privileged mode
schema:
type: boolean
default: false
- variable: readOnlyRootFilesystem
label: ReadOnly Root Filesystem
schema:
type: boolean
default: false
- variable: allowPrivilegeEscalation
label: Allow Privilege Escalation
schema:
type: boolean
default: false
- variable: runAsNonRoot
label: runAsNonRoot
schema:
type: boolean
default: true
# Include{podSecurityContextRoot}
- 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: fsGroup
label: fsGroup
description: The group that should own ALL storage.
schema:
type: int
default: 568
# Include{podSecurityContextAdvanced}
# Include{resources}
# Include{advanced}
# Include{addons}
# Include{codeserver}
# Include{vpn}
# Include{documentation}

View File

@ -0,0 +1,70 @@
{{/* 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 }}

View File

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

View File

@ -0,0 +1,62 @@
image:
repository: tccr.io/truecharts/nitter
pullPolicy: IfNotPresent
tag: latest@sha256:dde49ae0122fe8da6d00432ec26e596efd36e81e0f14851df6ff40e1c656ddf7
nitter:
general:
title: nitter
hostname: localhost:10606
httpMaxConnections: 100
cache:
listMinutes: 240
rssMinutes: 10
config:
base64Media: false
enableRSS: true
enableDebug: false
proxy: ""
proxyAuth: ""
tokenCount: 10
preferences:
theme: Nitter
replaceTwitter: nitter.net
replaceYouTube: piped.video
replaceReddit: teddit.net
replaceInstagram: ""
proxyVideos: true
hlsPlayback: false
infiniteScroll: false
probes:
liveness:
type: HTTP
path: /
readiness:
type: HTTP
path: /
startup:
type: HTTP
path: /
service:
main:
ports:
main:
protocol: HTTP
port: 10606
persistence:
nitter-conf:
enabled: true
mountPath: /src/nitter.conf
type: secret
objectName: '{{ template "tc.common.names.fullname" . }}-nitter-secret'
subPath: nitter.conf
redis:
enabled: true
existingSecret: rediscreds
portal:
enabled: true

View File

@ -166,6 +166,7 @@ words:
- netdata
- networkv
- nextcloud
- nitter
- nobind
- nocaptcha
- nodeport