From c61b5b73675db6c27e3f65ce6445522ab6433b8a Mon Sep 17 00:00:00 2001 From: Miguel de Barros Date: Fri, 20 Apr 2018 10:11:05 +0200 Subject: [PATCH] #159 Update CI/CD for k8s-london for helm charts #45 (#46) * Fixed AWS config (#25): https://github.com/mojaloop/helm/issues/24 * Fixed update script ordering. (#27) * Sync'd central-config.yml with central/values.yml (#29) * Fixed update script ordering. * Sync'd config-central.yaml to match central/values.yaml * Feature/#60 automate the cd pipeline for central ledger (#34) * Fixed AWS config (#25): https://github.com/mojaloop/helm/issues/24 (#26) * Fixed update script ordering. (#27) * Develop (#30) * added initial configs for central dev and prod deployments * Added a new chart called "mojaloop" which deploys all components for the mojaloop switch. * Feature/#60 automate the cd pipeline for central ledger (#36) * added initial configs for central dev and prod deployments * Added a new chart called "mojaloop" which deploys all components for the mojaloop switch. * Updated ingress for prod deployment * Updated Ingress Host Names * updated dev config for all tags to point to 'snapshot' instead of 'latst' * updated dev config for all tags to point to 'snapshot' instead of 'latst' * updated centralledger chart to v0.2.0 (#43) * updated centralledger chart to v0.2.0 Changes made: - added mysql dep on centralledger, and associated configurations for either postgres or mysql - changed centralledger config to use value for the knex config - removed AWS values (not needed) - removed values in the root folder. Rather use the value.yaml in each chart folder, which is easier to maintain. * Bumbped chart versions impacted by centralledger update to 0.2.0 to match the same version * Bumbped chart versions impacted by centralledger update to 0.2.0 to match the same version For previous commit: Added db_type and db_driver under the config values for CentralLedger. This will allow us to switch between postgresql and mysql. Note the mysql deployment has not been tested since we do not have working backend code to fully support this yet. * #159 Update CI/CD for k8s-london for helm charts (#45) * Published Helm repo from the develop branch * Bugfix/mock pathfinder port names too long (#11) * Fixed typo in readme.md * Fixed port name for mock pathfinder. Name was longer then 15 characters. * Published bug fix * Fixed to published repo (#15) * Develop (#12) * Initial Helm Commit (#1) 1. Added Helm charts for: - Central Directory - Central End User Registry - Central Ledger - Central Hub - Central KMS - Mock Pathfinder - Forensic Logging Sidecar - Central - Ingress Nginx 2. Updated documentation: - readme.md 3. Added helper scripts: - deploy-central.sh - deploy-ingress.sh - clean.sh - update-charts-dep.sh 4. Added global configs: - config-central.sh - config-ingress.sh 5. Added how to deploy mojaloop to a local minikube k8s environment to readme.md * updated typos (#3) * Bugfix/readme improvements (#4) * Fixed typo in readme for updating dependencies * Added local dev guide * Feature/adding external service (#7) * Several feature updates, bug and typo fixes 1. Removed duplicate central-directory references 2. Removed duplicate central-kms references 3. Cleanred up values.yaml 4. Added external hikacking service capability for all k8s services. This will allow for easier local development. 5. Updated readme.md, and moved development guide into https://github.com/mojaloop/mojaloop * added package.sh to assist in indexing and creating a helm repo * updated README.MD to include instructions on how to use the helm repo for mojaloop * Fixed typo in readme.md * Fixed port name for mock pathfinder. Name was longer then 15 characters. (#10) * Develop (#14) * Initial Helm Commit (#1) 1. Added Helm charts for: - Central Directory - Central End User Registry - Central Ledger - Central Hub - Central KMS - Mock Pathfinder - Forensic Logging Sidecar - Central - Ingress Nginx 2. Updated documentation: - readme.md 3. Added helper scripts: - deploy-central.sh - deploy-ingress.sh - clean.sh - update-charts-dep.sh 4. Added global configs: - config-central.sh - config-ingress.sh 5. Added how to deploy mojaloop to a local minikube k8s environment to readme.md * updated typos (#3) * Bugfix/readme improvements (#4) * Fixed typo in readme for updating dependencies * Added local dev guide * Feature/adding external service (#7) * Several feature updates, bug and typo fixes 1. Removed duplicate central-directory references 2. Removed duplicate central-kms references 3. Cleanred up values.yaml 4. Added external hikacking service capability for all k8s services. This will allow for easier local development. 5. Updated readme.md, and moved development guide into https://github.com/mojaloop/mojaloop * added package.sh to assist in indexing and creating a helm repo * updated README.MD to include instructions on how to use the helm repo for mojaloop * Fixed typo in readme.md * Fixed port name for mock pathfinder. Name was longer then 15 characters. (#10) * Several updates: (#13) Several updates * Published master changes * Publishing latest charts * publishing to repo * Publishing fixes * Updated deployments * added pod affinity, nodeSelector and tollarations * Updates requirements to relfect v0.1.1 version * Fixed issue on tolerations from {} to [] * Fixed tolerations in centralledger * Feature/#76 implementa poc for stream processing pattern (#38) * Feature/#60 automate the cd pipeline for central ledger (#36) * added initial configs for central dev and prod deployments * Added a new chart called "mojaloop" which deploys all components for the mojaloop switch. * Updated ingress for prod deployment * Updated Ingress Host Names * updated dev config for all tags to point to 'snapshot' instead of 'latst' * updated dev config for all tags to point to 'snapshot' instead of 'latst' * added pod affinity, nodeSelector and tollarations * Updates requirements to relfect v0.1.1 version * Fixed issue on tolerations from {} to [] * Fixed tolerations in centralledger * Published v1.1 * Updated the templates to cater for external DBs * Fixed circleci typo * Updated versions for impacted chats * publishing v0.1.2 of chats * fixed issue with central-ledger secret config * fixed issue with centralledger secret * updated config to use correct URI for api and admin hosts * Updated deployment to show proper host for centralledger * Fixed issue https://github.com/mojaloop/helm/issues/41 * Fixed https://github.com/mojaloop/helm/issues/41 * sperated the ingress for admin and api * Seperated the ingress for admin and api * removing repo * Bumped all versions to 2.0 * realignment fixes * fixed config file * Merge/developintomaster (#47) * Develop (#44) * Fixed AWS config (#25): https://github.com/mojaloop/helm/issues/24 * Fixed update script ordering. (#27) * Sync'd central-config.yml with central/values.yml (#29) * Fixed update script ordering. * Sync'd config-central.yaml to match central/values.yaml * Feature/#60 automate the cd pipeline for central ledger (#34) * Fixed AWS config (#25): https://github.com/mojaloop/helm/issues/24 (#26) * Fixed update script ordering. (#27) * Develop (#30) * added initial configs for central dev and prod deployments * Added a new chart called "mojaloop" which deploys all components for the mojaloop switch. * Feature/#60 automate the cd pipeline for central ledger (#36) * added initial configs for central dev and prod deployments * Added a new chart called "mojaloop" which deploys all components for the mojaloop switch. * Updated ingress for prod deployment * Updated Ingress Host Names * updated dev config for all tags to point to 'snapshot' instead of 'latst' * updated dev config for all tags to point to 'snapshot' instead of 'latst' * updated centralledger chart to v0.2.0 (#43) * updated centralledger chart to v0.2.0 Changes made: - added mysql dep on centralledger, and associated configurations for either postgres or mysql - changed centralledger config to use value for the knex config - removed AWS values (not needed) - removed values in the root folder. Rather use the value.yaml in each chart folder, which is easier to maintain. * Bumbped chart versions impacted by centralledger update to 0.2.0 to match the same version * Bumbped chart versions impacted by centralledger update to 0.2.0 to match the same version For previous commit: Added db_type and db_driver under the config values for CentralLedger. This will allow us to switch between postgresql and mysql. Note the mysql deployment has not been tested since we do not have working backend code to fully support this yet. * removed 'type: http' from the centrslledger values which is unused. * Removed 'type: http' from centralledger values in central and centralHub charts as these are not used. --- central/requirements.yaml | 2 +- central/values.yaml | 23 +++++++++-- centraldirectory/Chart.yaml | 2 +- centraldirectory/requirements.yaml | 6 +-- centraldirectory/templates/deployment.yaml | 12 ++++++ centraldirectory/values.yaml | 17 +++++++++ centralenduserregistry/Chart.yaml | 2 +- centralenduserregistry/requirements.yaml | 2 +- .../templates/deployment.yaml | 12 ++++++ centralenduserregistry/values.yaml | 18 +++++++++ centralhub/templates/deployment.yaml | 12 ++++++ centralhub/values.yaml | 24 ++++++++++-- centralkms/Chart.yaml | 2 +- centralkms/requirements.yaml | 2 +- centralkms/templates/deployment.yaml | 12 ++++++ centralkms/values.yaml | 17 +++++++++ centralledger/requirements.yaml | 6 +-- centralledger/templates/deployment.yaml | 38 +++++++------------ centralledger/values.yaml | 30 ++++++++++++--- forensicloggingsidecar/Chart.yaml | 2 +- forensicloggingsidecar/requirements.yaml | 4 +- .../templates/deployment.yaml | 12 ++++++ forensicloggingsidecar/values.yaml | 18 +++++++++ mockpathfinder/Chart.yaml | 2 +- mockpathfinder/requirements.yaml | 2 +- mockpathfinder/templates/deployment.yaml | 12 ++++++ mockpathfinder/values.yaml | 18 +++++++++ mojaloop/values.yaml | 23 +++++++++-- 28 files changed, 273 insertions(+), 59 deletions(-) diff --git a/central/requirements.yaml b/central/requirements.yaml index cfd4cf411..186b35bd9 100644 --- a/central/requirements.yaml +++ b/central/requirements.yaml @@ -5,6 +5,6 @@ dependencies: repository: "file://../centralhub" condition: centralhub.enabled - name: centraldirectory - version: 0.1.0 + version: 0.2.0 repository: "file://../centraldirectory" condition: centraldirectory.enabled diff --git a/central/values.yaml b/central/values.yaml index 44c0e490f..613ee3f39 100644 --- a/central/values.yaml +++ b/central/values.yaml @@ -1,5 +1,21 @@ # Default values for central. # This is a YAML-formatted file. +# Declare global configurations +global: + config: + ## Pod scheduling preferences. + ## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity + ## + affinity: {} + + ## Node labels for pod assignment + ## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#nodeselector + nodeSelector: {} + + ## Set toleration for schedular + ## ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ + tolerations: [] + # Declare variables to be passed into your templates. centralhub: @@ -219,7 +235,6 @@ centralhub: ingress: enabled: true - type: http externalPath: api: / admin: /admin/ @@ -542,8 +557,8 @@ centralhub: ## Uncomment to create a database user ## - mysqlUser: test - mysqlPassword: test + mysqlUser: central_ledger + mysqlPassword: oyMxgZChuu ## Allow unauthenticated access, uncomment to enable ## @@ -551,7 +566,7 @@ centralhub: ## Uncomment to Create a database ## - mysqlDatabase: test + mysqlDatabase: central_ledger ## hosts to allow root user access from # set to "127.0.0.1" to deny remote root. diff --git a/centraldirectory/Chart.yaml b/centraldirectory/Chart.yaml index b7aeac050..93587d055 100644 --- a/centraldirectory/Chart.yaml +++ b/centraldirectory/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: v1 description: Central-Directory Helm chart for Kubernetes name: centraldirectory -version: 0.1.0 +version: 0.2.0 home: http://mojaloop.io icon: http://mojaloop.io/images/logo.png sources: diff --git a/centraldirectory/requirements.yaml b/centraldirectory/requirements.yaml index ee38bc439..2ca46de12 100644 --- a/centraldirectory/requirements.yaml +++ b/centraldirectory/requirements.yaml @@ -1,14 +1,14 @@ # requirements.yaml dependencies: - name: centralenduserregistry - version: 0.1.0 + version: 0.2.0 repository: "file://../centralenduserregistry" condition: centralenduserregistry.enabled - name: mockpathfinder - version: 0.1.0 + version: 0.2.0 repository: "file://../mockpathfinder" condition: mockpathfinder.enabled - name: postgresql - version: 0.8.4 + version: 0.9.1 repository: https://kubernetes-charts.storage.googleapis.com/ condition: postgresql.enabled diff --git a/centraldirectory/templates/deployment.yaml b/centraldirectory/templates/deployment.yaml index bc6ad84fe..0abac9bfe 100644 --- a/centraldirectory/templates/deployment.yaml +++ b/centraldirectory/templates/deployment.yaml @@ -15,6 +15,18 @@ spec: release: {{ .Release.Name }} heritage: {{ .Release.Service }} spec: +{{- if .Values.global.config.affinity }} + affinity: +{{ toYaml .Values.global.config.affinity | indent 8 }} +{{- end }} +{{- if .Values.global.config.nodeSelector }} + nodeSelector: +{{ toYaml .Values.global.config.nodeSelector | indent 8 }} +{{- end }} +{{- if .Values.global.config.tolerations }} + tolerations: +{{ toYaml .Values.global.config.tolerations | indent 8 }} +{{- end }} {{- if .Values.init.enabled }} initContainers: - name: wait-for-postgres diff --git a/centraldirectory/values.yaml b/centraldirectory/values.yaml index cb21f48c9..3df442935 100644 --- a/centraldirectory/values.yaml +++ b/centraldirectory/values.yaml @@ -1,5 +1,22 @@ # Default values for central-directory. # This is a YAML-formatted file. + +# Declare global configurations +global: + config: + ## Pod scheduling preferences. + ## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity + ## + affinity: {} + + ## Node labels for pod assignment + ## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#nodeselector + nodeSelector: {} + + ## Set toleration for schedular + ## ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ + tolerations: [] + # Declare variables to be passed into your templates. replicaCount: 1 image: diff --git a/centralenduserregistry/Chart.yaml b/centralenduserregistry/Chart.yaml index 4bb5a3686..67e698856 100644 --- a/centralenduserregistry/Chart.yaml +++ b/centralenduserregistry/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: v1 description: Central-End-User-Registry Helm chart for Kubernetes name: centralenduserregistry -version: 0.1.0 +version: 0.2.0 home: http://mojaloop.io icon: http://mojaloop.io/images/logo.png sources: diff --git a/centralenduserregistry/requirements.yaml b/centralenduserregistry/requirements.yaml index 6847de087..e0c3e6d9c 100644 --- a/centralenduserregistry/requirements.yaml +++ b/centralenduserregistry/requirements.yaml @@ -1,6 +1,6 @@ # requirements.yaml dependencies: - name: postgresql - version: 0.8.4 + version: 0.9.1 repository: https://kubernetes-charts.storage.googleapis.com/ condition: postgresql.enabled diff --git a/centralenduserregistry/templates/deployment.yaml b/centralenduserregistry/templates/deployment.yaml index 2ed6edada..b8d311f8e 100644 --- a/centralenduserregistry/templates/deployment.yaml +++ b/centralenduserregistry/templates/deployment.yaml @@ -15,6 +15,18 @@ spec: release: {{ .Release.Name }} heritage: {{ .Release.Service }} spec: +{{- if .Values.global.config.affinity }} + affinity: +{{ toYaml .Values.global.config.affinity | indent 8 }} +{{- end }} +{{- if .Values.global.config.nodeSelector }} + nodeSelector: +{{ toYaml .Values.global.config.nodeSelector | indent 8 }} +{{- end }} +{{- if .Values.global.config.tolerations }} + tolerations: +{{ toYaml .Values.global.config.tolerations | indent 8 }} +{{- end }} {{- if .Values.init.enabled }} initContainers: - name: wait-for-postgres diff --git a/centralenduserregistry/values.yaml b/centralenduserregistry/values.yaml index e18dfda4f..9f23a602f 100644 --- a/centralenduserregistry/values.yaml +++ b/centralenduserregistry/values.yaml @@ -1,6 +1,24 @@ # Default values for central-end-user-registry. # This is a YAML-formatted file. + +# Declare global configurations +global: + config: + ## Pod scheduling preferences. + ## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity + ## + affinity: {} + + ## Node labels for pod assignment + ## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#nodeselector + nodeSelector: {} + + ## Set toleration for schedular + ## ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ + tolerations: [] + # Declare variables to be passed into your templates. + replicaCount: 1 image: repository: mojaloop/central-end-user-registry diff --git a/centralhub/templates/deployment.yaml b/centralhub/templates/deployment.yaml index e06525336..34115a4d8 100644 --- a/centralhub/templates/deployment.yaml +++ b/centralhub/templates/deployment.yaml @@ -17,6 +17,18 @@ spec: release: {{ .Release.Name }} heritage: {{ .Release.Service }} spec: +{{- if .Values.global.config.affinity }} + affinity: +{{ toYaml .Values.global.config.affinity | indent 8 }} +{{- end }} +{{- if .Values.global.config.nodeSelector }} + nodeSelector: +{{ toYaml .Values.global.config.nodeSelector | indent 8 }} +{{- end }} +{{- if .Values.global.config.tolerations }} + tolerations: +{{ toYaml .Values.global.config.tolerations | indent 8 }} +{{- end }} containers: - name: {{ .Chart.Name }} image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" diff --git a/centralhub/values.yaml b/centralhub/values.yaml index 71c6e9896..fae7a7619 100644 --- a/centralhub/values.yaml +++ b/centralhub/values.yaml @@ -1,5 +1,22 @@ # Default values for central-kms. # This is a YAML-formatted file. + +# Declare global configurations +global: + config: + ## Pod scheduling preferences. + ## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity + ## + affinity: {} + + ## Node labels for pod assignment + ## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#nodeselector + nodeSelector: {} + + ## Set toleration for schedular + ## ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ + tolerations: [] + # Declare variables to be passed into your templates. replicaCount: 1 @@ -216,7 +233,6 @@ centralledger: ingress: enabled: true - type: http externalPath: api: / admin: /admin/ @@ -539,8 +555,8 @@ centralledger: ## Uncomment to create a database user ## - mysqlUser: test - mysqlPassword: test + mysqlUser: central_ledger + mysqlPassword: oyMxgZChuu ## Allow unauthenticated access, uncomment to enable ## @@ -548,7 +564,7 @@ centralledger: ## Uncomment to Create a database ## - mysqlDatabase: test + mysqlDatabase: central_ledger ## hosts to allow root user access from # set to "127.0.0.1" to deny remote root. diff --git a/centralkms/Chart.yaml b/centralkms/Chart.yaml index 2fa786b4d..796069e2d 100644 --- a/centralkms/Chart.yaml +++ b/centralkms/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: v1 description: Central-KMS Helm chart for Kubernetes name: centralkms -version: 0.1.0 +version: 0.2.0 home: http://mojaloop.io icon: http://mojaloop.io/images/logo.png sources: diff --git a/centralkms/requirements.yaml b/centralkms/requirements.yaml index 6847de087..e0c3e6d9c 100644 --- a/centralkms/requirements.yaml +++ b/centralkms/requirements.yaml @@ -1,6 +1,6 @@ # requirements.yaml dependencies: - name: postgresql - version: 0.8.4 + version: 0.9.1 repository: https://kubernetes-charts.storage.googleapis.com/ condition: postgresql.enabled diff --git a/centralkms/templates/deployment.yaml b/centralkms/templates/deployment.yaml index b6d1e7248..f68362ed5 100644 --- a/centralkms/templates/deployment.yaml +++ b/centralkms/templates/deployment.yaml @@ -18,6 +18,18 @@ spec: release: {{ .Release.Name }} heritage: {{ .Release.Service }} spec: +{{- if .Values.global.config.affinity }} + affinity: +{{ toYaml .Values.global.config.affinity | indent 8 }} +{{- end }} +{{- if .Values.global.config.nodeSelector }} + nodeSelector: +{{ toYaml .Values.global.config.nodeSelector | indent 8 }} +{{- end }} +{{- if .Values.global.config.tolerations }} + tolerations: +{{ toYaml .Values.global.config.tolerations | indent 8 }} +{{- end }} initContainers: - name: wait-for-postgres image: bowerswilkins/awaitpostgres diff --git a/centralkms/values.yaml b/centralkms/values.yaml index dcdec5fbe..27249f9af 100644 --- a/centralkms/values.yaml +++ b/centralkms/values.yaml @@ -1,5 +1,22 @@ # Default values for central-kms. # This is a YAML-formatted file. + +# Declare global configurations +global: + config: + ## Pod scheduling preferences. + ## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity + ## + affinity: {} + + ## Node labels for pod assignment + ## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#nodeselector + nodeSelector: {} + + ## Set toleration for schedular + ## ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ + tolerations: {} + # Declare variables to be passed into your templates. replicaCount: 1 diff --git a/centralledger/requirements.yaml b/centralledger/requirements.yaml index 64e0ef5d8..6b6083296 100644 --- a/centralledger/requirements.yaml +++ b/centralledger/requirements.yaml @@ -1,12 +1,12 @@ # requirements.yaml dependencies: - name: forensicloggingsidecar - version: 0.1.0 + version: 0.2.0 repository: "file://../forensicloggingsidecar" condition: forensicloggingsidecar.enabled - name: postgresql - version: 0.8.4 - repository: https://kubernetes-charts.storage.googleapis.com + version: 0.9.1 + repository: https://kubernetes-charts.storage.googleapis.com/ condition: postgresql.enabled - name: percona-xtradb-cluster version: 0.1.4 diff --git a/centralledger/templates/deployment.yaml b/centralledger/templates/deployment.yaml index d6c4fd24f..077b47b1c 100644 --- a/centralledger/templates/deployment.yaml +++ b/centralledger/templates/deployment.yaml @@ -15,6 +15,18 @@ spec: release: {{ .Release.Name }} heritage: {{ .Release.Service }} spec: +{{- if .Values.global.config.affinity }} + affinity: +{{ toYaml .Values.global.config.affinity | indent 8 }} +{{- end }} +{{- if .Values.global.config.nodeSelector }} + nodeSelector: +{{ toYaml .Values.global.config.nodeSelector | indent 8 }} +{{- end }} +{{- if .Values.global.config.tolerations }} + tolerations: +{{ toYaml .Values.global.config.tolerations | indent 8 }} +{{- end }} {{- if .Values.init.enabled }} {{- if eq .Values.config.db_type "postgres"}} initContainers: @@ -52,24 +64,12 @@ spec: initialDelaySeconds: {{ .Values.containers.api.livenessProbe.initialDelaySeconds }} periodSeconds: {{ .Values.containers.api.livenessProbe.periodSeconds }} {{- end }} - # securityContext: - # capabilities: - # add: - # - NET_ADMIN - # envFrom: - # - configMapRef: - # name: central-ledger-config-env env: - name: CLEDG_PORT valueFrom: configMapKeyRef: name: {{ template "centralledger.fullname" . }} key: server.port - # - name: CLEDG_ADMIN_PORT - # valueFrom: - # configMapKeyRef: - # name: central-ledger-config - # key: admin.port - name: CLEDG_HOSTNAME valueFrom: configMapKeyRef: @@ -108,29 +108,17 @@ spec: initialDelaySeconds: {{ .Values.containers.admin.livenessProbe.initialDelaySeconds }} periodSeconds: {{ .Values.containers.admin.livenessProbe.periodSeconds }} {{- end }} - # securityContext: - # capabilities: - # add: - # - NET_ADMIN - # envFrom: - # - configMapRef: - # name: central-ledger-config-env env: - name: CLEDG_ADMIN_PORT valueFrom: configMapKeyRef: name: {{ template "centralledger.fullname" . }} key: admin.port - # - name: CLEDG_ADMIN_PORT - # valueFrom: - # configMapKeyRef: - # name: central-ledger-config - # key: admin.port - name: CLEDG_HOSTNAME valueFrom: configMapKeyRef: name: {{ template "centralledger.fullname" . }} - key: server.host + key: admin.host - name: CLEDG_DATABASE_URI valueFrom: secretKeyRef: diff --git a/centralledger/values.yaml b/centralledger/values.yaml index fb49aee0b..d033610a5 100644 --- a/centralledger/values.yaml +++ b/centralledger/values.yaml @@ -1,6 +1,24 @@ # Default values for central-ledger. # This is a YAML-formatted file. + +# Declare global configurations +global: + config: + ## Pod scheduling preferences. + ## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity + ## + affinity: {} + + ## Node labels for pod assignment + ## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#nodeselector + nodeSelector: {} + + ## Set toleration for schedular + ## ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ + tolerations: [] + # Declare variables to be passed into your templates. + replicaCount: 1 containers: api: @@ -131,7 +149,7 @@ ingress: type: http externalPath: api: / - admin: /admin/ + admin: /admin # Used to create an Ingress record. hosts: api: central-ledger.local @@ -340,7 +358,9 @@ forensicloggingsidecar: externalIPs: [] postgresql: - enabled: true + enabled: true + ## includeReleaseInName: If you are using an external DB, make sure this is set to 'false' + includeReleaseInName: true nameOverride: "centralledger-postgresql" ## postgres image repository image: "postgres" @@ -451,8 +471,8 @@ mysql: ## Uncomment to create a database user ## - mysqlUser: test - mysqlPassword: test + mysqlUser: central_ledger + mysqlPassword: oyMxgZChuu ## Allow unauthenticated access, uncomment to enable ## @@ -460,7 +480,7 @@ mysql: ## Uncomment to Create a database ## - mysqlDatabase: test + mysqlDatabase: central_ledger ## hosts to allow root user access from # set to "127.0.0.1" to deny remote root. diff --git a/forensicloggingsidecar/Chart.yaml b/forensicloggingsidecar/Chart.yaml index d721ce0c9..b495f5d05 100644 --- a/forensicloggingsidecar/Chart.yaml +++ b/forensicloggingsidecar/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: v1 description: Forensic Logging Sidecar Helm chart for Kubernetes name: forensicloggingsidecar -version: 0.1.0 +version: 0.2.0 home: http://mojaloop.io icon: http://mojaloop.io/images/logo.png sources: diff --git a/forensicloggingsidecar/requirements.yaml b/forensicloggingsidecar/requirements.yaml index 37fba6043..70a0a2a37 100644 --- a/forensicloggingsidecar/requirements.yaml +++ b/forensicloggingsidecar/requirements.yaml @@ -1,10 +1,10 @@ # requirements.yaml dependencies: - name: centralkms - version: 0.1.0 + version: 0.2.0 repository: "file://../centralkms" condition: centralkms.enabled - name: postgresql - version: 0.8.4 + version: 0.9.1 repository: https://kubernetes-charts.storage.googleapis.com/ condition: postgresql.enabled diff --git a/forensicloggingsidecar/templates/deployment.yaml b/forensicloggingsidecar/templates/deployment.yaml index fc20db387..cf512b437 100644 --- a/forensicloggingsidecar/templates/deployment.yaml +++ b/forensicloggingsidecar/templates/deployment.yaml @@ -15,6 +15,18 @@ spec: release: {{ .Release.Name }} heritage: {{ .Release.Service }} spec: +{{- if .Values.global.config.affinity }} + affinity: +{{ toYaml .Values.global.config.affinity | indent 8 }} +{{- end }} +{{- if .Values.global.config.nodeSelector }} + nodeSelector: +{{ toYaml .Values.global.config.nodeSelector | indent 8 }} +{{- end }} +{{- if .Values.global.config.tolerations }} + tolerations: +{{ toYaml .Values.global.config.tolerations | indent 8 }} +{{- end }} initContainers: - name: wait-for-postgres image: bowerswilkins/awaitpostgres diff --git a/forensicloggingsidecar/values.yaml b/forensicloggingsidecar/values.yaml index 5e138d812..502b95531 100644 --- a/forensicloggingsidecar/values.yaml +++ b/forensicloggingsidecar/values.yaml @@ -1,6 +1,24 @@ # Default values for forensic-logging-sidecar. # This is a YAML-formatted file. + +# Declare global configurations +global: + config: + ## Pod scheduling preferences. + ## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity + ## + affinity: {} + + ## Node labels for pod assignment + ## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#nodeselector + nodeSelector: {} + + ## Set toleration for schedular + ## ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ + tolerations: [] + # Declare variables to be passed into your templates. + replicaCount: 1 image: repository: mojaloop/forensic-logging-sidecar diff --git a/mockpathfinder/Chart.yaml b/mockpathfinder/Chart.yaml index c474baa44..8d8086c98 100644 --- a/mockpathfinder/Chart.yaml +++ b/mockpathfinder/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: v1 description: Mock-Pathfinder Helm chart for Kubernetes name: mockpathfinder -version: 0.1.0 +version: 0.2.0 home: http://mojaloop.io icon: http://mojaloop.io/images/logo.png sources: diff --git a/mockpathfinder/requirements.yaml b/mockpathfinder/requirements.yaml index 6847de087..e0c3e6d9c 100644 --- a/mockpathfinder/requirements.yaml +++ b/mockpathfinder/requirements.yaml @@ -1,6 +1,6 @@ # requirements.yaml dependencies: - name: postgresql - version: 0.8.4 + version: 0.9.1 repository: https://kubernetes-charts.storage.googleapis.com/ condition: postgresql.enabled diff --git a/mockpathfinder/templates/deployment.yaml b/mockpathfinder/templates/deployment.yaml index 46ab8859e..55e00a330 100644 --- a/mockpathfinder/templates/deployment.yaml +++ b/mockpathfinder/templates/deployment.yaml @@ -15,6 +15,18 @@ spec: release: {{ .Release.Name }} heritage: {{ .Release.Service }} spec: +{{- if .Values.global.config.affinity }} + affinity: +{{ toYaml .Values.global.config.affinity | indent 8 }} +{{- end }} +{{- if .Values.global.config.nodeSelector }} + nodeSelector: +{{ toYaml .Values.global.config.nodeSelector | indent 8 }} +{{- end }} +{{- if .Values.global.config.tolerations }} + tolerations: +{{ toYaml .Values.global.config.tolerations | indent 8 }} +{{- end }} initContainers: - name: wait-for-postgres image: bowerswilkins/awaitpostgres diff --git a/mockpathfinder/values.yaml b/mockpathfinder/values.yaml index e8bf143fe..491362414 100644 --- a/mockpathfinder/values.yaml +++ b/mockpathfinder/values.yaml @@ -1,6 +1,24 @@ # Default values for mockpathfinder. # This is a YAML-formatted file. + +# Declare global configurations +global: + config: + ## Pod scheduling preferences. + ## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity + ## + affinity: {} + + ## Node labels for pod assignment + ## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#nodeselector + nodeSelector: {} + + ## Set toleration for schedular + ## ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ + tolerations: [] + # Declare variables to be passed into your templates. + replicaCount: 1 image: repository: mojaloop/mock-pathfinder diff --git a/mojaloop/values.yaml b/mojaloop/values.yaml index b1787f40d..9c641091a 100644 --- a/mojaloop/values.yaml +++ b/mojaloop/values.yaml @@ -1,5 +1,21 @@ # Default values for central. # This is a YAML-formatted file. +# Declare global configurations +global: + config: + ## Pod scheduling preferences. + ## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity + ## + affinity: {} + + ## Node labels for pod assignment + ## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#nodeselector + nodeSelector: {} + + ## Set toleration for schedular + ## ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ + tolerations: [] + # Declare variables to be passed into your templates. central: @@ -220,7 +236,6 @@ central: ingress: enabled: true - type: http externalPath: api: / admin: /admin/ @@ -543,8 +558,8 @@ central: ## Uncomment to create a database user ## - mysqlUser: test - mysqlPassword: test + mysqlUser: central_ledger + mysqlPassword: oyMxgZChuu ## Allow unauthenticated access, uncomment to enable ## @@ -552,7 +567,7 @@ central: ## Uncomment to Create a database ## - mysqlDatabase: test + mysqlDatabase: central_ledger ## hosts to allow root user access from # set to "127.0.0.1" to deny remote root.