Skip to content

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
SethPyle376 committed Nov 4, 2021
0 parents commit 8218790
Show file tree
Hide file tree
Showing 20 changed files with 395 additions and 0 deletions.
Empty file added .gitignore
Empty file.
4 changes: 4 additions & 0 deletions deploy.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
helm upgrade --install homelab homelab/ \
--set postgres.user=$PG_USER \
--set postgres.pass=$PG_PASS \
--set postgres.db=homelab
23 changes: 23 additions & 0 deletions homelab/.helmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Patterns to ignore when building packages.
# This supports shell glob matching, relative path matching, and
# negation (prefixed with !). Only one pattern per line.
.DS_Store
# Common VCS dirs
.git/
.gitignore
.bzr/
.bzrignore
.hg/
.hgignore
.svn/
# Common backup files
*.swp
*.bak
*.tmp
*.orig
*~
# Various IDEs
.project
.idea/
*.tmproj
.vscode/
24 changes: 24 additions & 0 deletions homelab/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
apiVersion: v2
name: homelab
description: A Helm chart for Kubernetes

# A chart can be either an 'application' or a 'library' chart.
#
# Application charts are a collection of templates that can be packaged into versioned archives
# to be deployed.
#
# Library charts provide useful utilities or functions for the chart developer. They're included as
# a dependency of application charts to inject those utilities and functions into the rendering
# pipeline. Library charts do not define any templates and therefore cannot be deployed.
type: application

# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.1.0

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes.
appVersion: "1.16.0"
41 changes: 41 additions & 0 deletions homelab/templates/ghost-deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: ghost
labels:
app: ghost
spec:
replicas: 1
selector:
matchLabels:
app: ghost
template:
metadata:
labels:
app: ghost
spec:
volumes:
- name: ghost
persistentVolumeClaim:
claimName: ghost-pvc
containers:
- name: ghost
image: {{ .Values.images.ghost.image }}:{{ .Values.images.ghost.tag }}
ports:
- containerPort: 2368
protocol: TCP
env:
- name: database__client
value: sqlite3
- name: database__connection__filename
value: /ghost/ghost.db
- name: database__debug
value: 'false'
- name: url
value: 'https://blog.sethpyle.com'
resources: {}
volumeMounts:
- name: ghost
mountPath: /ghost
imagePullPolicy: {{ .Values.images.ghost.imagePullPolicy }}

18 changes: 18 additions & 0 deletions homelab/templates/ghost-ingress.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: ghost-ingress
spec:
tls:
- hosts:
- blog.sethpyle.com
rules:
- host: blog.sethpyle.com
http:
paths:
- pathType: ImplementationSpecific
backend:
service:
name: ghost
port:
number: 2368
14 changes: 14 additions & 0 deletions homelab/templates/ghost-service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
apiVersion: v1
kind: Service
metadata:
name: ghost
labels:
app: ghost
spec:
ports:
- protocol: TCP
port: 2368
targetPort: 2368
selector:
app: ghost
type: ClusterIP
11 changes: 11 additions & 0 deletions homelab/templates/ghost-volume.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: ghost-pvc
spec:
accessModes:
- ReadWriteOnce
storageClassName: local-path
resources:
requests:
storage: 5Gi
31 changes: 31 additions & 0 deletions homelab/templates/irc-deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: irc
labels:
app: irc
spec:
replicas: 1
selector:
matchLabels:
app: irc
template:
metadata:
labels:
app: irc
spec:
volumes:
- name: irc-data
persistentVolumeClaim:
claimName: irc-pvc
containers:
- name: irc
image: {{ .Values.images.irc.image }}:{{ .Values.images.irc.tag }}
ports:
- containerPort: {{ .Values.irc.port }}
protocol: TCP
volumeMounts:
- name: irc-data
mountPath: /var/opt/thelounge
imagePullPolicy: {{ .Values.images.irc.imagePullPolicy }}

18 changes: 18 additions & 0 deletions homelab/templates/irc-ingress.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: irc-ingress
spec:
tls:
- hosts:
- irc.sethpyle.com
rules:
- host: irc.sethpyle.com
http:
paths:
- pathType: ImplementationSpecific
backend:
service:
name: irc
port:
number: {{ .Values.irc.port }}
14 changes: 14 additions & 0 deletions homelab/templates/irc-service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
apiVersion: v1
kind: Service
metadata:
name: irc
labels:
app: irc
spec:
ports:
- protocol: TCP
port: {{ .Values.irc.port }}
targetPort: {{ .Values.irc.port }}
selector:
app: irc
type: ClusterIP
11 changes: 11 additions & 0 deletions homelab/templates/irc-volume.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: irc-pvc
spec:
accessModes:
- ReadWriteOnce
storageClassName: local-path
resources:
requests:
storage: 5Gi
38 changes: 38 additions & 0 deletions homelab/templates/postgres-deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: postgres
labels:
app: postgres
spec:
replicas: 1
selector:
matchLabels:
app: postgres
template:
metadata:
labels:
app: postgres
spec:
volumes:
- name: postgresdb
persistentVolumeClaim:
claimName: postgres-pvc
containers:
- name: postgres
image: {{ .Values.images.postgres.image}}:{{ .Values.images.postgres.tag }}
ports:
- containerPort: {{ .Values.postgres.port }}
protocol: TCP
env:
- name: POSTGRES_PASSWORD
value: {{ .Values.postgres.pass }}
- name: POSTGRES_USER
value: {{ .Values.postgres.user }}
- name: POSTGRES_DB
value: {{ .Values.postgres.db }}
volumeMounts:
- name: postgresdb
mountPath: /var/lib/postgresql/data
imagePullPolicy: {{ .Values.images.postgres.imagePullPolicy }}

14 changes: 14 additions & 0 deletions homelab/templates/postgres-service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
apiVersion: v1
kind: Service
metadata:
name: postgres
labels:
app: postgres
spec:
ports:
- protocol: TCP
port: {{ .Values.postgres.port }}
targetPort: {{ .Values.postgres.port }}
selector:
app: postgres
type: ClusterIP
11 changes: 11 additions & 0 deletions homelab/templates/postgres-volume.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: postgres-pvc
spec:
accessModes:
- ReadWriteOnce
storageClassName: local-path
resources:
requests:
storage: 10Gi
44 changes: 44 additions & 0 deletions homelab/templates/rss-deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: ttrss
labels:
app: ttrss
spec:
replicas: 1
selector:
matchLabels:
app: ttrss
template:
metadata:
labels:
app: ttrss
spec:
volumes:
- name: rss-data
persistentVolumeClaim:
claimName: ttrss-pvc
containers:
- name: postgres
image: {{ .Values.images.rss.image}}:{{ .Values.images.rss.tag }}
ports:
- containerPort: {{ .Values.rss.port }}
protocol: TCP
env:
- name: DB_HOST
value: postgres
- name: DB_USER
value: {{ .Values.postgres.user }}
- name: DB_NAME
value: {{ .Values.postgres.db }}
- name: DB_PASS
value: {{ .Values.postgres.pass }}
- name: DB_PORT
value: "{{ .Values.postgres.port }}"
- name: SELF_URL_PATH
value: 'https://rss.sethpyle.com'
volumeMounts:
- name: rss-data
mountPath: /config
imagePullPolicy: {{ .Values.images.rss.imagePullPolicy }}

18 changes: 18 additions & 0 deletions homelab/templates/rss-ingress.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: rss-ingress
spec:
tls:
- hosts:
- rss.sethpyle.com
rules:
- host: rss.sethpyle.com
http:
paths:
- pathType: ImplementationSpecific
backend:
service:
name: ttrss
port:
number: {{ .Values.rss.port }}
14 changes: 14 additions & 0 deletions homelab/templates/rss-service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
apiVersion: v1
kind: Service
metadata:
name: ttrss
labels:
app: ttrss
spec:
ports:
- protocol: TCP
port: {{ .Values.rss.port }}
targetPort: {{ .Values.rss.port }}
selector:
app: ttrss
type: ClusterIP
11 changes: 11 additions & 0 deletions homelab/templates/rss-volume.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: ttrss-pvc
spec:
accessModes:
- ReadWriteOnce
storageClassName: local-path
resources:
requests:
storage: 5Gi
Loading

0 comments on commit 8218790

Please sign in to comment.