Moritz Sanft 968cdc1a38
cli: move cli/internal libraries (#2623)
* cli: move internal packages

Signed-off-by: Moritz Sanft <58110325+msanft@users.noreply.github.com>

* cli: fix buildfiles

Signed-off-by: Moritz Sanft <58110325+msanft@users.noreply.github.com>

* bazel: fix exclude dir

Signed-off-by: Moritz Sanft <58110325+msanft@users.noreply.github.com>

* cli: move back libraries that will not be used by TF provider

Signed-off-by: Moritz Sanft <58110325+msanft@users.noreply.github.com>

---------

Signed-off-by: Moritz Sanft <58110325+msanft@users.noreply.github.com>
2023-11-22 14:52:56 +01:00

44 lines
1.4 KiB
YAML

{{- $kvstoreMetricsEnabled := and .Values.clustermesh.apiserver.kvstoremesh.enabled .Values.clustermesh.apiserver.metrics.kvstoremesh.enabled -}}
{{- if and
(or .Values.externalWorkloads.enabled .Values.clustermesh.useAPIServer)
(or .Values.clustermesh.apiserver.metrics.enabled $kvstoreMetricsEnabled .Values.clustermesh.apiserver.metrics.etcd.enabled) }}
apiVersion: v1
kind: Service
metadata:
name: clustermesh-apiserver-metrics
namespace: {{ .Release.Namespace }}
{{- with .Values.clustermesh.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
labels:
k8s-app: clustermesh-apiserver
app.kubernetes.io/part-of: cilium
app.kubernetes.io/name: clustermesh-apiserver
app.kubernetes.io/component: metrics
spec:
clusterIP: None
type: ClusterIP
ports:
{{- if .Values.clustermesh.apiserver.metrics.enabled }}
- name: apiserv-metrics
port: {{ .Values.clustermesh.apiserver.metrics.port }}
protocol: TCP
targetPort: apiserv-metrics
{{- end }}
{{- if $kvstoreMetricsEnabled }}
- name: kvmesh-metrics
port: {{ .Values.clustermesh.apiserver.metrics.kvstoremesh.port }}
protocol: TCP
targetPort: kvmesh-metrics
{{- end }}
{{- if .Values.clustermesh.apiserver.metrics.etcd.enabled }}
- name: etcd-metrics
port: {{ .Values.clustermesh.apiserver.metrics.etcd.port }}
protocol: TCP
targetPort: etcd-metrics
{{- end }}
selector:
k8s-app: clustermesh-apiserver
{{- end }}