From 96970c6818642268ecae299ea2cddfb75495dcac Mon Sep 17 00:00:00 2001 From: Ismail Ahmad Date: Fri, 12 Feb 2021 18:40:32 +0000 Subject: [PATCH] feat: updates istio vs configuration Bumping chart and app version --- CHANGELOG.md | 7 +++++++ chart/Chart.yaml | 4 ++-- chart/templates/console-vs.yaml | 20 ++++++++++++++++---- chart/values.yaml | 16 +++++++++++++--- tests/test-values.yml | 7 ++++++- 5 files changed, 44 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f991b5c..042e26b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,13 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), --- +## [0.0.3-bb.0] - 2021-02-12 +### Added +- Options under istio values to control labels, annotations, gateways and full URL modification for twistlock VirtualService. + +### Changed +- Position of "hostname" value in values, from "console.hostname" to toplevel "hostname". + ## [0.0.2-bb.2] - 2021-02-11 ### Added - imagePullSecret array to values. diff --git a/chart/Chart.yaml b/chart/Chart.yaml index 940fd47..24e6a45 100644 --- a/chart/Chart.yaml +++ b/chart/Chart.yaml @@ -1,4 +1,4 @@ apiVersion: v2 name: twistlock -version: 0.0.2-bb.2 -appVersion: 20.04.163 \ No newline at end of file +version: 0.0.3-bb.0 +appVersion: 20.12.531 diff --git a/chart/templates/console-vs.yaml b/chart/templates/console-vs.yaml index 248d14e..d0e2e49 100644 --- a/chart/templates/console-vs.yaml +++ b/chart/templates/console-vs.yaml @@ -1,14 +1,26 @@ -{{- if .Values.istio.enabled }} +{{- if and .Values.istio.enabled .Values.istio.console.enabled -}} apiVersion: networking.istio.io/v1alpha3 kind: VirtualService metadata: name: console namespace: {{ .Release.Namespace }} + {{- if .Values.istio.console.labels }} + labels: +{{ toYaml .Values.istio.console.labels | indent 4 }} + {{- end }} + {{- if .Values.istio.console.annotations }} + annotations: +{{ toYaml .Values.istio.console.annotations | indent 4 }} + {{- end }} spec: - hosts: - - "twistlock.{{ .Values.console.hostname }}" gateways: - - istio-system/main + {{- range .Values.istio.console.gateways }} + - {{ . }} + {{- end }} + hosts: + {{- range .Values.istio.console.hosts }} + - {{ tpl . $ }} + {{- end }} http: - route: - destination: diff --git a/chart/values.yaml b/chart/values.yaml index 66d2018..64b927a 100644 --- a/chart/values.yaml +++ b/chart/values.yaml @@ -1,16 +1,26 @@ +hostname: bigbang.dev prometheus: servicemonitor: enabled: false +hostname: bigbang.dev istio: + # Toggle istio integration enabled: false + console: + # Toggle vs creation + enabled: true + annotations: {} + labels: {} + gateways: + - istio-system/main + hosts: + - twistlock.{{ .Values.hostname }} # imagePullSecrets defines the secrets to use when pulling the operator container image. imagePullSecrets: [] - + console: - hostname: bigbang.dev - image: repository: registry1.dso.mil/ironbank/twistlock/console/console tag: 20.12.531 diff --git a/tests/test-values.yml b/tests/test-values.yml index c99f8e8..96d4808 100644 --- a/tests/test-values.yml +++ b/tests/test-values.yml @@ -1,12 +1,17 @@ hostname: bigbang.dev istio: enabled: true + console: + enabled: true + gateways: + - istio-system/main + hosts: + - twistlock.{{ .Values.hostname }} imagePullSecrets: - name: private-registry-mil console: - hostname: bigbang.dev image: repository: registry1.dso.mil/ironbank/twistlock/console/console tag: 20.12.531 -- GitLab