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

PodSecurityPolicy switch #218

Merged
merged 8 commits into from
Mar 1, 2019
Merged

PodSecurityPolicy switch #218

merged 8 commits into from
Mar 1, 2019

Conversation

kron4eg
Copy link
Member

@kron4eg kron4eg commented Feb 27, 2019

Allows enable/disable PodSecurityPolicy admission plugin

Fixes #195

new `features.enable_psp` boolean flag in config

@kubermatic-bot kubermatic-bot added release-note Denotes a PR that will be considered when it comes time to generate release notes. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Feb 27, 2019
* new config option features.enabled_psp
* regenerate kubeadm config every upgrade
@kron4eg
Copy link
Member Author

kron4eg commented Feb 27, 2019

/hold
until tested

@kubermatic-bot kubermatic-bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Feb 27, 2019
@kron4eg
Copy link
Member Author

kron4eg commented Feb 27, 2019

/test pull-kubeone-e2e

@kron4eg kron4eg changed the title PodSecurityPolicy switch WIP PodSecurityPolicy switch Feb 27, 2019
@kubermatic-bot kubermatic-bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Feb 27, 2019
@kubermatic-bot kubermatic-bot 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 Feb 28, 2019
@kron4eg kron4eg changed the title WIP PodSecurityPolicy switch PodSecurityPolicy switch Feb 28, 2019
@kubermatic-bot kubermatic-bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Feb 28, 2019
@kron4eg
Copy link
Member Author

kron4eg commented Feb 28, 2019

/hold cancel

@kubermatic-bot kubermatic-bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Feb 28, 2019
config.yaml.dist Outdated Show resolved Hide resolved
pkg/config/cluster.go Outdated Show resolved Hide resolved
pkg/features/activate.go Outdated Show resolved Hide resolved
)

var (
defaultAdmissionPlugins = []string{
Copy link
Member

Choose a reason for hiding this comment

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

Are those admission plugins same for all Kubernetes versions?

Copy link
Member Author

Choose a reason for hiding this comment

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

for what we currently support — yes, maybe that will be changed in the future

}
}

func boolPtr(b bool) *bool {
Copy link
Member

Choose a reason for hiding this comment

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

A follow up: create a package for such functions or check does client-go ships something.

Copy link
Member Author

Choose a reason for hiding this comment

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

I tried to find such thing in k8s.io libs, but seems like everyone agree that "small copy is better then small dependency" and no one exports it.

}

// KubeadmActivate features in cluster config
func KubeadmActivate(featuresCfg config.Features, clusterConfig *kubeadmv1beta1.ClusterConfiguration) {
Copy link
Member

Choose a reason for hiding this comment

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

At the first thought I was unsure what this function does. A better function name or improved comment would be appreciated.

Copy link
Member Author

@kron4eg kron4eg Mar 1, 2019

Choose a reason for hiding this comment

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

I'm all open for better name suggestions

@xmudrii
Copy link
Member

xmudrii commented Mar 1, 2019

/test pull-kubeone-lint

@xmudrii
Copy link
Member

xmudrii commented Mar 1, 2019

/approve
/lgtm

@kubermatic-bot kubermatic-bot added the lgtm Indicates that a PR is ready to be merged. label Mar 1, 2019
@kubermatic-bot
Copy link
Contributor

LGTM label has been added.

Git tree hash: 7e171644b3fb1852cd4a988ffba610194157b52a

@kubermatic-bot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: xmudrii

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

@kubermatic-bot kubermatic-bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Mar 1, 2019
@kubermatic-bot kubermatic-bot merged commit 8e55f57 into master Mar 1, 2019
@kubermatic-bot kubermatic-bot deleted the 195-psp branch March 1, 2019 16:50
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. lgtm 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. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants