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

In some admission plugins Validate is called twice #58196

Closed
hzxuzhonghu opened this Issue Jan 12, 2018 · 3 comments

Comments

Projects
None yet
3 participants
@hzxuzhonghu
Member

hzxuzhonghu commented Jan 12, 2018

Is this a BUG REPORT or FEATURE REQUEST?:

/kind bug

What happened:
in some admission plugins, ValidationInterface.Validate will be called twice, like ServiceAccount.

Secondly called

I think this is a redundant work

What you expected to happen:

Validate be called only once, in validating stage.

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

Anything else we need to know?:

Environment:

  • Kubernetes version (use kubectl version):
  • Cloud provider or hardware configuration:
  • OS (e.g. from /etc/os-release):
  • Kernel (e.g. uname -a):
  • Install tools:
  • Others:
@hzxuzhonghu

This comment has been minimized.

Show comment
Hide comment
@hzxuzhonghu

hzxuzhonghu Jan 12, 2018

Member

/sig auth
/kind bug

Member

hzxuzhonghu commented Jan 12, 2018

/sig auth
/kind bug

@hzxuzhonghu

This comment has been minimized.

Show comment
Hide comment
@hzxuzhonghu

hzxuzhonghu Jan 12, 2018

Member

open a pr #58197 to fix it.

Member

hzxuzhonghu commented Jan 12, 2018

open a pr #58197 to fix it.

@liggitt

This comment has been minimized.

Show comment
Hide comment
@liggitt

liggitt Jan 13, 2018

Member

this is not a bug, it is an intentional factoring.

during the Admit phase, these plugins do some mutation and some validation. if the validation fails, we want to reject early.

during the Validate phase, they recheck that the result is still valid (and hasn't been invalidated by other things in the Admit phase)

Member

liggitt commented Jan 13, 2018

this is not a bug, it is an intentional factoring.

during the Admit phase, these plugins do some mutation and some validation. if the validation fails, we want to reject early.

during the Validate phase, they recheck that the result is still valid (and hasn't been invalidated by other things in the Admit phase)

@liggitt liggitt closed this Jan 13, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment