mirror of
https://github.com/kyverno/kyverno.git
synced 2025-03-31 03:45:17 +00:00
feat: added support for exposing the metrics via kyverno-svc service
Signed-off-by: Yashvardhan Kukreja <yash.kukreja.98@gmail.com>
This commit is contained in:
parent
72aa739395
commit
8eae8ec492
5 changed files with 21 additions and 0 deletions
|
@ -91,6 +91,9 @@ spec:
|
|||
- containerPort: 9443
|
||||
name: https
|
||||
protocol: TCP
|
||||
- containerPort: 8000
|
||||
name: metrics-port
|
||||
protocol: TCP
|
||||
env:
|
||||
- name: INIT_CONFIG
|
||||
value: {{ template "kyverno.configMapName" . }}
|
||||
|
|
|
@ -16,5 +16,12 @@ spec:
|
|||
{{- if and (eq .Values.service.type "NodePort") (not (empty .Values.service.nodePort)) }}
|
||||
nodePort: {{ .Values.service.nodePort }}
|
||||
{{- end }}
|
||||
- port: {{ .Values.service.metricsPort }}
|
||||
targetPort: 8000
|
||||
protocol: TCP
|
||||
name: metrics-port
|
||||
{{- if and (eq .Values.service.type "NodePort") (not (empty .Values.service.nodePort)) }}
|
||||
nodePort: {{ .Values.service.metricsNodePort }}
|
||||
{{- end }}
|
||||
selector: {{ include "kyverno.matchLabels" . | nindent 4 }}
|
||||
type: {{ .Values.service.type }}
|
||||
|
|
|
@ -145,6 +145,10 @@ service:
|
|||
type: ClusterIP
|
||||
# Only used if service.type is NodePort
|
||||
nodePort:
|
||||
## Kyverno's metrics server will be exposed at this port
|
||||
metricsPort: 8000
|
||||
## The Node's port which will allow access Kyverno's metrics at the host level. Only used if service.type is NodePort.
|
||||
metricsNodePort: 8000
|
||||
## Provide any additional annotations which may be required. This can be used to
|
||||
## set the LoadBalancer service type to internal only.
|
||||
## ref: https://kubernetes.io/docs/concepts/services-networking/service/#internal-load-balancer
|
||||
|
|
|
@ -15,7 +15,11 @@ metadata:
|
|||
spec:
|
||||
ports:
|
||||
- port: 443
|
||||
name: https
|
||||
targetPort: https
|
||||
- port: 8000
|
||||
name: metrics-port
|
||||
targetPort: metrics-port
|
||||
selector:
|
||||
app: kyverno
|
||||
app.kubernetes.io/name: kyverno
|
||||
|
|
|
@ -58,6 +58,9 @@ spec:
|
|||
- containerPort: 9443
|
||||
name: https
|
||||
protocol: TCP
|
||||
- containerPort: 8000
|
||||
name: metrics-port
|
||||
protocol: TCP
|
||||
env:
|
||||
- name: INIT_CONFIG
|
||||
value: init-config
|
||||
|
|
Loading…
Add table
Reference in a new issue