VictoriaMetrics / helm-charts

Helm charts for VictoriaMetrics, VictoriaLogs and ecosystem
https://victoriametrics.github.io/helm-charts/
Apache License 2.0
344 stars 332 forks source link

question: vmalert ingress URL not injected into vmalertmanager UI #1775

Open fmunteanu opened 17 hours ago

fmunteanu commented 17 hours ago

Chart name and version chart: victoria-metrics-k8s-stack version: v0.28.4

Describe the bug While visiting the vmalertmanager ingress URL, the vmalert source URL is not using the assigned ingress URL:

http://vmalert-vmks-victoria-metrics-k8s-stack-5d6bd9bf9c-s6j4b:8080/vmalert/alert?group_id=16811704966474814942&alert_id=9747162530162696377

image

I have to manually replace the URL with the assigned ingress URL, to be able to view the alert:

image

The Source link is also making reference to the wrong URL:

http://vmalert-vmks-victoria-metrics-k8s-stack-5d6bd9bf9c-s6j4b:8080/vmalert/alert?group_id=16811704966474814942&alert_id=9747162530162696377

Custom values Please provide only custom values (excluding default ones):

USER-SUPPLIED VALUES:
alertmanager:
  config:
    inhibit_rules:
    - equal:
      - cluster
      - namespace
      - alertname
      source_matchers:
      - severity="critical"
      target_matchers:
      - severity=~"info|warning"
    - equal:
      - cluster
      - namespace
      - alertname
      source_matchers:
      - severity="warning"
      target_matchers:
      - severity="info"
    - equal:
      - cluster
      - namespace
      source_matchers:
      - alertname="InfoInhibitor"
      target_matchers:
      - severity="info"
    route:
      group_by:
      - alertgroup
      - job
      group_interval: 5m
      group_wait: 30s
      repeat_interval: 12h
  ingress:
    annotations:
      cert-manager.io/cluster-issuer: cloudflare-cluster-issuer-staging
    enabled: true
    hosts:
    - alertmanager.noty.cc
    ingressClassName: cilium
    tls:
    - hosts:
      - alertmanager.noty.cc
      secretName: cloudflare-alertmanager-vmks-victoria-metrics-k8s-stack
  spec:
    configReloaderResources:
      limits:
        cpu: null
        memory: 128Mi
      requests:
        cpu: 10m
        memory: 128Mi
    replicaCount: 2
    resources:
      limits:
        cpu: null
        memory: 128Mi
      requests:
        cpu: 10m
        memory: 128Mi
defaultDashboards:
  dashboards:
    victoriametrics-operator:
      enabled: true
    victoriametrics-vmalert:
      enabled: true
  defaultTimezone: utc
global:
  cluster:
    dnsDomain: cluster.local.
  clusterLabel: default
grafana:
  admin:
    existingSecret: vmks-grafana-user-account
  ingress:
    annotations:
      cert-manager.io/cluster-issuer: cloudflare-cluster-issuer-staging
    enabled: true
    hosts:
    - grafana.noty.cc
    ingressClassName: cilium
    tls:
    - hosts:
      - grafana.noty.cc
      secretName: cloudflare-vmks-grafana
  resources:
    limits:
      cpu: null
      memory: 128Mi
    requests:
      cpu: 10m
      memory: 128Mi
  sidecar:
    resources:
      limits:
        cpu: null
        memory: 128Mi
      requests:
        cpu: 10m
        memory: 128Mi
kube-state-metrics:
  replicas: 2
  resources:
    limits:
      cpu: null
      memory: 128Mi
    requests:
      cpu: 10m
      memory: 128Mi
kubeControllerManager:
  endpoints:
  - 192.168.4.2
  - 192.168.4.3
  - 192.168.4.4
  vmScrape:
    spec:
      endpoints:
      - bearerTokenFile: /var/run/secrets/kubernetes.io/serviceaccount/token
        port: http-metrics
        scheme: https
        tlsConfig:
          caFile: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt
          insecureSkipVerify: true
          serverName: localhost
kubeEtcd:
  endpoints:
  - 192.168.4.2
  - 192.168.4.3
  - 192.168.4.4
  service:
    port: 2381
    targetPort: 2381
  vmScrape:
    spec:
      endpoints:
      - port: http-metrics
        scheme: http
kubeScheduler:
  endpoints:
  - 192.168.4.2
  - 192.168.4.3
  - 192.168.4.4
  vmScrape:
    spec:
      endpoints:
      - bearerTokenFile: /var/run/secrets/kubernetes.io/serviceaccount/token
        port: http-metrics
        scheme: https
        tlsConfig:
          caFile: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt
          insecureSkipVerify: true
          serverName: localhost
prometheus-node-exporter:
  resources:
    limits:
      cpu: null
      memory: 128Mi
    requests:
      cpu: 10m
      memory: 128Mi
prometheus-operator-crds:
  enabled: true
victoria-metrics-operator:
  operator:
    admissionWebhooks:
      certManager:
        enabled: true
        issuer:
          group: cert-manager.io
          kind: ClusterIssuer
          name: certmanager-cluster-issuer
    enable_converter_ownership: true
  replicaCount: 2
  resources:
    limits:
      cpu: null
      memory: 128Mi
    requests:
      cpu: 10m
      memory: 128Mi
vmagent:
  ingress:
    annotations:
      cert-manager.io/cluster-issuer: cloudflare-cluster-issuer-staging
    enabled: true
    hosts:
    - agent.noty.cc
    ingressClassName: cilium
    tls:
    - hosts:
      - agent.noty.cc
      secretName: cloudflare-vmagent-vmks-victoria-metrics-k8s-stack
  spec:
    configReloaderResources:
      limits:
        cpu: null
        memory: 128Mi
      requests:
        cpu: 10m
        memory: 128Mi
    resources:
      limits:
        cpu: null
        memory: 512Mi
      requests:
        cpu: 10m
        memory: 512Mi
vmalert:
  ingress:
    annotations:
      cert-manager.io/cluster-issuer: cloudflare-cluster-issuer-staging
    enabled: true
    hosts:
    - alert.noty.cc
    ingressClassName: cilium
    tls:
    - hosts:
      - alert.noty.cc
      secretName: cloudflare-vmalert-vmks-victoria-metrics-k8s-stack
  spec:
    configReloaderResources:
      limits:
        cpu: null
        memory: 128Mi
      requests:
        cpu: 10m
        memory: 128Mi
    resources:
      limits:
        cpu: null
        memory: 128Mi
      requests:
        cpu: 10m
        memory: 128Mi
vmcluster:
  enabled: true
  ingress:
    insert:
      annotations:
        cert-manager.io/cluster-issuer: cloudflare-cluster-issuer-staging
      enabled: true
      hosts:
      - insert.noty.cc
      ingressClassName: cilium
      tls:
      - hosts:
        - insert.noty.cc
        secretName: cloudflare-vminsert-vmks-victoria-metrics-k8s-stack
    select:
      annotations:
        cert-manager.io/cluster-issuer: cloudflare-cluster-issuer-staging
      enabled: true
      hosts:
      - metrics.noty.cc
      ingressClassName: cilium
      tls:
      - hosts:
        - metrics.noty.cc
        secretName: cloudflare-vmselect-vmks-victoria-metrics-k8s-stack
    storage:
      annotations:
        cert-manager.io/cluster-issuer: cloudflare-cluster-issuer-staging
      enabled: true
      hosts:
      - storage.noty.cc
      ingressClassName: cilium
      tls:
      - hosts:
        - storage.noty.cc
        secretName: cloudflare-vmstorage-vmks-victoria-metrics-k8s-stack
  spec:
    replicationFactor: 2
    retentionPeriod: 72h
    vminsert:
      replicaCount: 2
      resources:
        limits:
          cpu: null
          memory: 320Mi
        requests:
          cpu: 10m
          memory: 320Mi
    vmselect:
      replicaCount: 2
      resources:
        limits:
          cpu: null
          memory: 256Mi
        requests:
          cpu: 10m
          memory: 256Mi
      storage:
        volumeClaimTemplate:
          spec:
            accessModes:
            - ReadWriteOnce
            resources:
              requests:
                storage: 2Gi
            storageClassName: longhorn
    vmstorage:
      replicaCount: 2
      resources:
        limits:
          cpu: null
          memory: 2Gi
        requests:
          cpu: 10m
          memory: 2Gi
      storage:
        volumeClaimTemplate:
          spec:
            accessModes:
            - ReadWriteOnce
            resources:
              requests:
                storage: 20Gi
            storageClassName: longhorn
vmsingle:
  enabled: false
AndrewChubatiuk commented 11 hours ago

setting externalURL when ingress is enabled is not obvious for everyone, it should be defined explicitly. please set alertmanager.spec.externalURL to a base URL of your ingress. For the reset of parameters available under alertmanager.spec please consider using this doc