cluster

Infrastructure files for Nordgedanken and Midnightthoughts.
git clone git://archive.git.mtrnord.blog/MTRNord/cluster.git
Log | Files | Refs | README

release.yaml (4026B)


      1 apiVersion: apps/v1
      2 kind: Deployment
      3 metadata:
      4   name: gotosocial
      5   namespace: gotosocial
      6 spec:
      7   replicas: 1
      8   selector:
      9     matchLabels:
     10       app: gotosocial
     11   template:
     12     metadata:
     13       labels:
     14         app: gotosocial
     15     spec:
     16       containers:
     17         - name: gotosocial
     18           image: docker.io/superseriousbusiness/gotosocial:latest
     19           imagePullPolicy: Always
     20           resources:
     21             limits:
     22               cpu: 1000m
     23               memory: 1Gi
     24             requests:
     25               cpu: 100m
     26               memory: 128Mi
     27           env:
     28             - name: GTS_HOST
     29               value: gts.mtrnord.blog
     30             - name: GTS_DB_TYPE
     31               value: postgres
     32             - name: GTS_DB_ADDRESS
     33               value: pg-cluster-v2-rw.postgres-cluster.svc.cluster.local
     34             - name: GTS_DB_USER
     35               value: gotosocial
     36             - name: GTS_DB_PASSWORD
     37               valueFrom:
     38                 secretKeyRef:
     39                   name: gotosocial-secret
     40                   key: db_password
     41             - name: GTS_DB_TLS_MODE
     42               value: enable
     43             - name: GTS_LETSENCRYPT_ENABLED
     44               value: "false"
     45             - name: GTS_WAZERO_COMPILATION_CACHE
     46               value: /gotosocial/.cache
     47             - name: GTS_TRUSTED_PROXIES
     48               value: 10.0.0.0/8
     49             - name: TZ
     50               value: Europe/Berlin
     51             - name: GTS_SMTP_HOST
     52               value: mail.midnightthoughts.space
     53             - name: GTS_SMTP_PORT
     54               value: "587"
     55             - name: GTS_SMTP_USERNAME
     56               value: "ops@midnightthoughts.space"
     57             - name: GTS_SMTP_PASSWORD
     58               valueFrom:
     59                 secretKeyRef:
     60                   name: gotosocial-secret
     61                   key: smtp_password
     62             - name: GTS_SMTP_FROM
     63               value: "noreply@midnightthoughts.space"
     64             - name: GTS_STORAGE_BACKEND
     65               value: s3
     66             - name: GTS_STORAGE_S3_ENDPOINT
     67               value: hel1.your-objectstorage.com
     68             - name: GTS_STORAGE_S3_BUCKET
     69               value: midnightthoughts-gotosocial
     70             - name: GTS_STORAGE_S3_ACCESS_KEY
     71               valueFrom:
     72                 secretKeyRef:
     73                   name: gotosocial-s3-secret
     74                   key: s3_access_key
     75             - name: GTS_STORAGE_S3_SECRET_KEY
     76               valueFrom:
     77                 secretKeyRef:
     78                   name: gotosocial-s3-secret
     79                   key: s3_secret_key
     80             - name: GTS_STORAGE_S3_USE_SSL
     81               value: "true"
     82             - name: GTS_STORAGE_S3_PROXY
     83               value: "true"
     84             - name: GTS_STORAGE_S3_BUCKET_LOOKUP
     85               value: path
     86           ports:
     87             - containerPort: 8080
     88           livenessProbe:
     89             httpGet:
     90               path: /livez
     91               port: 8080
     92             initialDelaySeconds: 30
     93             periodSeconds: 10
     94             timeoutSeconds: 5
     95             successThreshold: 1
     96             failureThreshold: 3
     97           readinessProbe:
     98             httpGet:
     99               path: /readyz
    100               port: 8080
    101             initialDelaySeconds: 30
    102             periodSeconds: 10
    103             timeoutSeconds: 5
    104             successThreshold: 1
    105             failureThreshold: 3
    106           volumeMounts:
    107             - name: gotosocial
    108               mountPath: /gotosocial/.cache
    109               subPath: .cache
    110       volumes:
    111         - name: gotosocial
    112           persistentVolumeClaim:
    113             claimName: gotosocial
    114 ---
    115 apiVersion: v1
    116 kind: Service
    117 metadata:
    118   name: gotosocial-service
    119   namespace: gotosocial
    120 spec:
    121   selector:
    122     app: gotosocial
    123   ports:
    124     - protocol: TCP
    125       port: 8080
    126       targetPort: 8080
    127 ---
    128 apiVersion: gateway.networking.k8s.io/v1
    129 kind: HTTPRoute
    130 metadata:
    131   name: gotosocial
    132   namespace: gotosocial
    133 spec:
    134   parentRefs:
    135     - name: envoy-gateway
    136       namespace: envoy-gateway
    137   hostnames:
    138     - gts.mtrnord.blog
    139   rules:
    140     - backendRefs:
    141         - name: gotosocial-service
    142           port: 8080