diff --git a/chart/infra-server/templates/monitoring/servicemonitors.yaml b/chart/infra-server/templates/monitoring/servicemonitors.yaml new file mode 100644 index 000000000..2c37052f5 --- /dev/null +++ b/chart/infra-server/templates/monitoring/servicemonitors.yaml @@ -0,0 +1,27 @@ +--- +apiVersion: monitoring.coreos.com/v1 +kind: ServiceMonitor +metadata: + name: argo-workflows + namespace: argo +spec: + endpoints: + - port: metrics + selector: + matchLabels: + app: workflow-controller +--- +apiVersion: monitoring.coreos.com/v1 +kind: ServiceMonitor +metadata: + name: infra-server + namespace: infra +spec: + endpoints: + - port: metrics + scheme: https + tlsConfig: + insecureSkipVerify: true + selector: + matchLabels: + app: infra-server diff --git a/chart/infra-server/templates/monitoring/argo.yaml b/chart/infra-server/templates/monitoring/services.yaml similarity index 58% rename from chart/infra-server/templates/monitoring/argo.yaml rename to chart/infra-server/templates/monitoring/services.yaml index eb615d055..381286da9 100644 --- a/chart/infra-server/templates/monitoring/argo.yaml +++ b/chart/infra-server/templates/monitoring/services.yaml @@ -15,14 +15,18 @@ spec: selector: app.kubernetes.io/component: workflow-controller --- -apiVersion: monitoring.coreos.com/v1 -kind: ServiceMonitor +apiVersion: v1 +kind: Service metadata: - name: argo-workflows - namespace: argo + labels: + app: infra-server + name: infra-server-metrics + namespace: infra spec: - endpoints: - - port: metrics + ports: + - name: metrics + port: 9101 + protocol: TCP + targetPort: 9101 selector: - matchLabels: - app: workflow-controller + app.kubernetes.io/name: infra-server