From 65029d488dcf6de2a8d87313f6d294291a0eec6c Mon Sep 17 00:00:00 2001 From: Junwei Zhao Date: Fri, 19 Mar 2021 10:50:02 +1100 Subject: [PATCH] update nginx to tolerate master node --- apply.sh | 4 ++++ nginx-values.yaml | 5 +++++ postgres-values.yaml | 24 +++++++++++++----------- 3 files changed, 22 insertions(+), 11 deletions(-) diff --git a/apply.sh b/apply.sh index 0956ed9..e83709c 100755 --- a/apply.sh +++ b/apply.sh @@ -3,6 +3,10 @@ # namespaces kubectl create namespace longhorn +# taints + +kubectl taint nodes server-1 node=special:NoSchedule + ## install nginx ingress controller grafana dashboards # https://github.com/kubernetes/ingress-nginx/tree/master/deploy/grafana/dashboards diff --git a/nginx-values.yaml b/nginx-values.yaml index c47ceae..dd804ab 100644 --- a/nginx-values.yaml +++ b/nginx-values.yaml @@ -10,6 +10,11 @@ stats: nodeSelector: gateway: "true" +tolerations: + - key: node + operator: Equal + value: special + effect: NoSchedule replicaCount: 1 service: diff --git a/postgres-values.yaml b/postgres-values.yaml index 0aa1eea..05ae5d4 100644 --- a/postgres-values.yaml +++ b/postgres-values.yaml @@ -1,21 +1,23 @@ -image: - repository: postgres - tag: 11 -postgresqlDataDir: /var/lib/postgresql/data +# image: +# repository: postgres +# tag: 11 +# postgresqlDataDir: /bitnami/postgresql postgresqlPassword: "@wahyd4" postgresqlDatabase: home persistence: - mountPath: /var/lib/postgresql/data - storageClass: nfs - existingClaim: postgres-nfs + mountPath: /bitnami/postgresql + storageClass: longhorn-static + existingClaim: postgres-db + # storageClass: nfs + # existingClaim: postgres-nfs volumePermissions: enabled: true -securityContext: - fsGroup: 1000 - runAsUser: 1000 +# securityContext: +# fsGroup: 1000 +# runAsUser: 1000 service: type: NodePort - nodePort: 32222 + nodePort: 31111 metrics: enabled: true serviceMonitor: