mirror of
https://github.com/auricom/home-cluster.git
synced 2025-10-02 00:34:25 +02:00
135 lines
3.7 KiB
YAML
135 lines
3.7 KiB
YAML
---
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: nitter
|
|
namespace: data
|
|
labels:
|
|
app.kubernetes.io/instance: nitter
|
|
app.kubernetes.io/name: nitter
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
app.kubernetes.io/instance: nitter
|
|
app.kubernetes.io/name: nitter
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app.kubernetes.io/instance: nitter
|
|
app.kubernetes.io/name: nitter
|
|
spec:
|
|
containers:
|
|
- image: zedeus/nitter:cf47c1b8ad3affa43881ea661c8a5a11d206dfa0
|
|
imagePullPolicy: IfNotPresent
|
|
name: nitter
|
|
ports:
|
|
- containerPort: 8080
|
|
name: http
|
|
volumeMounts:
|
|
- name: config
|
|
mountPath: /src/nitter.conf
|
|
subPath: nitter.conf
|
|
volumes:
|
|
- name: config
|
|
configMap:
|
|
name: nitter-config
|
|
---
|
|
apiVersion: v1
|
|
kind: ConfigMap
|
|
metadata:
|
|
name: nitter-config
|
|
namespace: data
|
|
data:
|
|
nitter.conf: |
|
|
[Server]
|
|
address = "0.0.0.0"
|
|
port = 8080
|
|
https = false # disable to enable cookies when not using https
|
|
httpMaxConnections = 100
|
|
staticDir = "./public"
|
|
title = "nitter"
|
|
hostname = "nitter.${SECRET_CLUSTER_DOMAIN}"
|
|
|
|
[Cache]
|
|
listMinutes = 240 # how long to cache list info (not the tweets, so keep it high)
|
|
rssMinutes = 10 # how long to cache rss queries
|
|
redisHost = "localhost"
|
|
redisPort = 6379
|
|
redisConnections = 20 # connection pool size
|
|
redisMaxConnections = 30
|
|
redisPassword = ""
|
|
# max, new connections are opened when none are available, but if the pool size
|
|
# goes above this, they're closed when released. don't worry about this unless
|
|
# you receive tons of requests per second
|
|
|
|
[Config]
|
|
hmacKey = "b38bf170965a71f5ba4da40e4881d25c05339b51" # random key for cryptographic signing of video urls
|
|
base64Media = false # use base64 encoding for proxied media urls
|
|
tokenCount = 10
|
|
# minimum amount of usable tokens. tokens are used to authorize API requests,
|
|
# but they expire after ~1 hour, and have a limit of 187 requests.
|
|
# the limit gets reset every 15 minutes, and the pool is filled up so there's
|
|
# always at least $tokenCount usable tokens. again, only increase this if
|
|
# you receive major bursts all the time
|
|
|
|
# Change default preferences here, see src/prefs_impl.nim for a complete list
|
|
[Preferences]
|
|
theme = "Nitter"
|
|
replaceTwitter = "nitter.${SECRET_CLUSTER_DOMAIN}"
|
|
replaceYouTube = "piped.kavin.rocks"
|
|
replaceInstagram = ""
|
|
proxyVideos = true
|
|
hlsPlayback = false
|
|
infiniteScroll = false
|
|
---
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
annotations:
|
|
prometheus.io/probe: "true"
|
|
prometheus.io/protocol: tcp
|
|
labels:
|
|
app.kubernetes.io/instance: nitter
|
|
app.kubernetes.io/name: nitter
|
|
name: nitter
|
|
namespace: data
|
|
spec:
|
|
ports:
|
|
- name: http
|
|
port: 8080
|
|
protocol: TCP
|
|
targetPort: 8080
|
|
selector:
|
|
app.kubernetes.io/instance: nitter
|
|
app.kubernetes.io/name: nitter
|
|
type: ClusterIP
|
|
---
|
|
apiVersion: networking.k8s.io/v1
|
|
kind: Ingress
|
|
metadata:
|
|
# annotations:
|
|
# traefik.ingress.kubernetes.io/router.entrypoints: "websecure"
|
|
labels:
|
|
app.kubernetes.io/instance: nitter
|
|
app.kubernetes.io/name: nitter
|
|
name: nitter
|
|
namespace: data
|
|
spec:
|
|
ingressClassName: "nginx"
|
|
rules:
|
|
- host: "nitter.${SECRET_CLUSTER_DOMAIN}"
|
|
http:
|
|
paths:
|
|
- path: /
|
|
pathType: Prefix
|
|
backend:
|
|
service:
|
|
name: nitter
|
|
port:
|
|
number: 8080
|
|
tls:
|
|
- hosts:
|
|
- "nitter.${SECRET_CLUSTER_DOMAIN}"
|
|
secretName: "${SECRET_CLUSTER_CERTIFICATE_DEFAULT}"
|