Loading assets/auto-deploy-app/Chart.yaml +1 −1 Original line number Diff line number Diff line apiVersion: v1 description: GitLab's Auto-deploy Helm Chart name: auto-deploy-app version: 2.40.1 version: 2.63.0 icon: https://gitlab.com/gitlab-com/gitlab-artwork/raw/master/logo/logo-square.png assets/auto-deploy-app/README.md +1 −0 Original line number Diff line number Diff line Loading @@ -21,6 +21,7 @@ | extraLabels | Allow labelling resources with custom key/value pairs | `{}` | | lifecycle | [Container lifecycle hooks](https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/) | `{}` | | podAnnotations | Pod annotations | `{}` | | hostNetwork | Use the host's network namespace. | `false` | | dnsPolicy | Pod DNS policy | `{}` | | dnsConfig | [Pod DNS config](https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/#pod-dns-config) | `{}` | | nodeSelector | Node labels for pod assignment | `{}` | Loading assets/auto-deploy-app/templates/deployment.yaml +6 −3 Original line number Diff line number Diff line Loading @@ -45,6 +45,9 @@ spec: nodeSelector: {{ toYaml .Values.nodeSelector | indent 8 }} {{- end }} {{- if .Values.hostNetwork }} hostNetwork: {{ .Values.hostNetwork }} {{- end }} {{- if .Values.dnsPolicy }} dnsPolicy: {{ .Values.dnsPolicy }} {{- end }} Loading assets/auto-deploy-app/templates/worker-deployment.yaml +6 −1 Original line number Diff line number Diff line Loading @@ -55,6 +55,11 @@ items: {{ toYaml $nodeSelectorConfig | indent 10 }} {{- end }} {{- end }} {{- with $hostNetworkConfig := default $.Values.hostNetwork $workerConfig.hostNetwork -}} {{- if $hostNetworkConfig }} hostNetwork: {{ $hostNetworkConfig }} {{- end }} {{- end }} {{- with $dnsPolicyConfig := default $.Values.dnsPolicy $workerConfig.dnsPolicy -}} {{- if $dnsPolicyConfig }} dnsPolicy: {{ $dnsPolicyConfig }} Loading assets/auto-deploy-app/test/templates/deployment_test.go +39 −0 Original line number Diff line number Diff line Loading @@ -225,6 +225,45 @@ func TestDeploymentTemplate(t *testing.T) { }) } for _, tc := range []struct { CaseName string Release string Values map[string]string ExpectedHostNetwork bool }{ { CaseName: "root hostNetwork is defined", Release: "production", Values: map[string]string{ "hostNetwork": "true", }, ExpectedHostNetwork: bool(true), }, } { t.Run(tc.CaseName, func(t *testing.T) { namespaceName := "minimal-ruby-app-" + strings.ToLower(random.UniqueId()) values := map[string]string{ "gitlab.app": "auto-devops-examples/minimal-ruby-app", "gitlab.env": "prod", } mergeStringMap(values, tc.Values) options := &helm.Options{ SetValues: values, KubectlOptions: k8s.NewKubectlOptions("", "", namespaceName), } output := helm.RenderTemplate(t, options, helmChartPath, tc.Release, []string{"templates/deployment.yaml"}) var deployment appsV1.Deployment helm.UnmarshalK8SYaml(t, output, &deployment) require.Equal(t, tc.ExpectedHostNetwork, deployment.Spec.Template.Spec.HostNetwork) }) } // serviceAccountName for _, tc := range []struct { CaseName string Loading Loading
assets/auto-deploy-app/Chart.yaml +1 −1 Original line number Diff line number Diff line apiVersion: v1 description: GitLab's Auto-deploy Helm Chart name: auto-deploy-app version: 2.40.1 version: 2.63.0 icon: https://gitlab.com/gitlab-com/gitlab-artwork/raw/master/logo/logo-square.png
assets/auto-deploy-app/README.md +1 −0 Original line number Diff line number Diff line Loading @@ -21,6 +21,7 @@ | extraLabels | Allow labelling resources with custom key/value pairs | `{}` | | lifecycle | [Container lifecycle hooks](https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/) | `{}` | | podAnnotations | Pod annotations | `{}` | | hostNetwork | Use the host's network namespace. | `false` | | dnsPolicy | Pod DNS policy | `{}` | | dnsConfig | [Pod DNS config](https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/#pod-dns-config) | `{}` | | nodeSelector | Node labels for pod assignment | `{}` | Loading
assets/auto-deploy-app/templates/deployment.yaml +6 −3 Original line number Diff line number Diff line Loading @@ -45,6 +45,9 @@ spec: nodeSelector: {{ toYaml .Values.nodeSelector | indent 8 }} {{- end }} {{- if .Values.hostNetwork }} hostNetwork: {{ .Values.hostNetwork }} {{- end }} {{- if .Values.dnsPolicy }} dnsPolicy: {{ .Values.dnsPolicy }} {{- end }} Loading
assets/auto-deploy-app/templates/worker-deployment.yaml +6 −1 Original line number Diff line number Diff line Loading @@ -55,6 +55,11 @@ items: {{ toYaml $nodeSelectorConfig | indent 10 }} {{- end }} {{- end }} {{- with $hostNetworkConfig := default $.Values.hostNetwork $workerConfig.hostNetwork -}} {{- if $hostNetworkConfig }} hostNetwork: {{ $hostNetworkConfig }} {{- end }} {{- end }} {{- with $dnsPolicyConfig := default $.Values.dnsPolicy $workerConfig.dnsPolicy -}} {{- if $dnsPolicyConfig }} dnsPolicy: {{ $dnsPolicyConfig }} Loading
assets/auto-deploy-app/test/templates/deployment_test.go +39 −0 Original line number Diff line number Diff line Loading @@ -225,6 +225,45 @@ func TestDeploymentTemplate(t *testing.T) { }) } for _, tc := range []struct { CaseName string Release string Values map[string]string ExpectedHostNetwork bool }{ { CaseName: "root hostNetwork is defined", Release: "production", Values: map[string]string{ "hostNetwork": "true", }, ExpectedHostNetwork: bool(true), }, } { t.Run(tc.CaseName, func(t *testing.T) { namespaceName := "minimal-ruby-app-" + strings.ToLower(random.UniqueId()) values := map[string]string{ "gitlab.app": "auto-devops-examples/minimal-ruby-app", "gitlab.env": "prod", } mergeStringMap(values, tc.Values) options := &helm.Options{ SetValues: values, KubectlOptions: k8s.NewKubectlOptions("", "", namespaceName), } output := helm.RenderTemplate(t, options, helmChartPath, tc.Release, []string{"templates/deployment.yaml"}) var deployment appsV1.Deployment helm.UnmarshalK8SYaml(t, output, &deployment) require.Equal(t, tc.ExpectedHostNetwork, deployment.Spec.Template.Spec.HostNetwork) }) } // serviceAccountName for _, tc := range []struct { CaseName string Loading