Repository for dip
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

50 lines
1.9 KiB

{{- if .Values.backgroundController.enabled -}}
{{- if .Values.backgroundController.metricsService.create -}}
---
apiVersion: v1
kind: Service
metadata:
name: {{ template "kyverno.background-controller.name" . }}-metrics
namespace: {{ template "kyverno.namespace" . }}
labels:
{{- include "kyverno.background-controller.labels" . | nindent 4 }}
{{- with .Values.backgroundController.metricsService.annotations }}
annotations:
{{- tpl (toYaml .) $ | nindent 4 }}
{{- end }}
spec:
ports:
- port: {{ .Values.backgroundController.metricsService.port }}
targetPort: {{ .Values.backgroundController.metering.port }}
protocol: TCP
name: metrics-port
{{- if and (eq .Values.backgroundController.metricsService.type "NodePort") (not (empty .Values.backgroundController.metricsService.nodePort)) }}
nodePort: {{ .Values.backgroundController.metricsService.nodePort }}
{{- end }}
selector:
{{- include "kyverno.background-controller.matchLabels" . | nindent 4 }}
type: {{ .Values.backgroundController.metricsService.type }}
{{- end -}}
{{- end -}}
{{- if .Values.backgroundController.profiling.enabled }}
---
apiVersion: v1
kind: Service
metadata:
name: {{ template "kyverno.background-controller.name" . }}-profiling
namespace: {{ template "kyverno.namespace" . }}
labels:
{{- include "kyverno.background-controller.labels" . | nindent 4 }}
spec:
ports:
- port: {{ .Values.backgroundController.profiling.port }}
targetPort: {{ .Values.backgroundController.profiling.port }}
protocol: TCP
name: profiling-port
{{- if and (eq .Values.backgroundController.profiling.serviceType "NodePort") (not (empty .Values.backgroundController.profiling.nodePort)) }}
nodePort: {{ .Values.backgroundController.profiling.nodePort }}
{{- end }}
selector:
{{- include "kyverno.background-controller.matchLabels" . | nindent 4 }}
type: {{ .Values.backgroundController.profiling.serviceType }}
{{- end -}}