feat: add istio support to kubezero-ci/gocd

This commit is contained in:
Stefan Reimer 2021-11-06 21:30:32 +01:00
parent 038288ee12
commit 003be5f068
4 changed files with 32 additions and 0 deletions

View File

@ -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

View File

@ -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` | |

View File

@ -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 }}

View File

@ -7,5 +7,10 @@ gocd:
ingress:
enabled: false
istio:
enabled: false
gateway: istio-ingress/private-ingressgateway
url: "" # gocd.example.com
jenkins:
enabled: false