Add base layer and vr as an example
This commit is contained in:
parent
23e233bf8e
commit
87f0b617cd
11
customers/base/db1-service.yml
Normal file
11
customers/base/db1-service.yml
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: multinode-db
|
||||||
|
namespace: nextcloud
|
||||||
|
spec:
|
||||||
|
type: ExternalName
|
||||||
|
externalName: multinode-db1.drive.test.sunet.se
|
||||||
|
ports:
|
||||||
|
- port: 3306
|
11
customers/base/db2-service.yml
Normal file
11
customers/base/db2-service.yml
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: multinode-db
|
||||||
|
namespace: nextcloud
|
||||||
|
spec:
|
||||||
|
type: ExternalName
|
||||||
|
externalName: multinode-db2.drive.test.sunet.se
|
||||||
|
ports:
|
||||||
|
- port: 3306
|
11
customers/base/db3-service.yml
Normal file
11
customers/base/db3-service.yml
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: multinode-db
|
||||||
|
namespace: nextcloud
|
||||||
|
spec:
|
||||||
|
type: ExternalName
|
||||||
|
externalName: multinode-db3.drive.test.sunet.se
|
||||||
|
ports:
|
||||||
|
- port: 3306
|
8
customers/base/kustomization.yaml
Normal file
8
customers/base/kustomization.yaml
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
resources:
|
||||||
|
- db-service.yml
|
||||||
|
- nextcloud-deployment.yml
|
||||||
|
- nextcloud-ingress.yml
|
||||||
|
- nextcloud-namespace.yml
|
||||||
|
- nextcloud-pvc.yml
|
||||||
|
- nextcloud-service.yml
|
||||||
|
- s3-service.yml
|
80
customers/base/nextcloud-deployment.yml
Normal file
80
customers/base/nextcloud-deployment.yml
Normal file
|
@ -0,0 +1,80 @@
|
||||||
|
---
|
||||||
|
kind: Deployment
|
||||||
|
apiVersion: apps/v1
|
||||||
|
metadata:
|
||||||
|
name: customer-node
|
||||||
|
namespace: customer
|
||||||
|
labels:
|
||||||
|
app: customer-node
|
||||||
|
spec:
|
||||||
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: customer-node
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
creationTimestamp:
|
||||||
|
labels:
|
||||||
|
app: customer-node
|
||||||
|
spec:
|
||||||
|
volumes:
|
||||||
|
- name: server-storage
|
||||||
|
persistentVolumeClaim:
|
||||||
|
claimName: customer-shared-storage-claim
|
||||||
|
containers:
|
||||||
|
- name: customer
|
||||||
|
image: customer
|
||||||
|
volumeMounts:
|
||||||
|
- name: server-storage
|
||||||
|
mountPath: /var/www/html
|
||||||
|
subPath: server-data
|
||||||
|
env:
|
||||||
|
- name: MYSQL_DATABASE
|
||||||
|
value: "customer_customer"
|
||||||
|
- name: MYSQL_USER
|
||||||
|
value: "customer"
|
||||||
|
- name: MYSQL_HOST
|
||||||
|
value: "proxysql.proxysql"
|
||||||
|
- name: MYSQL_PASSWORD
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: db-secret
|
||||||
|
key: "db_password"
|
||||||
|
- name: MYSQL_PORT
|
||||||
|
value: "6033"
|
||||||
|
- name: NEXTCLOUD_TRUSTED_DOMAINS
|
||||||
|
value: "customer.drive.test.sunet.se"
|
||||||
|
- name: NEXTCLOUD_ADMIN_USER
|
||||||
|
value: _customer
|
||||||
|
- name: NEXTCLOUD_ADMIN_PASSWORD
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: nc-secret
|
||||||
|
key: "nc_admin_password"
|
||||||
|
- name: OBJECTSTORE_S3_REGION
|
||||||
|
value: "us-east-1"
|
||||||
|
- name: OBJECTSTORE_S3_HOST
|
||||||
|
value: "s3.sto4.safedc.net"
|
||||||
|
- name: OBJECTSTORE_S3_BUCKET
|
||||||
|
value: "primary-customer-drive-test.sunet.se"
|
||||||
|
- name: OBJECTSTORE_S3_KEY
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: s3-secret
|
||||||
|
key: "s3_key"
|
||||||
|
- name: OBJECTSTORE_S3_SECRET
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: s3-secret
|
||||||
|
key: "s3_secret"
|
||||||
|
- name: OBJECTSTORE_S3_USEPATH_STYLE
|
||||||
|
value: "true"
|
||||||
|
- name: OBJECTSTORE_S3_AUTOCREATE
|
||||||
|
value: "true"
|
||||||
|
- name: OBJECTSTORE_S3_SSL
|
||||||
|
value: "true"
|
||||||
|
- name: REDIS_HOST
|
||||||
|
value: "redis.redis"
|
||||||
|
resources: {}
|
||||||
|
strategy: {}
|
||||||
|
status: {}
|
32
customers/base/nextcloud-ingress.yml
Normal file
32
customers/base/nextcloud-ingress.yml
Normal file
|
@ -0,0 +1,32 @@
|
||||||
|
---
|
||||||
|
apiVersion: networking.k8s.io/v1
|
||||||
|
kind: Ingress
|
||||||
|
metadata:
|
||||||
|
name: customer-ingress
|
||||||
|
namespace: customer
|
||||||
|
annotations:
|
||||||
|
kubernetes.io/ingress.class: traefik
|
||||||
|
traefik.ingress.kubernetes.io/router.entrypoints: websecure
|
||||||
|
traefik.ingress.kubernetes.io/router.tls: "true"
|
||||||
|
spec:
|
||||||
|
defaultBackend:
|
||||||
|
service:
|
||||||
|
name: customer-node
|
||||||
|
port:
|
||||||
|
number: 8443
|
||||||
|
tls:
|
||||||
|
- hosts:
|
||||||
|
- customer.drive.test.sunet.se
|
||||||
|
secretName: tls-secret
|
||||||
|
|
||||||
|
rules:
|
||||||
|
- host: customer.drive.test.sunet.se
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: Prefix
|
||||||
|
backend:
|
||||||
|
service:
|
||||||
|
name: customer-node
|
||||||
|
port:
|
||||||
|
number: 80
|
8
customers/base/nextcloud-namespace.yml
Normal file
8
customers/base/nextcloud-namespace.yml
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Namespace
|
||||||
|
metadata:
|
||||||
|
name: customer
|
||||||
|
spec:
|
||||||
|
finalizers:
|
||||||
|
- kubernetes
|
15
customers/base/nextcloud-pvc.yml
Normal file
15
customers/base/nextcloud-pvc.yml
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
---
|
||||||
|
kind: PersistentVolumeClaim
|
||||||
|
apiVersion: v1
|
||||||
|
metadata:
|
||||||
|
name: customer-shared-storage-claim
|
||||||
|
namespace: customer
|
||||||
|
annotations:
|
||||||
|
volume.beta.kubernetes.io/storage-class: openebs-jiva-3repl
|
||||||
|
spec:
|
||||||
|
storageClassName: openebs-jiva-3repl
|
||||||
|
accessModes:
|
||||||
|
- ReadWriteOnce
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: 5G
|
25
customers/base/nextcloud-service.yml
Normal file
25
customers/base/nextcloud-service.yml
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
items:
|
||||||
|
- apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: customer-node
|
||||||
|
name: customer-node
|
||||||
|
namespace: customer
|
||||||
|
spec:
|
||||||
|
ports:
|
||||||
|
- port: 80
|
||||||
|
protocol: TCP
|
||||||
|
targetPort: 80
|
||||||
|
selector:
|
||||||
|
app: customer-node
|
||||||
|
sessionAffinity: None
|
||||||
|
type: ClusterIP
|
||||||
|
status:
|
||||||
|
loadBalancer: {}
|
||||||
|
kind: List
|
||||||
|
metadata:
|
||||||
|
resourceVersion: ""
|
||||||
|
selfLink: ""
|
11
customers/base/s3-service.yml
Normal file
11
customers/base/s3-service.yml
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: sto4
|
||||||
|
namespace: customer
|
||||||
|
spec:
|
||||||
|
type: ExternalName
|
||||||
|
externalName: s3.sto4.safedc.net
|
||||||
|
ports:
|
||||||
|
- port: 443
|
11
customers/overlays/vr/prod/kustomization.yaml
Normal file
11
customers/overlays/vr/prod/kustomization.yaml
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
apiVersion: 'kustomize.config.k8s.io/v1beta1'
|
||||||
|
kind: Kustomization
|
||||||
|
bases:
|
||||||
|
- ../../../base
|
||||||
|
patchesStrategicMerge:
|
||||||
|
- nextcloud-deployment.yml
|
||||||
|
- nextcloud-ingress.yml
|
||||||
|
- nextcloud-namespace.yml
|
||||||
|
- nextcloud-pvc.yml
|
||||||
|
- nextcloud-service.yml
|
||||||
|
- s3-service.yml
|
39
customers/overlays/vr/prod/nextcloud-deployment.yml
Normal file
39
customers/overlays/vr/prod/nextcloud-deployment.yml
Normal file
|
@ -0,0 +1,39 @@
|
||||||
|
---
|
||||||
|
kind: Deployment
|
||||||
|
apiVersion: apps/v1
|
||||||
|
metadata:
|
||||||
|
name: vr-node
|
||||||
|
namespace: vr
|
||||||
|
labels:
|
||||||
|
app: vr-node
|
||||||
|
spec:
|
||||||
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: vr-node
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
creationTimestamp:
|
||||||
|
labels:
|
||||||
|
app: vr-node
|
||||||
|
spec:
|
||||||
|
volumes:
|
||||||
|
- name: server-storage
|
||||||
|
persistentVolumeClaim:
|
||||||
|
claimName: vr-shared-storage-claim
|
||||||
|
containers:
|
||||||
|
- name: vr
|
||||||
|
env:
|
||||||
|
- name: MYSQL_DATABASE
|
||||||
|
value: "vr_nextcloud"
|
||||||
|
- name: MYSQL_USER
|
||||||
|
value: "vr_nextcloud"
|
||||||
|
- name: NEXTCLOUD_TRUSTED_DOMAINS
|
||||||
|
value: "vr.drive.sunet.se"
|
||||||
|
- name: OBJECTSTORE_S3_HOST
|
||||||
|
value: "s3.sto4.safedc.net"
|
||||||
|
- name: OBJECTSTORE_S3_BUCKET
|
||||||
|
value: "primary-vr-drive.sunet.se"
|
||||||
|
resources: {}
|
||||||
|
strategy: {}
|
||||||
|
status: {}
|
32
customers/overlays/vr/prod/nextcloud-ingress.yml
Normal file
32
customers/overlays/vr/prod/nextcloud-ingress.yml
Normal file
|
@ -0,0 +1,32 @@
|
||||||
|
---
|
||||||
|
apiVersion: networking.k8s.io/v1
|
||||||
|
kind: Ingress
|
||||||
|
metadata:
|
||||||
|
name: vr-ingress
|
||||||
|
namespace: vr
|
||||||
|
annotations:
|
||||||
|
kubernetes.io/ingress.class: traefik
|
||||||
|
traefik.ingress.kubernetes.io/router.entrypoints: websecure
|
||||||
|
traefik.ingress.kubernetes.io/router.tls: "true"
|
||||||
|
spec:
|
||||||
|
defaultBackend:
|
||||||
|
service:
|
||||||
|
name: vr-node
|
||||||
|
port:
|
||||||
|
number: 8443
|
||||||
|
tls:
|
||||||
|
- hosts:
|
||||||
|
- vr.drive.sunet.se
|
||||||
|
secretName: tls-secret
|
||||||
|
|
||||||
|
rules:
|
||||||
|
- host: vr.drive.sunet.se
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: Prefix
|
||||||
|
backend:
|
||||||
|
service:
|
||||||
|
name: vr-node
|
||||||
|
port:
|
||||||
|
number: 80
|
8
customers/overlays/vr/prod/nextcloud-namespace.yml
Normal file
8
customers/overlays/vr/prod/nextcloud-namespace.yml
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Namespace
|
||||||
|
metadata:
|
||||||
|
name: vr
|
||||||
|
spec:
|
||||||
|
finalizers:
|
||||||
|
- kubernetes
|
15
customers/overlays/vr/prod/nextcloud-pvc.yml
Normal file
15
customers/overlays/vr/prod/nextcloud-pvc.yml
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
---
|
||||||
|
kind: PersistentVolumeClaim
|
||||||
|
apiVersion: v1
|
||||||
|
metadata:
|
||||||
|
name: vr-shared-storage-claim
|
||||||
|
namespace: vr
|
||||||
|
annotations:
|
||||||
|
volume.beta.kubernetes.io/storage-class: openebs-jiva-3repl
|
||||||
|
spec:
|
||||||
|
storageClassName: openebs-jiva-3repl
|
||||||
|
accessModes:
|
||||||
|
- ReadWriteOnce
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: 5G
|
25
customers/overlays/vr/prod/nextcloud-service.yml
Normal file
25
customers/overlays/vr/prod/nextcloud-service.yml
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
items:
|
||||||
|
- apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: vr-node
|
||||||
|
name: vr-node
|
||||||
|
namespace: vr
|
||||||
|
spec:
|
||||||
|
ports:
|
||||||
|
- port: 80
|
||||||
|
protocol: TCP
|
||||||
|
targetPort: 80
|
||||||
|
selector:
|
||||||
|
app: vr-node
|
||||||
|
sessionAffinity: None
|
||||||
|
type: ClusterIP
|
||||||
|
status:
|
||||||
|
loadBalancer: {}
|
||||||
|
kind: List
|
||||||
|
metadata:
|
||||||
|
resourceVersion: ""
|
||||||
|
selfLink: ""
|
11
customers/overlays/vr/prod/s3-service.yml
Normal file
11
customers/overlays/vr/prod/s3-service.yml
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: sto4
|
||||||
|
namespace: vr
|
||||||
|
spec:
|
||||||
|
type: ExternalName
|
||||||
|
externalName: s3.sto4.safedc.net
|
||||||
|
ports:
|
||||||
|
- port: 443
|
11
customers/overlays/vr/test/kustomization.yaml
Normal file
11
customers/overlays/vr/test/kustomization.yaml
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
apiVersion: 'kustomize.config.k8s.io/v1beta1'
|
||||||
|
kind: Kustomization
|
||||||
|
bases:
|
||||||
|
- ../../../base
|
||||||
|
patchesStrategicMerge:
|
||||||
|
- nextcloud-deployment.yml
|
||||||
|
- nextcloud-ingress.yml
|
||||||
|
- nextcloud-namespace.yml
|
||||||
|
- nextcloud-pvc.yml
|
||||||
|
- nextcloud-service.yml
|
||||||
|
- s3-service.yml
|
39
customers/overlays/vr/test/nextcloud-deployment.yml
Normal file
39
customers/overlays/vr/test/nextcloud-deployment.yml
Normal file
|
@ -0,0 +1,39 @@
|
||||||
|
---
|
||||||
|
kind: Deployment
|
||||||
|
apiVersion: apps/v1
|
||||||
|
metadata:
|
||||||
|
name: vr-node
|
||||||
|
namespace: vr
|
||||||
|
labels:
|
||||||
|
app: vr-node
|
||||||
|
spec:
|
||||||
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: vr-node
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
creationTimestamp:
|
||||||
|
labels:
|
||||||
|
app: vr-node
|
||||||
|
spec:
|
||||||
|
volumes:
|
||||||
|
- name: server-storage
|
||||||
|
persistentVolumeClaim:
|
||||||
|
claimName: vr-shared-storage-claim
|
||||||
|
containers:
|
||||||
|
- name: vr
|
||||||
|
env:
|
||||||
|
- name: MYSQL_DATABASE
|
||||||
|
value: "vr_nextcloud"
|
||||||
|
- name: MYSQL_USER
|
||||||
|
value: "vr_nextcloud"
|
||||||
|
- name: NEXTCLOUD_TRUSTED_DOMAINS
|
||||||
|
value: "vr.drive.test.sunet.se"
|
||||||
|
- name: OBJECTSTORE_S3_HOST
|
||||||
|
value: "s3.sto4.safedc.net"
|
||||||
|
- name: OBJECTSTORE_S3_BUCKET
|
||||||
|
value: "primary-vr-drive-test.sunet.se"
|
||||||
|
resources: {}
|
||||||
|
strategy: {}
|
||||||
|
status: {}
|
32
customers/overlays/vr/test/nextcloud-ingress.yml
Normal file
32
customers/overlays/vr/test/nextcloud-ingress.yml
Normal file
|
@ -0,0 +1,32 @@
|
||||||
|
---
|
||||||
|
apiVersion: networking.k8s.io/v1
|
||||||
|
kind: Ingress
|
||||||
|
metadata:
|
||||||
|
name: vr-ingress
|
||||||
|
namespace: vr
|
||||||
|
annotations:
|
||||||
|
kubernetes.io/ingress.class: traefik
|
||||||
|
traefik.ingress.kubernetes.io/router.entrypoints: websecure
|
||||||
|
traefik.ingress.kubernetes.io/router.tls: "true"
|
||||||
|
spec:
|
||||||
|
defaultBackend:
|
||||||
|
service:
|
||||||
|
name: vr-node
|
||||||
|
port:
|
||||||
|
number: 8443
|
||||||
|
tls:
|
||||||
|
- hosts:
|
||||||
|
- vr.drive.test.sunet.se
|
||||||
|
secretName: tls-secret
|
||||||
|
|
||||||
|
rules:
|
||||||
|
- host: vr.drive.test.sunet.se
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: Prefix
|
||||||
|
backend:
|
||||||
|
service:
|
||||||
|
name: vr-node
|
||||||
|
port:
|
||||||
|
number: 80
|
8
customers/overlays/vr/test/nextcloud-namespace.yml
Normal file
8
customers/overlays/vr/test/nextcloud-namespace.yml
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Namespace
|
||||||
|
metadata:
|
||||||
|
name: vr
|
||||||
|
spec:
|
||||||
|
finalizers:
|
||||||
|
- kubernetes
|
15
customers/overlays/vr/test/nextcloud-pvc.yml
Normal file
15
customers/overlays/vr/test/nextcloud-pvc.yml
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
---
|
||||||
|
kind: PersistentVolumeClaim
|
||||||
|
apiVersion: v1
|
||||||
|
metadata:
|
||||||
|
name: vr-shared-storage-claim
|
||||||
|
namespace: vr
|
||||||
|
annotations:
|
||||||
|
volume.beta.kubernetes.io/storage-class: openebs-jiva-3repl
|
||||||
|
spec:
|
||||||
|
storageClassName: openebs-jiva-3repl
|
||||||
|
accessModes:
|
||||||
|
- ReadWriteOnce
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: 5G
|
25
customers/overlays/vr/test/nextcloud-service.yml
Normal file
25
customers/overlays/vr/test/nextcloud-service.yml
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
items:
|
||||||
|
- apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: vr-node
|
||||||
|
name: vr-node
|
||||||
|
namespace: vr
|
||||||
|
spec:
|
||||||
|
ports:
|
||||||
|
- port: 80
|
||||||
|
protocol: TCP
|
||||||
|
targetPort: 80
|
||||||
|
selector:
|
||||||
|
app: vr-node
|
||||||
|
sessionAffinity: None
|
||||||
|
type: ClusterIP
|
||||||
|
status:
|
||||||
|
loadBalancer: {}
|
||||||
|
kind: List
|
||||||
|
metadata:
|
||||||
|
resourceVersion: ""
|
||||||
|
selfLink: ""
|
11
customers/overlays/vr/test/s3-service.yml
Normal file
11
customers/overlays/vr/test/s3-service.yml
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: sto4
|
||||||
|
namespace: vr
|
||||||
|
spec:
|
||||||
|
type: ExternalName
|
||||||
|
externalName: s3.sto4.safedc.net
|
||||||
|
ports:
|
||||||
|
- port: 443
|
Loading…
Reference in a new issue