Closed cospeedster closed 4 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?
Now, I get the issue. There are "--". Therefore, please change the "printf" ...
( printf "%s-rt" (include "common.names.fullname" . ) )
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.
Helper function contains two dashes instead of one.