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

podNodeSelectorPluginConfig need validation when start #35506

Closed
mdshuai opened this issue Oct 25, 2016 · 7 comments
Closed

podNodeSelectorPluginConfig need validation when start #35506

mdshuai opened this issue Oct 25, 2016 · 7 comments
Labels
area/kubectl lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery.

Comments

@mdshuai
Copy link

mdshuai commented Oct 25, 2016

Kubernetes version (use kubectl version):
v1.5.0-alpha.1.857+c81816751387a2-dirty

How to reproduce it (as minimally and precisely as possible):

1. Start kube-apiserver with invalid value for PodNodeSelector admission controller
--admission-control=PodNodeSelector, --admission-control-config-file=admission-control-config-file.cfg

# cat ../admission-control-config-file.cfg
podNodeSelectorPluginConfig:
 clusterDefaultNodeSelector: region#=xyz%
 ns3: os=@#^&*,region=west^&*

2. Create a pod in this env
[root@ip-172-18-6-200 podnodeselector]# kc create -f https://raw.githubusercontent.com/mdshuai/testfile-openshift/master/k8s/pod/hello-pod.yaml
Error from server: error when creating "https://raw.githubusercontent.com/mdshuai/testfile-openshift/master/k8s/pod/hello-pod.yaml": invalid label key "region#": name part must match the regex ([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9] (e.g. 'MyName' or 'my.name' or '123-abc')

Expected results

  1. Should start failed PodNodeSelector with invalid podNodeSelectorPluginConfig value.

Anything else do we need to know:

@mdshuai
Copy link
Author

mdshuai commented Oct 25, 2016

@aveshagarwal
Copy link
Member

@derekwaynecarr I do not have enough permissions, could you assign this issue to me?

@aveshagarwal
Copy link
Member

@mdshuai I verified the code and validation of default cluster wide selectors and whitelist happens when a pod is being admitted, not when the pluging config file is read.

@k8s-github-robot k8s-github-robot added the needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. label May 31, 2017
@spiffxp
Copy link
Member

spiffxp commented Jun 26, 2017

/sig api-machinery

@k8s-ci-robot k8s-ci-robot added the sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. label Jun 26, 2017
@k8s-github-robot k8s-github-robot removed the needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. label Jun 26, 2017
@fejta-bot
Copy link

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

Prevent issues from auto-closing with an /lifecycle frozen comment.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or @fejta.
/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Dec 30, 2017
@fejta-bot
Copy link

Stale issues rot after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle rotten.
Rotten issues close after an additional 30d of inactivity.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle rotten
/remove-lifecycle stale

@k8s-ci-robot k8s-ci-robot added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Jan 29, 2018
@fejta-bot
Copy link

Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen.
Mark the issue as fresh with /remove-lifecycle rotten.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/close

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/kubectl lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants