void init()

in src/com/epam/digital/data/platform/pipelines/registrycomponents/regular/PostgresOperator.groovy [69:104]


    void init() {

        operationalClusterSecretJson = context.platform.getAsJson("secret", OPERATIONAL_CLUSTER_SECRET)["data"]
        analyticalClusterSecretJson = context.platform.getAsJson("secret", ANALYTICAL_CLUSTER_SECRET)["data"]
        operational_pg_user = DecodeHelper.decodeBase64(operationalClusterSecretJson["user"])
        operational_pg_password = DecodeHelper.decodeBase64(operationalClusterSecretJson["password"])
        analytical_pg_user = DecodeHelper.decodeBase64(analyticalClusterSecretJson["user"])
        analytical_pg_password = DecodeHelper.decodeBase64(analyticalClusterSecretJson["password"])

        postgresSecretRolesJson = context.platform.getAsJson("secret", POSTGRES_ROLES_SECRET)["data"]
        auditServiceUsername = DecodeHelper.decodeBase64(postgresSecretRolesJson["anSvcName"])
        auditServicePassword = DecodeHelper.decodeBase64(postgresSecretRolesJson["anSvcPass"])
        adminRole = DecodeHelper.decodeBase64(postgresSecretRolesJson["admRoleName"])
        adminRolePass = DecodeHelper.decodeBase64(postgresSecretRolesJson["admRolePass"])
        ownerRole = DecodeHelper.decodeBase64(postgresSecretRolesJson["regOwnerName"])
        ownerRolePass = DecodeHelper.decodeBase64(postgresSecretRolesJson["regOwnerPass"])
        regTemplateOwnerRole = DecodeHelper.decodeBase64(postgresSecretRolesJson["regTemplateOwnerName"])
        regTemplateOwnerRolePass = DecodeHelper.decodeBase64(postgresSecretRolesJson["regTemplateOwnerPass"])
        regRegulationRole = DecodeHelper.decodeBase64(postgresSecretRolesJson["regRegulationRoleName"])
        regRegulationRolePass = DecodeHelper.decodeBase64(postgresSecretRolesJson["regRegulationRolePass"])
        appRole = DecodeHelper.decodeBase64(postgresSecretRolesJson["appRoleName"])
        appRolePass = DecodeHelper.decodeBase64(postgresSecretRolesJson["appRolePass"])
        auditRolePass = DecodeHelper.decodeBase64(postgresSecretRolesJson["anRolePass"])
        excerptExporterUser = DecodeHelper.decodeBase64(postgresSecretRolesJson["excerptExporterName"])
        excerptExporterPass = DecodeHelper.decodeBase64(postgresSecretRolesJson["excerptExporterPass"])
        analyticsAdminRolePass = DecodeHelper.decodeBase64(postgresSecretRolesJson["anAdmPass"])
        notificationPublisherUser = DecodeHelper.decodeBase64(postgresSecretRolesJson["notificationTemplatePublisherName"])
        notificationPublisherPass = DecodeHelper.decodeBase64(postgresSecretRolesJson["notificationTemplatePublisherPass"])
        geoServerPublisherUser = DecodeHelper.decodeBase64(postgresSecretRolesJson["geoserverRoleName"])
        geoServerPublisherPass = DecodeHelper.decodeBase64(postgresSecretRolesJson["geoserverRolePass"])

        masterPod = context.platform.getAll("pods", "-l postgres-operator.crunchydata.com/role=master," +
                "postgres-operator.crunchydata.com/cluster=operational -o jsonpath=\"{.items[0].metadata.name}\"")
        masterRepPod = context.platform.getAll("pods", "-l postgres-operator.crunchydata.com/role=master," +
                "postgres-operator.crunchydata.com/cluster=analytical -o jsonpath=\"{.items[0].metadata.name}\"")
    }