-
Notifications
You must be signed in to change notification settings - Fork 40k
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
Use existing ABAC policy file when upgrading GCE cluster #40172
Conversation
# ABAC_AUTHZ_FILE | ||
function detect-legacy-abac-file() { | ||
# This is the location GCE scripts wrote ABAC policy files to prior to 1.6 | ||
local -r legacy_abac_path="/etc/srv/kubernetes/abac-authz-policy.jsonl" |
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.
The container-linux scripts put it /srv/kubernetes/abac-authz-policy.jsonl
:(
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.
really? both places I saw it referenced by the apiserver it was at this path
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.
also, the container-linux scripts didn't exist in release-1.5
@@ -900,6 900,9 @@ function start-kube-apiserver { | |||
|
|||
|
|||
local authorization_mode="RBAC" | |||
# Load existing ABAC policy files written by versions < 1.6 of this script | |||
# TODO: only default to this legacy path when in upgrade mode | |||
ABAC_AUTHZ_FILE="${ABAC_AUTHZ_FILE:-/etc/srv/kubernetes/abac-authz-policy.jsonl}" |
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.
LGTM for GCI.
I think you'd need the same thing above the corresponding stanza in the container-linux script.
Trusty would be the same as this, but it looks like it isn't being maintained anymore...
Debian sets this up w/ salt (https://github.com/kubernetes/kubernetes/tree/master/cluster/saltbase/salt/kube-apiserver) and it appears to still be using ABAC all the time.
Those can be handled in followup PRs.
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.
The container-linux script didn't exist in 1.5. Is it possible for someone to have an existing install that they upgrade using that script?
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.
The container-linux script was recently renamed from "coreos". It was heavily refactored after the 1.5 cut (due to my slow review) and I'm not sure if the maintainers are concerned with upgrade compatibility as they are still heavily modifying the script.
@k8s-bot test this |
@k8s-bot cross build this |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED The following people have approved this PR: roberthbailey Needs approval from an approver in each of these OWNERS Files:
You can indicate your approval by writing |
tagging based on #40172 (comment) |
Automatic merge from submit-queue (batch tested with PRs 38739, 40480, 40495, 40172, 40393) |
When upgrading, continue loading an existing ABAC policy file so that existing system components continue working as-is