Skip to content

Commit 7cbcc4f

Browse files
cheina97adamjensenbot
authored andcommitted
Helm: labels and annotations
1 parent 6a5ace5 commit 7cbcc4f

File tree

6 files changed

+51
-4
lines changed

6 files changed

+51
-4
lines changed

deployments/liqo/README.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,15 @@
1212
| auth.ingress.class | string | `""` | Set your ingress class. |
1313
| auth.ingress.enable | bool | `false` | Enable/disable the creation of the Ingress resource. |
1414
| auth.ingress.host | string | `""` | Set the hostname for your ingress. |
15+
| auth.ingress.port | int | `443` | Set port for your ingress. |
1516
| auth.initContainer.imageName | string | `"ghcr.io/liqotech/cert-creator"` | Image repository for the init container of the auth pod. |
1617
| auth.pod.annotations | object | `{}` | Annotations for the auth pod. |
1718
| auth.pod.extraArgs | list | `[]` | Extra arguments for the auth pod. |
1819
| auth.pod.labels | object | `{}` | Labels for the auth pod. |
1920
| auth.pod.resources | object | `{"limits":{},"requests":{}}` | Resource requests and limits (https://kubernetes.io/docs/user-guide/compute-resources/) for the auth pod. |
2021
| auth.service.annotations | object | `{}` | Annotations for the auth service. |
22+
| auth.service.labels | object | `{}` | Labels for the auth service. |
23+
| auth.service.port | int | `443` | Port used by the Authentication Service. |
2124
| auth.service.type | string | `"LoadBalancer"` | Kubernetes service used to expose the Authentication Service. If you are exposing this service with an Ingress, you can change it to ClusterIP; if your cluster does not support LoadBalancer services, consider to switch it to NodePort. See https://doc.liqo.io/installation/ for more details. |
2225
| auth.tls | bool | `true` | Enable TLS for the Authentication Service Pod (using a self-signed certificate). If you are exposing this service with an Ingress, consider to disable it or add the appropriate annotations to the Ingress resource. |
2326
| awsConfig.accessKeyId | string | `""` | AccessKeyID for the Liqo user. |
@@ -64,15 +67,20 @@
6467
| gateway.imageName | string | `"ghcr.io/liqotech/liqonet"` | Image repository for the network gateway pod. |
6568
| gateway.metrics.enabled | bool | `false` | Expose metrics about network traffic towards cluster peers. |
6669
| gateway.metrics.port | int | `5872` | Port used to expose metrics. |
70+
| gateway.metrics.service | object | `{"annotations":{},"labels":{}}` | Service used to expose metrics. |
71+
| gateway.metrics.service.annotations | object | `{}` | Annotations for the metrics service. |
72+
| gateway.metrics.service.labels | object | `{}` | Labels for the metrics service. |
6773
| gateway.metrics.serviceMonitor.enabled | bool | `false` | Enable/Disable a Prometheus servicemonitor. Turn on this flag when the Prometheus Operator runs in your cluster; otherwise simply export the port above as an external endpoint. |
6874
| gateway.metrics.serviceMonitor.interval | string | `""` | Customize service monitor requests interval. If empty, Prometheus uses the global scrape interval (https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api.md#endpoint). |
75+
| gateway.metrics.serviceMonitor.labels | object | `{}` | Labels for the gateway servicemonitor. |
6976
| gateway.metrics.serviceMonitor.scrapeTimeout | string | `""` | Customize service monitor scrape timeout. If empty, Prometheus uses the global scrape timeout (https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api.md#endpoint). |
7077
| gateway.pod.annotations | object | `{}` | Annotations for the network gateway pod. |
7178
| gateway.pod.extraArgs | list | `[]` | Extra arguments for the network gateway pod. |
7279
| gateway.pod.labels | object | `{}` | Labels for the network gateway pod. |
7380
| gateway.pod.resources | object | `{"limits":{},"requests":{}}` | Resource requests and limits (https://kubernetes.io/docs/user-guide/compute-resources/) for the network gateway pod. |
7481
| gateway.replicas | int | `1` | The number of gateway instances to run. The gateway component supports active/passive high availability. Make sure that there are enough nodes to accommodate the replicas, because such pod has to run in the host network, hence no more than one replica can be scheduled on a given node. |
75-
| gateway.service.annotations | object | `{}` | |
82+
| gateway.service.annotations | object | `{}` | Annotations for the network gateway service. |
83+
| gateway.service.labels | object | `{}` | Labels for the network gateway service. |
7684
| gateway.service.type | string | `"LoadBalancer"` | Kubernetes service to be used to expose the network gateway pod. If you plan to use liqo over the Internet, consider to change this field to "LoadBalancer". Instead, if your nodes are directly reachable from the cluster you are peering to, you may change it to "NodePort". |
7785
| metricAgent.enable | bool | `true` | Enable/Disable the virtual kubelet metric agent. This component aggregates all the kubelet-related metrics (e.g., CPU, RAM, etc) collected on the nodes that are used by a remote cluster peered with you, then exporting the resulting values as a property of the virtual kubelet running on the remote cluster. |
7886
| metricAgent.imageName | string | `"ghcr.io/liqotech/metric-agent"` | Image repository for the metricAgent pod. |
@@ -137,6 +145,7 @@
137145
| virtualKubelet.metrics.enabled | bool | `false` | Enable/Disable to expose metrics about virtual kubelet resources. |
138146
| virtualKubelet.metrics.podMonitor.enabled | bool | `false` | Enable/Disable the creation of a Prometheus podmonitor. Turn on this flag when the Prometheus Operator runs in your cluster; otherwise simply export the port above as an external endpoint. |
139147
| virtualKubelet.metrics.podMonitor.interval | string | `""` | Setup pod monitor requests interval. If empty, Prometheus uses the global scrape interval (https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api.md#endpoint). |
148+
| virtualKubelet.metrics.podMonitor.labels | object | `{}` | Labels for the virtualkubelet podmonitor. |
140149
| virtualKubelet.metrics.podMonitor.scrapeTimeout | string | `""` | Setup pod monitor scrape timeout. If empty, Prometheus uses the global scrape timeout (https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api.md#endpoint). |
141150
| virtualKubelet.metrics.port | int | `5872` | Port used to expose metrics. |
142151
| virtualKubelet.virtualNode.extra.annotations | object | `{}` | Extra annotations for the virtual node. |

deployments/liqo/templates/liqo-auth-service.yaml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,12 @@ metadata:
88
labels:
99
{{- include "liqo.labels" $authConfig | nindent 4 }}
1010
{{- include "liqo.authServiceLabels" . | nindent 4 }}
11+
{{- if .Values.auth.service.labels }}
12+
{{- toYaml .Values.auth.service.labels | nindent 4}}
13+
{{- end }}
1114
annotations:
1215
{{- if .Values.auth.service.annotations }}
13-
{{- toYaml .Values.auth.service.annotations | nindent 4}}
16+
{{- toYaml .Values.auth.service.annotations | nindent 4}}
1417
{{- end }}
1518
{{- if .Values.auth.config.addressOverride }}
1619
liqo.io/override-address: {{ .Values.auth.config.addressOverride | quote }}
@@ -20,7 +23,7 @@ metadata:
2023
{{- if .Values.auth.config.portOverride }}
2124
liqo.io/override-port: {{ .Values.auth.config.portOverride | quote }}
2225
{{- else if .Values.auth.ingress.enable }}
23-
liqo.io/override-port: "443"
26+
liqo.io/override-port: {{ .Values.auth.ingress.port | quote }}
2427
{{- end }}
2528
spec:
2629
type: {{ .Values.auth.service.type }}
@@ -34,6 +37,6 @@ spec:
3437
port: 5000
3538
targetPort: 5000
3639
{{- else }}
37-
port: 443
40+
port: {{ .Values.auth.service.port }}
3841
targetPort: 8443
3942
{{- end }}

deployments/liqo/templates/liqo-gateway-service.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ metadata:
2020
labels:
2121
{{- include "liqo.labels" $gatewayConfig | nindent 4 }}
2222
{{- include "liqo.gatewayServiceLabels" $gatewayConfig | nindent 4 }}
23+
{{- if .Values.gateway.service.labels }}
24+
{{- toYaml .Values.gateway.service.labels | nindent 4 }}
25+
{{- end}}
2326
spec:
2427
type: {{ .Values.gateway.service.type }}
2528
ports:
@@ -38,8 +41,15 @@ apiVersion: v1
3841
kind: Service
3942
metadata:
4043
name: {{ include "liqo.prefixedName" $gatewayMetricsConfig }}
44+
annotations:
45+
{{- if .Values.gateway.metrics.service.annotations }}
46+
{{- toYaml .Values.gateway.metrics.service.annotations | nindent 4 }}
47+
{{- end}}
4148
labels:
4249
{{- include "liqo.labels" $gatewayMetricsConfig | nindent 4 }}
50+
{{- if .Values.gateway.metrics.service.labels }}
51+
{{- toYaml .Values.gateway.metrics.service.labels | nindent 4 }}
52+
{{- end}}
4353
spec:
4454
selector:
4555
{{- include "liqo.gatewaySelector" $gatewayMetricsConfig | nindent 4 }}

deployments/liqo/templates/liqo-gateway-servicemonitor.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ metadata:
99
name: {{ include "liqo.prefixedName" $gatewayMetricsConfig }}
1010
labels:
1111
{{- include "liqo.labels" $gatewayMetricsConfig | nindent 4 }}
12+
{{- if .Values.gateway.metrics.serviceMonitor.labels }}
13+
{{- toYaml .Values.gateway.metrics.serviceMonitor.labels | nindent 4 }}
14+
{{- end }}
1215
spec:
1316
selector:
1417
matchLabels:

deployments/liqo/templates/liqo-virtualkubelet-podmonitor.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ metadata:
77
name: {{ include "liqo.prefixedName" $kubeletMetricsConfig }}
88
labels:
99
{{- include "liqo.labels" $kubeletMetricsConfig | nindent 4 }}
10+
{{- if .Values.virtualKubelet.metrics.podMonitor.labels }}
11+
{{- toYaml .Values.virtualKubelet.metrics.podMonitor.labels | nindent 4 }}
12+
{{- end }}
1013
spec:
1114
namespaceSelector:
1215
any: true

deployments/liqo/values.yaml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,10 @@ gateway:
8989
# If you plan to use liqo over the Internet, consider to change this field to "LoadBalancer".
9090
# Instead, if your nodes are directly reachable from the cluster you are peering to, you may change it to "NodePort".
9191
type: "LoadBalancer"
92+
# -- Annotations for the network gateway service.
9293
annotations: {}
94+
# -- Labels for the network gateway service.
95+
labels: {}
9396
config:
9497
# -- Override the default address where your network gateway service is available.
9598
# You should configure it if the network gateway is behind a reverse proxy or NAT.
@@ -108,6 +111,12 @@ gateway:
108111
enabled: false
109112
# -- Port used to expose metrics.
110113
port: 5872
114+
# -- Service used to expose metrics.
115+
service:
116+
# -- Labels for the metrics service.
117+
labels: {}
118+
# -- Annotations for the metrics service.
119+
annotations: {}
111120
serviceMonitor:
112121
# -- Enable/Disable a Prometheus servicemonitor. Turn on this flag when the Prometheus Operator
113122
# runs in your cluster; otherwise simply export the port above as an external endpoint.
@@ -118,6 +127,8 @@ gateway:
118127
# -- Customize service monitor scrape timeout. If empty, Prometheus uses the global scrape timeout
119128
# (https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api.md#endpoint).
120129
scrapeTimeout: ""
130+
# -- Labels for the gateway servicemonitor.
131+
labels: {}
121132

122133
networkManager:
123134
externalIPAM:
@@ -233,8 +244,12 @@ auth:
233244
# if your cluster does not support LoadBalancer services, consider to switch it to NodePort.
234245
# See https://doc.liqo.io/installation/ for more details.
235246
type: "LoadBalancer"
247+
# -- Labels for the auth service.
248+
labels: {}
236249
# -- Annotations for the auth service.
237250
annotations: {}
251+
# -- Port used by the Authentication Service.
252+
port: 443
238253
# -- Enable TLS for the Authentication Service Pod (using a self-signed certificate).
239254
# If you are exposing this service with an Ingress, consider to disable it or add the appropriate annotations to the Ingress resource.
240255
tls: true
@@ -247,6 +262,8 @@ auth:
247262
host: ""
248263
# -- Set your ingress class.
249264
class: ""
265+
# -- Set port for your ingress.
266+
port: 443
250267
config:
251268
# -- Set to false to disable the authentication of discovered clusters.
252269
# Note: use it only for testing installations.
@@ -344,6 +361,8 @@ virtualKubelet:
344361
# -- Setup pod monitor scrape timeout. If empty, Prometheus uses the global scrape timeout
345362
# (https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api.md#endpoint).
346363
scrapeTimeout: ""
364+
# -- Labels for the virtualkubelet podmonitor.
365+
labels: {}
347366

348367
uninstaller:
349368
pod:

0 commit comments

Comments
 (0)