Compare commits
2 commits
79cdf25efd
...
35cce02514
Author | SHA1 | Date | |
---|---|---|---|
Micke Nordin | 35cce02514 | ||
Micke Nordin | 5bbca47bd1 |
27
add_customer
Executable file
27
add_customer
Executable file
|
@ -0,0 +1,27 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
basename="$(dirname "${0}")"
|
||||||
|
|
||||||
|
customer=${1}
|
||||||
|
shift
|
||||||
|
environ=${1}
|
||||||
|
shift
|
||||||
|
|
||||||
|
if [[ -z ${customer} ]] || [[ -z ${environ} ]]; then
|
||||||
|
echo "Usage: ${0} <customer> <environment>"
|
||||||
|
echo "Example: ${0} vr test"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ ${customer} == 'test' ]] || [[ ${customer} == 'prod' ]]; then
|
||||||
|
temp=${customer}
|
||||||
|
customer=${environ}
|
||||||
|
environ=${temp}
|
||||||
|
fi
|
||||||
|
customer_dir="${basename}/customers/overlays/${customer}"
|
||||||
|
mkdir -p "${customer_dir}"
|
||||||
|
cp -a "${basename}/customers/overlays/vr/${environ}" "${customer_dir}/"
|
||||||
|
sed -i "s/vr/${customer}/g" "${customer_dir}/${environ}/nextcloud-ingress.yml" "${customer_dir}/${environ}/nextcloud-deployment.yml"
|
||||||
|
git add "${customer_dir}/${environ}"
|
||||||
|
git commit -m "Adding ${customer} to ${environ}"
|
||||||
|
${basename}/bump-tag
|
7
customers/overlays/nunoc/test/kustomization.yaml
Normal file
7
customers/overlays/nunoc/test/kustomization.yaml
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||||
|
kind: Kustomization
|
||||||
|
resources:
|
||||||
|
- ../../../base
|
||||||
|
patches:
|
||||||
|
- path: nextcloud-deployment.yml
|
||||||
|
- path: nextcloud-ingress.yml
|
35
customers/overlays/nunoc/test/nextcloud-deployment.yml
Normal file
35
customers/overlays/nunoc/test/nextcloud-deployment.yml
Normal file
|
@ -0,0 +1,35 @@
|
||||||
|
kind: StatefulSet
|
||||||
|
apiVersion: apps/v1
|
||||||
|
metadata:
|
||||||
|
name: customer-node
|
||||||
|
labels:
|
||||||
|
app: customer-node
|
||||||
|
spec:
|
||||||
|
replicas: 1
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: customer-node
|
||||||
|
spec:
|
||||||
|
initContainers:
|
||||||
|
- image: docker.sunet.se/sunet/docker-jinja:latest
|
||||||
|
name: init-config
|
||||||
|
env:
|
||||||
|
- name: MYSQL_DATABASE
|
||||||
|
value: "nextcloud_nunoc"
|
||||||
|
- name: MYSQL_USER
|
||||||
|
value: "nextcloud_nunoc"
|
||||||
|
- name: GSS_MASTER_URL
|
||||||
|
value: "https://drive.test.sunet.se"
|
||||||
|
- name: LOOKUP_SERVER
|
||||||
|
value: "https://lookup.drive.test.sunet.se"
|
||||||
|
- name: MAIL_DOMAIN
|
||||||
|
value: "drive.test.sunet.se"
|
||||||
|
- name: MAIL_SMTPNAME
|
||||||
|
value: "noreply@drive.test.sunet.se"
|
||||||
|
- name: NEXTCLOUD_TRUSTED_DOMAINS
|
||||||
|
value: "nunoc.drive.test.sunet.se"
|
||||||
|
- name: OBJECTSTORE_S3_BUCKET
|
||||||
|
value: "primary-nunoc-drive-test.sunet.se"
|
||||||
|
- name: SITE_NAME
|
||||||
|
value: "nunoc.drive.test.sunet.se"
|
26
customers/overlays/nunoc/test/nextcloud-ingress.yml
Normal file
26
customers/overlays/nunoc/test/nextcloud-ingress.yml
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
---
|
||||||
|
apiVersion: networking.k8s.io/v1
|
||||||
|
kind: Ingress
|
||||||
|
metadata:
|
||||||
|
name: customer-ingress
|
||||||
|
annotations:
|
||||||
|
kubernetes.io/ingress.class: traefik
|
||||||
|
traefik.ingress.kubernetes.io/router.entrypoints: websecure
|
||||||
|
traefik.ingress.kubernetes.io/router.tls: "true"
|
||||||
|
spec:
|
||||||
|
tls:
|
||||||
|
- hosts:
|
||||||
|
- nunoc.drive.test.sunet.se
|
||||||
|
secretName: tls-secret
|
||||||
|
|
||||||
|
rules:
|
||||||
|
- host: nunoc.drive.test.sunet.se
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: Prefix
|
||||||
|
backend:
|
||||||
|
service:
|
||||||
|
name: customer-node
|
||||||
|
port:
|
||||||
|
number: 80
|
Loading…
Reference in a new issue