diff --git a/assets/auto-deploy-app/Chart.yaml b/assets/auto-deploy-app/Chart.yaml index 60b69d1076ee297b9ac286188acb7fc262c49a27..5f978104574d2e07dd0f7e640c9164694b7aaa27 100644 --- a/assets/auto-deploy-app/Chart.yaml +++ b/assets/auto-deploy-app/Chart.yaml @@ -1,5 +1,5 @@ apiVersion: v1 description: GitLab's Auto-deploy Helm Chart name: auto-deploy-app -version: 2.22.0 +version: 2.22.1 icon: https://gitlab.com/gitlab-com/gitlab-artwork/raw/master/logo/logo-square.png diff --git a/assets/auto-deploy-app/test/templates/service_test.go b/assets/auto-deploy-app/test/templates/service_test.go index d1a53e3a404427d872d6adbe1a6015d67116231c..79156a001638c1849e734b4d6f9143888644f638 100644 --- a/assets/auto-deploy-app/test/templates/service_test.go +++ b/assets/auto-deploy-app/test/templates/service_test.go @@ -30,10 +30,16 @@ func TestServiceTemplate_ServiceType(t *testing.T) { }, { - name: "with NodePort", + name: "with type NodePort but no nodePort value", values: map[string]string{ "service.type": "NodePort" }, expectedType: "NodePort", - expectedPort: coreV1.ServicePort{Port: 5000, TargetPort: intstr.FromInt(5000), NodePort: 30001, Protocol: "TCP", Name: "web"}, + expectedPort: coreV1.ServicePort{Port: 5000, TargetPort: intstr.FromInt(5000), NodePort: 0, Protocol: "TCP", Name: "web"}, + }, + { + name: "with type NodePort and nodePort set", + values: map[string]string{ "service.type": "NodePort", "service.nodePort": "12345" }, + expectedType: "NodePort", + expectedPort: coreV1.ServicePort{Port: 5000, TargetPort: intstr.FromInt(5000), NodePort: 12345, Protocol: "TCP", Name: "web"}, }, } @@ -159,14 +165,14 @@ func TestServiceExtraPortsServiceDefinition(t *testing.T) { name: "with extra service port", valueFiles: []string{"../testdata/service-definition.yaml"}, expectedPorts: []coreV1.ServicePort{ - coreV1.ServicePort { + { Name: "web", Protocol: "TCP", Port: 5000, TargetPort: intstr.FromInt(5000), NodePort: 0, }, - coreV1.ServicePort { + { Name: "port-443", Protocol: "TCP", Port: 443, @@ -195,4 +201,4 @@ func TestServiceExtraPortsServiceDefinition(t *testing.T) { require.Equal(t, tc.expectedPorts, service.Spec.Ports) }) } -} \ No newline at end of file +} diff --git a/assets/auto-deploy-app/values.yaml b/assets/auto-deploy-app/values.yaml index 40c28a96743f0fc565db56ede972b5ecf9f419cd..016c9236f11d7e43355ce5ae6119e52dfbea857b 100644 --- a/assets/auto-deploy-app/values.yaml +++ b/assets/auto-deploy-app/values.yaml @@ -67,7 +67,7 @@ service: commonName: externalPort: 5000 internalPort: 5000 - nodePort: 30001 + # nodePort: 30001 extraPorts: [] ingress: enabled: true