forked from hashicorp/vault-helm
-
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.
Adds support to explicitly configure network policy in injector
Similar to the conversion around PR hashicorp#381, network policies are useful for the injector independent of openshift. This allows support for those use cases but similarly will require some configuration changes for openshift users.
- Loading branch information
Showing
3 changed files
with
27 additions
and
1 deletion.
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 |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#!/usr/bin/env bats | ||
|
||
load _helpers | ||
|
||
@test "injector/network-policy: disabled by default" { | ||
cd `chart_dir` | ||
local actual=$( (helm template \ | ||
--show-only templates/injector-network-policy.yaml \ | ||
. || echo "---") | tee /dev/stderr | | ||
yq 'length > 0' | tee /dev/stderr) | ||
[ "${actual}" = "false" ] | ||
} | ||
|
||
@test "injector/network-policy: enabled by injector.networkPolicy.enabled" { | ||
cd `chart_dir` | ||
local actual=$( (helm template \ | ||
--set 'injector.networkPolicy.enabled=true' \ | ||
--show-only templates/injector-network-policy.yaml \ | ||
. || echo "---") | tee /dev/stderr | | ||
yq 'length > 0' | tee /dev/stderr) | ||
[ "${actual}" = "true" ] | ||
} |
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