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

593 feature #594

Merged
merged 64 commits into from
Jan 7, 2020
Merged

593 feature #594

merged 64 commits into from
Jan 7, 2020

Conversation

shivdudhani
Copy link
Contributor

@shivdudhani shivdudhani commented Jan 3, 2020

Using a pointer to a boolean to handle default:

  • As the defaulting is done by mutating webhook if the policy was created when the webhook was not active, we will have value nil.
  • the nil has been handled in code, where it is used. So if the value is nil, we skip background processing as it missed the policy mutation webhook.
  • this will be a downside of using a pointer instead of variable, as additional checks are needed.

@realshuting , as this was limiting some issues for others, Those can now be resolved now.

Also implements condition and variable support.
** To be merged after #587 *

fixes https://github.com/nirmata/kyverno/issues/595
fixes https://github.com/nirmata/kyverno/issues/593
fixes https://github.com/nirmata/kyverno/issues/592

@shivdudhani
Copy link
Contributor Author

To be merged after https://github.com/nirmata/kyverno/pull/587

@shivdudhani
Copy link
Contributor Author

@JimBugwadia we currently can use generate on any resources. But can only support re-evaluation of policy on resource update for Namespace resource.

@shivdudhani
Copy link
Contributor Author

If the key is not present in context, the variable is set to nil. We are currently awaiting https://github.com/nirmata/kyverno/issues/568 to understand how to handle null values. As the type is unknown during variable substitution.

pkg/engine/context/context.go Show resolved Hide resolved
pkg/engine/variables/operator/equal.go Outdated Show resolved Hide resolved
pkg/engine/variables/operator/operator.go Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants