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

fix: call TokenRequest API when service account token secret is missing #3377

Merged
merged 4 commits into from
Sep 12, 2024

Commits on Sep 10, 2024

  1. fix: call TokenRequest API when service account token secret is missing

    Beyond Kubernetes 1.22, the service account token secret is not
    automatically, created. Therefore, when OLM is not able to find the
    service account token secret, it should request one from the k8s api
    server.
    
    Ref: https://kubernetes.io/docs/reference/access-authn-authz/service-accounts-admin/#manual-secret-management-for-serviceaccounts
    
    Signed-off-by: Edmund Ochieng <[email protected]>
    OchiengEd committed Sep 10, 2024
    Configuration menu
    Copy the full SHA
    3838f6e View commit details
    Browse the repository at this point in the history
  2. fix: return error

    Signed-off-by: Edmund Ochieng <[email protected]>
    OchiengEd committed Sep 10, 2024
    Configuration menu
    Copy the full SHA
    36867ec View commit details
    Browse the repository at this point in the history
  3. handle error when creating sa token from TokenRequest API fails

    Signed-off-by: Edmund Ochieng <[email protected]>
    OchiengEd committed Sep 10, 2024
    Configuration menu
    Copy the full SHA
    426c3cb View commit details
    Browse the repository at this point in the history
  4. move return from inner loop

    Move the return to line 48. This will ensure a value is returned whether
    we successully create a service account token from the TokenRequest API or get an error
    
    Signed-off-by: Edmund Ochieng <[email protected]>
    OchiengEd committed Sep 10, 2024
    Configuration menu
    Copy the full SHA
    a25b212 View commit details
    Browse the repository at this point in the history