You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Prevent pod admission before service account tokens exist #3035
If a build or deployment pod is created immediately after creating a project, but before the serviceaccount API tokens have been generated, no token will be mounted, which will fail the build/deployment.
More broadly, this is true of any pod running a container which expects to make use of service account tokens.
The QPS changes in #3003 greatly narrowed the window where this issue is possible, but we may want to require the API token to exist in the serviceaccount admission controller.
@bparees will the build controller retry creating the build pod if it is rejected on admission? at what interval? @ironcladlou will the deployment controller retry creating the deployer pod if admission rejects it? at what interval?
The retry system started in deployments, got adopted in builds, and new features have been added to the core support. Not all of them have found their way back to deployments (the token buckets have and are effective for cases where we retry more than once, but the time based retries have not). Should deployments be updated to take advantage of the time based retries?
Activity
liggitt commentedon Jun 10, 2015
This manifests itself as a pod with a service account set, but no volumemount in the pod.spec for the API token secret
liggitt commentedon Jun 10, 2015
@bparees will the build controller retry creating the build pod if it is rejected on admission? at what interval?
@ironcladlou will the deployment controller retry creating the deployer pod if admission rejects it? at what interval?
ironcladlou commentedon Jun 10, 2015
@liggitt
Looks like it's currently configured to retry once immediately. If that's not sufficient we can change it.
bparees commentedon Jun 10, 2015
@liggitt if "admission control rejection" means that this will get an error:
return c.KubeClient.Pods(namespace).Create(pod)
then we'll retry for 30 minutes using a 1/second token bucket with a 10 token burst potential.
which in hindsight seems pretty aggressive (we used to give up after a minute).
liggitt commentedon Jun 10, 2015
apparently we care a lot more about builds than deployments :)
ironcladlou commentedon Jun 10, 2015
The retry system started in deployments, got adopted in builds, and new features have been added to the core support. Not all of them have found their way back to deployments (the token buckets have and are effective for cases where we retry more than once, but the time based retries have not). Should deployments be updated to take advantage of the time based retries?
bparees commentedon Jun 10, 2015
@ironcladlou only retrying once and failing does seem overly pessimistic.
ironcladlou commentedon Jun 10, 2015
#3051 will cover the requirements for deployment retry handling.
liggitt commentedon Jul 1, 2015
This change was made upstream in kubernetes/kubernetes#10523
liggitt commentedon Jul 15, 2015
Merged in #3703 rebase