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

kubeadm: Writable to ReadOnly in HostPathMount #70495

Merged
merged 1 commit into from Nov 3, 2018

Conversation

rosti
Copy link
Contributor

@rosti rosti commented Oct 31, 2018

What type of PR is this?
/kind api-change

What this PR does / why we need it:

Writable was added to HostPathMount in v1alpha1 in order to control if an extra volume is mounted in read only or writable mode.
Usually, in Kubernetes, this option is referred to as ReadOnly, instead of Writable and is defaulted to false. However, at the time, all extra volumes to pods were defaulted to read-only. Therefore, to avoid changes to existing v1alpha1 configs, this option had to be added with reversed meaning.

Hence, it's called writable.

Now, with the migration towards v1beta1, we can safely change this to ReadOnly and get it in sync with the reset of Kubernetes.

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Refs kubernetes/kubeadm#911

Special notes for your reviewer:

This PR depends on:

Please, review only the last commit here.

/cc @kubernetes/sig-cluster-lifecycle-pr-reviews
/area kubeadm
/assign @fabriziopandini
/assign @timothysc

Does this PR introduce a user-facing change?:

kubeadm: The writable config file option for extra volumes is renamed to readOnly with a reversed meaning. With readOnly defaulted to false (as in pod specs).

@k8s-ci-robot k8s-ci-robot added the release-note Denotes a PR that will be considered when it comes time to generate release notes. label Oct 31, 2018
@k8s-ci-robot k8s-ci-robot added kind/api-change Categorizes issue or PR as related to adding, removing, or otherwise changing an API size/L Denotes a PR that changes 100-499 lines, ignoring generated files. sig/cluster-lifecycle Categorizes an issue or PR as relevant to SIG Cluster Lifecycle. area/kubeadm cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Oct 31, 2018
@rosti rosti changed the title kubeadm: Writable to ReadOnly in HostPathMount [WIP] kubeadm: Writable to ReadOnly in HostPathMount Oct 31, 2018
@k8s-ci-robot k8s-ci-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Oct 31, 2018
@rosti
Copy link
Contributor Author

rosti commented Oct 31, 2018

Needs a test case or two, so I'll mark it as WIP for now.

@rosti rosti changed the title [WIP] kubeadm: Writable to ReadOnly in HostPathMount kubeadm: Writable to ReadOnly in HostPathMount Nov 1, 2018
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Nov 1, 2018
@rosti rosti force-pushed the writable-to-readonly-volumes branch from 6acc816 to 1b7cc82 Compare November 1, 2018 10:52
@k8s-ci-robot k8s-ci-robot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Nov 1, 2018
@rosti
Copy link
Contributor Author

rosti commented Nov 1, 2018

This one is ready for review now.

@timothysc timothysc added the do-not-merge/blocked-paths Indicates that a PR should not merge because it touches files in blocked paths. label Nov 1, 2018
Copy link
Member

@timothysc timothysc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/approve

I don't see an issue with the change, but rebase required.

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 1, 2018
Copy link
Member

@fabriziopandini fabriziopandini left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @rosti!
/approve
Waiting for dependency to merge before final lgtm

Writable was added to HostPathMount in v1alpha1 in order to control if an extra
volume is mounted in read only or writable mode.
Usually, in Kubernetes, this option is referred to as ReadOnly, instead of
Writable and is defaulted to `false`. However, at the time, all extra volumes
to pods were defaulted to read-only. Therefore, to avoid changes to existing
v1alpha1 configs, this option had to be added with reversed meaning.

Hence, it's called `writable`.

Now, with the migration towards v1beta1, we can safely change this to ReadOnly
and get it in sync with the reset of Kubernetes.

Signed-off-by: Rostislav M. Georgiev <rostislavg@vmware.com>
@rosti rosti force-pushed the writable-to-readonly-volumes branch from 1b7cc82 to 6c9e347 Compare November 2, 2018 16:03
@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed do-not-merge/blocked-paths Indicates that a PR should not merge because it touches files in blocked paths. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Nov 2, 2018
@neolit123
Copy link
Member

/retest

@fabriziopandini
Copy link
Member

@rosti great work!
/approve
/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Nov 3, 2018
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: fabriziopandini, rosti, timothysc

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot merged commit 474e27f into kubernetes:master Nov 3, 2018
@rosti rosti deleted the writable-to-readonly-volumes branch November 22, 2018 15:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. area/kubeadm cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/api-change Categorizes issue or PR as related to adding, removing, or otherwise changing an API lgtm "Looks good to me", indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes. sig/cluster-lifecycle Categorizes an issue or PR as relevant to SIG Cluster Lifecycle. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants