cloudtube and newleaf

Signed-off-by: Martyn Ranyard <m@rtyn.berlin>
This commit is contained in:
Martyn 2023-11-14 12:11:14 +01:00
parent b77e7d126a
commit 27440ecae7
9 changed files with 195 additions and 0 deletions

View File

@ -0,0 +1,24 @@
apiVersion: v1
data:
cloudtube.config.js: |
module.exports = {
/*
Copy this file to `config.js`, and add options here.
They'll override the options from `utils/constants.js`.
For example, the next block changes the default instance.
*/
user_settings: {
instance: {
default: "http://newleaf.martyn.berlin"
}
},
/*
If cloudtube and Newleaf is not in same docker-network, you need to also set local_instance_origin.
*/
server_setup: {
local_instance_origin: "http://newleaf.cloudtube.svc.cluster.local:3000"
}
}
kind: ConfigMap
metadata:
name: cloudtube

View File

@ -0,0 +1,41 @@
apiVersion: apps/v1
kind: Deployment
metadata:
creationTimestamp: null
labels:
app: cloudtube
name: cloudtube
spec:
replicas: 1
selector:
matchLabels:
app: cloudtube
strategy: {}
template:
metadata:
creationTimestamp: null
labels:
app: cloudtube
spec:
containers:
- image: abeltramo/cloudtube:59266a6
name: cloudtube
resources: {}
volumeMounts:
- mountPath: /workdir/db
name: db
- mountPath: /workdir/config/config.js
name: config
subPath: cloudtube.config.js
volumes:
- configMap:
defaultMode: 420
items:
- key: cloudtube.config.js
path: cloudtube.config.js
name: cloudtube
name: config
- name: db
persistentVolumeClaim:
claimName: cloudtube-db-data
status: {}

View File

@ -0,0 +1,11 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: cloudtube-db-data
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 10Gi
storageClassName: local-path

View File

@ -0,0 +1,16 @@
apiVersion: v1
kind: Service
metadata:
labels:
app: cloudtube
app.kubernetes.io/instance: cloudtube
name: cloudtube
annotations:
external-dns.alpha.kubernetes.io/hostname: cloudtube.martyn.berlin
spec:
ports:
- targetPort: 10412
port: 80
selector:
app: cloudtube
type: LoadBalancer

View File

@ -0,0 +1,23 @@
apiVersion: v1
data:
newleaf-configuration.py: |-
# ==============================
# You MUST set these settings.
# ==============================
# A URL that this site can be accessed on. Do not include a trailing slash.
website_origin = "http://newleaf.martyn.berlin"
# ==============================
# These settings are optional.
# ==============================
# The address of the interface to bind to.
#bind_host = "0.0.0.0"
# The port to bind to.
#bind_port = 3000
kind: ConfigMap
metadata:
name: newleaf

View File

@ -0,0 +1,36 @@
apiVersion: apps/v1
kind: Deployment
metadata:
creationTimestamp: null
labels:
app: newleaf
name: newleaf
spec:
replicas: 1
selector:
matchLabels:
app: newleaf
strategy: {}
template:
metadata:
creationTimestamp: null
labels:
app: newleaf
spec:
containers:
- image: abeltramo/newleaf:97b7661
name: newleaf
resources: {}
volumeMounts:
- mountPath: /workdir/configuration.py
name: config
subPath: newleaf-configuration.py
volumes:
- configMap:
defaultMode: 420
items:
- key: newleaf-configuration.py
path: newleaf-configuration.py
name: newleaf
name: config
status: {}

View File

@ -0,0 +1,16 @@
apiVersion: v1
kind: Service
metadata:
labels:
app: newleaf
app.kubernetes.io/instance: newleaf
name: newleaf
annotations:
external-dns.alpha.kubernetes.io/hostname: newleaf.martyn.berlin
spec:
ports:
- port: 80
targetPort: 3000
selector:
app: newleaf
type: LoadBalancer

View File

@ -0,0 +1,14 @@
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: cloudtube
namespace: argocd
spec:
destination:
namespace: cloudtube
server: https://kubernetes.default.svc
project: apps
source:
path: apps-kustomized/cloudtube
repoURL: https://git.martyn.berlin/martyn/infra4talos
targetRevision: HEAD

View File

@ -0,0 +1,14 @@
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: newleaf
namespace: argocd
spec:
destination:
namespace: newleaf
server: https://kubernetes.default.svc
project: apps
source:
path: apps-kustomized/newleaf
repoURL: https://git.martyn.berlin/martyn/infra4talos
targetRevision: HEAD