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

Increased sa and secret creation_time difference check (#1) #1165

Closed
wants to merge 1 commit into from

Conversation

amsgeodis
Copy link

@amsgeodis amsgeodis commented Feb 11, 2021

Increased service_account and secret creation_time difference check to a bigger limit, 60 seconds; instead of 3 seconds. If we have mutation webhooks, the secret creation can take longer.
#1104

Description

Acceptance tests

  • Have you added an acceptance test for the functionality being added?
  • Have you run the acceptance tests on this branch?

Output from acceptance testing:

$ make testacc TESTARGS='-run=TestAccXXX'

...

Release Note

Release note for CHANGELOG:

...

References

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Increased service_account and secret creation_time difference check to a bigger limit, 60 seconds; instead of 3 seconds. If we have mutation webhooks, the secret creation can take longer.
hashicorp#1104
@ghost ghost added size/XS labels Feb 11, 2021
@hashicorp-cla
Copy link

hashicorp-cla commented Feb 11, 2021

CLA assistant check
All committers have signed the CLA.

Base automatically changed from master to main March 23, 2021 15:53
@erSitzt
Copy link

erSitzt commented Oct 4, 2021

Hi everyone can we get this merged ? It's a very small change and it would help a lot of people...

This is the whats happening right after running terraform:

❯ k get sa
NAME                   SECRETS   AGE
default                1         131d
vault-tokenreview      1         10s
❯ k get secret
NAME                               TYPE                                  DATA   AGE
default-token-czq66                kubernetes.io/service-account-token   3      131d
vault-tokenreview-token-28nmc      kubernetes.io/service-account-token   3      <invalid>
❯ k get secret
NAME                               TYPE                                  DATA   AGE
default-token-czq66                kubernetes.io/service-account-token   3      131d
vault-tokenreview-token-28nmc      kubernetes.io/service-account-token   3      <invalid>
❯ k get secret
NAME                               TYPE                                  DATA   AGE
default-token-czq66                kubernetes.io/service-account-token   3      131d
vault-tokenreview-token-28nmc      kubernetes.io/service-account-token   3      <invalid>
❯ k get secret
NAME                               TYPE                                  DATA   AGE
default-token-czq66                kubernetes.io/service-account-token   3      131d
vault-tokenreview-token-28nmc      kubernetes.io/service-account-token   3      <invalid>
❯ k get secret
NAME                               TYPE                                  DATA   AGE
default-token-czq66                kubernetes.io/service-account-token   3      131d
vault-tokenreview-token-28nmc      kubernetes.io/service-account-token   3      <invalid>
❯
❯ k get secret
NAME                               TYPE                                  DATA   AGE
default-token-czq66                kubernetes.io/service-account-token   3      131d
vault-tokenreview-token-28nmc      kubernetes.io/service-account-token   3      6s
❯
❯ k get sa
NAME                   SECRETS   AGE
default                1         131d
vault-tokenreview      1         4m28s
❯ k get secret
NAME                               TYPE                                  DATA   AGE
default-token-czq66                kubernetes.io/service-account-token   3      131d
vault-tokenreview-token-28nmc      kubernetes.io/service-account-token   3      3m46s

As you can see it took longer than 40s for the secret to be ready... (i'm not sure why it takes that long.. maybe someone has an idea about that...)

And maybe have a look at those annotations in mentioned in #848
Or correct me if my assumption is wrong :)

And for completeness sake as i'm having the problem now while creating SAs and not importing them
#1104

@owengo
Copy link

owengo commented Jan 11, 2022

I also have the issue with eks. 4 seconds difference between sa and secret,
Skipping <token> as it wasn't created at the same time as the service account

@github-actions github-actions bot added the stale label Nov 1, 2023
@github-actions github-actions bot closed this Dec 1, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 1, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants