From 5b73b4fbe220fcb7ddce686fab87131c873031d3 Mon Sep 17 00:00:00 2001 From: Alessandro Cattapan Date: Fri, 11 Oct 2024 23:15:32 +0200 Subject: [PATCH] Replaced deploymentName with deployment.name in SRS chart, updated documentation and updated unit tests --- charts/backingservices/charts/srs/README.md | 8 ++-- .../charts/srs/templates/_helpers.tpl | 3 ++ charts/backingservices/charts/srs/values.yaml | 3 +- charts/backingservices/values.yaml | 5 +- .../backingservices/srs-deployment_test.go | 48 +++++++++++++++++-- .../backingservices/srs-networkpolicy_test.go | 42 ++++++++-------- .../src/test/backingservices/srs-pdb_test.go | 41 ++++++++-------- .../srs-registry-secret_test.go | 20 ++++---- .../test/backingservices/srs-service_test.go | 27 ++++++----- .../src/test/backingservices/srs_test.go | 31 ++++++------ 10 files changed, 141 insertions(+), 87 deletions(-) diff --git a/charts/backingservices/charts/srs/README.md b/charts/backingservices/charts/srs/README.md index 3b55f7a93..16aed0f56 100644 --- a/charts/backingservices/charts/srs/README.md +++ b/charts/backingservices/charts/srs/README.md @@ -107,7 +107,8 @@ To deploy Pega Platform with the SRS backing service, the SRS helm chart require | Configuration | Usage | |-----------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | `enabled` | Enable the Search and Reporting Service deployment as a backing service. Set this parameter to `true` to use SRS. | -| `deploymentName` | Specify the name of your SRS cluster. Your deployment creates resources prefixed with this string. This is also the service name for the SRS. | +| `deploymentName` | Deprecated, use `deployment.name`. Specify the name of your SRS cluster. Your deployment creates resources prefixed with this string. This is also the service name for the SRS. | +| `deployment.name` | Specify the name of your SRS cluster. Your deployment creates resources prefixed with this string. This is also the service name for the SRS. | | `srsRuntime` | Use this section to define specific resource configuration options like image, replica count, pod affinity, cpu and memory resource settings in the SRS. The default minimum required number of replicas is 2, but as a best practice, deploy 3 replicas to maintain high availability. | | `busybox` | When provisioning an internally managed Elasticsearch cluster, you can customize the location and pull policy of the Alpine image used during the deployment process by specifying `busybox.image` and `busybox.imagePullPolicy`. | | `elasticsearch` | Define the elasticsearch cluster configurations. The [Elasticsearch](https://github.com/helm/charts/tree/master/stable/elasticsearch/values.yaml) chart defines the values for Elasticsearch provisioning in the SRS cluster. For internally provisioned Elasticsearch the default version is set to `7.17.9`. Set the `elasticsearch.imageTag` parameter in values.yaml to `7.16.3` to use this supported version in the SRS cluster. | @@ -159,8 +160,9 @@ srs: # Set srs.enabled=true to enable SRS enabled: true - # specify unique name for the deployment based on org app and/or srs applicable environment name. eg: acme-demo-dev-srs - deploymentName: "YOUR_SRS_DEPLOYMENT_NAME" + deployment: + # specify unique name for the deployment based on org app and/or srs applicable environment name. eg: acme-demo-dev-srs + name: "YOUR_SRS_DEPLOYMENT_NAME" # Configure the location of the busybox image that is used during the deployment process of # the internal Elasticsearch cluster diff --git a/charts/backingservices/charts/srs/templates/_helpers.tpl b/charts/backingservices/charts/srs/templates/_helpers.tpl index a9a8b06a0..72d103d0d 100644 --- a/charts/backingservices/charts/srs/templates/_helpers.tpl +++ b/charts/backingservices/charts/srs/templates/_helpers.tpl @@ -9,10 +9,13 @@ App name Create a default fully qualified deployment name. This is used to define the deployment resource name. We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). If release name contains chart name it will be used as a full name. +The key deploymentName is DEPRECATED use deployment.name instead. */}} {{- define "srs.fullname" -}} {{- if .Values.deploymentName }} {{- .Values.deploymentName | trunc 63 | trimSuffix "-" }} +{{- else if and (.Values.deployment) (.Values.deployment.name)}} +{{- .Values.deployment.name | trunc 63 | trimSuffix "-" }} {{- else }} {{- $name := default .Chart.Name .Values.deploymentName }} {{- if contains $name .Release.Name }} diff --git a/charts/backingservices/charts/srs/values.yaml b/charts/backingservices/charts/srs/values.yaml index c1863fdf4..6b4bb7bd9 100644 --- a/charts/backingservices/charts/srs/values.yaml +++ b/charts/backingservices/charts/srs/values.yaml @@ -3,7 +3,8 @@ # This is a YAML-formatted file. # Declare variables to be passed into your templates. enabled: true -deploymentName: pega-shared-srs +deployment: + name: pega-shared-srs # srs-service configuration srsRuntime: diff --git a/charts/backingservices/values.yaml b/charts/backingservices/values.yaml index 7979f214e..3227b2719 100644 --- a/charts/backingservices/values.yaml +++ b/charts/backingservices/values.yaml @@ -12,8 +12,9 @@ srs: # Set srs.enabled=true to enable SRS enabled: true - # specify unique name for the deployment based on org app and/or srs applicable environment name. eg: acme-demo-dev-srs - deploymentName: "YOUR_SRS_DEPLOYMENT_NAME" + deployment: + # specify unique name for the deployment based on org app and/or srs applicable environment name. eg: acme-demo-dev-srs + name: "YOUR_SRS_DEPLOYMENT_NAME" # Configure the location of the busybox image that is used during the deployment process of # the internal Elasticsearch cluster diff --git a/terratest/src/test/backingservices/srs-deployment_test.go b/terratest/src/test/backingservices/srs-deployment_test.go index 482068615..ff1bf07b8 100644 --- a/terratest/src/test/backingservices/srs-deployment_test.go +++ b/terratest/src/test/backingservices/srs-deployment_test.go @@ -12,10 +12,52 @@ import ( func TestSRSDeployment(t *testing.T) { + helmChartParser := NewHelmConfigParser( + NewHelmTestFromTemplate(t, helmChartRelativePath, map[string]string{ + "srs.enabled": "true", + "srs.deployment.name": "test-srs", + "global.imageCredentials.registry": "docker-registry.io", + "srs.srsRuntime.replicaCount": "1", + "srs.srsRuntime.srsImage": "platform-services/search-n-reporting-service:latest", + "srs.srsRuntime.env.AuthEnabled": "false", + "srs.srsRuntime.env.OAuthPublicKeyURL": "", + "srs.srsStorage.tls.enabled": "true", + "srs.srsStorage.basicAuthentication.enabled": "false", + }, + []string{"charts/srs/templates/srsservice_deployment.yaml"}), + ) + + var srsDeploymentObj appsv1.Deployment + helmChartParser.getResourceYAML(SearchResourceOption{ + Name: "test-srs", + Kind: "Deployment", + }, &srsDeploymentObj) + VerifySRSDeployment(t, srsDeploymentObj, + srsDeployment{ + "test-srs", + "srs-service", + int32(1), + "platform-services/search-n-reporting-service:latest", + "false", + "", + false, + podResources{"1300m", "2Gi", "650m", "2Gi"}, + esDomain{ + domain: "elasticsearch-master.default.svc", + port: "9200", + protocol: "https", + }, + false, + }) +} + +func TestSRSDeploymentDeprecatedNameOverNewForBackwardCompatibility(t *testing.T) { + helmChartParser := NewHelmConfigParser( NewHelmTestFromTemplate(t, helmChartRelativePath, map[string]string{ "srs.enabled": "true", "srs.deploymentName": "test-srs", + "srs.deployment.name": "test-srs-new-key", "global.imageCredentials.registry": "docker-registry.io", "srs.srsRuntime.replicaCount": "1", "srs.srsRuntime.srsImage": "platform-services/search-n-reporting-service:latest", @@ -56,7 +98,7 @@ func TestSRSDeploymentVariables(t *testing.T) { helmChartParser := NewHelmConfigParser( NewHelmTestFromTemplate(t, helmChartRelativePath, map[string]string{ "srs.enabled": "true", - "srs.deploymentName": "test-srs-dev", + "srs.deployment.name": "test-srs-dev", "global.imageCredentials.registry": "docker-registry.io", "srs.srsRuntime.replicaCount": "3", "srs.srsRuntime.srsImage": "platform-services/search-n-reporting-service:1.0.0", @@ -109,7 +151,7 @@ func TestSRSDeploymentVariablesDefaultInternetEgress(t *testing.T) { helmChartParser := NewHelmConfigParser( NewHelmTestFromTemplate(t, helmChartRelativePath, map[string]string{ "srs.enabled": "true", - "srs.deploymentName": "test-srs-dev", + "srs.deployment.name": "test-srs-dev", "global.imageCredentials.registry": "docker-registry.io", "srs.srsRuntime.replicaCount": "3", "srs.srsRuntime.srsImage": "platform-services/search-n-reporting-service:1.0.0", @@ -161,7 +203,7 @@ func TestSRSDeploymentWithAffinity(t *testing.T) { helmChartParser := NewHelmConfigParser( NewHelmTestFromTemplate(t, helmChartRelativePath, map[string]string{ "srs.enabled": "true", - "srs.deploymentName": "test-srs", + "srs.deployment.name": "test-srs", "global.imageCredentials.registry": "docker-registry.io", "srs.srsRuntime.replicaCount": "1", "srs.srsRuntime.srsImage": "platform-services/search-n-reporting-service:latest", diff --git a/terratest/src/test/backingservices/srs-networkpolicy_test.go b/terratest/src/test/backingservices/srs-networkpolicy_test.go index 08c9dc679..66bcf445f 100644 --- a/terratest/src/test/backingservices/srs-networkpolicy_test.go +++ b/terratest/src/test/backingservices/srs-networkpolicy_test.go @@ -1,17 +1,18 @@ package backingservices import ( + "testing" + "github.com/stretchr/testify/require" networkingv1 "k8s.io/api/networking/v1" - "testing" ) -func TestSRSServiceNetworkPolicy(t *testing.T){ +func TestSRSServiceNetworkPolicy(t *testing.T) { helmChartParser := NewHelmConfigParser( NewHelmTestFromTemplate(t, helmChartRelativePath, map[string]string{ - "srs.enabled": "true", - "srs.deploymentName": "test-srs", + "srs.enabled": "true", + "srs.deployment.name": "test-srs", "srs.srsStorage.tls.enabled": "false", }, []string{"charts/srs/templates/srsservice_networkpolicy.yaml"}), @@ -25,14 +26,14 @@ func TestSRSServiceNetworkPolicy(t *testing.T){ VerifySRSServiceNetworkPolicy(t, &networkPolicyObj, false) } -func TestSRSServiceNetworkPolicyWithProvisionInternalESCluster(t *testing.T){ +func TestSRSServiceNetworkPolicyWithProvisionInternalESCluster(t *testing.T) { helmChartParser := NewHelmConfigParser( NewHelmTestFromTemplate(t, helmChartRelativePath, map[string]string{ - "srs.enabled": "true", - "srs.deploymentName": "test-srs", - "srs.srsStorage.tls.enabled": "false", - "srs.srsStorage.requireInternetAccess": "true", + "srs.enabled": "true", + "srs.deployment.name": "test-srs", + "srs.srsStorage.tls.enabled": "false", + "srs.srsStorage.requireInternetAccess": "true", "srs.srsStorage.provisionInternalESCluster": "true", }, []string{"charts/srs/templates/srsservice_networkpolicy.yaml"}), @@ -46,18 +47,18 @@ func TestSRSServiceNetworkPolicyWithProvisionInternalESCluster(t *testing.T){ VerifySRSServiceNetworkPolicy(t, &networkPolicyObj, false) } -func TestSRSServiceNetworkPolicyWithProvisionInternalESClusterFalse(t *testing.T){ +func TestSRSServiceNetworkPolicyWithProvisionInternalESClusterFalse(t *testing.T) { helmChartParser := NewHelmConfigParser( NewHelmTestFromTemplate(t, helmChartRelativePath, map[string]string{ - "srs.enabled": "true", - "srs.deploymentName": "test-srs", - "srs.srsStorage.requireInternetAccess": "true", - "srs.srsStorage.provisionInternalESCluster": "false", - "srs.srsStorage.tls.enabled": "false", - "srs.srsStorage.domain": "es.acme.io", - "srs.srsStorage.port": "8008", - "srs.srsStorage.protocol": "https", + "srs.enabled": "true", + "srs.deployment.name": "test-srs", + "srs.srsStorage.requireInternetAccess": "true", + "srs.srsStorage.provisionInternalESCluster": "false", + "srs.srsStorage.tls.enabled": "false", + "srs.srsStorage.domain": "es.acme.io", + "srs.srsStorage.port": "8008", + "srs.srsStorage.protocol": "https", "srs.srsStorage.basicAuthentication.enabled": "false", }, []string{"charts/srs/templates/srsservice_networkpolicy.yaml"}), @@ -74,8 +75,7 @@ func TestSRSServiceNetworkPolicyWithProvisionInternalESClusterFalse(t *testing.T func VerifySRSServiceNetworkPolicy(t *testing.T, networkPolicySvcObj *networkingv1.NetworkPolicy, internetEgress bool) { require.Equal(t, "srs-service", networkPolicySvcObj.Spec.PodSelector.MatchLabels["app.kubernetes.io/name"]) - - require.ElementsMatch(t, []networkingv1.PolicyType{ "Ingress","Egress"}, networkPolicySvcObj.Spec.PolicyTypes) + require.ElementsMatch(t, []networkingv1.PolicyType{"Ingress", "Egress"}, networkPolicySvcObj.Spec.PolicyTypes) // ingress require.Equal(t, "0.0.0.0/0", networkPolicySvcObj.Spec.Ingress[0].From[0].IPBlock.CIDR) require.Equal(t, int32(8080), networkPolicySvcObj.Spec.Ingress[0].Ports[0].Port.IntVal) @@ -93,4 +93,4 @@ func VerifySRSServiceNetworkPolicy(t *testing.T, networkPolicySvcObj *networking require.Equal(t, "", networkPolicySvcObj.Spec.PodSelector.MatchLabels["networking/allow-internet-egress"]) } -} \ No newline at end of file +} diff --git a/terratest/src/test/backingservices/srs-pdb_test.go b/terratest/src/test/backingservices/srs-pdb_test.go index ac6e53b70..11f019723 100644 --- a/terratest/src/test/backingservices/srs-pdb_test.go +++ b/terratest/src/test/backingservices/srs-pdb_test.go @@ -1,17 +1,18 @@ package backingservices import ( + "testing" + "github.com/stretchr/testify/require" "k8s.io/api/policy/v1beta1" - "testing" ) -func TestSRSServicePDB(t *testing.T){ +func TestSRSServicePDB(t *testing.T) { helmChartParser := NewHelmConfigParser( NewHelmTestFromTemplate(t, helmChartRelativePath, map[string]string{ - "srs.enabled": "true", - "srs.deploymentName": "test-srs", + "srs.enabled": "true", + "srs.deployment.name": "test-srs", "srs.srsStorage.tls.enabled": "false", }, []string{"charts/srs/templates/srsservice_poddisruptionbudget.yaml"}), @@ -25,13 +26,13 @@ func TestSRSServicePDB(t *testing.T){ VerifySRSServicePDB(t, &pdbObj) } -func TestSRSServicePDBWithESInternetAccess(t *testing.T){ +func TestSRSServicePDBWithESInternetAccess(t *testing.T) { helmChartParser := NewHelmConfigParser( NewHelmTestFromTemplate(t, helmChartRelativePath, map[string]string{ - "srs.enabled": "true", - "srs.deploymentName": "test-srs", - "srs.srsStorage.tls.enabled": "false", + "srs.enabled": "true", + "srs.deployment.name": "test-srs", + "srs.srsStorage.tls.enabled": "false", "srs.srsStorage.requireInternetAccess": "true", }, []string{"charts/srs/templates/srsservice_poddisruptionbudget.yaml"}), @@ -45,18 +46,18 @@ func TestSRSServicePDBWithESInternetAccess(t *testing.T){ VerifySRSServicePDB(t, &pdbObj) } -func TestSRSServicePDBWithESInternetAccessWithExternalES(t *testing.T){ +func TestSRSServicePDBWithESInternetAccessWithExternalES(t *testing.T) { helmChartParser := NewHelmConfigParser( NewHelmTestFromTemplate(t, helmChartRelativePath, map[string]string{ - "srs.enabled": "true", - "srs.deploymentName": "test-srs", - "srs.srsStorage.requireInternetAccess": "true", - "srs.srsStorage.tls.enabled": "false", - "srs.srsStorage.provisionInternalESCluster": "false", - "srs.srsStorage.domain": "es.acme.io", - "srs.srsStorage.port": "8008", - "srs.srsStorage.protocol": "https", + "srs.enabled": "true", + "srs.deployment.name": "test-srs", + "srs.srsStorage.requireInternetAccess": "true", + "srs.srsStorage.tls.enabled": "false", + "srs.srsStorage.provisionInternalESCluster": "false", + "srs.srsStorage.domain": "es.acme.io", + "srs.srsStorage.port": "8008", + "srs.srsStorage.protocol": "https", "srs.srsStorage.basicAuthentication.enabled": "false", }, []string{"charts/srs/templates/srsservice_poddisruptionbudget.yaml"}), @@ -71,11 +72,11 @@ func TestSRSServicePDBWithESInternetAccessWithExternalES(t *testing.T){ } func VerifySRSServicePDB(t *testing.T, servicePDBObj *v1beta1.PodDisruptionBudget) { - require.Equal(t, "srs-service", servicePDBObj.Spec.Selector.MatchLabels["app.kubernetes.io/name"] ) + require.Equal(t, "srs-service", servicePDBObj.Spec.Selector.MatchLabels["app.kubernetes.io/name"]) require.Equal(t, "", servicePDBObj.Spec.Selector.MatchLabels["networking/allow-internet-egress"]) } func VerifySRSServicePDBWithEgressLabel(t *testing.T, servicePDBObj *v1beta1.PodDisruptionBudget) { - require.Equal(t, "srs-service", servicePDBObj.Spec.Selector.MatchLabels["app.kubernetes.io/name"] ) + require.Equal(t, "srs-service", servicePDBObj.Spec.Selector.MatchLabels["app.kubernetes.io/name"]) require.Equal(t, "true", servicePDBObj.Spec.Selector.MatchLabels["networking/allow-internet-egress"]) -} \ No newline at end of file +} diff --git a/terratest/src/test/backingservices/srs-registry-secret_test.go b/terratest/src/test/backingservices/srs-registry-secret_test.go index 329cae8e4..0a931d82b 100644 --- a/terratest/src/test/backingservices/srs-registry-secret_test.go +++ b/terratest/src/test/backingservices/srs-registry-secret_test.go @@ -1,15 +1,17 @@ package backingservices import ( + "testing" + "github.com/stretchr/testify/require" corev1 "k8s.io/api/core/v1" - "testing" ) -func TestSRSRegistrySecretDefaultName(t *testing.T){ + +func TestSRSRegistrySecretDefaultName(t *testing.T) { helmChartParser := NewHelmConfigParser( NewHelmTestFromTemplate(t, helmChartRelativePath, map[string]string{ - "srs.enabled": "true", - "srs.deploymentName": "test-srs", + "srs.enabled": "true", + "srs.deployment.name": "test-srs", "srs.srsStorage.tls.enabled": "false", }, []string{"charts/srs/templates/registrysecret.yaml"}), @@ -25,15 +27,15 @@ func TestSRSRegistrySecretDefaultName(t *testing.T){ require.Contains(t, string(registryData[".dockerconfigjson"]), "WU9VUl9ET0NLRVJfUkVHSVNUUllfVVNFUk5BTUU6WU9VUl9ET0NLRVJfUkVHSVNUUllfUEFTU1dPUkQ=") } -func TestSRSRegistrySecretCustomName(t *testing.T){ +func TestSRSRegistrySecretCustomName(t *testing.T) { helmChartParser := NewHelmConfigParser( NewHelmTestFromTemplate(t, helmChartRelativePath, map[string]string{ - "srs.enabled": "true", - "srs.deploymentName": "custom-srs", + "srs.enabled": "true", + "srs.deployment.name": "custom-srs", "global.imageCredentials.registry": "docker-repo.acme.io", "global.imageCredentials.username": "acmeuser", "global.imageCredentials.password": "thisisapwd", - "srs.srsStorage.tls.enabled": "false", + "srs.srsStorage.tls.enabled": "false", }, []string{"charts/srs/templates/registrysecret.yaml"}), ) @@ -46,4 +48,4 @@ func TestSRSRegistrySecretCustomName(t *testing.T){ registryData := secret.Data require.Contains(t, string(registryData[".dockerconfigjson"]), "docker-repo.acme.io") require.Contains(t, string(registryData[".dockerconfigjson"]), "YWNtZXVzZXI6dGhpc2lzYXB3ZA==") -} \ No newline at end of file +} diff --git a/terratest/src/test/backingservices/srs-service_test.go b/terratest/src/test/backingservices/srs-service_test.go index 5e88fb2c0..30554bb12 100644 --- a/terratest/src/test/backingservices/srs-service_test.go +++ b/terratest/src/test/backingservices/srs-service_test.go @@ -1,18 +1,19 @@ package backingservices import ( + "testing" + "github.com/stretchr/testify/require" k8score "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/util/intstr" - "testing" ) -func TestSRSService(t *testing.T){ +func TestSRSService(t *testing.T) { helmChartParser := NewHelmConfigParser( NewHelmTestFromTemplate(t, helmChartRelativePath, map[string]string{ - "srs.enabled": "true", - "srs.deploymentName": "test-srs", + "srs.enabled": "true", + "srs.deployment.name": "test-srs", "srs.srsStorage.tls.enabled": "false", }, []string{"charts/srs/templates/srsservice_service.yaml"}), @@ -26,18 +27,18 @@ func TestSRSService(t *testing.T){ VerifySRSService(t, &srsServiceObj) } -func TestSRSServiceWithInternetEgress(t *testing.T){ +func TestSRSServiceWithInternetEgress(t *testing.T) { helmChartParser := NewHelmConfigParser( NewHelmTestFromTemplate(t, helmChartRelativePath, map[string]string{ - "srs.enabled": "true", - "srs.deploymentName": "test-srs", - "srs.srsStorage.requireInternetAccess": "true", - "srs.srsStorage.provisionInternalESCluster": "false", - "srs.srsStorage.domain": "es.acme.io", - "srs.srsStorage.port": "8008", - "srs.srsStorage.tls.enabled": "false", - "srs.srsStorage.protocol": "https", + "srs.enabled": "true", + "srs.deployment.name": "test-srs", + "srs.srsStorage.requireInternetAccess": "true", + "srs.srsStorage.provisionInternalESCluster": "false", + "srs.srsStorage.domain": "es.acme.io", + "srs.srsStorage.port": "8008", + "srs.srsStorage.tls.enabled": "false", + "srs.srsStorage.protocol": "https", "srs.srsStorage.basicAuthentication.enabled": "false", }, []string{"charts/srs/templates/srsservice_service.yaml"}), diff --git a/terratest/src/test/backingservices/srs_test.go b/terratest/src/test/backingservices/srs_test.go index 7e4adc59e..8ff0963d0 100644 --- a/terratest/src/test/backingservices/srs_test.go +++ b/terratest/src/test/backingservices/srs_test.go @@ -1,17 +1,18 @@ package backingservices import ( - "github.com/stretchr/testify/require" "testing" + + "github.com/stretchr/testify/require" ) func Test_shouldNotContainSRSResourcesWhenDisabled(t *testing.T) { helmChartParser := NewHelmConfigParser( NewHelmTest(t, helmChartRelativePath, map[string]string{ "srs.enabled": "false", - "srs.srsStorage.provisionInternalESCluster": "false", - "srs.srsStorage.tls.enabled": "false", - "srs.deploymentName": "test-srs", + "srs.srsStorage.provisionInternalESCluster": "false", + "srs.srsStorage.tls.enabled": "false", + "srs.deployment.name": "test-srs", "srs.srsStorage.basicAuthentication.enabled": "false", }), ) @@ -34,9 +35,9 @@ func Test_shouldNotContainSRSResourcesWhenDisabled(t *testing.T) { func Test_shouldContainSRSResourcesWhenEnabled(t *testing.T) { helmChartParser := NewHelmConfigParser( NewHelmTest(t, helmChartRelativePath, map[string]string{ - "srs.deploymentName": "test-srs", - "srs.srsStorage.provisionInternalESCluster": "true", - "srs.srsStorage.tls.enabled": "true", + "srs.deployment.name": "test-srs", + "srs.srsStorage.provisionInternalESCluster": "true", + "srs.srsStorage.tls.enabled": "true", "srs.srsStorage.basicAuthentication.enabled": "false", }), ) @@ -59,9 +60,9 @@ func Test_shouldContainSRSResourcesWhenEnabled(t *testing.T) { func Test_shouldContainSRSandESResourcesWhenEnabled(t *testing.T) { helmChartParser := NewHelmConfigParser( NewHelmTest(t, helmChartRelativePath, map[string]string{ - "srs.deploymentName": "test-srs", + "srs.deployment.name": "test-srs", "srs.srsStorage.provisionInternalESCluster": "true", - "srs.srsStorage.tls.enabled": "false", + "srs.srsStorage.tls.enabled": "false", }), ) @@ -83,12 +84,12 @@ func Test_shouldContainSRSandESResourcesWhenEnabled(t *testing.T) { func Test_shouldContainSRSWhenEnabledandNotESResourcesWhenDisabled(t *testing.T) { helmChartParser := NewHelmConfigParser( NewHelmTest(t, helmChartRelativePath, map[string]string{ - "srs.deploymentName": "test-srs", - "srs.srsStorage.provisionInternalESCluster": "false", - "srs.srsStorage.domain": "es.managed.io", - "srs.srsStorage.port": "9200", - "srs.srsStorage.protocol": "https", - "srs.srsStorage.tls.enabled": "false", + "srs.deployment.name": "test-srs", + "srs.srsStorage.provisionInternalESCluster": "false", + "srs.srsStorage.domain": "es.managed.io", + "srs.srsStorage.port": "9200", + "srs.srsStorage.protocol": "https", + "srs.srsStorage.tls.enabled": "false", "srs.srsStorage.basicAuthentication.enabled": "false", }), )