added cargo files

This commit is contained in:
2026-03-03 10:57:43 -05:00
parent 478a90e01b
commit 169df46bc2
813 changed files with 227273 additions and 9 deletions

View File

@@ -0,0 +1,149 @@
provider "aws" {
region = "us-east-1" # Choose your preferred region
}
variable "db_username" {
description = "Database administrator username"
type = string
sensitive = true
}
variable "db_password" {
description = "Database administrator password"
type = string
sensitive = true
}
resource "aws_vpc" "main" {
cidr_block = "10.0.0.0/16"
}
resource "aws_subnet" "subnet" {
vpc_id = aws_vpc.main.id
cidr_block = "10.15.0.0/24"
}
resource "aws_security_group" "allow_all" {
vpc_id = aws_vpc.main.id
ingress {
from_port = 0
to_port = 0
protocol = "-1"
cidr_blocks = ["0.0.0.0/0"]
}
egress {
from_port = 0
to_port = 0
protocol = "-1"
cidr_blocks = ["0.0.0.0/0"]
}
}
resource "aws_rds_instance" "default" {
allocated_storage = 20
engine = "postgres"
engine_version = "12.5"
instance_class = "db.t2.micro"
name = "pinepods-db"
username = var.db_username
password = var.db_password
parameter_group_name = "default.postgres12"
skip_final_snapshot = true
publicly_accessible = true
vpc_security_group_ids = [aws_security_group.allow_all.id]
db_subnet_group_name = aws_db_subnet_group.main.name
}
resource "aws_db_subnet_group" "main" {
name = "main"
subnet_ids = [aws_subnet.subnet.id]
tags = {
Name = "Main subnet group"
}
}
resource "aws_ecs_cluster" "main" {
name = "pinepods-cluster"
}
resource "aws_ecs_task_definition" "pinepods" {
family = "pinepods-task"
network_mode = "awsvpc"
requires_compatibilities = ["FARGATE"]
cpu = "1"
memory = "4"
execution_role_arn = aws_iam_role.ecs_task_execution_role.arn
container_definitions = <<DEFINITION
[
{
"name": "pinepods",
"image": "madeofpendletonwool/pinepods", # Change this to your Docker image
"essential": true,
"portMappings": [
{
"containerPort": 80,
"hostPort": 80
}
],
"environment": [
{
"name": "DB_HOST",
"value": "${aws_rds_instance.default.address}"
},
{
"name": "DB_USER",
"value": "admin"
},
{
"name": "DB_PASSWORD",
"value": "password" # Use the same password set for RDS
},
{
"name": "DB_NAME",
"value": "pinepods"
}
]
}
]
DEFINITION
}
resource "aws_ecs_service" "main" {
name = "pinepods-service"
cluster = aws_ecs_cluster.main.id
task_definition = aws_ecs_task_definition.pinepods.arn
desired_count = 1
launch_type = "FARGATE"
network_configuration {
subnets = [aws_subnet.subnet.id]
security_groups = [aws_security_group.allow_all.id]
assign_public_ip = true
}
}
resource "aws_iam_role" "ecs_task_execution_role" {
name = "ecs_task_execution_role"
assume_role_policy = <<POLICY
{
"Version": "2012-10-17",
"Statement": [
{
"Action": "sts:AssumeRole",
"Principal": {
"Service": "ecs-tasks.amazonaws.com"
},
"Effect": "Allow",
"Sid": ""
}
]
}
POLICY
managed_policy_arns = [
"arn:aws:iam::aws:policy/service-role/AmazonECSTaskExecutionRolePolicy"
]
}

View File

@@ -0,0 +1,55 @@
services:
db:
container_name: db
image: mariadb:12
command: --wait_timeout=1800
environment:
MYSQL_TCP_PORT: 3306
MYSQL_ROOT_PASSWORD: myS3curepass
MYSQL_DATABASE: pinepods_database
MYSQL_COLLATION_SERVER: utf8mb4_unicode_ci
MYSQL_CHARACTER_SET_SERVER: utf8mb4
MYSQL_INIT_CONNECT: "SET @@GLOBAL.max_allowed_packet=64*1024*1024;"
volumes:
- /home/user/pinepods/sql:/var/lib/mysql
restart: always
valkey:
image: valkey/valkey:8-alpine
pinepods:
image: madeofpendletonwool/pinepods:latest
ports:
- "8040:8040"
environment:
# Basic Server Info
SEARCH_API_URL: "https://search.pinepods.online/api/search"
PEOPLE_API_URL: "https://people.pinepods.online"
HOSTNAME: "http://localhost:8040"
# Database Vars
DB_TYPE: mariadb
DB_HOST: db
DB_PORT: 3306
DB_USER: root
DB_PASSWORD: myS3curepass
DB_NAME: pinepods_database
# Valkey Settings
VALKEY_HOST: valkey
VALKEY_PORT: 6379
# Enable or Disable Debug Mode for additional Printing
DEBUG_MODE: false
PUID: ${UID:-911}
PGID: ${GID:-911}
# Add timezone configuration
TZ: "America/New_York"
volumes:
# Mount the download and backup locations on the server
- /home/user/pinepods/downloads:/opt/pinepods/downloads
- /home/user/pinepods/backups:/opt/pinepods/backups
# Timezone volumes, HIGHLY optional. Read the timezone notes below
- /etc/localtime:/etc/localtime:ro
- /etc/timezone:/etc/timezone:ro
depends_on:
- db
- valkey

View File

@@ -0,0 +1,60 @@
services:
db:
container_name: db
image: mysql:9
command: --wait_timeout=1800
environment:
MYSQL_TCP_PORT: 3306
MYSQL_ROOT_PASSWORD: myS3curepass
MYSQL_DATABASE: pinepods_database
MYSQL_COLLATION_SERVER: utf8mb4_unicode_ci
MYSQL_CHARACTER_SET_SERVER: utf8mb4
MYSQL_INIT_CONNECT: "SET @@GLOBAL.max_allowed_packet=64*1024*1024;"
volumes:
- /home/user/pinepods/sql:/var/lib/mysql
restart: always
valkey:
image: valkey/valkey:8-alpine
pinepods:
image: madeofpendletonwool/pinepods:latest
ports:
- "8040:8040"
environment:
# Basic Server Info
SEARCH_API_URL: "https://search.pinepods.online/api/search"
PEOPLE_API_URL: "https://people.pinepods.online"
HOSTNAME: "http://localhost:8040"
# Database Vars
DB_TYPE: mariadb
DB_HOST: db
DB_PORT: 3306
DB_USER: root
DB_PASSWORD: myS3curepass
DB_NAME: pinepods_database
# Valkey Settings
VALKEY_HOST: valkey
VALKEY_PORT: 6379
# Enable or Disable Debug Mode for additional Printing
DEBUG_MODE: false
PUID: ${UID:-911}
PGID: ${GID:-911}
# Add timezone configuration
TZ: "America/New_York"
# Language Configuration
DEFAULT_LANGUAGE: "en"
volumes:
# Mount the download and the backup location on the server if you want to. You could mount a nas to the downloads folder or something like that.
# The backups directory is used if backups are made on the web version on pinepods. When taking backups on the client version it downloads them locally.
volumes:
# Mount the download and backup locations on the server
- /home/user/pinepods/downloads:/opt/pinepods/downloads
- /home/user/pinepods/backups:/opt/pinepods/backups
# Timezone volumes, HIGHLY optional. Read the timezone notes below
- /etc/localtime:/etc/localtime:ro
- /etc/timezone:/etc/timezone:ro
depends_on:
- db
- valkey

View File

@@ -0,0 +1,55 @@
services:
db:
container_name: db
image: postgres:17
environment:
POSTGRES_DB: pinepods_database
POSTGRES_USER: postgres
POSTGRES_PASSWORD: myS3curepass
PGDATA: /var/lib/postgresql/data/pgdata
volumes:
- /home/user/pinepods/pgdata:/var/lib/postgresql/data
restart: always
valkey:
image: valkey/valkey:8-alpine
restart: always
pinepods:
image: madeofpendletonwool/pinepods:latest
ports:
- "8040:8040"
environment:
# Basic Server Info
SEARCH_API_URL: "https://search.pinepods.online/api/search"
PEOPLE_API_URL: "https://people.pinepods.online"
HOSTNAME: "http://localhost:8040"
# Database Vars
DB_TYPE: postgresql
DB_HOST: db
DB_PORT: 5432
DB_USER: postgres
DB_PASSWORD: myS3curepass
DB_NAME: pinepods_database
# Valkey Settings
VALKEY_HOST: valkey
VALKEY_PORT: 6379
# Enable or Disable Debug Mode for additional Printing
DEBUG_MODE: false
PUID: ${UID:-911}
PGID: ${GID:-911}
# Add timezone configuration
TZ: "America/New_York"
# Language Configuration
DEFAULT_LANGUAGE: "en"
volumes:
# Mount the download and backup locations on the server
- /home/user/pinepods/downloads:/opt/pinepods/downloads
- /home/user/pinepods/backups:/opt/pinepods/backups
# Timezone volumes, HIGHLY optional. Read the timezone notes below
- /etc/localtime:/etc/localtime:ro
- /etc/timezone:/etc/timezone:ro
restart: always
depends_on:
- db
- valkey

View File

@@ -0,0 +1,9 @@
# db-secret.yaml
apiVersion: v1
kind: Secret
metadata:
name: db-secret
type: Opaque
data:
MYSQL_ROOT_PASSWORD: myS3curepass
DB_PASSWORD: myS3curepass

View File

@@ -0,0 +1,16 @@
# env-configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
name: pinepods-config
data:
SEARCH_API_URL: "https://search.pinepods.online/api/search"
USERNAME: "myadminuser01"
PASSWORD: "myS3curepass"
FULLNAME: "Pinepods Admin"
EMAIL: "user@pinepods.online"
DB_TYPE: "postgresql"
DB_HOST: "postgres"
DB_PORT: "5432"
DB_NAME: "pypods_database"
DEBUG_MODE: "False"

View File

@@ -0,0 +1,118 @@
# pinepods-deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
name: pinepods
spec:
replicas: 3
selector:
matchLabels:
app: pinepods
template:
metadata:
labels:
app: pinepods
spec:
containers:
- name: pinepods
image: madeofpendletonwool/pinepods:latest
ports:
- containerPort: 8040
env:
- name: SEARCH_API_URL
valueFrom:
configMapKeyRef:
name: pinepods-config
key: SEARCH_API_URL
- name: USERNAME
valueFrom:
configMapKeyRef:
name: pinepods-config
key: USERNAME
- name: PASSWORD
valueFrom:
configMapKeyRef:
name: pinepods-config
key: PASSWORD
- name: FULLNAME
valueFrom:
configMapKeyRef:
name: pinepods-config
key: FULLNAME
- name: EMAIL
valueFrom:
configMapKeyRef:
name: pinepods-config
key: EMAIL
- name: DB_TYPE
valueFrom:
configMapKeyRef:
name: pinepods-config
key: DB_TYPE
- name: DB_HOST
valueFrom:
configMapKeyRef:
name: pinepods-config
key: DB_HOST
- name: DB_PORT
valueFrom:
configMapKeyRef:
name: pinepods-config
key: DB_PORT
- name: DB_USER
value: postgres
- name: DB_PASSWORD
valueFrom:
secretKeyRef:
name: db-secret
key: DB_PASSWORD
- name: DB_NAME
valueFrom:
configMapKeyRef:
name: pinepods-config
key: DB_NAME
- name: DEBUG_MODE
valueFrom:
configMapKeyRef:
name: pinepods-config
key: DEBUG_MODE
volumeMounts:
- name: downloads
mountPath: /opt/pypods/downloads
- name: backups
mountPath: /opt/pinepods/backups
livenessProbe:
httpGet:
path: /api/pinepods_check
port: 8040
initialDelaySeconds: 60
periodSeconds: 30
readinessProbe:
httpGet:
path: /api/pinepods_check
port: 8040
initialDelaySeconds: 60
periodSeconds: 30
volumes:
- name: downloads
hostPath:
path: /home/collinp/wait/downloads
- name: backups
hostPath:
path: /home/user/pinepods/backups
---
apiVersion: v1
kind: Service
metadata:
name: pinepods-service
spec:
type: NodePort
selector:
app: pinepods
ports:
- protocol: TCP
port: 8040
targetPort: 8040
nodePort: 30007 # Adjust the NodePort range as needed

View File

@@ -0,0 +1,53 @@
# postgres-deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
name: postgres
spec:
selector:
matchLabels:
app: postgres
strategy:
type: Recreate
template:
metadata:
labels:
app: postgres
spec:
containers:
- image: postgres:latest
name: postgres
env:
- name: POSTGRES_DB
value: pypods_database
- name: POSTGRES_USER
value: postgres
- name: POSTGRES_PASSWORD
valueFrom:
secretKeyRef:
name: db-secret
key: DB_PASSWORD
- name: PGDATA
value: /var/lib/postgresql/data/pgdata
ports:
- containerPort: 5432
name: postgres
volumeMounts:
- name: postgres-persistent-storage
mountPath: /var/lib/postgresql/data
volumes:
- name: postgres-persistent-storage
persistentVolumeClaim:
claimName: postgres-pvc
---
apiVersion: v1
kind: Service
metadata:
name: postgres
spec:
ports:
- port: 5432
selector:
app: postgres

View File

@@ -0,0 +1,24 @@
# pv-pvc.yaml
apiVersion: v1
kind: PersistentVolume
metadata:
name: postgres-pv
spec:
capacity:
storage: 10Gi
accessModes:
- ReadWriteOnce
hostPath:
path: "/home/user/pgdata"
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: postgres-pvc
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 10Gi

View File

@@ -0,0 +1,9 @@
dependencies:
- name: postgresql
repository: https://charts.bitnami.com/bitnami
version: 15.5.14
- name: valkey
repository: https://charts.bitnami.com/bitnami
version: 2.0.1
digest: sha256:283ac4a37bcdaa28adb6114913b92dc5488e215e3f5646165e1304b16abbb746
generated: "2024-11-01T07:54:28.056935878-05:00"

View File

@@ -0,0 +1,13 @@
apiVersion: v2
name: pinepods
version: 0.1.0
description: A Helm chart for deploying Pinepods - A complete podcast management system and allows you to play, download, and keep track of podcasts you enjoy. All self hosted and enjoyed on your own server!
dependencies:
- name: postgresql
version: 15.5.14
repository: https://charts.bitnami.com/bitnami
condition: postgresql.enabled
- name: valkey
version: 2.0.1
repository: https://charts.bitnami.com/bitnami
condition: valkey.enabled

View File

@@ -0,0 +1,42 @@
{{- define "pinepods.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
{{- end }}
{{- define "pinepods.fullname" -}}
{{- if .Values.fullnameOverride }}
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
{{- else }}
{{- $name := default .Chart.Name .Values.nameOverride }}
{{- if contains $name .Release.Name }}
{{- .Release.Name | trunc 63 | trimSuffix "-" }}
{{- else }}
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }}
{{- end }}
{{- end }}
{{- end }}
{{- define "pinepods.postgresql.fullname" -}}
{{- printf "%s-postgresql" (include "pinepods.fullname" .) | trunc 63 | trimSuffix "-" }}
{{- end }}
{{- define "pinepods.valkey.fullname" -}}
{{- printf "%s-valkey-primary" (include "pinepods.fullname" .) | trunc 63 | trimSuffix "-" }}
{{- end }}
{{- define "pinepods.labels" -}}
helm.sh/chart: {{ include "pinepods.chart" . }}
{{ include "pinepods.selectorLabels" . }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- end }}
{{- define "pinepods.selectorLabels" -}}
app.kubernetes.io/name: {{ include "pinepods.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}
{{- define "pinepods.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
{{- end }}

View File

@@ -0,0 +1,32 @@
{{- if .Values.backend.enabled }}
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "pinepods.fullname" . }}-backend
labels:
{{- include "pinepods.labels" . | nindent 4 }}
app.kubernetes.io/component: backend
spec:
replicas: 1
selector:
matchLabels:
{{- include "pinepods.selectorLabels" . | nindent 6 }}
app.kubernetes.io/component: backend
template:
metadata:
labels:
{{- include "pinepods.selectorLabels" . | nindent 8 }}
app.kubernetes.io/component: backend
spec:
containers:
- name: backend
image: "{{ .Values.backend.image.repository }}:{{ .Values.backend.image.tag }}"
imagePullPolicy: {{ .Values.backend.image.pullPolicy }}
ports:
- name: http
containerPort: {{ .Values.backend.service.port }}
protocol: TCP
envFrom:
- secretRef:
name: {{ include "pinepods.fullname" . }}-backend
{{- end }}

View File

@@ -0,0 +1,42 @@
{{- if and .Values.backend.enabled .Values.backend.ingress.enabled }}
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: {{ include "pinepods.fullname" . }}-backend
labels:
{{- include "pinepods.labels" . | nindent 4 }}
app.kubernetes.io/component: backend
{{- with .Values.backend.ingress.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
{{- if .Values.backend.ingress.className }}
ingressClassName: {{ .Values.backend.ingress.className }}
{{- end }}
{{- if .Values.backend.ingress.tls }}
tls:
{{- range .Values.backend.ingress.tls }}
- hosts:
{{- range .hosts }}
- {{ . | quote }}
{{- end }}
secretName: {{ .secretName }}
{{- end }}
{{- end }}
rules:
{{- range .Values.backend.ingress.hosts }}
- host: {{ .host | quote }}
http:
paths:
{{- range .paths }}
- path: {{ .path }}
pathType: {{ .pathType }}
backend:
service:
name: {{ include "pinepods.fullname" $ }}-backend
port:
number: {{ $.Values.backend.service.port }}
{{- end }}
{{- end }}
{{- end }}

View File

@@ -0,0 +1,13 @@
{{- if .Values.backend.enabled }}
apiVersion: v1
kind: Secret
metadata:
name: {{ include "pinepods.fullname" . }}-backend
labels:
{{- include "pinepods.labels" . | nindent 4 }}
type: Opaque
stringData:
API_KEY: {{ .Values.backend.secrets.apiKey | quote }}
API_SECRET: {{ .Values.backend.secrets.apiSecret | quote }}
YOUTUBE_API_KEY: {{ .Values.backend.secrets.youtubeApiKey | quote }}
{{- end }}

View File

@@ -0,0 +1,19 @@
{{- if .Values.backend.enabled }}
apiVersion: v1
kind: Service
metadata:
name: {{ include "pinepods.fullname" . }}-backend
labels:
{{- include "pinepods.labels" . | nindent 4 }}
app.kubernetes.io/component: backend
spec:
type: {{ .Values.backend.service.type }}
ports:
- port: {{ .Values.backend.service.port }}
targetPort: http
protocol: TCP
name: http
selector:
{{- include "pinepods.selectorLabels" . | nindent 4 }}
app.kubernetes.io/component: backend
{{- end }}

View File

@@ -0,0 +1,74 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "pinepods.fullname" . }}
labels:
{{- include "pinepods.labels" . | nindent 4 }}
spec:
replicas: {{ .Values.replicaCount }}
strategy:
type: Recreate # Ensures clean volume handling
selector:
matchLabels:
{{- include "pinepods.selectorLabels" . | nindent 6 }}
template:
metadata:
labels:
{{- include "pinepods.selectorLabels" . | nindent 8 }}
app.kubernetes.io/component: main
spec:
containers:
- name: {{ .Chart.Name }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
ports:
- name: http
containerPort: {{ .Values.service.port }}
protocol: TCP
envFrom:
- secretRef:
name: {{ include "pinepods.fullname" $ }}-env
env:
{{ if (and (not .Values.postgresql.enabled) (.Values.externalDatabase.existingSecret.enabled)) -}}
- name: DB_PASSWORD
valueFrom:
secretKeyRef:
name: {{ .Values.externalDatabase.existingSecret.name }}
key: {{ .Values.externalDatabase.existingSecret.key }}
{{- end }}
volumeMounts:
{{- if .Values.persistence.enabled }}
- name: downloads
mountPath: /opt/pinepods/downloads
- name: backups
mountPath: /opt/pinepods/backups
{{- end }}
livenessProbe:
httpGet:
path: /api/pinepods_check
port: http
initialDelaySeconds: 120
periodSeconds: 30
timeoutSeconds: 5
successThreshold: 1
failureThreshold: 3
readinessProbe:
httpGet:
path: /api/pinepods_check
port: http
initialDelaySeconds: 120
periodSeconds: 10
timeoutSeconds: 5
successThreshold: 1
failureThreshold: 3
resources:
{{- toYaml .Values.resources | nindent 12 }}
volumes:
{{- if .Values.persistence.enabled }}
- name: downloads
persistentVolumeClaim:
claimName: {{ if .Values.persistence.downloads.existingClaim }}{{ .Values.persistence.downloads.existingClaim }}{{ else }}{{ include "pinepods.fullname" . }}-downloads{{ end }}
- name: backups
persistentVolumeClaim:
claimName: {{ if .Values.persistence.backups.existingClaim }}{{ .Values.persistence.backups.existingClaim }}{{ else }}{{ include "pinepods.fullname" . }}-backups{{ end }}
{{- end }}

View File

@@ -0,0 +1,41 @@
{{- if .Values.ingress.enabled -}}
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: {{ include "pinepods.fullname" . }}
labels:
{{- include "pinepods.labels" . | nindent 4 }}
{{- with .Values.ingress.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
{{- if .Values.ingress.className }}
ingressClassName: {{ .Values.ingress.className }}
{{- end }}
{{- if .Values.ingress.tls }}
tls:
{{- range .Values.ingress.tls }}
- hosts:
{{- range .hosts }}
- {{ . | quote }}
{{- end }}
secretName: {{ .secretName }}
{{- end }}
{{- end }}
rules:
{{- range .Values.ingress.hosts }}
- host: {{ .host | quote }}
http:
paths:
{{- range .paths }}
- path: {{ .path }}
pathType: {{ .pathType }}
backend:
service:
name: {{ include "pinepods.fullname" $ }}
port:
number: {{ $.Values.service.port }}
{{- end }}
{{- end }}
{{- end }}

View File

@@ -0,0 +1,53 @@
{{- if .Values.podpeople.enabled }}
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "pinepods.fullname" . }}-podpeople
labels:
{{- include "pinepods.labels" . | nindent 4 }}
app.kubernetes.io/component: podpeople
spec:
replicas: 1
selector:
matchLabels:
{{- include "pinepods.selectorLabels" . | nindent 6 }}
app.kubernetes.io/component: podpeople
template:
metadata:
labels:
{{- include "pinepods.selectorLabels" . | nindent 8 }}
app.kubernetes.io/component: podpeople
spec:
containers:
- name: podpeople
image: "{{ .Values.podpeople.image.repository }}:{{ .Values.podpeople.image.tag }}"
imagePullPolicy: {{ .Values.podpeople.image.pullPolicy }}
ports:
- name: http
containerPort: {{ .Values.podpeople.service.port }}
protocol: TCP
env:
- name: ADMIN_USERNAME
value: {{ .Values.podpeople.auth.adminUsername | quote }}
- name: ADMIN_PASSWORD
value: {{ .Values.podpeople.auth.adminPassword | quote }}
- name: NTFY_URL
value: {{ .Values.podpeople.environment.ntfyUrl | quote }}
- name: NTFY_TOPIC
value: {{ .Values.podpeople.environment.ntfyTopic | quote }}
- name: BASE_URL
value: {{ .Values.podpeople.environment.baseurl | quote }}
- name: SEARCH_API_URL
{{- if .Values.backend.enabled }}
value: "http://{{ include "pinepods.fullname" . }}-backend:{{ .Values.backend.service.port }}"
{{- else }}
value: {{ .Values.podpeople.environment.searchApiUrl | quote }}
{{- end }}
volumeMounts:
- name: data
mountPath: /app/podpeople-data
volumes:
- name: data
persistentVolumeClaim:
claimName: {{ if .Values.podpeople.persistence.existingClaim }}{{ .Values.podpeople.persistence.existingClaim }}{{ else }}{{ include "pinepods.fullname" . }}-podpeople{{ end }}
{{- end }}

View File

@@ -0,0 +1,42 @@
{{- if and .Values.podpeople.enabled .Values.podpeople.ingress.enabled }}
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: {{ include "pinepods.fullname" . }}-podpeople
labels:
{{- include "pinepods.labels" . | nindent 4 }}
app.kubernetes.io/component: podpeople
{{- with .Values.podpeople.ingress.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
{{- if .Values.podpeople.ingress.className }}
ingressClassName: {{ .Values.podpeople.ingress.className }}
{{- end }}
{{- if .Values.podpeople.ingress.tls }}
tls:
{{- range .Values.podpeople.ingress.tls }}
- hosts:
{{- range .hosts }}
- {{ . | quote }}
{{- end }}
secretName: {{ .secretName }}
{{- end }}
{{- end }}
rules:
{{- range .Values.podpeople.ingress.hosts }}
- host: {{ .host | quote }}
http:
paths:
{{- range .paths }}
- path: {{ .path }}
pathType: {{ .pathType }}
backend:
service:
name: {{ include "pinepods.fullname" $ }}-podpeople
port:
number: {{ $.Values.podpeople.service.port }}
{{- end }}
{{- end }}
{{- end }}

View File

@@ -0,0 +1,17 @@
{{- if and .Values.podpeople.enabled .Values.podpeople.persistence.enabled (not .Values.podpeople.persistence.existingClaim) }}
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: {{ include "pinepods.fullname" . }}-podpeople
labels:
{{- include "pinepods.labels" . | nindent 4 }}
spec:
accessModes:
- {{ .Values.podpeople.persistence.accessMode }}
resources:
requests:
storage: {{ .Values.podpeople.persistence.size }}
{{- if .Values.podpeople.persistence.storageClass }}
storageClassName: {{ .Values.podpeople.persistence.storageClass }}
{{- end }}
{{- end }}

View File

@@ -0,0 +1,19 @@
{{- if .Values.podpeople.enabled }}
apiVersion: v1
kind: Service
metadata:
name: {{ include "pinepods.fullname" . }}-podpeople
labels:
{{- include "pinepods.labels" . | nindent 4 }}
app.kubernetes.io/component: podpeople
spec:
type: {{ .Values.podpeople.service.type }}
ports:
- port: {{ .Values.podpeople.service.port }}
targetPort: http
protocol: TCP
name: http
selector:
{{- include "pinepods.selectorLabels" . | nindent 4 }}
app.kubernetes.io/component: podpeople
{{- end }}

View File

@@ -0,0 +1,36 @@
# templates/pvc.yaml
{{- if and .Values.persistence.enabled (not .Values.persistence.downloads.existingClaim) }}
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: {{ include "pinepods.fullname" . }}-downloads
labels:
{{- include "pinepods.labels" . | nindent 4 }}
spec:
accessModes:
- {{ .Values.persistence.downloads.accessMode }}
resources:
requests:
storage: {{ .Values.persistence.downloads.size }}
{{- if .Values.persistence.downloads.storageClass }}
storageClassName: {{ .Values.persistence.downloads.storageClass }}
{{- end }}
---
{{- end }}
{{- if and .Values.persistence.enabled (not .Values.persistence.backups.existingClaim) }}
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: {{ include "pinepods.fullname" . }}-backups
labels:
{{- include "pinepods.labels" . | nindent 4 }}
spec:
accessModes:
- {{ .Values.persistence.backups.accessMode }}
resources:
requests:
storage: {{ .Values.persistence.backups.size }}
{{- if .Values.persistence.backups.storageClass }}
storageClassName: {{ .Values.persistence.backups.storageClass }}
{{- end }}
{{- end }}

View File

@@ -0,0 +1,40 @@
{{- /* Set default environment variables. */ -}}
{{ $env := dict -}}
{{ if .Values.postgresql.enabled }}
{{ $_ := set $env "DB_TYPE" "postgresql" }}
{{ $_ := set $env "DB_HOST" (include "pinepods.postgresql.fullname" .) }}
{{ $_ := set $env "DB_PORT" "5432" }}
{{ $_ := set $env "DB_NAME" "pinepods_database" }}
{{ $_ := set $env "DB_USER" "postgres" }}
{{ $_ := set $env "DB_PASSWORD" .Values.postgresql.auth.password }}
{{ else }}
{{ $_ := set $env "DB_TYPE" .Values.externalDatabase.type }}
{{ $_ := set $env "DB_HOST" .Values.externalDatabase.host }}
{{ $_ := set $env "DB_PORT" .Values.externalDatabase.port }}
{{ $_ := set $env "DB_NAME" .Values.externalDatabase.database }}
{{ $_ := set $env "DB_USER" .Values.externalDatabase.user }}
{{ if not .Values.externalDatabase.existingSecret.enabled -}}
{{ $_ := set $env "DB_PASSWORD" .Values.externalDatabase.password }}
{{ end -}}
{{ end -}}
{{ if .Values.valkey.enabled }}
{{ $_ := set $env "VALKEY_HOST" (include "pinepods.valkey.fullname" .) }}
{{ $_ := set $env "VALKEY_PORT" (.Values.valkey.service.port) }}
{{ end -}}
{{- /* Merge in user-specified environment variables, overriding the above. */ -}}
{{ $env := mergeOverwrite $env .Values.env -}}
apiVersion: v1
kind: Secret
metadata:
name: {{ include "pinepods.fullname" . }}-env
labels:
{{- include "pinepods.labels" . | nindent 4 }}
type: Opaque
stringData:
{{- range $key, $value := $env }}
{{ $key }}: {{ $value | quote }}
{{- end }}

View File

@@ -0,0 +1,17 @@
apiVersion: v1
kind: Service
metadata:
name: {{ include "pinepods.fullname" . }}
labels:
{{- include "pinepods.labels" . | nindent 4 }}
spec:
type: {{ .Values.service.type }}
ports:
- port: {{ .Values.service.port }}
targetPort: {{ .Values.service.port }}
{{- if and (eq .Values.service.type "NodePort") .Values.service.nodePort }}
nodePort: {{ .Values.service.nodePort }}
{{- end }}
selector:
{{- include "pinepods.selectorLabels" . | nindent 4 }}
app.kubernetes.io/component: main

View File

@@ -0,0 +1,267 @@
# Default values for pinepods.
# This is a YAML-formatted file.
## Number of pinepods pods to run
replicaCount: 1
## Container image configuration
image:
# -- Repository to pull the container image from
repository: madeofpendletonwool/pinepods
# -- Tag of the image to pull
# Default uses 'latest' but it's recommended to use a specific version
tag: latest
# -- Image pull policy
# Defaults to IfNotPresent but consider using Always if using latest tag - You know, if you like living on the edge. You could even use nightly.
pullPolicy: IfNotPresent
## Service configuration for exposing the pinepods application
service:
# -- Kubernetes service type
# Valid values are ClusterIP, NodePort, LoadBalancer
type: ClusterIP
# -- Port the service will listen on
port: 8040
# -- Optional nodePort to use when service type is NodePort
# If not set, Kubernetes will automatically allocate one
# nodePort: 30007
## Ingress configuration for exposing the application to external traffic
ingress:
# -- Enable ingress resource
enabled: true
# -- Ingress class name
className: ""
# -- Additional ingress annotations
annotations: {
traefik.ingress.kubernetes.io/router.entrypoints: web
}
# kubernetes.io/ingress.class: nginx
# kubernetes.io/tls-acme: "true"
# -- Ingress hosts configuration
hosts:
- host: pinepods.mydomain.com
paths:
- path: /
pathType: Prefix
# -- TLS configuration for ingress
tls: []
# - secretName: chart-example-tls
# hosts:
# - chart-example.local
## Persistence configuration
persistence:
# -- Enable persistent storage
enabled: true
downloads:
# -- Storage class for downloads PVC
# If empty, default StorageClass will be used
storageClass: ""
# -- Access mode for downloads PVC
accessMode: ReadWriteOnce
# -- Size of downloads PVC
size: 5Gi
# -- Use existing PVC for downloads
# If set, a new PVC will not be created
existingClaim: ""
backups:
# -- Storage class for backups PVC
storageClass: ""
# -- Access mode for backups PVC
accessMode: ReadWriteOnce
# -- Size of backups PVC
size: 2Gi
# -- Use existing PVC for backups
existingClaim: ""
## PostgreSQL configuration
postgresql:
# -- Enable PostgreSQL deployment
# Set to false if using external database
enabled: true
auth:
# -- PostgreSQL username
username: postgres
# -- PostgreSQL password
# Consider using a secret for production environments
password: "supersecretpassword"
# -- PostgreSQL database name
database: pinepods_database
# -- PostgreSQL resource configuration
# Default values provide good performance for most deployments
# Increase for larger deployments or high concurrent usage
resources:
requests:
# -- Memory request for PostgreSQL container
memory: 512Mi
# -- CPU request for PostgreSQL container
cpu: 250m
limits:
# -- Memory limit for PostgreSQL container
memory: 2Gi
# -- CPU limit for PostgreSQL container
cpu: 1000m
# Run on control planes if needed
# tolerations:
# - key: "node-role.kubernetes.io/control-plane"
# operator: "Exists"
# effect: "NoSchedule"
persistence:
# -- Enable PostgreSQL persistence
enabled: true
# -- Storage class for PostgreSQL PVC
storageClass: ""
# -- Size of PostgreSQL PVC
size: 3Gi
# -- Use existing PVC for PostgreSQL
existingClaim: ""
# External database configuration
# Only used when postgresql.enabled is false
externalDatabase:
type: postgresql
host: ""
port: 5432
user: postgres
password: ""
database: pinepods_database
existingSecret:
enabled: false
name: existing-secret
key: password
resources: {}
## Valkey configuration
valkey:
# -- Enable Valkey deployment
enabled: true
architecture: standalone # This prevents replica creation
auth:
enabled: false
replica:
replicaCount: 0 # Ensure no replicas are created
primary:
persistence:
enabled: false
# Service configuration
service:
# -- Valkey port
port: 6379
## Application environment variables
env:
# -- Search API URL for podcast search functionality - Change these only if you're hosting the backend and the podcast people database yourself
SEARCH_API_URL: "https://search.pinepods.online/api/search"
PEOPLE_API_URL: "https://people.pinepods.online/api/hosts"
# User Configuration
# -- Default admin username
USERNAME: "admin"
# -- Default admin password
PASSWORD: "password"
# -- Admin full name
FULLNAME: "Admin User"
# -- Admin email address
EMAIL: "admin@example.com"
# Valkey Configuration
# -- Valkey host
# This is automatically set in deployment template - do not change
# VALKEY_HOST: "post-valkey"
# -- Valkey port
# This is automatically set in deployment template - do not change
# VALKEY_PORT: "6379"
# Application Configuration
# -- Debug mode
# Set to true for additional logging
DEBUG_MODE: "false"
## Pod Security Context
securityContext: {}
# fsGroup: 2000
# runAsUser: 1000
# runAsNonRoot: true
## Container Security Context
containerSecurityContext: {}
# capabilities:
# drop:
# - ALL
# readOnlyRootFilesystem: true
# runAsNonRoot: true
# runAsUser: 1000
## Node selector for pod assignment
nodeSelector: {}
## Pod tolerations
tolerations: []
## Pod affinity
affinity: {}
## Optional Backend configuration
## backend is the itunes and podcast index search API. This is publically maintained at https://search.pinepods.online. If you want to maintain it yourself you can though
backend:
# -- Enable backend deployment
enabled: true
image:
repository: madeofpendletonwool/pinepods_backend
tag: latest
pullPolicy: IfNotPresent
service:
type: ClusterIP
port: 5000
# -- Backend secrets
secrets:
apiKey: "MYPODCASTINDEXKEY"
apiSecret: "MYPODCASTINDEXSECRET"
youtubeApiKey: "YOUR_YOUTUBE_API_KEY_HERE"
ingress:
enabled: true
className: ""
annotations: {}
hosts:
- host: backend.mydomain.com
paths:
- path: /
pathType: Prefix
tls: []
## PodPeople DB configuration
## Podpeople is a publically available website in which you can get details on guests and hosts for podcasts that don't maintain podcast 2.0 in their feeds.
## If you do want to maintain it yourself you'll probably want to download a copy of the database here: https://podpeople.pinepods.online
podpeople:
# -- Enable PodPeople DB deployment
enabled: true
image:
repository: madeofpendletonwool/podpeople_db
tag: latest
pullPolicy: IfNotPresent
service:
type: ClusterIP
port: 8085
persistence:
enabled: true
storageClass: ""
size: 1Gi
accessMode: ReadWriteOnce
existingClaim: ""
auth:
adminUsername: "admin"
adminPassword: "password"
# Change this only if you aren't hosting the backend. If you aren't you probably want it to be https://search.pinepods.online
searchApiUrl: "http://pinepods-backend:{{ .Values.backend.service.port }}" # Only used if backend.enabled is false
ingress:
enabled: true
className: ""
annotations: {}
hosts:
- host: podpeople.mydomain.com
paths:
- path: /
pathType: Prefix
tls: []