Skip to content

Commit

Permalink
Merge pull request #1219 from axeII/feat/nitter
Browse files Browse the repository at this point in the history
feat: adds nitter
  • Loading branch information
axeII authored Aug 12, 2024
2 parents 3d57e40 + 29c6964 commit a85bbb2
Show file tree
Hide file tree
Showing 4 changed files with 152 additions and 0 deletions.
27 changes: 27 additions & 0 deletions kubernetes/apps/default/nitter/app/externalsecret.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
# yaml-language-server: $schema=https://kubernetes-schemas.pages.dev/external-secrets.io/externalsecret_v1beta1.json
apiVersion: external-secrets.io/v1beta1
kind: ExternalSecret
metadata:
name: gatus
spec:
secretStoreRef:
kind: ClusterSecretStore
name: onepassword-connect
target:
name: gatus-secret
template:
engineVersion: v2
data:
CUSTOM_PUSHOVER_TOKEN: "{{ .GATUS_PUSHOVER_TOKEN }}"
CUSTOM_PUSHOVER_USER_KEY: "{{ .PUSHOVER_USER_KEY }}"
# INIT_POSTGRES_DBNAME: gatus
# INIT_POSTGRES_HOST: postgres16-rw.database.svc.cluster.local
# INIT_POSTGRES_USER: "{{ .GATUS_POSTGRES_USER }}"
# INIT_POSTGRES_PASS: "{{ .GATUS_POSTGRES_PASS }}"
# INIT_POSTGRES_SUPER_PASS: "{{ .POSTGRES_SUPER_PASS }}"
dataFrom:
# - extract:
# key: cloudnative-pg
- extract:
key: gatus
100 changes: 100 additions & 0 deletions kubernetes/apps/default/nitter/app/helmrelease.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
---
apiVersion: helm.toolkit.fluxcd.io/v2beta1
kind: HelmRelease
metadata:
name: &app nitter
namespace: services
spec:
interval: 15m
chart:
spec:
chart: app-template
version: 2.6.0
sourceRef:
kind: HelmRepository
name: bjw-s-charts
namespace: flux-system
install:
createNamespace: true
remediation:
retries: 5
upgrade:
remediation:
retries: 5
values:
controller:
replicas: 2
strategy: RollingUpdate
fullNameOverride: *app
image:
repository: registry.skysolutions.fi/library/nitter
tag: guest-accounts
service:
main:
ports:
http:
port: &port 8080
ingress:
main:
enabled: true
ingressClassName: 'nginx'
annotations:
external-dns-cf/is-public: "true"
external-dns-cf/is-dns-public: "true"
external-dns.alpha.kubernetes.io/cloudflare-proxied: "true"
external-dns.alpha.kubernetes.io/target: "ingress-cf.skylab.fi"
hajimari.io/icon: 'twitter'
hosts:
- host: &host 'nitter.${SECRET_DOMAIN}'
paths:
- path: /
pathType: Prefix
tls:
- hosts:
- *host
topologySpreadConstraints:
- maxSkew: 1
topologyKey: kubernetes.io/hostname
whenUnsatisfiable: DoNotSchedule
labelSelector:
matchLabels:
app.kubernetes.io/name: *app
probes:
liveness: &probes
enabled: false
custom: true
spec:
httpGet:
path: /settings
port: *port
initialDelaySeconds: 0
periodSeconds: 10
timeoutSeconds: 1
failureThreshold: 3
readiness: *probes
startup:
enabled: false
persistence:
config:
enabled: true
type: configMap
name: *app
subPath: config.ini
mountPath: /src/nitter.conf
readOnly: false
podAnnotations:
secret.reloader.stakater.com/reload: *app
resources:
requests:
memory: 50Mi
limits:
memory: 250Mi
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: kubernetes.io/arch
operator: In
values:
- "amd64"
6 changes: 6 additions & 0 deletions kubernetes/apps/default/nitter/app/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- ./helmrelease.yaml
- ./externalsecret.yaml
19 changes: 19 additions & 0 deletions kubernetes/apps/default/nitter/ks.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
# yaml-language-server: $schema=https://raw.githubusercontent.com/fluxcd-community/flux2-schemas/main/kustomization-kustomize-v1.json
apiVersion: kustomize.toolkit.fluxcd.io/v1
kind: Kustomization
metadata:
name: &app nitter
namespace: flux-system
spec:
targetNamespace: default
commonMetadata:
labels:
app.kubernetes.io/name: *app
interval: 10m
path: ./kubernetes/apps/default/nitter/app
prune: true
sourceRef:
kind: GitRepository
name: home-kubernetes
wait: false

0 comments on commit a85bbb2

Please sign in to comment.