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

Properly wait for namespace creation to stabilize in tests #403

Open
thomastaylor312 opened this issue Sep 25, 2020 · 2 comments · May be fixed by #668
Open

Properly wait for namespace creation to stabilize in tests #403

thomastaylor312 opened this issue Sep 25, 2020 · 2 comments · May be fixed by #668
Labels
refactor Identifies code that needs a refactor

Comments

@thomastaylor312
Copy link
Member

Currently in our integration tests, we are just doing a delay to give the controller enough time to create the token for the default service account. However, we should do this more smartly. Ideally, we should do a watch (on exactly what will be part of this issue, probably something like the status of the ServiceAccount or the tokens in the namespace) to wait for the token to be created

@nitishm
Copy link

nitishm commented Aug 12, 2021

@thomastaylor312 I would love to help out with this albeit with some hand holding since I have just started with Rust over the past few weeks. Please let me know if this is something that might be suited for a beginner to take on (I have experience writing controllers for Kubernetes in Go, so am aware of how the kube client is supposed to work)

@thomastaylor312
Copy link
Member Author

Yeah, if you have that deep of background in Kubernetes, this task should be just fine for a beginner. Given that k8s 1.21+ uses the projected volume to inject tokens, this is now less of a problem, but will still effect 1.20.

Please let me know if you have any issues, as running the e2e tests can be difficult at times

nitishm added a commit to nitishm/krustlet that referenced this issue Aug 13, 2021
Instead of using a sleep use an actual watcher to ensure that the token
is ready before proceeding.

Closes krustlet#403

Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com>
@nitishm nitishm linked a pull request Aug 13, 2021 that will close this issue
nitishm added a commit to nitishm/krustlet that referenced this issue Aug 13, 2021
Instead of using a sleep use an actual watcher to ensure that the token
is ready before proceeding.

Closes krustlet#403

Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com>
nitishm added a commit to nitishm/krustlet that referenced this issue Oct 8, 2021
Instead of using a sleep use an actual watcher to ensure that the token
is ready before proceeding.

Closes krustlet#403

Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com>
thomastaylor312 pushed a commit to nitishm/krustlet that referenced this issue Oct 22, 2021
Instead of using a sleep use an actual watcher to ensure that the token
is ready before proceeding.

Closes krustlet#403

Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactor Identifies code that needs a refactor
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants