Skip to content

Commit 23567f3

Browse files
authored
[core] Add Annotations and Labels to VirtualService (#609)
It is now possible to add custom annotations and labels to a VirtualService in the Helm chart.
1 parent 886bb38 commit 23567f3

File tree

5 files changed

+29
-1
lines changed

5 files changed

+29
-1
lines changed

deploy/helm/kobs/Chart.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@ apiVersion: v2
22
name: kobs
33
description: Kubernetes Observability Platform
44
type: application
5-
version: 0.2.0
5+
version: 0.3.0
66
appVersion: v0.12.0

deploy/helm/kobs/templates/cluster/virtualservice.yaml

+7
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,13 @@ metadata:
77
labels:
88
{{- include "kobs.labels" . | nindent 4 }}
99
app.kubernetes.io/component: cluster
10+
{{- with .Values.cluster.istio.virtualService.labels }}
11+
{{- toYaml . | nindent 4 }}
12+
{{- end }}
13+
{{- with .Values.cluster.virtualService.annotations }}
14+
annotations:
15+
{{- toYaml . | nindent 4 }}
16+
{{- end }}
1017
spec:
1118
{{- with .Values.cluster.istio.virtualService.hosts }}
1219
hosts:

deploy/helm/kobs/templates/hub/virtualservice.yaml

+11
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,13 @@ metadata:
77
labels:
88
{{- include "kobs.labels" . | nindent 4 }}
99
app.kubernetes.io/component: hub
10+
{{- with .Values.hub.istio.virtualService.labels }}
11+
{{- toYaml . | nindent 4 }}
12+
{{- end }}
13+
{{- with .Values.hub.virtualService.annotations }}
14+
annotations:
15+
{{- toYaml . | nindent 4 }}
16+
{{- end }}
1017
spec:
1118
{{- with .Values.hub.istio.virtualService.hosts }}
1219
hosts:
@@ -29,6 +36,10 @@ spec:
2936
port:
3037
number: 15220
3138
timeout: {{ .Values.hub.istio.virtualService.timeout }}
39+
{{- with .Values.hub.istio.virtualService.headers }}
40+
headers:
41+
{{- toYaml . | nindent 8 }}
42+
{{- end }}
3243
- route:
3344
- destination:
3445
host: {{ include "kobs.fullname" . }}-hub.{{ .Release.Namespace }}.svc.cluster.local

deploy/helm/kobs/values.yaml

+6
Original file line numberDiff line numberDiff line change
@@ -342,6 +342,9 @@ hub:
342342
virtualService:
343343
enabled: false
344344

345+
annotations: {}
346+
labels: {}
347+
345348
gateways: []
346349
# - gateway
347350

@@ -771,6 +774,9 @@ cluster:
771774
virtualService:
772775
enabled: false
773776

777+
annotations: {}
778+
labels: {}
779+
774780
gateways: []
775781
# - gateway
776782

docs/getting-started/installation/helm.md

+4
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,8 @@ helm upgrade --install kobs kobs/kobs
7272
| `hub.ingress.hosts` | Hosts to use for the ingress. | `[]` |
7373
| `hub.ingress.tls` | TLS configuration for the ingress. | `[]` |
7474
| `hub.istio.virtualService.enabled` | Specifies whether a VirtualService should be created. | `false` |
75+
| `hub.istio.virtualService.annotations` | Annotations to add to the VirtualService. | `{}` |
76+
| `hub.istio.virtualService.labels` | Labels to add to the VirtualService. | `{}` |
7577
| `hub.istio.virtualService.gateways` | A list of gateways for the VirtualService. | `[]` |
7678
| `hub.istio.virtualService.hosts` | A list of hosts for the VirtualService. | `[]` |
7779
| `hub.istio.virtualService.timeout` | Timeout for API requests. | `300s` |
@@ -141,6 +143,8 @@ helm upgrade --install kobs kobs/kobs
141143
| `cluster.ingress.hosts` | Hosts to use for the ingress. | `[]` |
142144
| `cluster.ingress.tls` | TLS configuration for the ingress. | `[]` |
143145
| `cluster.istio.virtualService.enabled` | Specifies whether a VirtualService should be created. | `false` |
146+
| `cluster.istio.virtualService.annotations` | Annotations to add to the VirtualService. | `{}` |
147+
| `cluster.istio.virtualService.labels` | Labels to add to the VirtualService. | `{}` |
144148
| `cluster.istio.virtualService.gateways` | A list of gateways for the VirtualService. | `[]` |
145149
| `cluster.istio.virtualService.hosts` | A list of hosts for the VirtualService. | `[]` |
146150
| `cluster.istio.virtualService.timeout` | Timeout for API requests. | `300s` |

0 commit comments

Comments
 (0)