diff --git a/charts/freshrss/Chart.yaml b/charts/freshrss/Chart.yaml new file mode 100644 index 0000000..56e83f3 --- /dev/null +++ b/charts/freshrss/Chart.yaml @@ -0,0 +1,12 @@ +apiVersion: v2 +name: freshrss +version: 0.0.1 +description: Chart for Freshrss +keywords: + - rss +sources: + - https://github.com/FreshRSS/FreshRSS +maintainers: + - name: alexlebens +icon: https://avatars.githubusercontent.com/u/9414285?s=48&v=4 +appVersion: "1.23.1" diff --git a/charts/freshrss/README.md b/charts/freshrss/README.md new file mode 100644 index 0000000..3ab7649 --- /dev/null +++ b/charts/freshrss/README.md @@ -0,0 +1,18 @@ +## Introduction + +[FreshRSS](https://github.com/FreshRSS/FreshRSS) + +FreshRSS is a self-hosted RSS feed aggregator. + +It is lightweight, easy to work with, powerful, and customizable. + +This chart bootstraps a [FreshRSS](https://github.com/FreshRSS/FreshRSS) deployment on a [Kubernetes](https://kubernetes.io) cluster using the [Helm](https://helm.sh) package manager. + +## Prerequisites + +- Kubernetes +- Helm + +## Parameters + +See the [values files](values.yaml). diff --git a/charts/freshrss/templates/deployment.yaml b/charts/freshrss/templates/deployment.yaml new file mode 100644 index 0000000..5c07483 --- /dev/null +++ b/charts/freshrss/templates/deployment.yaml @@ -0,0 +1,76 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ .Release.Name }} + namespace: {{ .Release.Namespace | quote }} + labels: + app.kubernetes.io/name: {{ .Release.Name }} + app.kubernetes.io/instance: {{ .Release.Name }} + app.kubernetes.io/version: {{ .Chart.AppVersion }} + app.kubernetes.io/component: web + app.kubernetes.io/part-of: {{ .Release.Name }} +spec: + revisionHistoryLimit: 3 + replicas: {{ .Values.deployment.replicas }} + strategy: + type: {{ .Values.deployment.strategy }} + selector: + matchLabels: + app.kubernetes.io/name: {{ .Release.Name }} + app.kubernetes.io/instance: {{ .Release.Name }} + template: + metadata: + labels: + app.kubernetes.io/name: {{ .Release.Name }} + app.kubernetes.io/instance: {{ .Release.Name }} + spec: + serviceAccountName: {{ .Release.Name }} + containers: + - name: {{ .Release.Name }} + image: "{{ .Values.deployment.image.repository }}:{{ .Values.deployment.image.tag }}" + imagePullPolicy: {{ .Values.deployment.image.imagePullPolicy }} + ports: + - name: http + containerPort: {{ .Values.service.http.port }} + protocol: TCP + volumeMounts: + - name: {{ .Release.Name }}-config + mountPath: /config + resources: + {{- toYaml .Values.deployment.resources | nindent 12 }} + env: + - name: LISTEN + value: "0.0.0.0:{{ .Values.service.http.port }}" + {{- range $k,$v := .Values.deployment.env }} + - name: {{ $k }} + value: {{ $v | quote }} + {{- end }} + {{- with .Values.deployment.envFrom }} + envFrom: + {{- toYaml . | nindent 12 }} + {{- end }} + livenessProbe: + tcpSocket: + port: {{ .Values.service.http.port }} + initialDelaySeconds: 0 + failureThreshold: 3 + timeoutSeconds: 1 + periodSeconds: 10 + readinessProbe: + tcpSocket: + port: {{ .Values.service.http.port }} + initialDelaySeconds: 0 + failureThreshold: 3 + timeoutSeconds: 1 + periodSeconds: 10 + startupProbe: + tcpSocket: + port: {{ .Values.service.http.port }} + initialDelaySeconds: 0 + failureThreshold: 30 + timeoutSeconds: 1 + periodSeconds: 5 + volumes: + - name: {{ .Release.Name }}-config + persistentVolumeClaim: + claimName: {{ .Release.Name }}-config diff --git a/charts/freshrss/templates/ingress.yaml b/charts/freshrss/templates/ingress.yaml new file mode 100644 index 0000000..8395226 --- /dev/null +++ b/charts/freshrss/templates/ingress.yaml @@ -0,0 +1,32 @@ +{{- if .Values.ingress.enabled }} +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: {{ .Release.Name }} + namespace: {{ .Release.Namespace }} + labels: + app.kubernetes.io/name: {{ .Release.Name }} + app.kubernetes.io/instance: {{ .Release.Name }} + app.kubernetes.io/version: {{ .Chart.AppVersion }} + app.kubernetes.io/component: web + app.kubernetes.io/part-of: {{ .Release.Name }} + annotations: + {{- toYaml .Values.ingress.annotations | nindent 4 }} +spec: + ingressClassName: {{ .Values.ingress.className }} + tls: + - hosts: + - {{ .Values.ingress.host }} + secretName: {{ .Release.Name }}-secret-tls + rules: + - host: {{ .Values.ingress.host }} + http: + paths: + - path: / + pathType: Prefix + backend: + service: + name: {{ .Release.Name }} + port: + name: http +{{- end }} diff --git a/charts/freshrss/templates/persistant-volume-claim.yaml b/charts/freshrss/templates/persistant-volume-claim.yaml new file mode 100644 index 0000000..c06df0c --- /dev/null +++ b/charts/freshrss/templates/persistant-volume-claim.yaml @@ -0,0 +1,19 @@ +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: {{ .Release.Name }}-config + namespace: {{ .Release.Namespace }} + labels: + app.kubernetes.io/name: {{ .Release.Name }} + app.kubernetes.io/instance: {{ .Release.Name }} + app.kubernetes.io/version: {{ .Chart.AppVersion }} + app.kubernetes.io/component: storage + app.kubernetes.io/part-of: {{ .Release.Name }} +spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: {{ .Values.persistence.config.storageSize }} + storageClassName: {{ .Values.persistence.config.storageClassName }} + volumeMode: {{ .Values.persistence.config.volumeMode }} diff --git a/charts/freshrss/templates/pod.yaml b/charts/freshrss/templates/pod.yaml new file mode 100644 index 0000000..b9f52eb --- /dev/null +++ b/charts/freshrss/templates/pod.yaml @@ -0,0 +1,26 @@ +apiVersion: v1 +kind: Pod +metadata: + name: "{{ .Release.Name }}-test-connection" + labels: + app.kubernetes.io/name: {{ .Release.Name }} + app.kubernetes.io/instance: {{ .Release.Name }} + app.kubernetes.io/version: {{ .Chart.AppVersion }} + app.kubernetes.io/component: web + app.kubernetes.io/part-of: {{ .Release.Name }} + annotations: + "helm.sh/hook": test-success +spec: + restartPolicy: Never + containers: + - name: wget + image: busybox + command: ['wget'] + args: ['{{ .Release.Name }}:{{ .Values.service.http.port }}'] + resources: + limits: + cpu: 500m + memory: 1Gi + requests: + cpu: 50m + memory: 256Mi diff --git a/charts/freshrss/templates/service-account.yaml b/charts/freshrss/templates/service-account.yaml new file mode 100644 index 0000000..a437092 --- /dev/null +++ b/charts/freshrss/templates/service-account.yaml @@ -0,0 +1,11 @@ +apiVersion: v1 +kind: ServiceAccount +metadata: + name: {{ .Release.Name }} + namespace: {{ .Release.Namespace }} + labels: + app.kubernetes.io/name: {{ .Release.Name }} + app.kubernetes.io/instance: {{ .Release.Name }} + app.kubernetes.io/version: {{ .Chart.AppVersion }} + app.kubernetes.io/component: web + app.kubernetes.io/part-of: {{ .Release.Name }} diff --git a/charts/freshrss/templates/service.yaml b/charts/freshrss/templates/service.yaml new file mode 100644 index 0000000..bbeeb51 --- /dev/null +++ b/charts/freshrss/templates/service.yaml @@ -0,0 +1,21 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{ .Release.Name }} + namespace: {{ .Release.Namespace }} + labels: + app.kubernetes.io/name: {{ .Release.Name }} + app.kubernetes.io/instance: {{ .Release.Name }} + app.kubernetes.io/version: {{ .Chart.AppVersion }} + app.kubernetes.io/component: web + app.kubernetes.io/part-of: {{ .Release.Name }} +spec: + type: ClusterIP + ports: + - port: {{ .Values.service.http.port }} + targetPort: http + protocol: TCP + name: http + selector: + app.kubernetes.io/name: {{ .Release.Name }} + app.kubernetes.io/instance: {{ .Release.Name }} diff --git a/charts/freshrss/values.yaml b/charts/freshrss/values.yaml new file mode 100644 index 0000000..e84d862 --- /dev/null +++ b/charts/freshrss/values.yaml @@ -0,0 +1,33 @@ +deployment: + replicas: 1 + strategy: Recreate + image: + repository: ghcr.io/linuxserver/freshrss + tag: 1.23.1 + imagePullPolicy: IfNotPresent + env: + PGID: "568" + PUID: "568" + TZ: UTC + FRESHRSS_ENV: production + envFrom: + resources: + limits: + cpu: 500m + memory: 1Gi + requests: + cpu: 50m + memory: 256Mi +service: + http: + port: 80 +ingress: + enabled: true + className: traefik + annotations: + host: +persistence: + config: + storageClassName: default + storageSize: 5Gi + volumeMode: Filesystem