SoftwareAG / webmethods-helm-charts

This repository contains a collection of Helm charts for various webMethods components.
https://open-source.softwareag.com/webmethods-helm-charts/
Apache License 2.0
8 stars 14 forks source link

fix(apigateway): Fixed label for service monitor #101

Closed cospeedster closed 4 days ago

cospeedster commented 1 week ago

Helper function contains two dashes instead of one.

cospeedster commented 5 days ago

Hi @thomas-2020 ,

if i run the following command the template it results in not matching labels for the ServiceMonitor matchLabels and the Service labels.

helm template mygateway webmethods/apigateway --version 1.2.7 --set serviceMonitor.enabled=true

apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
  name: mygateway-apigateway
  namespace: default
  labels:
    app.kubernetes.io/name: apigateway
    helm.sh/chart: apigateway-1.2.7
    app.kubernetes.io/instance: mygateway
    app.kubernetes.io/managed-by: Helm
    app.kubernetes.io/version: "10.15"
spec:
  endpoints:
    - honorLabels:   true
      interval:      10s
      path:          /metrics
      targetPort:    5555
      scheme:        http
      scrapeTimeout: 10s
      tlsConfig:
        insecureSkipVerify: true
  jobLabel: mygateway
  namespaceSelector:
    matchNames:
    - default
  selector:
    matchLabels:
      app.kubernetes.io/instance: mygateway
      service-name: mygateway-apigateway--rt

--> service-name: mygateway-apigateway--rt

apiVersion: v1
kind: Service
metadata:
  name: mygateway-apigateway-rt
  labels:
    app.kubernetes.io/name: apigateway
    helm.sh/chart: apigateway-1.2.7
    app.kubernetes.io/instance: mygateway
    app.kubernetes.io/managed-by: Helm
    app.kubernetes.io/version: "10.15"
    service-name: mygateway-apigateway-rt
spec:
  type: ClusterIP
  ports:
  - port: 5556
    protocol: TCP
    targetPort: 5556
    name: rtport
    nodePort: null
  selector:
    app.kubernetes.io/name: apigateway
    app.kubernetes.io/instance: mygateway

--> service-name: mygateway-apigateway-rt

Why don't you agree?

thomas-2020 commented 4 days ago

Now, I get the issue. There are "--". Therefore, please change the "printf" ... ( printf "%s-rt" (include "common.names.fullname" . ) )

cospeedster commented 4 days ago

Hi @thomas-2020 , thanks for your reply. I implemented what you suggested. Can you please test this? I'm not in the office at the moment.