-
Notifications
You must be signed in to change notification settings - Fork 114
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Don't require names for built-in Kubernetes list types
`.metadata.name` is not required for built-in list types. Our provider expects this property, which means it will crash if it's not given. This commit changes ouur provider to not expect such. The specifics are slightly more complex. Here is the background: Kubernetes does not instantiate or manage the lifecycle of list types like `v1.List`. If it receives a list type, it will recursively traverse it for resource definitions that it is supposed to manage, and then perform the relevant operation on each. (e.g., `apply`'ing each `v1.ConfigMap` in a `v1.ConfigMapList`.) Because of this property, lists are not required to have names. Unfortunately, while our code handles `v1.List` correctly, it does not handle all these other built-in lists. A resource is not specified as a list in the OpenAPI spec, either, so we will simply generate a set of checks for things that "look like" lists, and trust that when we update the OpenAPI spec, we will catch any weirdness in the diffs.
- Loading branch information
Showing
3 changed files
with
137 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters