Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

improvement: add podmonitor for vpc metric collection #3061

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

aburan28
Copy link

@aburan28 aburan28 commented Oct 4, 2024

What type of PR is this?

Which issue does this PR fix?:

There exists no way to collect metrics from the nodeagent at this time as there is no port opened up.

What does this PR do / Why do we need it?:
This adds a PodMonitor template in order to faciliatate automated prometheus metrics collection of the VPC CNI and EKS node agent. Additionally this PR adds a port to the eks node agent in order to allow for prometheus metrics to be collected.

Testing done on this change:

Run helm template locally to generate the rendered templates

---
# Source: aws-vpc-cni/templates/podmonitor.yaml
apiVersion: monitoring.coreos.com/v1
kind: PodMonitor
metadata:
  name: aws-node
  namespace: default
  labels:
spec:
  jobLabel: aws-node
  namespaceSelector:
    matchNames:
      - default
  podMetricsEndpoints:
  - interval: 30s
    path: /metrics
    port: metrics
  - interval: 30s
    path: /metrics
    port: agentmetrics
  selector:
    matchLabels:
      k8s-app: aws-node
---
....
       - name: aws-eks-nodeagent
          image: 602401143452.dkr.ecr.us-west-2.amazonaws.com/amazon/aws-network-policy-agent:v1.1.2
          imagePullPolicy: Always
          ports:
            - containerPort: 8162
              name: agentmetrics

Will this PR introduce any new dependencies?:
no
Will this break upgrades or downgrades? Has updating a running cluster been tested?:
no

Does this change require updates to the CNI daemonset config files to work?:

Does this PR introduce any user-facing change?:


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@aburan28 aburan28 requested a review from a team as a code owner October 4, 2024 19:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants