Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
74 commits
Select commit Hold shift + click to select a range
a0e6dbe
Bump helm/chart-releaser-action from 1.6.0 to 1.7.0
dependabot[bot] Jan 27, 2025
87fed46
chore(chart): update version
cartermckinnon Jul 16, 2025
98718f7
Merge pull request #1213 from cartermckinnon/master
k8s-ci-robot Jul 25, 2025
ce4f1a2
e2e/debug: increase data collection on e2e failures
mtulio Jul 29, 2025
1bdf622
doc/devel: update development guide with e2e information
mtulio Jul 29, 2025
702c043
Update job spec ref on development.md
mtulio Jul 30, 2025
7512ca8
Merge pull request #1218 from mtulio/doc-devel-e2e
k8s-ci-robot Jul 31, 2025
ce53a6d
Merge pull request #1099 from kubernetes/dependabot/github_actions/he…
k8s-ci-robot Jul 31, 2025
e955e76
Merge pull request #1217 from mtulio/e2e-debug
k8s-ci-robot Aug 1, 2025
ea8aa83
docs/devel: add CI monitoring information for developers
mtulio Aug 7, 2025
9abac55
add sig cloud provider leads to owners
elmiko Jul 16, 2025
a97d423
Merge pull request #1212 from elmiko/update-owners
k8s-ci-robot Aug 12, 2025
ca110f3
1.34.rc.0 dependencies update
Ganiredi Aug 12, 2025
79c0cc3
Merge pull request #1224 from Ganiredi/master
k8s-ci-robot Aug 12, 2025
ed02a93
Release 1.34 rc.0
notSoWiseOldMan Aug 13, 2025
9270f2a
Merge pull request #1225 from notSoWiseOldMan/master
k8s-ci-robot Aug 14, 2025
cc8d288
remove nil ptr dereference
gargipanatula Aug 11, 2025
83361d0
Merge pull request #1223 from gargipanatula/handle-elb-error
k8s-ci-robot Aug 20, 2025
b7c698e
doc/service: describe supported target group attributes
mtulio Aug 11, 2025
d576cd4
e2e/loadbalancer: implement hairpin connection cases
mtulio Aug 11, 2025
32347f7
aws/validations: introduce pre-flight validations for EnsureLoadBalancer
mtulio Aug 20, 2025
c9a3834
fix: update instance types requiring topology labels
ndbaker1 Aug 22, 2025
924fd6f
Merge pull request #1230 from ndbaker1/regex
k8s-ci-robot Aug 25, 2025
73428cd
feat/tg-attr: support target group attrib annotation on NLB
mtulio Aug 20, 2025
3733fb0
Update go dependencies with 1.34.0
Ganiredi Aug 28, 2025
3b4c95b
Merge pull request #1243 from Ganiredi/1.34.0
k8s-ci-robot Aug 29, 2025
cd61887
Merge pull request #1214 from mtulio/fix-hairpin-feat-tg-attrib
k8s-ci-robot Aug 29, 2025
1ffc668
Add support private ipv4 addresses annotation for NLB
luckyganesh Aug 30, 2025
79942ab
Update ec2 sdk version to latest
Ganiredi Sep 2, 2025
d720d4b
Release 1.34.0
Ganiredi Sep 2, 2025
e20edcb
Merge pull request #1245 from Ganiredi/v1.34.0-1
k8s-ci-robot Sep 2, 2025
ed5a860
Merge pull request #1246 from Ganiredi/d720d4b1
k8s-ci-robot Sep 3, 2025
43543b3
Merge pull request #1221 from mtulio/doc-devel-monitor
k8s-ci-robot Sep 4, 2025
1b022f1
docs: augmented description for "backend-protocol" and "type" annotat…
samuel-esp Jul 1, 2025
de9a0ab
Merge pull request #1187 from samuel-esp/fix-docs-default-backend-pro…
k8s-ci-robot Sep 5, 2025
30ab512
e2e: bump dependencies to the latest k8s lib
mtulio Sep 5, 2025
243bcf6
build(deps): bump actions/setup-go from 5.5.0 to 6.0.0
dependabot[bot] Sep 8, 2025
5b62557
Merge pull request #1256 from mtulio/e2e-dep-bump
k8s-ci-robot Sep 8, 2025
a63f164
docs: fix broken references on getting_started.md
mtulio Sep 8, 2025
7e16b17
svc/nlb/sg/lb: ensure elbv2 is handling security group IDs on Create
mtulio Jun 10, 2025
b6af98e
svc/sg/tags: introduce owner check for delete SG flow on BYO SG
mtulio Jul 15, 2025
7736b31
doc/nlb-sg: added instructions to use NLB+SG feature
mtulio Jul 8, 2025
7b53922
svc/nlb/sg/cfg: introduce cloud-config to enable NLB with SGs
mtulio Jun 10, 2025
76b579a
svc/nlb/sg: ensure service type NLB manage Sec Groups
mtulio Jun 10, 2025
2f6df28
svc/nlb/sg/validations: ensure annotations matches NLB SG
mtulio Sep 8, 2025
87b700f
svc/nlb/sg/test: ensure unit tests on EnsureLoadBalancer for NLB+SG
mtulio Jun 11, 2025
53a8527
fix/tests/nlb/lb: fix LB tests after sdk v2 updates
mtulio Sep 8, 2025
5e18243
Merge pull request #1158 from mtulio/SPLAT-2253-nlb-sg-config
k8s-ci-robot Sep 9, 2025
8a0025b
Merge pull request #1259 from mtulio/patch-1
k8s-ci-robot Sep 12, 2025
f915f24
Fix the batched describe insance method for instance not found case
kmala Sep 23, 2025
36c0ac9
Merge pull request #1260 from kmala/fix
k8s-ci-robot Sep 24, 2025
c221c83
Update cloud-controller-manager image version to v1.34.0
archups Sep 24, 2025
e4e42f3
Bump the helm chart version and app version
archups Sep 24, 2025
059b0b6
Merge pull request #1263 from archups/bump-ccm-version-1.34.0
k8s-ci-robot Sep 25, 2025
e5ba2d2
Fix the linting issue
luckyganesh Sep 26, 2025
0fb5ea8
Merge pull request #1258 from kubernetes/dependabot/github_actions/ac…
k8s-ci-robot Sep 26, 2025
1b911ba
bump go sdk to 1.24.7 for CVE
yue9944882 Oct 2, 2025
83eae93
Merge pull request #1266 from yue9944882/bump-go-1247
k8s-ci-robot Oct 2, 2025
37381a3
Merge pull request #1232 from luckyganesh/master
k8s-ci-robot Oct 3, 2025
d909bb6
go.mod: pinning go version to use patch from build env
mtulio Oct 22, 2025
bea9adf
Merge pull request #1282 from mtulio/pin-gomod
k8s-ci-robot Oct 24, 2025
db6580e
merge upstream/master into main
Oct 27, 2025
6a22d97
UPSTREAM: <carry>: Set up repository for OpenShift CI
Fedosin Jun 3, 2021
87aa095
UPSTREAM: <carry>: Adds ecr-credential-provider .spec file
theobarberbany Jan 9, 2024
2fc44f4
UPSTREAM: <carry>: Add snyk exclusion file
racheljpg Feb 26, 2024
cbbaebb
UPSTREAM: <carry>: Sync OWNERS file
JoelSpeed Jun 24, 2024
212210c
UPSTREAM: <carry>: Updating ose-aws-cloud-controller-manager-containe…
Sep 4, 2024
97bd3a4
UPSTREAM: <carry>: Updating ose-aws-cloud-controller-manager-containe…
Dec 4, 2024
db99463
UPSTREAM: <carry>: Updating ose-aws-cloud-controller-manager-containe…
Jun 18, 2025
bb6ba09
UPSTREAM: <carry>: Downgrade Go to 1.24.0
nrb Jul 24, 2025
6c187ce
UPSTREAM: <carry>: Sync OWNERS file
RadekManak Sep 4, 2025
7ce3783
UPSTREAM: <carry>: delete OWNERS_ALIASES
damdo Oct 28, 2025
d50372e
UPSTREAM: <carry>: Updating ose-aws-cloud-controller-manager-containe…
Sep 29, 2025
dd8ad24
UPSTREAM: <drop>: Updating and vendoring go modules after an upstream…
Oct 27, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
2 changes: 1 addition & 1 deletion .github/workflows/update-deps.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
pull-requests: write
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
- uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5
- uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00
with:
go-version-file: go.mod
- name: Update Dependencies
Expand Down
2 changes: 1 addition & 1 deletion .ko.yaml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
defaultBaseImage: registry.k8s.io/build-image/go-runner:v2.4.0-go1.24.4-bookworm.0
defaultBaseImage: registry.k8s.io/build-image/go-runner:v2.4.0-go1.24.7-bookworm.0
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@
## BUILD ARGS ##
################################################################################
# This build arg allows the specification of a custom Golang image.
ARG GOLANG_IMAGE=golang:1.24.4
ARG GOLANG_IMAGE=golang:1.24.7

# The distroless image on which the CPI manager image is built.
#
# Please do not use "latest". Explicit tags should be used to provide
# deterministic builds. Follow what kubernetes uses to build
# kube-controller-manager, for example for 1.23.x:
# https://github.com/kubernetes/kubernetes/blob/release-1.24/build/common.sh#L94
ARG DISTROLESS_IMAGE=registry.k8s.io/build-image/go-runner:v2.4.0-go1.24.4-bookworm.0
ARG DISTROLESS_IMAGE=registry.k8s.io/build-image/go-runner:v2.4.0-go1.24.7-bookworm.0

################################################################################
## BUILD STAGE ##
Expand Down
4 changes: 2 additions & 2 deletions charts/aws-cloud-controller-manager/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
apiVersion: v1
name: aws-cloud-controller-manager
description: Installs Cloud Controller Manager for AWS Cloud Provider
version: 0.0.8
appVersion: v1.27.1
version: 0.0.10
appVersion: v1.34.0
maintainers:
- name: Nick Turner
email: nic@amazon.com
Expand Down
2 changes: 1 addition & 1 deletion charts/aws-cloud-controller-manager/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ args:

image:
repository: registry.k8s.io/provider-aws/cloud-controller-manager
tag: v1.33.0
tag: v1.34.0

# Specify image pull secrets
imagePullSecrets: []
Expand Down
2 changes: 1 addition & 1 deletion cloudbuild.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ steps:
- --platform=linux/amd64,linux/arm64
- .
# Build cloudbuild artifacts (for attestation)
- name: 'docker.io/library/golang:1.24.4-bookworm'
- name: 'docker.io/library/golang:1.24.7-bookworm'
id: cloudbuild-artifacts
entrypoint: make
env:
Expand Down
46 changes: 45 additions & 1 deletion docs/development.md
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ cd cloud-provider-aws
make && make test
```

### Run the tests!
### Run the e2e tests!

You can run the tests with the following:

Expand All @@ -159,3 +159,47 @@ make test-e2e

> [!NOTE]
> If tests fail and the cluster isn't deleted, you can manually delete with `kops delete cluster --name ENTER_NAME`. The S3 kops state bucket will include all clusters not cleaned up.

### Run the e2e tests in clusters not provisioned by kops

E2E tests require a running Kubernetes cluster with AWS cloud provider configured.

Prerequisites:
- AWS credentials configured
- kubernetes configuration pointing to a cluster with cloud-provider-aws deployed

Steps:

- Build the test utility:
```bash
make e2e.test
```
- A binary `e2e.test` is expected to be created under the root of the project:
- Check available e2e tests (optional):
```bash
./e2e.test --ginkgo.dry-run
```
- Run specific e2e tests (Load Balancer with NLB):
```bash
./e2e.test --ginkgo.v --ginkgo.focus="loadbalancer.*NLB"
```

## CI Test Infrastructure

The cloud-provider-aws project uses [Prow][prow] as to the CI/CD (Continuous Integration/Continuous Delivery) system to schedule CI jobs, and use [kops][kops] to create the cluster used by jobs.

The Prow test grid dashboard is available at [testgrid.k8s.io/amazon-ec2][test-grid] ([here][test-grid-e2e] is the directly link to the e2e test suite).

The CI jobs are defined in the [kubernetes/test-infra repository][k-test-infra-ccm].

The e2e test suite is defined in [tests/e2e](https://github.com/kubernetes/cloud-provider-aws/tree/master/tests/e2e).

When you need to investigate CI infrastructure issues (such as build timeouts, resource constraints, or job failures), you can use the Grafana instance available at [monitoring-eks.prow.k8s.io][monitoring-eks]. The [Build Dashboard][monitoring-eks-dash-build] is commonly used to monitor resource usage from build jobs.

[prow]: https://github.com/kubernetes-sigs/prow
[kops]: https://github.com/kubernetes/kops/tree/master
[test-grid]: https://testgrid.k8s.io/amazon-ec2
[test-grid-e2e]: https://testgrid.k8s.io/amazon-ec2#ci-cloud-provider-aws-e2e
[k-test-infra-ccm]: https://github.com/kubernetes/test-infra/blob/master/config/jobs/kubernetes/cloud-provider-aws/cloud-provider-aws-presubmit.yaml
[monitoring-eks]: https://monitoring-eks.prow.k8s.io/
[monitoring-eks-dash-build]: https://monitoring-eks.prow.k8s.io/d/96Q8oOOZk/builds
8 changes: 4 additions & 4 deletions docs/getting_started.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ with the cloud controller manager. The steps are as follows:
1. Add the `--cloud-provider=external` to the kube-controller-manager config.
1. Add the `--cloud-provider=external` to the kube apiserver config.
1. Add the `--cloud-provider=external` to each the kubelet's config.
1. Add the tag kubernetes.io/cluster/your_cluster_id=owned (if resources are
1. Add the tag `kubernetes.io/cluster/your_cluster_id=owned` (if resources are
owned and managed by the cluster) or
kubernetes.io/cluster/your_cluster_id=shared (if resources are shared
`kubernetes.io/cluster/your_cluster_id=shared` (if resources are shared
between clusters, and should not be destroyed if the cluster is destroyed)
to your instances.
1. Apply the kustomize configuration: `kubectl apply -k
Expand All @@ -45,7 +45,7 @@ Follow the detailed steps in [the documentation](https://kubernetes.io/docs/task
|------|-----------|-------------|
| kube-apiserver | `--cloud-provider=external` | Disables the cloud provider in the API Server. This will disable the cloud provider code in the kube apiserver, which is limited to the persistent volume labelling controller. |
| kube-controller-manager | `--cloud-provider=external` | Disables the cloud provider in the Kube Controller Manager. This disables cloud related control loops, including the route controller, the service controller, and the node lifecycle controller. |
| kube-controller-manager | --leader-elect=true | Enable leader election |
| kube-controller-manager | `--leader-elect=true` | Enable leader election |
| kube-controller-manager | `--external-cloud-volume-plugin=aws` | Tells the Kube Controller Manager to run the volume loops that have cloud provider code in them. This is required for volumes to work if you are not using CSI with migration enabled. |
| kubelet | `--cloud-provider=external` | Disables the cloud provider in the Kubelet. This disables the built-in kubelet image credential provider, so in order for the kubelet to fetch from ECR repositories, it will need the external ECR kubelet image credential provider binary. This also disables the EBS attacher interface implementation, which is generally safe as long as the EBS CSI driver is installed and CSI migration is enabled.|
| aws-cloud-controller-manager | <code>--cloud-provider=[aws&#124;aws/v2]</code> | Optional. Selects the legacy cloud-provider or the v2 cloud-provider in the aws-cloud-controller-manager. WARNING: the v2 cloud-provider is in a pre-alpha state. |
Expand All @@ -56,4 +56,4 @@ In order to create a cluster using kops, you can try the kops example cluster. R

`make kops-example`

This will create a sample kops cluster with the example configuration, found in [examples/kops-new-cluster](../examples/kops-new-cluster) The cloud cloud controller manager specific configuration is separate, purely for readability purposes, and can be found in [overlays/cloud-controller-manager](../examples/kops-new-cluster/overlays/cloud-controller-manager).
This will create a sample kops cluster with the example configuration, found in [examples/kops-new-cluster](https://github.com/kubernetes/cloud-provider-aws/tree/master/examples/kops-new-cluster) The cloud cloud controller manager specific configuration is separate, purely for readability purposes, and can be found in [overlays/cloud-controller-manager](https://github.com/kubernetes/cloud-provider-aws/tree/master/examples/kops-new-cluster/overlays/cloud-controller-manager).
117 changes: 117 additions & 0 deletions docs/nlb_security_groups.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
# Service type-LoadBalancer Network Load Balancer with Security Group

## Overview

The controller can be configured to enable managed Security Group (SG) for Services using AWS Network Load Balancer (NLB) by setting an opt-in configuration in your cloud config. When enabled, each NLB created for a Kubernetes Service of type `LoadBalancer` with annotation `service.beta.kubernetes.io/aws-load-balancer-type=nlb` will have a dedicated Security Group, managed by the cloud provider controller. We are calling this as opt-in Managed NLB Security Group ("Managed SG" mode).

> Note: The BYO SG (user-provided security groups) annotations (`service.beta.kubernetes.io/aws-load-balancer-security-groups` and `service.beta.kubernetes.io/aws-load-balancer-extra-security-groups`) are valid only for Classic Load Balancers. To learn more about supported annotations by load balancer type, see the [service_controller documentation][doc-ctrl-service].

[doc-ctrl-service]: https://github.com/kubernetes/cloud-provider-aws/blob/master/docs/service_controller.md

## Configuration

### Opt-in Managed Security Group mode

To enable this feature, add the following to your cloud config (usually `/etc/kubernetes/cloud-config` or as configured in your deployment):

```ini
[Global]
NLBSecurityGroupMode = Managed
```

- **Default behavior:** If `NLBSecurityGroupMode` is not set or set to any value other than `Managed`, NLBs are provisioned without a dedicated, controller-managed Security Group (legacy behavior).
- **Opt-in behavior:** When set to `Managed`, the controller will create, attach, update, and delete a dedicated SG for each NLB Service.

## Feature Details and Use Cases

- **Why use this feature?**
- Improved security: fine-grained, automated control over NLB ingress.
- Automated lifecycle management of SGs, reducing manual intervention and risk of resource leaks.
- **When to use:**
- When you want the controller to manage NLB security groups automatically for NLB.
- When your security/compliance policies require explicit SGs for each NLB.

## Upgrade and Migration Notes

- **Enabling the feature:**
- Existing Service type-loadBalancer NLB will not be retroactively assigned a managed SG. Only new Services (created after enabling the feature) will have managed SGs.
- To migrate existing NLBs, you must recreate the Service or manually update the SGs.
- **Disabling the feature:**
- If you disable the feature after using it, previously managed SGs will not be deleted automatically unless the Service and associated NLB is deleted.
- **Controller restart:**
- Changing the config requires a controller restart for the new setting to take effect.

## Security Group Lifecycle

### Managed Security Group

- **Creation:**
- SGs are created with owned cluster tag indicating they are managed by the controller.
- **Tagging:**
- Managed SGs are tagged for identification and safe cleanup. Example cluster tag:
- `kubernetes.io/cluster/<cluster-name>: owned`
- **Deletion:**
- Managed SGs are deleted when the corresponding Service is deleted. The controller uses exponential backoff to handle AWS dependency violations.

## Testing and Validation

### Test 1 - **How to test the Managed Security Group:**

1. Ensure your cloud-config has the configuration `NLBSecurityGroupMode = Managed`
2. Create a Service of type `LoadBalancer` after enabling the feature.
```sh
APP_NAME=app
APP_NAMESPACE=$APP_NAME
SVC_NAME="${APP_NAME}-nlb-sg"
cat << EOF | kubectl create -f -
apiVersion: v1
kind: Service
metadata:
name: "${SVC_NAME}"
namespace: "${APP_NAMESPACE}"
annotations:
service.beta.kubernetes.io/aws-load-balancer-type: nlb
spec:
selector:
app: "${APP_NAME}"
ports:
- port: 80
targetPort: 8080
protocol: TCP
type: LoadBalancer
EOF
```
3. Verify that a managed SG is created and attached to the NLB in the AWS console.
4. Check that the SG is tagged appropriately and that ingress rules match your Service spec.
5. Ensure you can reach the Service NLB endpoint:
```sh
LB_DNS=$(kubectl get svc $SVC_NAME -n ${APP_NAMESPACE} -o jsonpath='{.status.loadBalancer.ingress[0].hostname}')

aws elbv2 describe-tags --resource-arns $(aws elbv2 describe-load-balancers | jq -r ".LoadBalancers[] | select(.DNSName==\"$LB_DNS\").LoadBalancerArn") | jq .TagDescriptions[].Tags

[
{
"Key": "kubernetes.io/service-name",
"Value": "app/app-svc-ccm"
},
{
"Key": "kubernetes.io/cluster/mrb-sg-zvcgr",
"Value": "owned"
}
]

# reach the LB endpoint
curl -v $LB_DNS
```
4. Delete the Service and verify that the SG is deleted.

## Troubleshooting

- **SG not deleted:**
- Check for AWS dependency violations (e.g., NLB still deleting). The controller will retry deletion with backoff.
- **NLB not created:**
- Ensure the controller has IAM permissions to manage Security Groups.
- **SG rules not as expected:**
- Check your Service annotations and cloud config.
- **Config changes not taking effect:**
- Ensure you have restarted the controller after changing the config.
Loading