Skip to content

Commit

Permalink
feat(serviceMonitor): Add flag to disable CRD check for mass server-s…
Browse files Browse the repository at this point in the history
…ide apply (#1077)
  • Loading branch information
jcpunk authored Oct 11, 2024
1 parent 46c2fa0 commit 0b3ad20
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions charts/kong/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Changelog

## Unreleased
* Added serviceMonitor.trustCRDsExist for render based deployments

### Changes

Expand Down
1 change: 1 addition & 0 deletions charts/kong/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -908,6 +908,7 @@ On the Gateway release side, set either `admin.tls.client.secretName` to the nam
| securityContext | Set the securityContext for Kong Pods | `{}` |
| containerSecurityContext | Set the securityContext for Containers | See values.yaml |
| serviceMonitor.enabled | Create ServiceMonitor for Prometheus Operator | `false` |
| serviceMonitor.trustCRDsExist | Do not check for the Prometheus Operator CRDs, just try to deploy | `false` |
| serviceMonitor.interval | Scraping interval | `30s` |
| serviceMonitor.namespace | Where to create ServiceMonitor | |
| serviceMonitor.labels | ServiceMonitor labels | `{}` |
Expand Down
2 changes: 1 addition & 1 deletion charts/kong/templates/servicemonitor.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if and ( .Capabilities.APIVersions.Has "monitoring.coreos.com/v1" ) .Values.serviceMonitor.enabled }}
{{- if and .Values.serviceMonitor.enabled (or (.Capabilities.APIVersions.Has "monitoring.coreos.com/v1") .Values.serviceMonitor.trustCRDsExist) }}
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
Expand Down
1 change: 1 addition & 0 deletions charts/kong/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1011,6 +1011,7 @@ serviceMonitor:
# If you wish to gather metrics from a Kong instance with the proxy disabled (such as a hybrid control plane), see:
# https://github.com/Kong/charts/blob/main/charts/kong/README.md#prometheus-operator-integration
enabled: false
trustCRDsExist: false
# interval: 30s
# Specifies namespace, where ServiceMonitor should be installed
# namespace: monitoring
Expand Down

0 comments on commit 0b3ad20

Please sign in to comment.