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

Add a janitor periodic job to cleanup stale ec2 instances from the node-e2e-tests service account #30395

Conversation

dims
Copy link
Member

@dims dims commented Aug 16, 2023

No description provided.

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Aug 16, 2023
@dims
Copy link
Member Author

dims commented Aug 16, 2023

/assign @tzneal @upodroid

@k8s-ci-robot k8s-ci-robot added the area/config Issues or PRs related to code in /config label Aug 16, 2023
@k8s-ci-robot k8s-ci-robot added area/jobs approved Indicates a PR has been approved by an approver from all required OWNERS files. sig/testing Categorizes an issue or PR as relevant to SIG Testing. labels Aug 16, 2023
@tzneal
Copy link
Contributor

tzneal commented Aug 16, 2023

Do the actual cluster nodes run in this account, or just the test launched nodes?

@dims
Copy link
Member Author

dims commented Aug 16, 2023

@tzneal test launched nodes

@dims
Copy link
Member Author

dims commented Aug 16, 2023

/hold

cross checking my query

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Aug 16, 2023
Copy link
Contributor

@tzneal tzneal left a comment

Choose a reason for hiding this comment

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

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Aug 16, 2023
@upodroid
Copy link
Member

upodroid commented Aug 16, 2023

I recommend you use the boskos janitor, have a look at maintenance-ci-aws-janitor job

- interval: 1h
  name: maintenance-ci-aws-janitor
  labels:
    preset-service-account: "true"
    preset-aws-ssh: "true"
    preset-aws-credential: "true"
  decorate: true
  spec:
    containers:
    - command:
      - /app
      args:
      - --ttl=2h30m
      - --path=s3://k8s-kops-prow/objs.json
      image: gcr.io/k8s-staging-boskos/aws-janitor:v20230524-a7ef97e
  annotations:
    testgrid-dashboards: sig-testing-maintenance
    testgrid-tab-name: ci-aws-janitor
    description: Deletes old AWS resources

That janitor can target resources by tags after the defined ttl.

https://github.com/kubernetes-sigs/boskos/blob/master/cmd/aws-janitor/main.go

…de-e2e-tests service account

Signed-off-by: Davanum Srinivas <davanum@gmail.com>
@dims dims force-pushed the add-a-janitor-periodic-job-to-cleanup-stale-ec2-instances-from-node-e2e-tests-service-account branch from 1b3287a to 67d6374 Compare August 16, 2023 21:03
@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Aug 16, 2023
@dims
Copy link
Member Author

dims commented Aug 16, 2023

@upodroid happy to iterate, i want to start with something simple.

Copy link
Member

@upodroid upodroid left a comment

Choose a reason for hiding this comment

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

I'll add it to the todo list

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Aug 16, 2023
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dims, tzneal, upodroid

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@dims
Copy link
Member Author

dims commented Aug 16, 2023

/hold cancel

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Aug 16, 2023
@k8s-ci-robot k8s-ci-robot merged commit da9bd26 into kubernetes:master Aug 16, 2023
@k8s-ci-robot
Copy link
Contributor

@dims: Updated the job-config configmap in namespace default at cluster test-infra-trusted using the following files:

  • key ec2-e2e.yaml using file config/jobs/kubernetes/sig-testing/ec2-e2e.yaml

In response to this:

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. area/config Issues or PRs related to code in /config area/jobs cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. sig/testing Categorizes an issue or PR as relevant to SIG Testing. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants