@@ -26,23 +26,27 @@ manner.
2626## Use Cases
2727
28281 . As a user, I want to be able to diff the last-applied-configuration
29- against the current local configuration to see which changes the command is seeing
29+ against the current local configuration to see which changes the command is seeing
30302 . As a user, I want to remove fields from being managed by the local
31- object configuration by removing them from the local object configuration
32- and setting the last-applied-configuration to match.
33- 3 . As a user, I want to be able to view the the base
34- last-applied-configuration that will be used to merge changes
31+ object configuration by removing them from the local object configuration
32+ and setting the last-applied-configuration to match.
33+ 3 . As a user, I want to be able to view the last-applied-configuration
34+ on the live object that will be used to calculate the diff patch
35+ to update the live object from the configuration file.
3536
3637## Naming and Format possibilities
3738
3839### Naming
3940
40411 . last-applied
41- 2 . last-config
42- 3 . last-applied-config
43- 4 . last-configuration
44- 5 . last-applied-configuration
45- 6 . last
42+
43+ Rejected alternatives:
44+
45+ 2 . ~~ last-config~~
46+ 3 . ~~ last-applied-config~~
47+ 4 . ~~ last-configuration~~
48+ 5 . ~~ last-applied-configuration~~
49+ 6 . ~~ last~~
4650
4751### Formats
4852
@@ -98,24 +102,32 @@ Same as above, but in json
98102
99103## diff last-applied
100104
101- Porcelain command that retrieves the object and displays a diff against the local configuration
105+ Porcelain command that retrieves the object and displays a diff against
106+ the local configuration
102107
1031081 . Diff the last-applied
104109
105110``` sh
106111kubectl apply diff last-applied -f deployment_nginx.yaml
107112```
108113
109- Opens up a 2-way diff in the default diff viewer. last-applied is old, local configuration is new.
114+ Opens up a 2-way diff in the default diff viewer. This should
115+ follow the same semantics as ` git diff ` . It should accept either a
116+ flag ` --diff-viewer=meld ` or check the environment variable
117+ ` KUBECTL_EXTERNAL_DIFF=meld ` . If neither is specified, the ` diff `
118+ command should be used.
119+
110120This is meant to show the user what they changed in the configuration,
111121since it was last applied, but not show what has changed in the server.
112122
123+ The supported output formats should be ` yaml ` and ` json ` , as specified
124+ by the ` -o ` flag.
125+
113126A future goal is to provide a 3-way diff with ` kubectl apply diff -f deployment_nginx.yaml ` .
114127Together these tools would give the user the ability to see what is going
115128on and compare changes made to the configuration file vs other
116129changes made to the server independent of the configuration file:
117130
118-
119131## set last-applied
120132
121133Porcelain command that sets the last-applied-config annotation to as
0 commit comments