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

Additional role to service account used by CAPG e2e tests #7665

Open
richardcase opened this issue Jan 9, 2025 · 9 comments
Open

Additional role to service account used by CAPG e2e tests #7665

richardcase opened this issue Jan 9, 2025 · 9 comments
Assignees
Labels
sig/k8s-infra Categorizes an issue or PR as relevant to SIG K8s Infra.

Comments

@richardcase
Copy link
Contributor

The e2e tests in CAPG have been updated to cover GKE provisioning. As a result, the service account that is retrieved from boskos needs an additional role assigning to it.

The Boskos resource details:

Type: gce-project
Owner: cluster-api-provider-gcp

Note: the resource is a key for a GCP service account.

The GCP service account that is related to this resource needs the following role adding to it:

iam.serviceAccountTokenCreator

This is blocking the e2e tests running.

@richardcase richardcase added the sig/k8s-infra Categorizes an issue or PR as relevant to SIG K8s Infra. label Jan 9, 2025
@richardcase
Copy link
Contributor Author

//cc @cpanato @salasberryfin

@cpanato
Copy link
Member

cpanato commented Jan 9, 2025

/assign

@cpanato
Copy link
Member

cpanato commented Jan 9, 2025

cc @ameukam can you help here? or who we can talk with

@ameukam
Copy link
Member

ameukam commented Jan 10, 2025

I have very limited bandwidth currently. Sorry. 😞
Talk to one of the @kubernetes/sig-k8s-infra-leads

@salasberryfin
Copy link

@dims @BenTheElder can you help with this?

@dims
Copy link
Member

dims commented Jan 13, 2025

/assign @ameukam @upodroid

@BenTheElder
Copy link
Member

If we're adding roles: we need to make sure boskos cleans up the associated resources we'll be creating that we may not have been before.

@richardcase
Copy link
Contributor Author

If we're adding roles: we need to make sure boskos cleans up the associated resources we'll be creating that we may not have been before.

Thats a good point. We'll be creating GKE clusters in the e2e. Looking at the janitor these are not included:

https://github.com/kubernetes-sigs/boskos/blob/9f79a9e4406a8d9fcc97b8ea93890dea44702981/cmd/janitor/gcp_janitor.py#L272

I can create a PR for this.

@richardcase
Copy link
Contributor Author

richardcase commented Jan 15, 2025

@cpanato @BenTheElder - just to confirm the existing GCP janitor cleans up stale GKE clusters:

[2025-01-15 09:49:15.829076] checking endpoint https://container.googleapis.com/
[2025-01-15 09:49:15.829160] running ['gcloud', 'container', '-q', 'clusters', 'list', '--project=k8s-infra-sandbox-capg', '--filter=name !~ ^default', '--format=json(name,createTime,region,zone)']
[2025-01-15 09:49:25.556005] cluster info: {'createTime': '2025-01-15T07:35:27+00:00', 'name': 'richard-test-autopilot', 'zone': 'us-central1'}
[2025-01-15 09:49:36.631275] Found stale gke cluster 'richard-test-autopilot' in 'https://container.googleapis.com/', created time = '2025-01-15T07:35:27'
[2025-01-15 09:50:09.076330] start a new thread, total 1
[2025-01-15 09:50:11.751438] [DRYRUN] Call ['gcloud', 'container', '-q', 'clusters', 'delete', 'richard-test-autopilot', '--project=k8s-infra-sandbox-capg', '--zone=us-central1']
[2025-01-15 09:50:13.642609] cluster info: {'createTime': '2025-01-15T07:33:43+00:00', 'name': 'richard-test-regional', 'zone': 'us-central1'}
[2025-01-15 09:50:23.363040] Found stale gke cluster 'richard-test-regional' in 'https://container.googleapis.com/', created time = '2025-01-15T07:33:43'
[2025-01-15 09:50:30.017251] start a new thread, total 2
[2025-01-15 09:50:32.418504] [DRYRUN] Call ['gcloud', 'container', '-q', 'clusters', 'delete', 'richard-test-regional', '--project=k8s-infra-sandbox-capg', '--zone=us-central1']
[2025-01-15 09:50:37.966746] cluster info: {'createTime': '2025-01-15T07:34:39+00:00', 'name': 'richard-test-zonal', 'zone': 'us-central1-c'}
[2025-01-15 09:50:42.694235] Found stale gke cluster 'richard-test-zonal' in 'https://container.googleapis.com/', created time = '2025-01-15T07:34:39'
[2025-01-15 09:50:51.363193] start a new thread, total 3
[2025-01-15 09:50:52.837425] [DRYRUN] Call ['gcloud', 'container', '-q', 'clusters', 'delete', 'richard-test-zonal', '--project=k8s-infra-sandbox-capg', '--zone=us-central1-c']

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
sig/k8s-infra Categorizes an issue or PR as relevant to SIG K8s Infra.
Projects
None yet
Development

No branches or pull requests

7 participants