forked from hall/kubenix
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix ConfigMap data with leading underscore (hall#44)
- Loading branch information
1 parent
e4d0365
commit 20c66c2
Showing
3 changed files
with
40 additions
and
7 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{ config, kubenix, ... }: | ||
let | ||
configMapData = (builtins.head config.kubernetes.objects).data; | ||
in | ||
{ | ||
imports = [ kubenix.modules.test kubenix.modules.k8s ]; | ||
|
||
test = { | ||
name = "k8s-simple"; | ||
description = "Test that ConfigMap data keys can have a leading underscore (https://github.com/hall/kubenix/issues/44)"; | ||
assertions = [ | ||
{ | ||
message = "leading underscore in ConfigMap key should be preserved"; | ||
assertion = configMapData == { _FOO = "_bar"; }; | ||
} | ||
]; | ||
}; | ||
|
||
kubernetes.resources.configMaps.foo.data._FOO = "_bar"; | ||
} |