k8s-manifests/proxysql/base/proxysql-deployment.yml
Micke 5763665c72
author Micke <kano@sunet.se> 1679915017 +0000
committer Micke Nordin <kano@sunet.se> 1680110378 +0200
gpgsig -----BEGIN PGP SIGNATURE-----

 iQIzBAABCgAdFiEEIpL7dwHsMfazpY3ODaCnpXCP4lcFAmQkcyoACgkQDaCnpXCP
 4ld8Rg/7BSPA3rrDV9JbfQYtuE1/wpMy+hfYC/jIiD3VpwPKZ27r8/LzIsrquL6o
 nOfQT5cj/Jm2WrZoS+6pRlmWxzbBN6Oc6XJMxrUu+JVHSyCYNSFU+j074/4B3mNW
 +YDw2415/sEBJbhBcCmNOfWVZuOq1+AsfBkZ1vhUT0GzKahGIBMzgK8P+5IBsXCp
 7t/N5EmvFy6mzubkT8LN9ZQ0WMd2OxBeBDPUcrwlrT6kxA/1JQfaZ4PWtSb7QD0G
 IQAeUAy3p9JxXRQyWmunEYrxp0maO6EPyp6O656C75JKn7lOhMGMR2S5FT3jPK5d
 KrbewbCsRiq3O94STxytBdDjT/Ez2vk0/tj7cW5r0hb2Pd1cVgHlcRP53r8dzSn9
 RIRycGKB49k2MYByNGJN3oM9KYB2vpIhqmy9vyFn3HinhD8nyj0VDAo0LWDCKnbh
 dt7jTKAsr1y9bXPK+3YM/2QiCdPMDz1xYd1BhbFgQ5B5Eb8iB0iQn9UHPe884wNN
 Zs+yPAGRyPrAVvCnopV2IZJpGI7oKjnmcgBanbTJK+UKkfmb0a4S/fbCezjhT6Qc
 105jvtmZgj44aSqtBSkXvV9UoCtjePEBifhcQznzpi8eudbo1Hhg5UjO5rwwhl2P
 lUQgs75Rsfd549YBV/Rq1szlVODTsMhU2oDr83t8Vf/TF9GdhEg=
 =Hnvm
 -----END PGP SIGNATURE-----

Nextcloud in K8s: MVP

This is the minumum needed to run a multinode customer in kubernetes.
Each customer will run in their own namespace with a nextcloud
container and a redis container. There is a proxysql cluster running in
its own namespace, used by all customer.

This is a monorepo that uses kustomize to allow using this repo for both
prod and test (and other things we can think of in the future).
2023-03-29 19:21:13 +02:00

312 lines
10 KiB
YAML

apiVersion: apps/v1
kind: StatefulSet
metadata:
name: proxysql
namespace: proxysql
labels:
app: proxysql
spec:
replicas: 3
serviceName: proxysqlcluster
selector:
matchLabels:
app: proxysql
updateStrategy:
type: RollingUpdate
volumeClaimTemplates:
- metadata:
name: proxysql-data
namespace: proxysql
spec:
storageClassName: mayastor-3
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 2Gi
- metadata:
name: proxysql-etc
namespace: proxysql
spec:
storageClassName: mayastor-3
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 2Gi
template:
metadata:
labels:
app: proxysql
spec:
restartPolicy: Always
containers:
- image: docker.sunet.se/drive/proxysql:latest
name: proxysql
volumeMounts:
- name: proxysql-data
mountPath: /var/lib/proxysql
subPath: data
- name: proxysql-etc
mountPath: /etc
subPath: etc
ports:
- containerPort: 6033
name: proxysql-mysql
- containerPort: 6032
name: proxysql-admin
initContainers:
- image: docker.sunet.se/sunet/docker-jinja:latest
name: init-config
volumeMounts:
- name: proxysql-config-template
mountPath: /tmp/proxysql.cnf.template
subPath: proxysql.cnf
- name: proxysql-etc
mountPath: /etc
subPath: etc
env:
- name: ADMIN_PASSWORD
valueFrom:
secretKeyRef:
name: proxysql-secret
key: "proxysql_admin_password"
- name: CLUSTER_PASSWORD
valueFrom:
secretKeyRef:
name: proxysql-secret
key: "proxysql_cluster_password"
- name: MONITOR_PASSWORD
valueFrom:
secretKeyRef:
name: proxysql-secret
key: "proxysql_monitor_password"
- name: ANTAGNING_PASSWORD
valueFrom:
secretKeyRef:
name: proxysql-secret
key: "proxysql_antagning_password"
- name: BTH_PASSWORD
valueFrom:
secretKeyRef:
name: proxysql-secret
key: "proxysql_bth_password"
- name: CHALMERS_PASSWORD
valueFrom:
secretKeyRef:
name: proxysql-secret
key: "proxysql_chalmers_password"
- name: DU_PASSWORD
valueFrom:
secretKeyRef:
name: proxysql-secret
key: "proxysql_du_password"
- name: ESH_PASSWORD
valueFrom:
secretKeyRef:
name: proxysql-secret
key: "proxysql_esh_password"
- name: FHS_PASSWORD
valueFrom:
secretKeyRef:
name: proxysql-secret
key: "proxysql_fhs_password"
- name: GU_PASSWORD
valueFrom:
secretKeyRef:
name: proxysql-secret
key: "proxysql_gu_password"
- name: HB_PASSWORD
valueFrom:
secretKeyRef:
name: proxysql-secret
key: "proxysql_hb_password"
- name: HHS_PASSWORD
valueFrom:
secretKeyRef:
name: proxysql-secret
key: "proxysql_hhs_password"
- name: HIG_PASSWORD
valueFrom:
secretKeyRef:
name: proxysql-secret
key: "proxysql_hig_password"
- name: HIS_PASSWORD
valueFrom:
secretKeyRef:
name: proxysql-secret
key: "proxysql_his_password"
- name: HJ_PASSWORD
valueFrom:
secretKeyRef:
name: proxysql-secret
key: "proxysql_hj_password"
- name: HV_PASSWORD
valueFrom:
secretKeyRef:
name: proxysql-secret
key: "proxysql_hv_password"
- name: IRF_PASSWORD
valueFrom:
secretKeyRef:
name: proxysql-secret
key: "proxysql_irf_password"
- name: KB_PASSWORD
valueFrom:
secretKeyRef:
name: proxysql-secret
key: "proxysql_kb_password"
- name: KI_PASSWORD
valueFrom:
secretKeyRef:
name: proxysql-secret
key: "proxysql_ki_password"
- name: KKH_PASSWORD
valueFrom:
secretKeyRef:
name: proxysql-secret
key: "proxysql_kkh_password"
- name: KMH_PASSWORD
valueFrom:
secretKeyRef:
name: proxysql-secret
key: "proxysql_kmh_password"
- name: KONSTFACK_PASSWORD
valueFrom:
secretKeyRef:
name: proxysql-secret
key: "proxysql_konstfack_password"
- name: KTH_PASSWORD
valueFrom:
secretKeyRef:
name: proxysql-secret
key: "proxysql_kth_password"
- name: KVA_PASSWORD
valueFrom:
secretKeyRef:
name: proxysql-secret
key: "proxysql_kva_password"
- name: LIU_PASSWORD
valueFrom:
secretKeyRef:
name: proxysql-secret
key: "proxysql_liu_password"
- name: LNU_PASSWORD
valueFrom:
secretKeyRef:
name: proxysql-secret
key: "proxysql_lnu_password"
- name: LTU_PASSWORD
valueFrom:
secretKeyRef:
name: proxysql-secret
key: "proxysql_ltu_password"
- name: LU_PASSWORD
valueFrom:
secretKeyRef:
name: proxysql-secret
key: "proxysql_lu_password"
- name: MAU_PASSWORD
valueFrom:
secretKeyRef:
name: proxysql-secret
key: "proxysql_mau_password"
- name: MIUN_PASSWORD
valueFrom:
secretKeyRef:
name: proxysql-secret
key: "proxysql_miun_password"
- name: NORDUNET_PASSWORD
valueFrom:
secretKeyRef:
name: proxysql-secret
key: "proxysql_nordunet_password"
- name: NRM_PASSWORD
valueFrom:
secretKeyRef:
name: proxysql-secret
key: "proxysql_nrm_password"
- name: ORU_PASSWORD
valueFrom:
secretKeyRef:
name: proxysql-secret
key: "proxysql_oru_password"
- name: RKH_PASSWORD
valueFrom:
secretKeyRef:
name: proxysql-secret
key: "proxysql_rkh_password"
- name: SHH_PASSWORD
valueFrom:
secretKeyRef:
name: proxysql-secret
key: "proxysql_shh_password"
- name: SICS_PASSWORD
valueFrom:
secretKeyRef:
name: proxysql-secret
key: "proxysql_sics_password"
- name: SLU_PASSWORD
valueFrom:
secretKeyRef:
name: proxysql-secret
key: "proxysql_slu_password"
- name: SMHI_PASSWORD
valueFrom:
secretKeyRef:
name: proxysql-secret
key: "proxysql_smhi_password"
- name: SP_PASSWORD
valueFrom:
secretKeyRef:
name: proxysql-secret
key: "proxysql_sp_password"
- name: SWAMID_PASSWORD
valueFrom:
secretKeyRef:
name: proxysql-secret
key: "proxysql_swamid_password"
- name: THS_PASSWORD
valueFrom:
secretKeyRef:
name: proxysql-secret
key: "proxysql_ths_password"
- name: UHR_PASSWORD
valueFrom:
secretKeyRef:
name: proxysql-secret
key: "proxysql_uhr_password"
- name: UMU_PASSWORD
valueFrom:
secretKeyRef:
name: proxysql-secret
key: "proxysql_umu_password"
- name: UNIARTS_PASSWORD
valueFrom:
secretKeyRef:
name: proxysql-secret
key: "proxysql_uniarts_password"
- name: UU_PASSWORD
valueFrom:
secretKeyRef:
name: proxysql-secret
key: "proxysql_uu_password"
- name: VINNOVA_PASSWORD
valueFrom:
secretKeyRef:
name: proxysql-secret
key: "proxysql_vinnova_password"
- name: VR_PASSWORD
valueFrom:
secretKeyRef:
name: proxysql-secret
key: "proxysql_vr_password"
command: ["/bin/sh", "-c", "/usr/bin/j2 -f env -o /etc/proxysql.cnf /tmp/proxysql.cnf.template"]
volumes:
- name: proxysql-config-template
configMap:
name: proxysql-configmap
items:
- key: "proxysql.cnf"
path: "proxysql.cnf"