diff --git a/charts/kubezero-ci/Chart.yaml b/charts/kubezero-ci/Chart.yaml index de3f8730..4c329d24 100644 --- a/charts/kubezero-ci/Chart.yaml +++ b/charts/kubezero-ci/Chart.yaml @@ -12,6 +12,9 @@ keywords: maintainers: - name: Quarky9 dependencies: + - name: kubezero-lib + version: ">= 0.1.4" + repository: https://zero-down-time.github.io/kubezero/ - name: gocd version: 1.39.4 repository: https://gocd.github.io/helm-chart diff --git a/charts/kubezero-ci/README.md b/charts/kubezero-ci/README.md index 9d172833..4842a8cd 100644 --- a/charts/kubezero-ci/README.md +++ b/charts/kubezero-ci/README.md @@ -19,6 +19,7 @@ Kubernetes: `>= 1.18.0` | Repository | Name | Version | |------------|------|---------| | https://gocd.github.io/helm-chart | gocd | 1.39.4 | +| https://zero-down-time.github.io/kubezero/ | kubezero-lib | >= 0.1.4 | # Jenkins @@ -31,4 +32,9 @@ Kubernetes: `>= 1.18.0` | Key | Type | Default | Description | |-----|------|---------|-------------| | gocd.enabled | bool | `false` | | +| gocd.istio.enabled | bool | `false` | | +| gocd.istio.gateway | string | `"istio-ingress/private-ingressgateway"` | | +| gocd.istio.url | string | `""` | | +| gocd.server.ingress.enabled | bool | `false` | | +| gocd.server.service.type | string | `"ClusterIP"` | | | jenkins.enabled | bool | `false` | | diff --git a/charts/kubezero-ci/templates/gocd/istio-service.yaml b/charts/kubezero-ci/templates/gocd/istio-service.yaml new file mode 100644 index 00000000..3a59541a --- /dev/null +++ b/charts/kubezero-ci/templates/gocd/istio-service.yaml @@ -0,0 +1,18 @@ +{{- if and .Values.gocd.enabled .Values.gocd.istio.enabled }} +apiVersion: networking.istio.io/v1beta1 +kind: VirtualService +metadata: + name: {{ include "kubezero-lib.fullname" . }} + namespace: {{ .Release.Namespace }} + labels: + {{- include "kubezero-lib.labels" . | nindent 4 }} +spec: + gateways: + - {{ .Values.gocd.istio.gateway }} + hosts: + - {{ .Values.gocd.istio.url }} + http: + - route: + - destination: + host: {{ .Release.Name }}-gocd-server +{{- end }} diff --git a/charts/kubezero-ci/values.yaml b/charts/kubezero-ci/values.yaml index 9e6b2c46..23a436e2 100644 --- a/charts/kubezero-ci/values.yaml +++ b/charts/kubezero-ci/values.yaml @@ -7,5 +7,10 @@ gocd: ingress: enabled: false + istio: + enabled: false + gateway: istio-ingress/private-ingressgateway + url: "" # gocd.example.com + jenkins: enabled: false