You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have enabled ServiceMonitor but the manifest is not deployed.
Expected behavior
If serviceMonitor.enabled: true, the ServiceMonitor manifest should be available.
Steps to reproduce (including prerequisites)
Specifically, prepare the following manifest and run the command.
values.yaml
# Default values for prometheus-yace-exporter.# This is a YAML-formatted file.# Declare variables to be passed into your templates.replicaCount: 1image:
repository: quay.io/invisionag/yet-another-cloudwatch-exportertag: v0.28.0-alphapullPolicy: IfNotPresentnameOverride: ""fullnameOverride: ""service:
type: ClusterIPport: 80annotations: {}labels: {}ingress:
enabled: falseannotations:
{}# kubernetes.io/ingress.class: nginx# kubernetes.io/tls-acme: "true"hosts:
- host: chart-example.localpaths: []tls: []# - secretName: chart-example-tls# hosts:# - chart-example.localresources:
# We usually recommend not to specify default resources and to leave this as a conscious# choice for the user. This also increases chances charts run on environments with little# resources, such as Minikube. If you do want to specify resources, uncomment the following# lines, adjust them as necessary, and remove the curly braces after 'resources:'.limits:
cpu: 500mmemory: 2Girequests:
cpu: 500mmemory: 2GinodeSelector: {}tolerations: []affinity: {}podAnnoatations: {}podLabels: {}extraArgs: []# decoupled-scraping: false# scraping-interval: 300aws:
role:
# The name of a pre-created secret in which AWS credentials are stored. When# set, aws_access_key_id is assumed to be in a field called access_key,# aws_secret_access_key is assumed to be in a field called secret_key, and the# session token, if it exists, is assumed to be in a field called# security_tokensecret:
name:
includesSessionToken: false# Note: Do not specify the aws_access_key_id and aws_secret_access_key if you specified role or secret.name beforeaws_access_key_id:
aws_secret_access_key:
serviceAccount:
# Specifies whether a ServiceAccount should be createdcreate: trueannotations: {}labels: {}# The name of the ServiceAccount to use.# If not set and create is true, a name is generated using the fullname templatename: prometheus-yace-exporterrbac:
# Specifies whether RBAC resources should be createdcreate: trueserviceMonitor:
# When set true then use a ServiceMonitor to configure scrapingenabled: true# Set the namespace the ServiceMonitor should be deployed# namespace: monitoring# Set how frequently Prometheus should scrapeinterval: 60s# Set targetPort for serviceMonitorport: http# Set path to cloudwatch-exporter telemtery-path# telemetryPath: /metrics# Set labels for the ServiceMonitor, use this to define your scrape label for Prometheus Operatorlabels:
prometheus: agent# Set timeout for scrapetimeout: 30sconfig: |- discovery: jobs: - type: AWS/ElastiCache regions: - ap-northeast-1 period: 600 length: 300 enableMetricData: true metrics: - name: ActiveDefragHits statistics: [Average, Sum]
This command renders the ServiceMonitor resource valid.
The issue stems from the incorrect evaluation of the "APIVersions" set in the ServiceMonitor Chart. In my environment, monitoring.coreos.com/v1 exists but is falsely evaluated as false. As a result, this ServiceMonitor manifest is not being deployed.
You should remove the element:
and ( .Capabilities.APIVersions.Has "monitoring.coreos.com/v1" )
The text was updated successfully, but these errors were encountered:
🐞 Bug Report
Bug details
I have enabled ServiceMonitor but the manifest is not deployed.
Expected behavior
If
serviceMonitor.enabled: true
, the ServiceMonitor manifest should be available.Steps to reproduce (including prerequisites)
Specifically, prepare the following manifest and run the command.
This command renders the ServiceMonitor resource valid.
This command renders the ServiceMonitor resource invalid.
Similarly, this cannot be used in Kustomize.
Environment
Causing
The issue stems from the incorrect evaluation of the "APIVersions" set in the ServiceMonitor Chart. In my environment, monitoring.coreos.com/v1 exists but is falsely evaluated as false. As a result, this ServiceMonitor manifest is not being deployed.
You should remove the element:
and ( .Capabilities.APIVersions.Has "monitoring.coreos.com/v1" )
The text was updated successfully, but these errors were encountered: