diff --git a/freshrss/resources.yaml b/freshrss/resources.yaml new file mode 100644 index 0000000..09aec95 --- /dev/null +++ b/freshrss/resources.yaml @@ -0,0 +1,131 @@ +apiVersion: v1 +kind: Namespace +metadata: + name: freshrss +--- +apiVersion: postgresql.cnpg.io/v1 +kind: Cluster +metadata: + name: freshrss-db + namespace: freshrss +spec: + instances: 1 + imageName: ghcr.io/cloudnative-pg/postgresql:16 + bootstrap: + initdb: + database: freshrss + owner: freshrss_admin + storage: + size: 5Gi + storageClass: longhorn +--- +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: freshrss-config-pvc + namespace: freshrss +spec: + accessModes: + - ReadWriteOnce + storageClassName: longhorn + resources: + requests: + storage: 2Gi +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: freshrss + namespace: freshrss +spec: + replicas: 1 + revisionHistoryLimit: 5 + selector: + matchLabels: + app: freshrss + strategy: + type: Recreate + template: + metadata: + labels: + app: freshrss + spec: + containers: + - name: freshrss + image: lscr.io/linuxserver/freshrss:latest + imagePullPolicy: IfNotPresent + ports: + - containerPort: 80 + name: http + protocol: TCP + env: + - name: PUID + value: "1000" + - name: PGID + value: "1000" + - name: TZ + value: "Europe/London" + - name: CRON_MIN + value: "*/20" + - name: DB_TYPE + value: "pgsql" + - name: DB_HOST + value: "freshrss-db-rw:5432" + - name: DB_BASE + value: "freshrss" + - name: DB_USER + value: "freshrss_admin" + - name: DB_PASSWORD + valueFrom: + secretKeyRef: + name: freshrss-db-app + key: password + volumeMounts: + - mountPath: /config + name: freshrss-config-data + dnsPolicy: ClusterFirst + restartPolicy: Always + volumes: + - name: freshrss-config-data + persistentVolumeClaim: + claimName: freshrss-config-pvc +--- +apiVersion: v1 +kind: Service +metadata: + name: freshrss-service + namespace: freshrss +spec: + ports: + - port: 80 + protocol: TCP + targetPort: 80 + selector: + app: freshrss + type: ClusterIP +--- +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: freshrss-ingress + namespace: freshrss + annotations: + cert-manager.io/cluster-issuer: "letsencrypt-production" + nginx.ingress.kubernetes.io/backend-protocol: "HTTP" +spec: + ingressClassName: nginx + tls: + - secretName: freshrss-tls-secret + hosts: + - rss.needlestack.boo + rules: + - host: rss.needlestack.boo + http: + paths: + - path: / + pathType: Prefix + backend: + service: + name: freshrss-service + port: + number: 80 diff --git a/gitea/test.yaml b/gitea/test.yaml deleted file mode 100644 index 4968768..0000000 --- a/gitea/test.yaml +++ /dev/null @@ -1 +0,0 @@ -test test test \ No newline at end of file diff --git a/longhorn/longhorn-ingress.yaml b/longhorn/longhorn-ingress.yaml new file mode 100644 index 0000000..ee83218 --- /dev/null +++ b/longhorn/longhorn-ingress.yaml @@ -0,0 +1,25 @@ +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: longhorn-ui-ingress + namespace: longhorn-system # Deployed straight into the native longhorn space + annotations: + cert-manager.io/cluster-issuer: "letsencrypt-production" + nginx.ingress.kubernetes.io/backend-protocol: "HTTP" +spec: + ingressClassName: nginx + tls: + - secretName: longhorn-tls-secret + hosts: + - storage.needlestack.boo + rules: + - host: storage.needlestack.boo + http: + paths: + - path: / + pathType: Prefix + backend: + service: + name: longhorn-frontend # Routes traffic to the dashboard portal + port: + number: 80