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

Wait for existence of a serviceAccount in zarf namespace before continuing #1328

Merged
merged 11 commits into from
Feb 2, 2023

Conversation

corang
Copy link
Contributor

@corang corang commented Feb 2, 2023

Description

As the title says. Tbh I'd prefer to actually parse the error or something like that but I don't know how to find the error type that the serviceAccount error is.

Related Issue

Fixes #1327

Type of change

  • Bug fix (non-breaking change which fixes an issue)

Checklist before merging

@netlify
Copy link

netlify bot commented Feb 2, 2023

Deploy Preview for zarf-docs canceled.

Name Link
🔨 Latest commit e8b02cb
🔍 Latest deploy log https://app.netlify.com/sites/zarf-docs/deploys/63dc00563aae34000935f060

@corang
Copy link
Contributor Author

corang commented Feb 2, 2023

Actually maybe it's better to check for serviceAccount existence after namespace creation...

@corang corang changed the title Add wait to injection method so if the cluster is slow it can catch up Wait for existence of a serviceAccount in zarf namespace before continuing Feb 2, 2023
@corang
Copy link
Contributor Author

corang commented Feb 2, 2023

Actually maybe it's better to check for serviceAccount existence after namespace creation...

Ended up implementing this instead!

src/internal/cluster/state.go Outdated Show resolved Hide resolved
src/pkg/k8s/sa.go Show resolved Hide resolved
Copy link
Contributor

@Racer159 Racer159 left a comment

Choose a reason for hiding this comment

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

lgtm

@jeff-mccoy jeff-mccoy merged commit 2734986 into main Feb 2, 2023
@jeff-mccoy jeff-mccoy deleted the 1327-injector-retry-time branch February 2, 2023 18:56
Noxsios pushed a commit that referenced this pull request Mar 8, 2023
…nuing (#1328)

## Description

As the title says. Tbh I'd prefer to actually parse the error or
something like that but I don't know how to find the error type that the
serviceAccount error is.

## Related Issue

Fixes #1327

## Type of change

- [X] Bug fix (non-breaking change which fixes an issue)

## Checklist before merging

- [X] Test, docs, adr added or updated as needed
- [X] [Contributor Guide
Steps](https://github.com/defenseunicorns/zarf/blob/main/CONTRIBUTING.md#developer-workflow)
followed

---------
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

If the cluster is "too slow" zarf init can fail due to the serviceAccount not being created in time
3 participants