aboutsummaryrefslogtreecommitdiffstats
path: root/kubernetes
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--kubernetes/mongodb/mongod.conf15
-rw-r--r--kubernetes/mongodb/mongodb-configmap.yaml7
-rw-r--r--kubernetes/mongodb/mongodb-data-volume.yaml12
-rw-r--r--kubernetes/mongodb/mongodb-deployment.yaml66
-rw-r--r--kubernetes/mongodb/mongodb-secret.yaml8
-rw-r--r--kubernetes/rpi/configmap.yaml (renamed from rpi/configmap.yaml)0
-rw-r--r--kubernetes/rpi/ntp/ntp.conf (renamed from rpi/ntp/ntp.conf)0
-rw-r--r--kubernetes/rpi/pihole-deployment.yaml (renamed from rpi/pihole-deployment.yaml)6
-rw-r--r--kubernetes/rpi/secret.yaml7
-rw-r--r--kubernetes/rpi/squid-proxy-deployment.yaml (renamed from rpi/squid-proxy-deployment.yaml)0
-rw-r--r--kubernetes/rpi/squid/squid.conf (renamed from rpi/squid/squid.conf)0
-rw-r--r--kubernetes/rpi/unbound-deployment.yaml (renamed from rpi/unbound-deployment.yaml)0
12 files changed, 118 insertions, 3 deletions
diff --git a/kubernetes/mongodb/mongod.conf b/kubernetes/mongodb/mongod.conf
new file mode 100644
index 0000000..85d2bd9
--- /dev/null
+++ b/kubernetes/mongodb/mongod.conf
@@ -0,0 +1,15 @@
+# vim: ft=yaml
+systemLog:
+ destination: file
+ path: "/var/log/mongodb/mongod.log"
+ logAppend: true
+storage:
+ journal:
+ enabled: true
+processManagement:
+ fork: true
+net:
+ bindIp: 0.0.0.0
+ port: 27017
+setParameter:
+ enableLocalhostAuthBypass: false
diff --git a/kubernetes/mongodb/mongodb-configmap.yaml b/kubernetes/mongodb/mongodb-configmap.yaml
new file mode 100644
index 0000000..19a484e
--- /dev/null
+++ b/kubernetes/mongodb/mongodb-configmap.yaml
@@ -0,0 +1,7 @@
+apiVersion: v1
+kind: ConfigMap
+metadata:
+ name: mongodb-configmap
+data:
+ mongodb_db__anime_name: anime
+ mongodb_db_manga_name: manga
diff --git a/kubernetes/mongodb/mongodb-data-volume.yaml b/kubernetes/mongodb/mongodb-data-volume.yaml
new file mode 100644
index 0000000..6b7d44b
--- /dev/null
+++ b/kubernetes/mongodb/mongodb-data-volume.yaml
@@ -0,0 +1,12 @@
+apiVersion: v1
+kind: PersistentVolumeClaim
+metadata:
+ creationTimestamp: null
+ name: mongo-data
+spec:
+ accessModes:
+ - ReadWriteOnce
+ resources:
+ requests:
+ storage: 100Mi
+status: {}
diff --git a/kubernetes/mongodb/mongodb-deployment.yaml b/kubernetes/mongodb/mongodb-deployment.yaml
new file mode 100644
index 0000000..778fd60
--- /dev/null
+++ b/kubernetes/mongodb/mongodb-deployment.yaml
@@ -0,0 +1,66 @@
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+ name: mongodb
+ labels:
+ app: mongodb
+spec:
+ replicas: 1
+ selector:
+ matchLabels:
+ app: mongodb
+ template:
+ metadata:
+ labels:
+ app: mongodb
+ spec:
+ containers:
+ - name: mongodb
+ image: mongo:4.4.10
+ ports:
+ - containerPort: 27017
+ - containerPort: 27018
+ - containerPort: 27019
+ env:
+ - name: MONGO_INITDB_ROOT_USERNAME
+ valueFrom:
+ secretKeyRef:
+ name: mongodb-secrets
+ key: mongodb-root-username
+ - name: MONGO_INITDB_ROOT_PASSWORD
+ valueFrom:
+ secretKeyRef:
+ name: mongodb-secrets
+ key: mongodb-root-password
+ volumeMounts:
+ - mountPath: /data/db
+ name: mongo-data
+ volumes:
+ - name: mongo-data
+ persistentVolumeClaim:
+ claimName: mongo-data
+---
+apiVersion: v1
+kind: Service
+metadata:
+ name: mongodb-service
+spec:
+ selector:
+ app: mongodb
+ type: LoadBalancer
+ ports:
+ - protocol: TCP
+ name: "6617"
+ port: 27117
+ targetPort: 27017
+ nodePort: 30017
+ - protocol: TCP
+ name: "6618"
+ port: 27118
+ targetPort: 27018
+ nodePort: 30018
+ - protocol: TCP
+ name: "6619"
+ port: 27119
+ targetPort: 27019
+ nodePort: 30019
diff --git a/kubernetes/mongodb/mongodb-secret.yaml b/kubernetes/mongodb/mongodb-secret.yaml
new file mode 100644
index 0000000..3a5fa46
--- /dev/null
+++ b/kubernetes/mongodb/mongodb-secret.yaml
@@ -0,0 +1,8 @@
+apiVersion: v1
+kind: Secret
+metadata:
+ name: mongodb-secrets
+type: Opaque
+data:
+ mongodb-root-username: bW9uZ29hZG1pbgo=
+ mongodb-root-password: bW9uZ29hZG1pbgo=
diff --git a/rpi/configmap.yaml b/kubernetes/rpi/configmap.yaml
index 551ee23..551ee23 100644
--- a/rpi/configmap.yaml
+++ b/kubernetes/rpi/configmap.yaml
diff --git a/rpi/ntp/ntp.conf b/kubernetes/rpi/ntp/ntp.conf
index b81b065..b81b065 100644
--- a/rpi/ntp/ntp.conf
+++ b/kubernetes/rpi/ntp/ntp.conf
diff --git a/rpi/pihole-deployment.yaml b/kubernetes/rpi/pihole-deployment.yaml
index 49e44fe..cee5d53 100644
--- a/rpi/pihole-deployment.yaml
+++ b/kubernetes/rpi/pihole-deployment.yaml
@@ -2,12 +2,12 @@ apiVersion: apps/v1
kind: Deployment
metadata:
name: pihole
- lables:
+ labels:
app: pihole
spec:
replicas: 1
- selctor:
- matchlabels:
+ selcetor:
+ matchLabels:
app: pihole
template:
metadata:
diff --git a/kubernetes/rpi/secret.yaml b/kubernetes/rpi/secret.yaml
new file mode 100644
index 0000000..0ac4b60
--- /dev/null
+++ b/kubernetes/rpi/secret.yaml
@@ -0,0 +1,7 @@
+apiVersion: v1
+kind: Secret
+metadata:
+ name: k3s-rpi-secrets
+type: Opaque
+data:
+ pihole-webpassword: WGFzaG1pdGgjNjY2Cg==
diff --git a/rpi/squid-proxy-deployment.yaml b/kubernetes/rpi/squid-proxy-deployment.yaml
index 70ec65e..70ec65e 100644
--- a/rpi/squid-proxy-deployment.yaml
+++ b/kubernetes/rpi/squid-proxy-deployment.yaml
diff --git a/rpi/squid/squid.conf b/kubernetes/rpi/squid/squid.conf
index 5099bbc..5099bbc 100644
--- a/rpi/squid/squid.conf
+++ b/kubernetes/rpi/squid/squid.conf
diff --git a/rpi/unbound-deployment.yaml b/kubernetes/rpi/unbound-deployment.yaml
index 26f8997..26f8997 100644
--- a/rpi/unbound-deployment.yaml
+++ b/kubernetes/rpi/unbound-deployment.yaml