From cc90a6a242cf37d36bd9027581cc7aac04811c26 Mon Sep 17 00:00:00 2001 From: sfdevops Date: Tue, 24 Sep 2024 19:15:31 +0530 Subject: [PATCH] helm changes added --- .../templates/cm-tenant-mgmt-facade.yaml | 4 ---- .../templates/secret-provider-class-and-sa.yaml | 10 ++++++++++ .../templates/tenant-mgmt-facade-deployment.yaml | 10 ++++++++++ .../control-plane-helm-chart/values.yaml.template | 2 ++ terraform/control-plane-application/data.tf | 7 +++++++ terraform/control-plane-application/main.tf | 2 ++ 6 files changed, 31 insertions(+), 4 deletions(-) diff --git a/files/control-plane/control-plane-helm-chart/templates/cm-tenant-mgmt-facade.yaml b/files/control-plane/control-plane-helm-chart/templates/cm-tenant-mgmt-facade.yaml index 550c8c05..9efa02fe 100644 --- a/files/control-plane/control-plane-helm-chart/templates/cm-tenant-mgmt-facade.yaml +++ b/files/control-plane/control-plane-helm-chart/templates/cm-tenant-mgmt-facade.yaml @@ -20,8 +20,4 @@ data: GATEWAY_ACCOUNT_ID: '{{ .Values.tenantMgmtFacade.gateway_id }}' WEBHOOK_USERNAME: '{{ .Values.tenantMgmtFacade.webhook_user }}' WEBHOOK_PASSWORD: '{{ .Values.tenantMgmtFacade.webhook_password }}' -{{- if .Values.marketPlaceIntegration.enabled }} - PRIVATE_KEY: "MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQCrCbRoK1v1nj6RqPtcX7OBqcTGtod82lSgvKytCo6Pwb9CIv613VYazfKiXd2vj9XjIsJyw7zMpGSEv8dPq3X03LvOoxPiiqiJ0kBpHj8SvQyw1LEB7FBN8IQ3Vq4B6jgzFY8cNrHN+WgemXE4bAeCTLmzjtb+rXeANzydBnXKNlL9GjYbuvqVPP3Em4e2Mx2y1htWCGX6NjuelAMbe9HfA26+B4OjOhIVr1J89fIIPwkfwdZgXDTWiO9qU2m1HmP/KYiQztPveBL1qlY8kTKEZuCSHAtimkWoCQ324wjOhWkECocKvv9qY95vz4+sleGjnU0KQ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AKQE+gVQLP994IqKJaekMsvDs6VUSRhgv4nZWNk7JmTBQZfCfT7+LASUgNIbUv+so8qed1jWAjPknW7PjexM5OhyWCSIFmWxhuxS01JIEbCB3J8jecpVOirTS2MBJiaWNQtWGiW/ddfcrAKBvxaLwXUvjS8E=" - PUBLIC_KEY: "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAqwm0aCtb9Z4+kaj7XF+zganExraHfNpUoLysrQqOj8G/QiL+td1WGs3yol3dr4/V4yLCcsO8zKRkhL/HT6t19Ny7zqMT4oqoidJAaR4/Er0MsNSxAexQTfCEN1auAeo4MxWPHDaxzfloHplxOGwHgky5s47W/q13gDc8nQZ1yjZS/Ro2G7r6lTz9xJuHtjMdstYbVghl+jY7npQDG3vR3wNuvgeDozoSFa9SfPXyCD8JH8HWYFw01ojvalNptR5j/ymIkM7T73gS9apWPJEyhGbgkhwLYppFqAkN9uMIzoVpBAqHCr7/amPeb8+PrJXho51NCkO0E7jNvyL+oJEqOQIDAQAB" -{{- end}} {{- end}} diff --git a/files/control-plane/control-plane-helm-chart/templates/secret-provider-class-and-sa.yaml b/files/control-plane/control-plane-helm-chart/templates/secret-provider-class-and-sa.yaml index 080bc67b..d7dd1676 100644 --- a/files/control-plane/control-plane-helm-chart/templates/secret-provider-class-and-sa.yaml +++ b/files/control-plane/control-plane-helm-chart/templates/secret-provider-class-and-sa.yaml @@ -69,6 +69,10 @@ spec: key: COGNITO_AUTH_CLIENT_ID - objectName: cognito_client_secret key: COGNITO_AUTH_CLIENT_SECRET + - objectName: private_key + key: PRIVATE_KEY + - objectName: public_key + key: PUBLIC_KEY {{- if .Values.ses.enabled }} - objectName: ses_access_key key: SMTP_USER @@ -138,6 +142,12 @@ spec: - objectName: {{ .Values.cognitosecret }} objectType: ssmparameter objectAlias: cognito_client_secret + - objectName: {{ .Values.privateKey }} + objectType: ssmparameter + objectAlias: private_key + - objectName: {{ .Values.publicKey }} + objectType: ssmparameter + objectAlias: public_key {{- if .Values.ses.enabled }} - objectName: "/{{ .Values.projectName }}/ses_access_key" objectType: ssmparameter diff --git a/files/control-plane/control-plane-helm-chart/templates/tenant-mgmt-facade-deployment.yaml b/files/control-plane/control-plane-helm-chart/templates/tenant-mgmt-facade-deployment.yaml index 352d0214..d0ff94b4 100644 --- a/files/control-plane/control-plane-helm-chart/templates/tenant-mgmt-facade-deployment.yaml +++ b/files/control-plane/control-plane-helm-chart/templates/tenant-mgmt-facade-deployment.yaml @@ -158,6 +158,16 @@ spec: secretKeyRef: name: api-token key: DB_SCHEMA + - name: PRIVATE_KEY + valueFrom: + secretKeyRef: + name: api-token + key: PRIVATE_KEY + - name: PUBLIC_KEY + valueFrom: + secretKeyRef: + name: api-token + key: PUBLIC_KEY {{- if .Values.imagePullSecret.enabled }} imagePullSecrets: - name: {{ .Values.imagePullSecret.name }} diff --git a/files/control-plane/control-plane-helm-chart/values.yaml.template b/files/control-plane/control-plane-helm-chart/values.yaml.template index d51f678d..4b79deb4 100644 --- a/files/control-plane/control-plane-helm-chart/values.yaml.template +++ b/files/control-plane/control-plane-helm-chart/values.yaml.template @@ -458,3 +458,5 @@ tenantmgmtdbdatabase: ${TENANT_MGMT_DATABASE} cognitodomain: ${COGNITO_DOMAIN} cognitoid: ${COGNITO_ID} cognitosecret: ${COGNITO_SECRET} +privateKey: ${PRIVATE_KEY} +publicKey: ${PUBLIC_KEY} diff --git a/terraform/control-plane-application/data.tf b/terraform/control-plane-application/data.tf index d01002f0..7cafd826 100644 --- a/terraform/control-plane-application/data.tf +++ b/terraform/control-plane-application/data.tf @@ -18,6 +18,13 @@ data "aws_ssm_parameter" "github_repo" { name = "/github_saas_repo" } +data "aws_ssm_parameter" "private_key" { + name = "/sf-arc-saas/dev/private-key" +} + +data "aws_ssm_parameter" "public_key" { + name = "/sf-arc-saas/dev/public-key" +} ############################################################################ ## EKS data ############################################################################ diff --git a/terraform/control-plane-application/main.tf b/terraform/control-plane-application/main.tf index a6076fae..80674a33 100644 --- a/terraform/control-plane-application/main.tf +++ b/terraform/control-plane-application/main.tf @@ -203,6 +203,8 @@ data "template_file" "helm_values_template" { COGNITO_ID = data.aws_ssm_parameter.cognito_id.name COGNITO_SECRET = data.aws_ssm_parameter.cognito_secret.name FROM_EMAIL = var.from_email + PRIVATE_KEY = data.aws_ssm_parameter.private_key.name + PUBLIC_KEY = data.aws_ssm_parameter.public_key.name } }