Commit c8bd464a authored by João Alexandre Cunha's avatar João Alexandre Cunha Committed by Thong Kuah
Browse files

Adds template hostname to additional hosts

parent 573b6083
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -257,6 +257,7 @@ test-deploy:
    CI_APPLICATION_TAG: "5d248f6fa69a"
    CI_ENVIRONMENT_SLUG: production
    CI_ENVIRONMENT_URL: example.com
    ADDITIONAL_HOSTS: '*.example.com'
    CI_PROJECT_PATH_SLUG: "gitlab-org/cluster-integration/auto-build-image"
    CI_PROJECT_VISIBILITY: public
    KUBE_NAMESPACE: default
@@ -454,6 +455,7 @@ test-delete-canary-postgresql:
test-chart-major-version-upgrade:
  extends: test-deploy
  script:
    - unset ADDITIONAL_HOSTS # The legacy chart is not compatible wildcard hosts on ADDITIONAL_HOSTS
    - auto-deploy initialize_tiller
    # Downloading legacy v0 chart from charts.gitlab.io and the deployment should succeed
    - AUTO_DEVOPS_CHART=gitlab/auto-deploy-app auto-deploy download_chart
+1 −1
Original line number Diff line number Diff line
apiVersion: v1
description: GitLab's Auto-deploy Helm Chart
name: auto-deploy-app
version: 1.0.0
version: 1.0.2
icon: https://gitlab.com/gitlab-com/gitlab-artwork/raw/master/logo/logo-square.png
+2 −2
Original line number Diff line number Diff line
@@ -39,7 +39,7 @@ spec:
    - {{ template "hostname" .Values.service.url }}
{{- if .Values.service.additionalHosts }}
{{- range $host := .Values.service.additionalHosts }}
    - {{ $host }}
    - {{ template "hostname" $host }}
{{- end -}}
{{- end }}
    secretName: {{ .Values.ingress.tls.secretName | default (printf "%s-tls" (include "fullname" .)) }}
@@ -60,7 +60,7 @@ spec:
{{- end -}}
{{- if .Values.service.additionalHosts }}
{{- range $host := .Values.service.additionalHosts }}
  - host: {{ $host }}
  - host: {{ template "hostname" $host }}
    http:
      <<: *httpRule
{{- end -}}
+1 −1
Original line number Diff line number Diff line
@@ -16,7 +16,7 @@ import (
)

const (
	chartName     = "auto-deploy-app-1.0.0"
	chartName     = "auto-deploy-app-1.0.2"
	helmChartPath = ".."
)

+46 −44
Original line number Diff line number Diff line
# frozen_string_literal: true

require_relative '../../../../src/bin/helpers/gitlab/chart.rb'
require 'tmpdir'

@@ -107,7 +109,7 @@ describe Gitlab::Chart do
        apiVersion: v1
        description: GitLab's Auto-deploy Helm Chart
        name: auto-deploy-app
      version: 1.0.0-beta.0
        version: 1.0.2
        icon: https://gitlab.com/gitlab-com/gitlab-artwork/raw/master/logo/logo-square.png
      EOS
    end
@@ -118,7 +120,7 @@ describe Gitlab::Chart do

        expect(chart.major).to eq(1)
        expect(chart.minor).to eq(0)
        expect(chart.patch).to eq(0)
        expect(chart.patch).to eq(2)
      end
    end

@@ -128,7 +130,7 @@ describe Gitlab::Chart do
          apiVersion: v1
          description: GitLab's Auto-deploy Helm Chart
          name: custom-chart
        version: 1.0.0-beta.0
          version: 1.0.2
          icon: https://gitlab.com/gitlab-com/gitlab-artwork/raw/master/logo/logo-square.png
        EOS
      end