-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Resolve admission plugin config files #12321
Resolve admission plugin config files #12321
Conversation
liggitt
commented
Dec 21, 2016
•
edited
Loading
edited
- moves server config to testdata files
- applies defaults to test configs
- fixes admission plugin config file locations to resolve the same way all other file references in the config files are resolved
@deads2k PTAL |
hmm, complaining about taking the address of a field in a struct value |
lgtm |
Any ideas on how to keep from slipping? Make people opt-out on new fields? |
updated. first commit is a straight move of the server config test data into standalone files, second commit round-trips to apply defaults to it |
pkg/cmd/server/api/types.go
Outdated
@@ -1233,7 +1233,7 @@ type LDAPQuery struct { | |||
type AdmissionPluginConfig struct { | |||
// Location is the path to a configuration file that contains the plugin's | |||
// configuration | |||
Location string | |||
Location *string |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so strange.
pkg/cmd/server/api/v1/conversions.go
Outdated
@@ -219,6 +219,15 @@ func addDefaultingFuncs(scheme *runtime.Scheme) error { | |||
obj.ServiceAccountMethod = "prompt" | |||
} | |||
}, | |||
func(obj *AdmissionConfig) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why does this live in conversion and not in defaulting?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why does this live in conversion and not in defaulting?
Put another way, even if we didn't convert this, you'd still want to end up with non-nil values in the external object, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is defaulting, the defaulting functions just got added in the conversions file. I can move them all if we want to
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is defaulting, the defaulting functions just got added in the conversions file. I can move them all if we want to
Ah, well that explains it. I don't feel strongly about a move.
On question about where the defaulting happens, lgtm either way. |
wow, that year passed quick |
/lgtm longest time in lgtm state ever? |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: deads2k, liggitt The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these OWNERS Files:
You can indicate your approval by writing |
/retest |
@liggitt: The following test failed, say
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
Automatic merge from submit-queue. |