diff --git a/templates/configmap.yml b/templates/configmap.yml index 404238c..cea986a 100644 --- a/templates/configmap.yml +++ b/templates/configmap.yml @@ -1,3 +1,7 @@ +{{- $dbHost := .Values.db.host -}} +{{- if eq $dbHost "" -}} +{{- $dbHost = printf "%s-postgresql-ha-pgpool.%s.svc.cluster.local" .Release.Name .Release.Namespace -}} +{{- end -}} apiVersion: v1 kind: ConfigMap metadata: @@ -23,8 +27,8 @@ data: MQ_USERNAME: "{{ .Values.mq.username }}" LICENSE_KEY: "{{ .Values.server.ee.licensekey }}" # needed if EE NETMAKER_TENANT_ID: "{{ .Values.server.ee.tenantId }}" # needed if EE - SQL_HOST: "{{ .Release.Name }}-postgresql-ha-pgpool.{{ .Release.Namespace }}.svc.cluster.local" - SQL_PORT: "5432" + SQL_HOST: "{{ $dbHost }}" + SQL_PORT: "{{ .Values.db.port }}" SQL_DB: {{ .Values.db.database }} SQL_USER: {{ .Values.db.username }} SQL_PASS: {{ .Values.db.password }} diff --git a/templates/coredns.yaml b/templates/coredns.yaml index 074892c..16c0be1 100644 --- a/templates/coredns.yaml +++ b/templates/coredns.yaml @@ -78,7 +78,7 @@ metadata: spec: storageClassName: {{ .Values.dns.RWX.storageClassName }} accessModes: - - ReadWriteOnce + - ReadWriteMany resources: requests: storage: {{ .Values.dns.storageSize }} diff --git a/templates/netmaker-statefulset.yaml b/templates/netmaker-statefulset.yaml index 244be23..7cb1651 100644 --- a/templates/netmaker-statefulset.yaml +++ b/templates/netmaker-statefulset.yaml @@ -5,7 +5,7 @@ metadata: app: {{ include "netmaker.fullname" . }} name: {{ include "netmaker.fullname" . }} spec: - replicas: 3 + replicas: {{ .Values.server.replicas }} selector: matchLabels: app: {{ include "netmaker.fullname" . }} diff --git a/values.yaml b/values.yaml index 02f485f..077f694 100644 --- a/values.yaml +++ b/values.yaml @@ -2,8 +2,7 @@ # This is a YAML-formatted file. # Declare variables to be passed into your templates. -# -- number of netmaker server replicas to create -replicas: 3 + baseDomain: "146.190.9.68.nip.io" image: # -- The image repo to pull Netmaker image from @@ -11,7 +10,7 @@ image: # -- Pull Policy for images pullPolicy: Always # -- Override the image tag to pull - tag: "v0.20.5" + tag: "latest" # -- override the name for netmaker objects nameOverride: "" @@ -41,12 +40,11 @@ ui: mq: # -- how many MQTT replicas to create replicas: 2 - singlenode: false - existingClaim: false - existingClaimName: "" username: netmaker password: 3yyerWGdds43yegGR server: + # -- number of netmaker server replicas to create + replicas: 2 RWX: storageClassName: "" storageSize: 128Mi @@ -95,9 +93,11 @@ ingress: rest: "api" db: type: "postgres" + host: "" + port: 5432 username: postgres # -- postgres pass to generate - password: postgres + password: password123 # set your own secure password # -- postgress db to generate database: netmaker @@ -107,13 +107,13 @@ postgresql-ha: # -- postgres user to generate username: postgres # -- postgres pass to generate - password: postgres + password: password123 # set your own secure password # -- postgress db to generate database: netmaker # -- postgress number of replicas to deploy replicaCount: 2 repmgrUsername: postgres - repmgrPassword: postgres + repmgrPassword: password123 # set your own secure password repmgrDatabase: repmgr persistence: # -- size of postgres DB