Skip to content

Commit

Permalink
Make ports configurable for background-controller & reports-controller (
Browse files Browse the repository at this point in the history
kyverno#9939)

Signed-off-by: Richard Clark <[email protected]>
Co-authored-by: Richard Clark <[email protected]>
  • Loading branch information
rdark and richard-rvvup authored Mar 28, 2024
1 parent 6344b85 commit 0655f9c
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 6 deletions.
2 changes: 2 additions & 0 deletions charts/kyverno/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -511,6 +511,7 @@ The chart values are organised per component.
| backgroundController.metering.port | int | `8000` | Prometheus endpoint port |
| backgroundController.metering.collector | string | `""` | Otel collector endpoint |
| backgroundController.metering.creds | string | `""` | Otel collector credentials |
| backgroundController.server | object | `{"port":9443}` | backgroundController server port in case you are using hostNetwork: true, you might want to change the port the backgroundController is listening to |
| backgroundController.profiling.enabled | bool | `false` | Enable profiling |
| backgroundController.profiling.port | int | `6060` | Profiling endpoint port |
| backgroundController.profiling.serviceType | string | `"ClusterIP"` | Service type. |
Expand Down Expand Up @@ -666,6 +667,7 @@ The chart values are organised per component.
| reportsController.metering.port | int | `8000` | Prometheus endpoint port |
| reportsController.metering.collector | string | `nil` | Otel collector endpoint |
| reportsController.metering.creds | string | `nil` | Otel collector credentials |
| reportsController.server | object | `{"port":9443}` | reportsController server port in case you are using hostNetwork: true, you might want to change the port the reportsController is listening to |
| reportsController.profiling.enabled | bool | `false` | Enable profiling |
| reportsController.profiling.port | int | `6060` | Profiling endpoint port |
| reportsController.profiling.serviceType | string | `"ClusterIP"` | Service type. |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,10 @@ spec:
image: {{ include "kyverno.background-controller.image" (dict "globalRegistry" .Values.global.image.registry "image" .Values.backgroundController.image "defaultTag" .Chart.AppVersion) | quote }}
imagePullPolicy: {{ .Values.backgroundController.image.pullPolicy }}
ports:
- containerPort: 9443
- containerPort: {{ .Values.backgroundController.server.port }}
name: https
protocol: TCP
- containerPort: 8000
- containerPort: {{ .Values.backgroundController.metering.port }}
name: metrics
protocol: TCP
{{ if .Values.backgroundController.profiling.enabled }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ metadata:
spec:
ports:
- port: {{ .Values.backgroundController.metricsService.port }}
targetPort: 8000
targetPort: {{ .Values.backgroundController.metering.port }}
protocol: TCP
name: metrics-port
{{- if and (eq .Values.backgroundController.metricsService.type "NodePort") (not (empty .Values.backgroundController.metricsService.nodePort)) }}
Expand Down
4 changes: 2 additions & 2 deletions charts/kyverno/templates/reports-controller/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,10 @@ spec:
image: {{ include "kyverno.reports-controller.image" (dict "globalRegistry" .Values.global.image.registry "image" .Values.reportsController.image "defaultTag" .Chart.AppVersion) | quote }}
imagePullPolicy: {{ .Values.reportsController.image.pullPolicy }}
ports:
- containerPort: 9443
- containerPort: {{ .Values.reportsController.server.port }}
name: https
protocol: TCP
- containerPort: 8000
- containerPort: {{ .Values.reportsController.metering.port }}
name: metrics
protocol: TCP
{{ if .Values.reportsController.profiling.enabled }}
Expand Down
2 changes: 1 addition & 1 deletion charts/kyverno/templates/reports-controller/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ metadata:
spec:
ports:
- port: {{ .Values.reportsController.metricsService.port }}
targetPort: 8000
targetPort: {{ .Values.reportsController.metering.port }}
protocol: TCP
name: metrics-port
{{- if and (eq .Values.reportsController.metricsService.type "NodePort") (not (empty .Values.reportsController.metricsService.nodePort)) }}
Expand Down
10 changes: 10 additions & 0 deletions charts/kyverno/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1536,6 +1536,11 @@ backgroundController:
# -- Otel collector credentials
creds: ''

# -- backgroundController server port
# in case you are using hostNetwork: true, you might want to change the port the backgroundController is listening to
server:
port: 9443

profiling:
# -- Enable profiling
enabled: false
Expand Down Expand Up @@ -2129,6 +2134,11 @@ reportsController:
# -- (string) Otel collector credentials
creds: ~

# -- reportsController server port
# in case you are using hostNetwork: true, you might want to change the port the reportsController is listening to
server:
port: 9443

profiling:
# -- Enable profiling
enabled: false
Expand Down

0 comments on commit 0655f9c

Please sign in to comment.