Git Product home page Git Product logo

Comments (5)

yu-croco avatar yu-croco commented on June 13, 2024

Hi @ellipsis-me ,
In the yaml you shared above, metrics has 4 indent, not 2 indent.
So I wonder if your values.yaml is correct. 🤔

# This doesn't work
controller:
    metrics:
      enabled: true
      serviceMonitor:
        enabled: true
        selector:
        release: kube-prometheus

# But this works, I think.
controller:
  metrics:
    enabled: true
    serviceMonitor:
      enabled: true
      selector:
      release: kube-prometheus

from argo-helm.

ellipsis-me avatar ellipsis-me commented on June 13, 2024

Hi @yu-croco YAML don't have the need of more spaces, I already did 1 indent, more than that is the same.
https://yaml.org/spec/1.2-old/spec.html#id2777534

I even used yq tool to find the value

But ignore that indentation, I just typed more in my comment, but the code is Ok.

from argo-helm.

yu-croco avatar yu-croco commented on June 13, 2024

Hi @ellipsis-me , thank you for your reply.

Maybe this is the cause... 👀
helm/helm#10760 (comment)

from argo-helm.

QustodioPablo avatar QustodioPablo commented on June 13, 2024

The issue I faced was that that the dex deployment metric's port is named metrics, but the default value used in the service monitor is http-metrics.
If you change .Values.dex.metrics.service.portName to metrics it should work.

from argo-helm.

pdrastil avatar pdrastil commented on June 13, 2024

@ellipsis-me The helm template will not check for installed manifests on the K8s cluster. If you want to try templating see command below. The check for CRD is done only during helm install and condition will pass only if Prometheus CRDs are installed before Argo CD or on subsequent upgrade.

@QustodioPablo Hi - I've checked the output of the manifests and they are fine. The ServiceMonitor watches the Service that has correct http-metrics port.

❯ helm template argocd . -f monitors.yaml --api-versions monitoring.coreos.com/v1

results:

apiVersion: v1
kind: Service
metadata:
  name: argocd-dex-server
  namespace: "argocd"
  labels:
    helm.sh/chart: argo-cd-6.8.1
    app.kubernetes.io/name: argocd-dex-server
    app.kubernetes.io/instance: argocd
    app.kubernetes.io/component: dex-server
    app.kubernetes.io/managed-by: Helm
    app.kubernetes.io/part-of: argocd
    app.kubernetes.io/version: "v2.11.0"
spec:
  ports:
  - name: http
    protocol: TCP
    port: 5556
    targetPort: http
  - name: grpc
    protocol: TCP
    port: 5557
    targetPort: grpc
  - name: http-metrics
    protocol: TCP
    port: 5558
    targetPort: metrics
  selector:
    app.kubernetes.io/name: argocd-dex-server
    app.kubernetes.io/instance: argocd
---
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
  name: argocd-dex-server
  namespace: "argocd"
  labels:
    helm.sh/chart: argo-cd-6.8.1
    app.kubernetes.io/name: argocd-dex-server
    app.kubernetes.io/instance: argocd
    app.kubernetes.io/component: dex-server
    app.kubernetes.io/managed-by: Helm
    app.kubernetes.io/part-of: argocd
    app.kubernetes.io/version: "v2.11.0"
spec:
  endpoints:
    - port: http-metrics
      interval: 30s
      path: /metrics
  namespaceSelector:
    matchNames:
      - argocd
  selector:
    matchLabels:
      app.kubernetes.io/name: argocd-dex-server
      app.kubernetes.io/instance: argocd
      app.kubernetes.io/component: dex-server

from argo-helm.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.