-
-
Notifications
You must be signed in to change notification settings - Fork 199
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1142 from projectsyn/feat/reclass-applications
Expose `applications` and `exports` fields in `InventoryTarget` and Jsonnet `inventory()` callback
- Loading branch information
Showing
9 changed files
with
151 additions
and
4 deletions.
There are no files selected for viewing
44 changes: 44 additions & 0 deletions
44
examples/kubernetes/compiled/jsonnet-env/jsonnet-env/env.yml
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 |
---|---|---|
@@ -0,0 +1,44 @@ | ||
applications: | ||
- a | ||
- b | ||
- c | ||
classes: | ||
- common | ||
- jsonnet-env | ||
exports: {} | ||
parameters: | ||
_reclass_: | ||
environment: base | ||
name: | ||
full: jsonnet-env | ||
parts: | ||
- jsonnet-env | ||
path: jsonnet-env | ||
short: jsonnet-env | ||
a: aaaaa | ||
b: bbbbb | ||
c: ccccc | ||
kapitan: | ||
compile: | ||
- input_params: {} | ||
input_paths: | ||
- components/jsonnet-env/env.jsonnet | ||
input_type: jsonnet | ||
output_path: jsonnet-env | ||
output_type: yml | ||
secrets: | ||
awskms: | ||
key: alias/nameOfKey | ||
gkms: | ||
key: projects/<project>/locations/<location>/keyRings/<keyRing>/cryptoKeys/<key> | ||
gpg: | ||
recipients: | ||
- fingerprint: D9234C61F58BEB3ED8552A57E28DC07A3CBFAE7C | ||
name: [email protected] | ||
target_full_path: jsonnet-env | ||
vars: | ||
managed_by: kapitan | ||
namespace: jsonnet-env | ||
target: jsonnet-env | ||
namespace: jsonnet-env | ||
target_name: jsonnet-env |
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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
local kap = import 'lib/kapitan.libjsonnet'; | ||
local inventory = kap.inventory(); | ||
|
||
{ | ||
env: { | ||
applications: inventory.applications, | ||
classes: inventory.classes, | ||
parameters: inventory.parameters, | ||
exports: inventory.exports, | ||
}, | ||
} |
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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
applications: | ||
- a | ||
- b | ||
- c | ||
|
||
classes: | ||
- common | ||
|
||
parameters: | ||
a: aaaaa | ||
b: bbbbb | ||
c: ccccc |
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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
classes: | ||
- jsonnet-env | ||
|
||
parameters: | ||
target_name: jsonnet-env | ||
kapitan: | ||
compile: | ||
- output_path: jsonnet-env | ||
input_type: jsonnet | ||
input_paths: | ||
- components/jsonnet-env/env.jsonnet | ||
output_type: yml |
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
44 changes: 44 additions & 0 deletions
44
tests/test_kubernetes_compiled/jsonnet-env/jsonnet-env/env.yml
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 |
---|---|---|
@@ -0,0 +1,44 @@ | ||
applications: | ||
- a | ||
- b | ||
- c | ||
classes: | ||
- common | ||
- jsonnet-env | ||
exports: {} | ||
parameters: | ||
_reclass_: | ||
environment: base | ||
name: | ||
full: jsonnet-env | ||
parts: | ||
- jsonnet-env | ||
path: jsonnet-env | ||
short: jsonnet-env | ||
a: aaaaa | ||
b: bbbbb | ||
c: ccccc | ||
kapitan: | ||
compile: | ||
- input_params: {} | ||
input_paths: | ||
- components/jsonnet-env/env.jsonnet | ||
input_type: jsonnet | ||
output_path: jsonnet-env | ||
output_type: yml | ||
secrets: | ||
awskms: | ||
key: alias/nameOfKey | ||
gkms: | ||
key: projects/<project>/locations/<location>/keyRings/<keyRing>/cryptoKeys/<key> | ||
gpg: | ||
recipients: | ||
- fingerprint: D9234C61F58BEB3ED8552A57E28DC07A3CBFAE7C | ||
name: [email protected] | ||
target_full_path: jsonnet-env | ||
vars: | ||
managed_by: kapitan | ||
namespace: jsonnet-env | ||
target: jsonnet-env | ||
namespace: jsonnet-env | ||
target_name: jsonnet-env |