-
Notifications
You must be signed in to change notification settings - Fork 160
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(etcd-operator): Remove kausal from root element (#480)
Instead, declare it explicitly, because it is an implementation detail that is leaking to the consumers of the libraries, polluting the root element. Particularly, this solves one use case, which is importing `etcd_cluster`: ``` local etcd_cluster = import 'etcd-operator/etcd-cluster.libsonnet'; { etcd_cluster: etcd_cluster.etcd_cluster('etcd') } ``` won't work if kausal is not available on the root element. To solve that we would need to do: ``` local etcd_cluster = import 'etcd-operator/etcd-cluster.libsonnet'; local k = import 'ksonnet-util/kausal.libsonnet'; { etcd_cluster: (k + etcd_cluster).etcd_cluster('etcd') } ``` For what is worth, that behaviour was not present when importing 'etcd-operator/etcd-operator.libsonnet'.
- Loading branch information
Showing
3 changed files
with
12 additions
and
11 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,2 @@ | ||
(import 'ksonnet-util/kausal.libsonnet') + | ||
(import 'operator.libsonnet') + | ||
(import 'etcd-cluster.libsonnet') |
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