Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
ef16761
fix: add missing IAM action for emptyRoutesDefaultVPCSecurityGroup op…
darkweaver87 Feb 10, 2025
227f1ab
:seedling: Bump the dependencies group in /hack/tools with 7 updates
dependabot[bot] Aug 25, 2025
f703c19
Update generated code
dependabot[bot] Aug 25, 2025
1d3f142
:seedling: Bump github.com/ulikunitz/xz in /hack/tools
dependabot[bot] Aug 28, 2025
2416035
:seedling: Bump github.com/go-viper/mapstructure/v2 in /hack/tools
dependabot[bot] Aug 29, 2025
948d685
devbox updates
May 12, 2025
3360b2b
go bump, seems needed to build envsubst
May 12, 2025
9d82d11
:sparkles: Create only one nat gateway per AZ
fiunchinho Jul 30, 2025
2c54e07
:seedling: Bump github.com/go-viper/mapstructure/v2 from 2.3.0 to 2.4.0
dependabot[bot] Aug 21, 2025
54bc415
Return early if Cluster is paused
fiunchinho Sep 3, 2025
e456362
:seedling: Bump the dependencies group in /hack/tools with 4 updates
dependabot[bot] Sep 4, 2025
05c538c
Update generated code
dependabot[bot] Sep 4, 2025
feebd44
add field to v1beta2
alam0rt Jun 4, 2025
ab0c792
add conversions and field to webhook tests
alam0rt Jun 4, 2025
058eabe
add to scope
alam0rt Jun 4, 2025
ba45de7
use correct type
alam0rt Jun 4, 2025
b456ba4
add tests for preserving delete
alam0rt Jun 4, 2025
2566c8a
make generate
alam0rt Jun 4, 2025
83e5d36
move to correct test case
alam0rt Jun 4, 2025
a915d3c
move to addon type
alam0rt Jun 5, 2025
e73c53c
remove old field
alam0rt Jun 5, 2025
b2bb96b
add back
alam0rt Jun 5, 2025
24aa66a
wire up
alam0rt Jun 5, 2025
bcb9122
generate again
alam0rt Sep 4, 2025
caed4ea
Add make target to generate test-infra prowjobs via CAPI's prowjob-gen
chrischdi Sep 5, 2025
62a8f84
build: upgrade Go version to 1.24.7
bryan-cox Sep 5, 2025
62c41a4
:seedling: Bump aws-actions/configure-aws-credentials from 4 to 5
dependabot[bot] Sep 8, 2025
fabad05
:seedling: Bump actions/setup-go from 5 to 6
dependabot[bot] Sep 8, 2025
848dab3
:seedling: Bump actions/github-script from 7.0.1 to 8.0.0
dependabot[bot] Sep 8, 2025
421deb6
:seedling: Bump the dependencies group in /hack/tools with 2 updates
dependabot[bot] Sep 10, 2025
9788faf
Fix RosaControlPlane sync defaulet RosaMachinePool
serngawy Aug 20, 2025
2b5f38b
Add support for AMD SEV-SNP instances
fangge1212 Aug 1, 2025
f0abfbf
Add RosaRoleConfig API and CRD.
PanSpagetka Apr 22, 2025
9d5c6b3
Enable partial reconcile of Rosa Operator Roles
PanSpagetka Aug 13, 2025
ee6d5f4
Review fixes
PanSpagetka Aug 18, 2025
258fcc0
Add integration tests
PanSpagetka Aug 26, 2025
6b11711
Add more tests
PanSpagetka Sep 3, 2025
d29f649
Fix comments
serngawy Sep 10, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "CAPA Devcontainer + Devbox + VSCode",
"image": "mcr.microsoft.com/devcontainers/base",
"image": "mcr.microsoft.com/devcontainers/go",
"features": {
"ghcr.io/dlouwers/devcontainer-features/devbox:1": {},
"ghcr.io/devcontainers/features/docker-in-docker:2.12.0": {},
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-ami-varsfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
echo "$PACKER_VARS" | jq -r > ./images/capi/vars.json
cat ./images/capi/vars.json
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
uses: aws-actions/configure-aws-credentials@v5
with:
aws-region: us-east-2
role-to-assume: arn:aws:iam::819546954734:role/gh-image-builder
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-ami.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ jobs:
ref: ${{ inputs.image_builder_version }}
fetch-depth: 0
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
uses: aws-actions/configure-aws-credentials@v5
with:
aws-region: us-east-2
role-to-assume: arn:aws:iam::819546954734:role/gh-image-builder
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.x
uses: actions/setup-go@v5
uses: actions/setup-go@v6
with:
go-version: '1.23'
go-version: '1.24'
id: go
- name: Check out code into the Go module directory
uses: actions/checkout@v5
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pr-gh-workflow-approve.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
actions: write
steps:
- name: Update PR
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
continue-on-error: true
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pr-golangci-lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
id: vars
run: echo "go_version=$(make go-version)" >> $GITHUB_OUTPUT
- name: Set up Go
uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # tag=v5.5.0
uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # tag=v6.0.0
with:
go-version: ${{ steps.vars.outputs.go_version }}
- name: golangci-lint
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v5
uses: actions/setup-go@v6
with:
go-version: '1.23'
- name: Set version info
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/scan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
with:
ref: ${{ matrix.branch }}
- name: Setup go
uses: actions/setup-go@v5
uses: actions/setup-go@v6
with:
go-version-file: '${{ github.workspace }}/go.mod'
- name: Run verify container script
Expand Down
2 changes: 1 addition & 1 deletion .golangci-kal.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: "2"

run:
timeout: 10m
go: "1.22"
go: "1.24"
allow-parallel-runners: true

linters:
Expand Down
11 changes: 10 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ include $(ROOT_DIR_RELATIVE)/common.mk
# https://suva.sh/posts/well-documented-makefiles

# Go
GO_VERSION ?=1.23.9
GO_VERSION ?=1.24.7
GO_CONTAINER_IMAGE ?= golang:$(GO_VERSION)

# Directories.
Expand Down Expand Up @@ -75,6 +75,7 @@ YQ := $(TOOLS_BIN_DIR)/yq
KPROMO := $(TOOLS_BIN_DIR)/kpromo
RELEASE_NOTES := $(TOOLS_BIN_DIR)/release-notes
GORELEASER := $(TOOLS_BIN_DIR)/goreleaser
PROWJOB_GEN := $(TOOLS_BIN_DIR)/prowjob-gen

CLUSTERAWSADM_SRCS := $(call rwildcard,.,cmd/clusterawsadm/*.*)

Expand Down Expand Up @@ -423,6 +424,14 @@ generate-test-flavors: $(KUSTOMIZE) ## Generate test template flavors
./hack/gen-test-flavors.sh withoutclusterclass
./hack/gen-test-flavors.sh withclusterclass

.PHONY: generate-test-infra-prowjobs
generate-test-infra-prowjobs: $(PROWJOB_GEN) ## Generates the prowjob configurations in test-infra
@if [ -z "${TEST_INFRA_DIR}" ]; then echo "TEST_INFRA_DIR is not set"; exit 1; fi
$(PROWJOB_GEN) \
-config "$(TEST_INFRA_DIR)/config/jobs/kubernetes-sigs/cluster-api-provider-aws/cluster-api-provider-aws-prowjob-gen.yaml" \
-templates-dir "$(TEST_INFRA_DIR)/config/jobs/kubernetes-sigs/cluster-api-provider-aws/templates" \
-output-dir "$(TEST_INFRA_DIR)/config/jobs/kubernetes-sigs/cluster-api-provider-aws"

.PHONY: e2e-image
e2e-image: docker-pull-prerequisites $(TOOLS_BIN_DIR)/start.sh $(TOOLS_BIN_DIR)/restart.sh ## Build an e2e test image
docker build --build-arg builder_image=$(GO_CONTAINER_IMAGE) -f Dockerfile --tag="gcr.io/k8s-staging-cluster-api/capa-manager:e2e" .
Expand Down
3 changes: 3 additions & 0 deletions PROJECT
Original file line number Diff line number Diff line change
Expand Up @@ -58,3 +58,6 @@ resources:
- group: infrastructure
version: v1beta2
kind: AWSManagedCluster
- group: infrastructure
kind: ROSARoleConfig
version: v1beta2
1 change: 1 addition & 0 deletions api/v1beta1/awscluster_conversion.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ func (src *AWSCluster) ConvertTo(dstRaw conversion.Hub) error {
dst.Status.Bastion.HostAffinity = restored.Status.Bastion.HostAffinity
dst.Status.Bastion.HostID = restored.Status.Bastion.HostID
dst.Status.Bastion.CapacityReservationPreference = restored.Status.Bastion.CapacityReservationPreference
dst.Status.Bastion.CPUOptions = restored.Status.Bastion.CPUOptions
}
dst.Spec.Partition = restored.Spec.Partition

Expand Down
2 changes: 2 additions & 0 deletions api/v1beta1/awsmachine_conversion.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ func (src *AWSMachine) ConvertTo(dstRaw conversion.Hub) error {
dst.Spec.HostAffinity = restored.Spec.HostAffinity
dst.Spec.CapacityReservationPreference = restored.Spec.CapacityReservationPreference
dst.Spec.NetworkInterfaceType = restored.Spec.NetworkInterfaceType
dst.Spec.CPUOptions = restored.Spec.CPUOptions
if restored.Spec.ElasticIPPool != nil {
if dst.Spec.ElasticIPPool == nil {
dst.Spec.ElasticIPPool = &infrav1.ElasticIPPool{}
Expand Down Expand Up @@ -115,6 +116,7 @@ func (r *AWSMachineTemplate) ConvertTo(dstRaw conversion.Hub) error {
dst.Spec.Template.Spec.HostAffinity = restored.Spec.Template.Spec.HostAffinity
dst.Spec.Template.Spec.CapacityReservationPreference = restored.Spec.Template.Spec.CapacityReservationPreference
dst.Spec.Template.Spec.NetworkInterfaceType = restored.Spec.Template.Spec.NetworkInterfaceType
dst.Spec.Template.Spec.CPUOptions = restored.Spec.Template.Spec.CPUOptions
if restored.Spec.Template.Spec.ElasticIPPool != nil {
if dst.Spec.Template.Spec.ElasticIPPool == nil {
dst.Spec.Template.Spec.ElasticIPPool = &infrav1.ElasticIPPool{}
Expand Down
2 changes: 2 additions & 0 deletions api/v1beta1/zz_generated.conversion.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions api/v1beta2/awsmachine_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,11 @@ type AWSMachineSpec struct {
// +kubebuilder:validation:MinLength:=2
InstanceType string `json:"instanceType"`

// CPUOptions defines CPU-related settings for the instance, including the confidential computing policy.
// When omitted, this means no opinion and the AWS platform is left to choose a reasonable default.
// +optional
CPUOptions CPUOptions `json:"cpuOptions,omitempty,omitzero"`

// AdditionalTags is an optional set of tags to add to an instance, in addition to the ones added by default by the
// AWS provider. If both the AWSCluster and the AWSMachine specify the same tag name with different values, the
// AWSMachine's value takes precedence.
Expand Down
35 changes: 35 additions & 0 deletions api/v1beta2/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,11 @@ type Instance struct {
// +kubebuilder:validation:Enum="";None;CapacityReservationsOnly;Open
// +optional
CapacityReservationPreference CapacityReservationPreference `json:"capacityReservationPreference,omitempty"`

// CPUOptions defines CPU-related settings for the instance, including the confidential computing policy.
// When omitted, this means no opinion and the AWS platform is left to choose a reasonable default.
// +optional
CPUOptions CPUOptions `json:"cpuOptions,omitempty,omitzero"`
}

// CapacityReservationPreference describes the preferred use of capacity reservations
Expand Down Expand Up @@ -534,3 +539,33 @@ var (
// SubnetSchemaPreferPublic allocates more subnets in the VPC to public subnets.
SubnetSchemaPreferPublic = SubnetSchemaType("PreferPublic")
)

// AWSConfidentialComputePolicy represents the confidential compute configuration for the instance.
// +kubebuilder:validation:Enum=Disabled;AMDEncryptedVirtualizationNestedPaging
type AWSConfidentialComputePolicy string

const (
// AWSConfidentialComputePolicyDisabled disables confidential computing for the instance.
AWSConfidentialComputePolicyDisabled AWSConfidentialComputePolicy = "Disabled"
// AWSConfidentialComputePolicySEVSNP enables AMD SEV-SNP as the confidential computing technology for the instance.
AWSConfidentialComputePolicySEVSNP AWSConfidentialComputePolicy = "AMDEncryptedVirtualizationNestedPaging"
)

// CPUOptions defines CPU-related settings for the instance, including the confidential computing policy.
// +kubebuilder:validation:MinProperties=1
type CPUOptions struct {
// ConfidentialCompute specifies whether confidential computing should be enabled for the instance,
// and, if so, which confidential computing technology to use.
// Valid values are: Disabled, AMDEncryptedVirtualizationNestedPaging
// When set to Disabled, confidential computing will be disabled for the instance.
// When set to AMDEncryptedVirtualizationNestedPaging, AMD SEV-SNP will be used as the confidential computing technology for the instance.
// In this case, ensure the following conditions are met:
// 1) The selected instance type supports AMD SEV-SNP.
// 2) The selected AWS region supports AMD SEV-SNP.
// 3) The selected AMI supports AMD SEV-SNP.
// More details can be checked at https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/sev-snp.html
// When omitted, this means no opinion and the AWS platform is left to choose a reasonable default,
// which is subject to change without notice. The current default is Disabled.
// +optional
ConfidentialCompute AWSConfidentialComputePolicy `json:"confidentialCompute,omitempty"`
}
17 changes: 17 additions & 0 deletions api/v1beta2/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion cloudbuild-nightly.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ timeout: 3000s
options:
substitution_option: ALLOW_LOOSE
steps:
- name: 'gcr.io/k8s-staging-test-infra/gcb-docker-gcloud@sha256:4e830b673791d5595719bc6c4ca62dce3746b4e20d749e45004254bc6ef0a140' # v20250116-2a05ea7e3d go 1.23.4
- name: 'gcr.io/k8s-staging-test-infra/gcb-docker-gcloud@sha256:63840f133e0dfeea0af9ef391210da7fab9d2676172e2967fccab0cd6110c4e7' # v20250513-9264efb079 go 1.24.3
entrypoint: make
env:
- DOCKER_CLI_EXPERIMENTAL=enabled
Expand Down
2 changes: 1 addition & 1 deletion cloudbuild.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ timeout: 3000s
options:
substitution_option: ALLOW_LOOSE
steps:
- name: 'gcr.io/k8s-staging-test-infra/gcb-docker-gcloud@sha256:4e830b673791d5595719bc6c4ca62dce3746b4e20d749e45004254bc6ef0a140' # v20250116-2a05ea7e3d go 1.23.4
- name: 'gcr.io/k8s-staging-test-infra/gcb-docker-gcloud@sha256:63840f133e0dfeea0af9ef391210da7fab9d2676172e2967fccab0cd6110c4e7' # v20250513-9264efb079 go 1.24.3
entrypoint: make
env:
- DOCKER_CLI_EXPERIMENTAL=enabled
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ func (t Template) ControllersPolicy() *iamv1.PolicyDocument {
"ec2:ModifyNetworkInterfaceAttribute",
"ec2:ModifySubnetAttribute",
"ec2:ReleaseAddress",
"ec2:RevokeSecurityGroupEgress",
"ec2:RevokeSecurityGroupIngress",
"ec2:RunInstances",
"ec2:TerminateInstances",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,7 @@ Resources:
- ec2:ModifyNetworkInterfaceAttribute
- ec2:ModifySubnetAttribute
- ec2:ReleaseAddress
- ec2:RevokeSecurityGroupEgress
- ec2:RevokeSecurityGroupIngress
- ec2:RunInstances
- ec2:TerminateInstances
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,7 @@ Resources:
- ec2:ModifyNetworkInterfaceAttribute
- ec2:ModifySubnetAttribute
- ec2:ReleaseAddress
- ec2:RevokeSecurityGroupEgress
- ec2:RevokeSecurityGroupIngress
- ec2:RunInstances
- ec2:TerminateInstances
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,7 @@ Resources:
- ec2:ModifyNetworkInterfaceAttribute
- ec2:ModifySubnetAttribute
- ec2:ReleaseAddress
- ec2:RevokeSecurityGroupEgress
- ec2:RevokeSecurityGroupIngress
- ec2:RunInstances
- ec2:TerminateInstances
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,7 @@ Resources:
- ec2:ModifyNetworkInterfaceAttribute
- ec2:ModifySubnetAttribute
- ec2:ReleaseAddress
- ec2:RevokeSecurityGroupEgress
- ec2:RevokeSecurityGroupIngress
- ec2:RunInstances
- ec2:TerminateInstances
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,7 @@ Resources:
- ec2:ModifyNetworkInterfaceAttribute
- ec2:ModifySubnetAttribute
- ec2:ReleaseAddress
- ec2:RevokeSecurityGroupEgress
- ec2:RevokeSecurityGroupIngress
- ec2:RunInstances
- ec2:TerminateInstances
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,7 @@ Resources:
- ec2:ModifyNetworkInterfaceAttribute
- ec2:ModifySubnetAttribute
- ec2:ReleaseAddress
- ec2:RevokeSecurityGroupEgress
- ec2:RevokeSecurityGroupIngress
- ec2:RunInstances
- ec2:TerminateInstances
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,7 @@ Resources:
- ec2:ModifyNetworkInterfaceAttribute
- ec2:ModifySubnetAttribute
- ec2:ReleaseAddress
- ec2:RevokeSecurityGroupEgress
- ec2:RevokeSecurityGroupIngress
- ec2:RunInstances
- ec2:TerminateInstances
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,7 @@ Resources:
- ec2:ModifyNetworkInterfaceAttribute
- ec2:ModifySubnetAttribute
- ec2:ReleaseAddress
- ec2:RevokeSecurityGroupEgress
- ec2:RevokeSecurityGroupIngress
- ec2:RunInstances
- ec2:TerminateInstances
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,7 @@ Resources:
- ec2:ModifyNetworkInterfaceAttribute
- ec2:ModifySubnetAttribute
- ec2:ReleaseAddress
- ec2:RevokeSecurityGroupEgress
- ec2:RevokeSecurityGroupIngress
- ec2:RunInstances
- ec2:TerminateInstances
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,7 @@ Resources:
- ec2:ModifyNetworkInterfaceAttribute
- ec2:ModifySubnetAttribute
- ec2:ReleaseAddress
- ec2:RevokeSecurityGroupEgress
- ec2:RevokeSecurityGroupIngress
- ec2:RunInstances
- ec2:TerminateInstances
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,7 @@ Resources:
- ec2:ModifyNetworkInterfaceAttribute
- ec2:ModifySubnetAttribute
- ec2:ReleaseAddress
- ec2:RevokeSecurityGroupEgress
- ec2:RevokeSecurityGroupIngress
- ec2:RunInstances
- ec2:TerminateInstances
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,7 @@ Resources:
- ec2:ModifyNetworkInterfaceAttribute
- ec2:ModifySubnetAttribute
- ec2:ReleaseAddress
- ec2:RevokeSecurityGroupEgress
- ec2:RevokeSecurityGroupIngress
- ec2:RunInstances
- ec2:TerminateInstances
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,7 @@ Resources:
- ec2:ModifyNetworkInterfaceAttribute
- ec2:ModifySubnetAttribute
- ec2:ReleaseAddress
- ec2:RevokeSecurityGroupEgress
- ec2:RevokeSecurityGroupIngress
- ec2:RunInstances
- ec2:TerminateInstances
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,7 @@ Resources:
- ec2:ModifyNetworkInterfaceAttribute
- ec2:ModifySubnetAttribute
- ec2:ReleaseAddress
- ec2:RevokeSecurityGroupEgress
- ec2:RevokeSecurityGroupIngress
- ec2:RunInstances
- ec2:TerminateInstances
Expand Down
Loading