Skip to content

Commit

Permalink
feat: Exposing Default Metric Port for ApplicationSet Controller in M…
Browse files Browse the repository at this point in the history
…anifest Files. argoproj#8999 (argoproj#9000)

* feat: expose default metrics port in manifest definitions.

Out of the box, Applicationset presents some controller-runtime metrics on port 8080. However, the metric port is not defined as a container port in manifest files, therefore, they are not accessible. This
commit aims to make it accessible.

Co-authored-by: Erkan Zileli <erkan.zileli@trendyol.com>
Signed-off-by: Celal Öner <celal.oner@trendyol.com>

* chore: add Trendyol to the list of users.

Signed-off-by: Celal Öner <celal.oner@trendyol.com>

* chore(docs): add ServiceMonitor manifest example for newly added metrics.

Signed-off-by: Celal Öner <celal.oner@trendyol.com>

* fix: regenerate manifest file via make file.

Co-authored-by: Erkan Zileli <erkan.zileli@trendyol.com>
Signed-off-by: Celal Öner <celal.oner@trendyol.com>

Co-authored-by: Erkan Zileli <erkan.zileli@trendyol.com>
Signed-off-by: wojtekidd <wojtek.cichon@protonmail.com>
  • Loading branch information
2 people authored and wojtekidd committed Apr 25, 2022
1 parent b85c616 commit c159cbd
Show file tree
Hide file tree
Showing 9 changed files with 52 additions and 0 deletions.
1 change: 1 addition & 0 deletions USERS.md
Expand Up @@ -202,3 +202,4 @@ Currently, the following organizations are **officially** using Argo CD:
1. [Yubo](https://www.yubo.live/)
1. [Zimpler](https://www.zimpler.com/)
1. [ZOZO](https://corp.zozo.com/)
1. [Trendyol](https://www.trendyol.com/)
15 changes: 15 additions & 0 deletions docs/operator-manual/metrics.md
Expand Up @@ -131,6 +131,21 @@ spec:
- port: metrics
```

```yaml
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
name: argocd-applicationset-controller-metrics
labels:
release: prometheus-operator
spec:
selector:
matchLabels:
app.kubernetes.io/name: argocd-applicationset-controller
endpoints:
- port: metrics
```

## Dashboards

You can find an example Grafana dashboard [here](https://github.com/argoproj/argo-cd/blob/master/examples/dashboard.json) or check demo instance
Expand Down
Expand Up @@ -25,6 +25,8 @@ spec:
ports:
- containerPort: 7000
name: webhook
- containerPort: 8080
name: metrics
env:
- name: NAMESPACE
valueFrom:
Expand Down
Expand Up @@ -12,5 +12,9 @@ spec:
port: 7000
protocol: TCP
targetPort: webhook
- name: metrics
port: 8080
protocol: TCP
targetPort: metrics
selector:
app.kubernetes.io/name: argocd-applicationset-controller
6 changes: 6 additions & 0 deletions manifests/core-install.yaml
Expand Up @@ -9068,6 +9068,10 @@ spec:
port: 7000
protocol: TCP
targetPort: webhook
- name: metrics
port: 8080
protocol: TCP
targetPort: metrics
selector:
app.kubernetes.io/name: argocd-applicationset-controller
---
Expand Down Expand Up @@ -9157,6 +9161,8 @@ spec:
ports:
- containerPort: 7000
name: webhook
- containerPort: 8080
name: metrics
volumeMounts:
- mountPath: /app/config/ssh
name: ssh-known-hosts
Expand Down
6 changes: 6 additions & 0 deletions manifests/ha/install.yaml
Expand Up @@ -9822,6 +9822,10 @@ spec:
port: 7000
protocol: TCP
targetPort: webhook
- name: metrics
port: 8080
protocol: TCP
targetPort: metrics
selector:
app.kubernetes.io/name: argocd-applicationset-controller
---
Expand Down Expand Up @@ -10094,6 +10098,8 @@ spec:
ports:
- containerPort: 7000
name: webhook
- containerPort: 8080
name: metrics
volumeMounts:
- mountPath: /app/config/ssh
name: ssh-known-hosts
Expand Down
6 changes: 6 additions & 0 deletions manifests/ha/namespace-install.yaml
Expand Up @@ -962,6 +962,10 @@ spec:
port: 7000
protocol: TCP
targetPort: webhook
- name: metrics
port: 8080
protocol: TCP
targetPort: metrics
selector:
app.kubernetes.io/name: argocd-applicationset-controller
---
Expand Down Expand Up @@ -1234,6 +1238,8 @@ spec:
ports:
- containerPort: 7000
name: webhook
- containerPort: 8080
name: metrics
volumeMounts:
- mountPath: /app/config/ssh
name: ssh-known-hosts
Expand Down
6 changes: 6 additions & 0 deletions manifests/install.yaml
Expand Up @@ -9297,6 +9297,10 @@ spec:
port: 7000
protocol: TCP
targetPort: webhook
- name: metrics
port: 8080
protocol: TCP
targetPort: metrics
selector:
app.kubernetes.io/name: argocd-applicationset-controller
---
Expand Down Expand Up @@ -9464,6 +9468,8 @@ spec:
ports:
- containerPort: 7000
name: webhook
- containerPort: 8080
name: metrics
volumeMounts:
- mountPath: /app/config/ssh
name: ssh-known-hosts
Expand Down
6 changes: 6 additions & 0 deletions manifests/namespace-install.yaml
Expand Up @@ -437,6 +437,10 @@ spec:
port: 7000
protocol: TCP
targetPort: webhook
- name: metrics
port: 8080
protocol: TCP
targetPort: metrics
selector:
app.kubernetes.io/name: argocd-applicationset-controller
---
Expand Down Expand Up @@ -604,6 +608,8 @@ spec:
ports:
- containerPort: 7000
name: webhook
- containerPort: 8080
name: metrics
volumeMounts:
- mountPath: /app/config/ssh
name: ssh-known-hosts
Expand Down

0 comments on commit c159cbd

Please sign in to comment.