-
Notifications
You must be signed in to change notification settings - Fork 113
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
1. Return resource inputs as well as resource state from Read() 2. Return a list of properties that changed from Diff() We implement the former by reading the last applied configuration from the `kubectl.kubernetes.io/last-applied-configuration` annotation in the live object state. If this key is not present, no inputs are populated and the old inputs are retained. These changes also update the provider to set this field during `Create` and `Update`. We implement the latter by scanning the JSON diff and recording the names of the top-level properties that changed. The engine uses this information to filter diffs to only those that are semantically meaningful. These changes required a couple of bugfixes: - Old names are only adopted if the old resource was auto-named. This ensures that a name must be specified when importing a resource that was not autonamed. - URN to GVK conversion was fixed for resources in the "core" group. These resources have no group part in the GVK. Parsing was also simplified through the use of pulumi/pulumi's token manipulation functions. - When reading a resource, the GVK for the resource to read is now pulled from the URN if it is absent from the inputs.
- Loading branch information
Showing
4 changed files
with
156 additions
and
48 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
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