-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Apply all resources in a single kubectl call #872
Commits on Dec 21, 2017
-
Remove namespace flag from kubectl apply/delete calls
Since the namespace must be specified in the parsed manifest for us to retrieve it, we don't need to set this flag. Kubectl figures it out on its own.
Sam Broughton committedDec 21, 2017 Configuration menu - View commit details
-
Copy full SHA for a5f18ff - Browse repository at this point
Copy the full SHA a5f18ffView commit details -
Remove unused apiObject fields
Sam Broughton committedDec 21, 2017 Configuration menu - View commit details
-
Copy full SHA for 5bd8f40 - Browse repository at this point
Copy the full SHA 5bd8f40View commit details -
Remove Stdout/err fields from Kubectl struct
These values are never actually used. They look like they are, but their only usage is immediately reassigned.
Sam Broughton committedDec 21, 2017 Configuration menu - View commit details
-
Copy full SHA for 40b23d5 - Browse repository at this point
Copy the full SHA 40b23d5View commit details -
Modify Applier to stage and execute rather than execute directly
This change to the interface facilitates creating an Applier that combines all yamels into a multidoc to be applied in one call to kubectl. Note that the deleted test was testing behaviour that exists nowhere in flux. All references to `SyncAction` in the code contain only a single change, so the test was unnecessary.
Sam Broughton committedDec 21, 2017 Configuration menu - View commit details
-
Copy full SHA for e7544db - Browse repository at this point
Copy the full SHA e7544dbView commit details -
Accept []byte instead of *apiObject in Applier methods
Since the namespace flag is no longer needed for kubectl, and since the tests don't actually need the object name, we can pass a byte slice and simplify a bit. This change guides us towards doing the single mega-apply without smushing bytes into an apiObject in a kludgey way.
Sam Broughton committedDec 21, 2017 Configuration menu - View commit details
-
Copy full SHA for 5bfc279 - Browse repository at this point
Copy the full SHA 5bfc279View commit details
Commits on Dec 22, 2017
-
As much as I love finding places to put channels, in this case it is entirely unnecessary. The only use of actionc can be replaced with a mutex, and any future methods can just compete for the lock instead of competing for a channel write.
Sam Broughton committedDec 22, 2017 Configuration menu - View commit details
-
Copy full SHA for 92e60a8 - Browse repository at this point
Copy the full SHA 92e60a8View commit details -
Store staged objects in a slice rather than a map
This brings back the previous ordering without doing a sort. Since we no longer apply objects one at a time, we don't need an id.
Sam Broughton committedDec 22, 2017 Configuration menu - View commit details
-
Copy full SHA for 0a6ef34 - Browse repository at this point
Copy the full SHA 0a6ef34View commit details -
Replace delete and apply with doCommand
Sam Broughton committedDec 22, 2017 Configuration menu - View commit details
-
Copy full SHA for 8419cc3 - Browse repository at this point
Copy the full SHA 8419cc3View commit details -
Deduplicate delete/apply logic
Sam Broughton committedDec 22, 2017 Configuration menu - View commit details
-
Copy full SHA for 687b704 - Browse repository at this point
Copy the full SHA 687b704View commit details -
This command was simply testing the mock.
Sam Broughton committedDec 22, 2017 Configuration menu - View commit details
-
Copy full SHA for 3000dcd - Browse repository at this point
Copy the full SHA 3000dcdView commit details -
Fallback to applying yamels one-by-one if mass apply fails
Sam Broughton committedDec 22, 2017 Configuration menu - View commit details
-
Copy full SHA for 7dbbd58 - Browse repository at this point
Copy the full SHA 7dbbd58View commit details -
We have this enormous block of nothingness all for satisying the requirements of a constructor we don't even need to use.
Sam Broughton committedDec 22, 2017 Configuration menu - View commit details
-
Copy full SHA for 1d010ee - Browse repository at this point
Copy the full SHA 1d010eeView commit details -
Remove error return value from NewCluster
Sam Broughton committedDec 22, 2017 Configuration menu - View commit details
-
Copy full SHA for 23c53d4 - Browse repository at this point
Copy the full SHA 23c53d4View commit details -
Camelify image_creds in main.go
Sam Broughton committedDec 22, 2017 Configuration menu - View commit details
-
Copy full SHA for ab35632 - Browse repository at this point
Copy the full SHA ab35632View commit details -
Apply namespaceless objects to default namespace
In some not-so-well-defined cases, applying an object to the default namespace can fail when its yaml doesn't explicitly specify the namespace. The simplest way to overcome this is to separate them out and pass the namespace flag to kubectl.
Sam Broughton committedDec 22, 2017 Configuration menu - View commit details
-
Copy full SHA for 712ca94 - Browse repository at this point
Copy the full SHA 712ca94View commit details -
Factor out common bits of execute
Sam Broughton committedDec 22, 2017 Configuration menu - View commit details
-
Copy full SHA for 68db839 - Browse repository at this point
Copy the full SHA 68db839View commit details
Commits on Dec 28, 2017
-
Remove namespace filtering logic from sync package
The ordering of application/deletion of namespaces before/after namespaced resources is specific to kubernetes and so does not belong in the generic sync package. This ordering is now implicitly handled by the order in which commands are run in the kubernetes package.
Sam Broughton committedDec 28, 2017 Configuration menu - View commit details
-
Copy full SHA for f74fd75 - Browse repository at this point
Copy the full SHA f74fd75View commit details -
Remove state from kubectl struct
It occurred to me that there's no good reason this state should be stored within the struct that happens to implement the Applier interface. The state can be built in the Sync method and then garbage collected at the end.
Sam Broughton committedDec 28, 2017 Configuration menu - View commit details
-
Copy full SHA for c113bd1 - Browse repository at this point
Copy the full SHA c113bd1View commit details
Commits on Jan 2, 2018
-
Take cluster lock as late as possible
Sam Broughton committedJan 2, 2018 Configuration menu - View commit details
-
Copy full SHA for 8c3f720 - Browse repository at this point
Copy the full SHA 8c3f720View commit details