Skip to content

Commit

Permalink
archive privatebin and use hastebin
Browse files Browse the repository at this point in the history
  • Loading branch information
brettinternet committed Nov 5, 2022
1 parent 2935223 commit b997428
Show file tree
Hide file tree
Showing 12 changed files with 163 additions and 9 deletions.
File renamed without changes.
File renamed without changes.
111 changes: 111 additions & 0 deletions cluster/apps/default/hastebin/helm-release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
# Watch for new version: https://github.com/toptal/haste-server/issues/429
---
apiVersion: helm.toolkit.fluxcd.io/v2beta1
kind: HelmRelease
metadata:
name: &app hastebin
namespace: default
spec:
interval: 15m
chart:
spec:
chart: app-template
version: 0.2.2
sourceRef:
kind: HelmRepository
name: bjw-s
namespace: flux-system
interval: 15m
install:
createNamespace: true
remediation:
retries: 5
upgrade:
remediation:
retries: 5
values:
image:
repository: ghcr.io/brettinternet/hastebin
tag: latest
# https://github.com/toptal/haste-server#docker
env:
TZ: "${TIMEZONE}"
STORAGE_TYPE: redis-server
STORAGE_PORT: 6379
STORAGE_HOST: hastebin-redis.default.svc.cluster.local
STORAGE_PASSWORD:
valueFrom:
secretKeyRef:
name: *app
key: REDIS_PASSWORD
STORAGE_DB: hastebin
KEYGENERATOR_TYPE: phonetic
DOCUMENTS: ""
service:
main:
ports:
http:
port: 7777
ingress:
main:
enabled: true
ingressClassName: nginx
annotations:
external-dns.home.arpa/enabled: "true"
hajimari.io/enable: "true"
hajimari.io/icon: paste
hosts:
- host: &host "paste.${PUBLIC_DOMAIN}"
paths:
- path: /
pathType: Prefix
tls:
- hosts:
- *host
nodeSelector:
# https://github.com/jonschoning/espial/issues/23
kubernetes.io/arch: amd64


---
apiVersion: helm.toolkit.fluxcd.io/v2beta1
kind: HelmRelease
metadata:
name: hastebin-redis
namespace: default
spec:
interval: 15m
chart:
spec:
chart: app-template
version: 0.2.2
interval: 15m
sourceRef:
kind: HelmRepository
name: bjw-s
namespace: flux-system
values:
controller:
strategy: RollingUpdate
image:
repository: docker.io/library/redis
tag: "7"
command: ["redis-server", "--requirepass", "$(REDIS_PASSWORD)"]
env:
REDIS_REPLICATION_MODE: master
envFrom:
- secretRef:
name: hastebin
persistence:
data:
enabled: true
path: /data
existingClaim: appdata
subPath: hastebin_redis
service:
main:
ports:
http:
port: 6379
podAnnotations:
secret.reloader.stakater.com/reload: hastebin
6 changes: 6 additions & 0 deletions cluster/apps/default/hastebin/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:
- secret.sops.yaml
- helm-release.yaml
28 changes: 28 additions & 0 deletions cluster/apps/default/hastebin/secret.sops.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# yamllint disable
apiVersion: v1
kind: Secret
metadata:
name: hastebin
namespace: default
stringData:
REDIS_PASSWORD: ENC[AES256_GCM,data:NkAPWF+kS+EHI8ksZ4EECsdo9uJohSIIYxx0URzlGCg=,iv:2iD9LziysxPURrYjjNwENsZaRzNqugOFNdOOHPovRXo=,tag:jWWh5JcH74WATDXfn4TOgQ==,type:str]
sops:
kms: []
gcp_kms: []
azure_kv: []
hc_vault: []
age:
- recipient: age148wprsnqjq8jughvywnzmvs8gffhrkendpr7g60q8u4rdsj4jvuqk7ltrs
enc: |
-----BEGIN AGE ENCRYPTED FILE-----
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBUU2FWN1lYS240SnpJQjlD
aDZLUDM3THNOUWdGMVJjeUJRMkNmazFwaWw0ClVObXpaR01xeTN2RkxSSS9Eb1BT
TzNJSXJLWmhONXkzeTQ2NGp6UXBqMGcKLS0tIFd4dnNEVW5WMk9IeEFrMElKa3dD
UEViT3RtdDVrcm9hd3lqWlQ0WmpLMHMKilG7ZUmC8J7PWSrCRYsIhRLN9E353HuF
fhUW0uXFvBica0eb7DNn+oaczXBhSllBIUisfb8sfuRn+8y/eH8IhA==
-----END AGE ENCRYPTED FILE-----
lastmodified: "2022-11-04T21:35:23Z"
mac: ENC[AES256_GCM,data:cLxUFcDIhLnHr2fVIiwoqt/jsaa8TEOYuKWPiDDItWQjJwuQN3Ab8RSs499Yqok45LgpU2i969pTVy5pi+EYJLp0rZYOfPOVPGxBzYKhgB0g+8g+vllLJFKxLOrSkcbjC7cUgX28hFABWRxcugnyPklxqm9iJGVJPBmhxhZKxxY=,iv:3bPnc68OFX9E8N6bS/ePefEJDSF8GhjZR3Uiohe5ca4=,tag:K+1B5Tz9la5ABJsuReGxfA==,type:str]
pgp: []
encrypted_regex: ^(data|stringData)$
version: 3.7.3
3 changes: 1 addition & 2 deletions cluster/apps/default/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ resources:
- frigate
- ghostfolio
- hajimari
- hastebin
- home-assistant
- kubernetes-dashboard
- linkding
Expand All @@ -30,8 +31,6 @@ resources:
- ntfy
- paperless-ngx
- pinry
- privatebin
- privatebin-public
- rallly
# - scrutiny
- unifi
Expand Down
20 changes: 15 additions & 5 deletions cluster/apps/default/rallly/helm-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,12 @@ spec:
hosts:
- host: &host "when.${PUBLIC_DOMAIN}"
paths:
- path: /admin/.*
pathType: Prefix
- path: /p/.*
pathType: Prefix
- path: /new
- path: /_next/.*
pathType: Prefix
- path: /site.webmanifest
pathType: Exact
tls:
- hosts:
- *host
Expand All @@ -81,12 +81,22 @@ spec:
- path: /
pathType: Exact
service:
name: http
name: rallly
port: 3000
- path: /new
pathType: Exact
service:
name: rallly
port: 3000
- path: /admin/.*
pathType: Prefix
service:
name: rallly
port: 3000
- path: /demo
pathType: Exact
service:
name: http
name: rallly
port: 3000
tls:
- hosts:
Expand Down
4 changes: 2 additions & 2 deletions cluster/apps/media/snapraid-runner/cron-job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ spec:
snapraid devices
- name: POST_COMMANDS_FAILURE
value: |-
curl \
curl -s \
-d "Sync failed" \
-H "Title: SnapRAID" \
-H "Tags: rotating_light" \
Expand All @@ -48,7 +48,7 @@ spec:
kubectl -n media scale --replicas=1 deployment/audiobookshelf
kubectl -n media scale --replicas=1 deployment/youtubedl
kubectl -n media scale --replicas=1 deployment/bazarr
curl \
curl -s \
-d "Sync succeeded" \
-H "Title: SnapRAID" \
-H "Tags: heavy_check_mark" \
Expand Down

0 comments on commit b997428

Please sign in to comment.