diff options
Diffstat (limited to 'kubernetes/common')
15 files changed, 118 insertions, 55 deletions
diff --git a/kubernetes/common/network-name-gen/resources/config/aai_keystore b/kubernetes/common/network-name-gen/resources/config/aai_keystore Binary files differnew file mode 100644 index 0000000000..83cae95273 --- /dev/null +++ b/kubernetes/common/network-name-gen/resources/config/aai_keystore diff --git a/kubernetes/common/network-name-gen/templates/deployment.yaml b/kubernetes/common/network-name-gen/templates/deployment.yaml index 743c8be02e..dac4e0d4ce 100644 --- a/kubernetes/common/network-name-gen/templates/deployment.yaml +++ b/kubernetes/common/network-name-gen/templates/deployment.yaml @@ -77,6 +77,13 @@ spec: value: "{{ .Values.config.aaiCertPath }}" - name: AAI_URI value: "{{ .Values.config.aaiUri }}" + - name: AAI_AUTH + value: "{{ .Values.config.aaiAuth }}" + volumeMounts: + - name: certs + mountPath: /opt/etc/config/aai_keystore + subPath: aai_keystore + readOnly: true resources: {{ include "common.resources" . | indent 12 }} {{- if .Values.nodeSelector }} @@ -87,6 +94,9 @@ spec: affinity: {{ toYaml .Values.affinity | indent 10 }} {{- end }} - + volumes: + - name: certs + secret: + secretName: {{ .Release.Name}}-aai-keystore imagePullSecrets: - name: "{{ include "common.namespace" . }}-docker-registry-key" diff --git a/kubernetes/common/network-name-gen/templates/secrets.yaml b/kubernetes/common/network-name-gen/templates/secrets.yaml index b50ad4eb26..4b6d97acad 100644 --- a/kubernetes/common/network-name-gen/templates/secrets.yaml +++ b/kubernetes/common/network-name-gen/templates/secrets.yaml @@ -25,3 +25,11 @@ metadata: type: Opaque data: db-root-password: {{ index .Values "mariadb-galera" "config" "mariadbRootPassword" | b64enc | quote }} +--- +apiVersion: v1 +data: +{{ tpl (.Files.Glob "resources/config/aai_keystore").AsConfig . | indent 2 }} +metadata: + name: {{ .Release.Name}}-aai-keystore + namespace: {{ include "common.namespace" . }} +kind: Secret diff --git a/kubernetes/common/network-name-gen/values.yaml b/kubernetes/common/network-name-gen/values.yaml index b40ac91cbc..67ba1ce274 100644 --- a/kubernetes/common/network-name-gen/values.yaml +++ b/kubernetes/common/network-name-gen/values.yaml @@ -61,14 +61,15 @@ pullPolicy: IfNotPresent config: dbUrl: jdbc:mysql://nengdb:3306/nengdb springProfile: live - polClientAuth: TBD - polBasicAuth: TBD - polUrl: TBD + polClientAuth: cHl0aG9uOnRlc3Q= + polBasicAuth: dGVzdHBkcDphbHBoYTEyMw== + polUrl: https://pdp:8081/pdp/api/getConfig polEnv: TEST polReqId: xx - aaiCertPass: TBD - aaiCertPath: TBD - aaiUri: TBD + aaiCertPass: changeit + aaiCertPath: /opt/etc/config/aai_keystore + aaiAuth: QUFJOkFBSQ== + aaiUri: https://aai:8443/aai/v14/ # default number of instances replicaCount: 1 diff --git a/kubernetes/common/pgpool/templates/configmap.yaml b/kubernetes/common/pgpool/templates/configmap.yaml deleted file mode 100755 index cc20b42581..0000000000 --- a/kubernetes/common/pgpool/templates/configmap.yaml +++ /dev/null @@ -1,12 +0,0 @@ -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ .Release.Name }}-pgpool-configmap - namespace: {{ include "common.namespace" . }} - labels: - app: {{ include "common.name" . }} - chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} -data: -{{ tpl (.Files.Glob "configs/*").AsConfig . | indent 2 }} diff --git a/kubernetes/common/pgpool/templates/service.yaml b/kubernetes/common/pgpool/templates/service.yaml deleted file mode 100644 index 0811fda593..0000000000 --- a/kubernetes/common/pgpool/templates/service.yaml +++ /dev/null @@ -1,14 +0,0 @@ -kind: "Service" -apiVersion: "v1" -metadata: - name: "pgpool" - labels: - name: "pgpool" -spec: - ports: - - protocol: "TCP" - port: 5432 - targetPort: 5432 - selector: - name: "pgpool" - type: ClusterIP diff --git a/kubernetes/common/pgpool/Chart.yaml b/kubernetes/common/postgres/charts/pgpool/Chart.yaml index b57e72a6ee..b57e72a6ee 100644 --- a/kubernetes/common/pgpool/Chart.yaml +++ b/kubernetes/common/postgres/charts/pgpool/Chart.yaml diff --git a/kubernetes/common/pgpool/configs/pgpool.conf b/kubernetes/common/postgres/charts/pgpool/configs/pgpool.conf index 9dd979ac6b..f335174f40 100644 --- a/kubernetes/common/pgpool/configs/pgpool.conf +++ b/kubernetes/common/postgres/charts/pgpool/configs/pgpool.conf @@ -52,12 +52,12 @@ pcp_socket_dir = '/tmp' # - Backend Connection Settings - -backend_hostname0 = '{{.Values.container.primary}}' +backend_hostname0 = '{{.Values.container.name.primary}}' backend_port0 = 5432 backend_weight0= 1 backend_flag0= 'DISALLOW_TO_FAILOVER' -backend_hostname1 = '{{.Values.container.replica}}' +backend_hostname1 = '{{.Values.container.name.replica}}' backend_port1 = 5432 backend_weight1= 1 backend_flag1= 'DISALLOW_TO_FAILOVER' @@ -259,7 +259,7 @@ failover_if_affected_tuples_mismatch = off # LOAD BALANCING MODE #------------------------------------------------------------------------------ -load_balance_mode = off +load_balance_mode = on # Activate load balancing mode # (change requires restart) ignore_leading_white_space = on @@ -358,7 +358,7 @@ health_check_period = 20 health_check_timeout = 10 # Health check timeout # 0 means no timeout -health_check_user = '{{.Values.credentials.pguser}}' +health_check_user = '{{.Values.credentials.pgusername}}' # Health check user health_check_password = '{{.Values.credentials.pgpassword}}' # Password for health check user @@ -419,7 +419,7 @@ search_primary_node_timeout = 10 # ONLINE RECOVERY #------------------------------------------------------------------------------ -recovery_user = '{{.Values.credentials.pguser}}' +recovery_user = '{{.Values.credentials.pgusername}}' # Online recovery user recovery_password = '{{.Values.credentials.pgpassword}}' # Online recovery password diff --git a/kubernetes/common/pgpool/configs/pool_hba.conf b/kubernetes/common/postgres/charts/pgpool/configs/pool_hba.conf index d8918409e8..d8918409e8 100644 --- a/kubernetes/common/pgpool/configs/pool_hba.conf +++ b/kubernetes/common/postgres/charts/pgpool/configs/pool_hba.conf diff --git a/kubernetes/common/pgpool/configs/pool_passwd b/kubernetes/common/postgres/charts/pgpool/configs/pool_passwd index d8e09a2afa..3636d1de74 100644 --- a/kubernetes/common/pgpool/configs/pool_passwd +++ b/kubernetes/common/postgres/charts/pgpool/configs/pool_passwd @@ -1 +1,2 @@ testuser:md599e8713364988502fa6189781bcf648f +postgres:md53175bce1d3201d16594cebf9d7eb3f9d diff --git a/kubernetes/common/pgpool/requirements.yaml b/kubernetes/common/postgres/charts/pgpool/requirements.yaml index 9f44c6df28..9f44c6df28 100644 --- a/kubernetes/common/pgpool/requirements.yaml +++ b/kubernetes/common/postgres/charts/pgpool/requirements.yaml diff --git a/kubernetes/common/pgpool/values.yaml b/kubernetes/common/postgres/charts/pgpool/templates/configmap.yaml index 8e7474203d..10ebd7fd7f 100644..100755 --- a/kubernetes/common/pgpool/values.yaml +++ b/kubernetes/common/postgres/charts/pgpool/templates/configmap.yaml @@ -1,4 +1,4 @@ -# Copyright © 2018 Amdocs, AT&T, Bell Canada +# Copyright © 2017 Amdocs, Bell Canada # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,17 +12,15 @@ # See the License for the specific language governing permissions and # limitations under the License. -name: pgpool -container: - port: 5432 - name: - primary: pgset-primary - replica: pgset-replica -credentials: - pgusername: testuser - pgpassword: password -serviceType: ClusterIP -image: - repository: crunchydata - container: crunchy-pgpool - tag: centos7-10.4-2.0.0 +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ .Release.Name }}-pgpool-configmap + namespace: {{ include "common.namespace" . }} + labels: + app: {{ include "common.name" . }} + chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +data: +{{ tpl (.Files.Glob "configs/*").AsConfig . | indent 2 }} diff --git a/kubernetes/common/pgpool/templates/deployment.yaml b/kubernetes/common/postgres/charts/pgpool/templates/deployment.yaml index f598409848..a05bed4b5f 100644 --- a/kubernetes/common/pgpool/templates/deployment.yaml +++ b/kubernetes/common/postgres/charts/pgpool/templates/deployment.yaml @@ -32,8 +32,9 @@ spec: release: {{ .Release.Name }} spec: containers: - - name: pgpool - image: "{{.Values.image.repository}}/{{.Values.image.container}}:{{.Values.image.tag}}" + - image: "{{.Values.repository}}/{{.Values.image}}" + imagePullPolicy: {{ .Values.pullPolicy | default .Values.global.pullPolicy }} + name: {{ include "common.name" . }} env: - name: PG_PRIMARY_SERVICE_NAME value: {{.Values.container.name.primary}} diff --git a/kubernetes/common/postgres/charts/pgpool/templates/service.yaml b/kubernetes/common/postgres/charts/pgpool/templates/service.yaml new file mode 100644 index 0000000000..86442a2740 --- /dev/null +++ b/kubernetes/common/postgres/charts/pgpool/templates/service.yaml @@ -0,0 +1,26 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{ .Values.service.name }} + namespace: {{ include "common.namespace" . }} + labels: + app: {{ include "common.name" . }} + chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} + annotations: +spec: + type: {{ .Values.service.type }} + ports: + {{if eq .Values.service.type "NodePort" -}} + - port: {{ .Values.service.externalPort }} + nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort }} + name: {{ .Values.service.name }} + {{- else -}} + - port: {{ .Values.service.externalPort }} + targetPort: {{ .Values.service.internalPort }} + name: {{ .Values.service.name }} + {{- end}} + selector: + app: {{ include "common.name" . }} + release: {{ .Release.Name }} diff --git a/kubernetes/common/postgres/charts/pgpool/values.yaml b/kubernetes/common/postgres/charts/pgpool/values.yaml new file mode 100644 index 0000000000..cb732b7cd7 --- /dev/null +++ b/kubernetes/common/postgres/charts/pgpool/values.yaml @@ -0,0 +1,44 @@ +# Copyright © 2018 Amdocs, AT&T, Bell Canada +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +################################################################# +# Global configuration defaults. +################################################################# +global: + nodePortPrefix: 302 + persistence: {} + readinessRepository: oomk8s + readinessImage: readiness-check:2.0.0 + +################################################################# +# Application configuration defaults. +################################################################# +# application image +repository: crunchydata +image: crunchy-pgpool:centos7-10.4-2.0.0 +pullPolicy: Always + +container: + port: 5432 + name: + primary: pgset-primary + replica: pgset-replica +credentials: + pgusername: testuser + pgpassword: password +service: + name: pgpool + type: ClusterIP + externalPort: 5432 + internalPort: 5432 |