-
Notifications
You must be signed in to change notification settings - Fork 125
Bug 1946479: Re-enable BoundServiceAccountTokenVolume disabled by 1.21 rebase #714
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
Bug 1946479: Re-enable BoundServiceAccountTokenVolume disabled by 1.21 rebase #714
Conversation
@marun: the contents of this pull request could not be automatically validated. The following commits could not be validated and must be approved by a top-level approver:
|
@marun: This pull request references Bugzilla bug 1946479, which is valid. The bug has been moved to the POST state. The bug has been updated to refer to the pull request using the external bug tracker. 3 validation(s) were run on this bug
Requesting review from QA contact: In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: marun The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/retest |
db490ee
to
3b1bac0
Compare
@marun: the contents of this pull request could not be automatically validated. The following commits could not be validated and must be approved by a top-level approver:
|
@marun: the contents of this pull request could not be automatically validated. The following commits could not be validated and must be approved by a top-level approver:
|
pkg/volume/projected/projected.go
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Compare
kubernetes/cmd/kube-controller-manager/app/patch_satoken.go
Lines 37 to 44 in 4bbda77
// if we have a rootCA bundle add that too. The rootCA will be used when hitting the default master service, since those are signed | |
// using a different CA by default. The rootCA's key is more closely guarded than ours and if it is compromised, that power could | |
// be used to change the trusted signers for every pod anyway, so we're already effectively trusting it. | |
if len(controllerOptions.RootCA) > 0 { | |
controllerOptions.ServiceServingCA = append(controllerOptions.ServiceServingCA, controllerOptions.RootCA...) | |
controllerOptions.ServiceServingCA = append(controllerOptions.ServiceServingCA, []byte("\n")...) | |
} | |
controllerOptions.ServiceServingCA = append(controllerOptions.ServiceServingCA, serviceServingCA...) |
(I have no idea whether the old behavior is correct, I just want the difference to be an intentional decision.)
pkg/volume/projected/projected.go
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I’m sure this is a stupid question, I hope to learn something: why isn’t a natural way to do this is to change the generated projected volume in
Sources: []api.VolumeProjection{ |
service-ca.crt
file conflict would go away entirely.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Answering myself:
projected volumes only support local object references
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Following this train of thought, the old token controller creating secrets that include service-ca.crt
is still running with BoundServiceAccountTokenVolume enabled. So #724 reproduces the old contents of that file (including the root CAs), and is pretty close to the trade-offs of the old approach, and at least survives bootstrap. OTOH “pretty close to the old approach” is probably a good reason not to do it that way.
d3cb32d
to
ce2e4a4
Compare
@marun: the contents of this pull request could not be automatically validated. The following commits could not be validated and must be approved by a top-level approver:
|
@marun: This pull request references Bugzilla bug 1946479, which is valid. 3 validation(s) were run on this bug
Requesting review from QA contact: In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
ce2e4a4
to
1cadcb0
Compare
@marun: the contents of this pull request could not be automatically validated. The following commits could not be validated and must be approved by a top-level approver:
|
@marun: This pull request references Bugzilla bug 1946479, which is valid. 3 validation(s) were run on this bug
Requesting review from QA contact: In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
1cadcb0
to
f2aa03c
Compare
@marun: the contents of this pull request could not be automatically validated. The following commits could not be validated and must be approved by a top-level approver:
|
f2aa03c
to
f0f6d79
Compare
@marun: the contents of this pull request could not be automatically validated. The following commits could not be validated and must be approved by a top-level approver:
|
f0f6d79
to
921a590
Compare
@marun: the contents of this pull request could not be automatically validated. The following commits could not be validated and must be approved by a top-level approver:
|
/retest |
1 similar comment
/retest |
I have a (hopefully not) red herring. kube-controller-manager-operator fails to upgrade on a local cluster because:
It looks like a race between the operator and the operand. The former is on a newer version but fails to mount the new service CA while the latter is not updated yet and does not provision the CA in the first place. I think we simply have to create an empty initial service CA configmap. |
/lgtm cancel |
The chain of events in an upgrade situation is as follows, if events happen in the following order:
|
we have another failure mode which explains failed e2e upgrade run failures like this one https://prow.ci.openshift.org/view/gs/origin-ci-test/pr-logs/pull/openshift_kubernetes/714/pull-ci-openshift-kubernetes-master-e2e-gcp-upgrade/1402105642675605504:
I checked and verified that Hence, the upgrade failure can also happen during upgrades of apiserver already, if at least one (new) apiserver instance is up. |
As discussed OOB the resolution is to manually craft serviceaccount mounts for certain control plane pods which omit serviceaccount admission:
|
/retest |
/test e2e-gcp-upgrade |
/test e2e-gcp-upgrade |
/lgtm |
/hold cancel |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: deads2k, marun, s-urbaniak, soltysh, stlaz The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/override ci/prow/e2e-gcp-upgrade |
@mfojtik: Overrode contexts on behalf of mfojtik: ci/prow/e2e-gcp-upgrade In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
@marun: Some pull requests linked via external trackers have merged:
The following pull requests linked via external trackers have not merged: These pull request must merge or be unlinked from the Bugzilla bug in order for it to move to the next state. Once unlinked, request a bug refresh with Bugzilla bug 1946479 has not been moved to the MODIFIED state. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Now that bound token projected volume support has been enabled with openshift/kubernetes#714, the cluster quota test can be re-enabled with awareness of the new service ca configmaps.
OpenShift since 3.x has injected the service serving certificate ca (service ca) bundle into service account token secrets. This was intended to ensure that all pods would be able to easily verify connections to endpoints secured with service serving certificates. Since breaking customer workloads is not an option, and there is no way to ensure that customers are not relying on the service ca bundle being mounted at
/var/run/secrets/kubernetes.io/serviceaccount/service-ca.crt
, it is necessary to continue mounting the service ca bundle in the same location in the bound token projected volumes enabled by theBoundServiceAccountTokenVolume
feature (enabled by default in 1.21).A new controller is added to create a configmap per namespace that is annotated for service ca injection. The controller is derived from the controller that creates configmaps for the root ca. The service account admission controller is updated to include a source for the new configmap in the default projected volume definition.