Skip to content

Conversation

@zjaco13
Copy link
Contributor

@zjaco13 zjaco13 commented Nov 14, 2025

Issue #, if available:
#1208
Description of changes:

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@zjaco13 zjaco13 marked this pull request as ready for review November 14, 2025 23:45
@zjaco13
Copy link
Contributor Author

zjaco13 commented Dec 31, 2025

@shapirov103 @elamaran11 functionally validated, had to make a bunch of changes to core addon and pod identity to make it work so please review!

Copy link
Collaborator

@shapirov103 shapirov103 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, a couple of minor comments/questions. Pending functional validation.

}

/* VersioMap showing the default version for supported Kubernetes versions */
const versionMap: Map<KubernetesVersion, string> = new Map([
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why no entry for 1.34? I see it in the matrix aws eks describe-addon-versions --addon-name aws-network-flow-monitoring-agent

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated

*/
export class EksPodIdentityAgentAddOn extends CoreAddOn {

@utils.conflictsWithAutoMode(utils.AutoModeConflictType.VERSION_MISMATCH, 'v1.3.4-eksbuild.1')
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

when running aws eks describe-addon-versions i see the following output:

- addonVersion: v1.0.2-eksbuild.6
    architecture:
    - amd64
    - arm64
    compatibilities:
    - clusterVersion: '1.34'
      defaultVersion: false
      platformVersions:
      - '*'
    - ...
    computeTypes:
    - ec2
    - auto
    requiresConfiguration: false
    requiresIamPermissions: true

we could incorporate these compute types and amd/arm support into the addon validation, e.g. auto mode compatibility for automode cluster provider and such.

It is not something to address in this PR, just a note to keep in mind.

Copy link
Collaborator

@shapirov103 shapirov103 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minor comment

import { KubernetesVersion } from "aws-cdk-lib/aws-eks";
import { cloneDeepWith } from 'lodash';
import * as nutil from 'node:util/types';
import { ManagedPolicyReference } from "aws-cdk-lib/aws-iam";
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it is from my commit iirc, let's remove this unused import, let's run make lint on the project

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

shapirov103
shapirov103 previously approved these changes Jan 2, 2026
Copy link
Collaborator

@shapirov103 shapirov103 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM
functional validation complete

❯ kubectl get pods -n amazon-network-flow-monitor
NAME                                   READY   STATUS    RESTARTS   AGE
aws-network-flow-monitor-agent-mfr86   1/1     Running   0          13m

╰─❯ 

@zjaco13
Copy link
Contributor Author

zjaco13 commented Jan 2, 2026

LGTM functional validation complete

❯ kubectl get pods -n amazon-network-flow-monitor
NAME                                   READY   STATUS    RESTARTS   AGE
aws-network-flow-monitor-agent-mfr86   1/1     Running   0          13m

╰─❯ 

@shapirov103 check logs if you can to make sure pod identity is working correctly. If not you'll see errors about OIDC stuff (before fixes to core-addon)

@shapirov103
Copy link
Collaborator

LGTM functional validation complete

❯ kubectl get pods -n amazon-network-flow-monitor
NAME                                   READY   STATUS    RESTARTS   AGE
aws-network-flow-monitor-agent-mfr86   1/1     Running   0          13m

╰─❯ 

@shapirov103 check logs if you can to make sure pod identity is working correctly. If not you'll see errors about OIDC stuff (before fixes to core-addon)

@zjaco13 I don't see any errors in the log, all INFO messages. However, i do observe something odd:

$ aws eks list-pod-identity-associations --cluster-name blueprint-construct-dev

associations:
- associationArn: arn:aws:eks:us-east-2:929819487611:podidentityassociation/blueprint-construct-dev/a-gcmtm4vtnujtkv5od
  associationId: a-gcmtm4vtnujtkv5od
  clusterName: blueprint-construct-dev
  namespace: amazon-network-flow-monitor
  ownerArn: arn:aws:eks:us-east-2:929819487611:addon/blueprint-construct-dev/aws-network-flow-monitoring-agent/02cdc025-6a17-bb70-bf61-32acc4da46fe
  serviceAccount: aws-network-flow-monitor-agent-service-account
- associationArn: arn:aws:eks:us-east-2:929819487611:podidentityassociation/blueprint-construct-dev/a-qapuueff8twne5lwj
  associationId: a-qapuueff8twne5lwj
  clusterName: blueprint-construct-dev
  namespace: kube-system
  serviceAccount: aws-network-flow-monitor-agent-service-account

Why are there two associations, one is in kube-system?

@shapirov103
Copy link
Collaborator

I had a failure on cluster delete, could be unrelated(subnet dependency), have you tried creating and dropping the stack?

Copy link
Collaborator

@elamaran11 elamaran11 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@zjaco13 Nice work. Can you test with Graviton Nodes too?
Following needs to be added to ADOT Addon to scraper config to scrape the NFM Metrics.

  - job_name: 'eks-nfm-agent'
    kubernetes_sd_configs:
    - role: pod
    metrics_path: /metrics
    relabel_configs:
    - source_labels:
      - __meta_kubernetes_namespace
      - __meta_kubernetes_pod_label_name
      action: keep
      regex: amazon-network-flow-monitor;aws-network-flow-monitor-agent
    - target_label: __address__
      replacement: ${1}:9101
      source_labels:
      - __meta_kubernetes_pod_ip

/**
* Implementation of Network Flow Monitor Agent addon for EKS
*/
@utils.supportsALL
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you test with Graviton Nodes?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, tested on graviton!

@zjaco13
Copy link
Contributor Author

zjaco13 commented Jan 12, 2026

@zjaco13 Nice work. Can you test with Graviton Nodes too? Following needs to be added to ADOT Addon to scraper config to scrape the NFM Metrics.

  - job_name: 'eks-nfm-agent'
    kubernetes_sd_configs:
    - role: pod
    metrics_path: /metrics
    relabel_configs:
    - source_labels:
      - __meta_kubernetes_namespace
      - __meta_kubernetes_pod_label_name
      action: keep
      regex: amazon-network-flow-monitor;aws-network-flow-monitor-agent
    - target_label: __address__
      replacement: ${1}:9101
      source_labels:
      - __meta_kubernetes_pod_ip

@elamaran11 Added to AMP addon

@zjaco13
Copy link
Contributor Author

zjaco13 commented Jan 12, 2026

I had a failure on cluster delete, could be unrelated(subnet dependency), have you tried creating and dropping the stack?

Believe unrelated, have had no issues with test stack

@zjaco13 zjaco13 changed the title start nfm addon work Create Network FLow Monitor Addon Jan 12, 2026
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