-
Notifications
You must be signed in to change notification settings - Fork 115
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for NetworkPolicies #422
Conversation
59e4703
to
3a48ee0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems reasonable given this resource has no status. Though I wonder if we want to use the UNUSUAL_FAILURE_MESSAGE
instead of STANDARD_TIMEOUT_MESSAGE
for timeout_message
.
3a48ee0
to
06a9bfa
Compare
Yeah that makes sense, changed |
@@ -1080,6 +1081,24 @@ def test_not_apply_resource_can_be_pruned | |||
]) | |||
end | |||
|
|||
def test_network_policies_are_deployed_first | |||
assert_deploy_success(deploy_fixtures("network-policy")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of creating a separate fixture set with just this in it, on this line you can do deploy_fixtures('hello-cloud', subset: ['network_policy.yml'])
"NetworkPolicy/allow-all-network-policy", | ||
], in_order: true) | ||
|
||
netpols = networking_v1_kubeclient.get_network_policies(namespace: @namespace) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of using kubeclient here, please augment the HelloCloud FixtureSet as described in our Readme:
Add the a basic example of the type to the hello-cloud fixture set and appropriate assertions to
#assert_all_up
inhello_cloud.rb
. This will get you coverage in several existing tests, such astest_full_hello_cloud_set_deploy_succeeds
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh right missed that, sorry. Updated now
9588e85
to
ec887ea
Compare
ec887ea
to
ec161b0
Compare
What are you trying to accomplish with this PR?
Add support for
NetworkPolicy
so that deploys dont nag about itHow is this accomplished?
Add resource type, copypaste things
What could go wrong?
I added support for pruning too because thats the correct way to do it, but might suprise people that do NetworkPolicies outside of deploys. Hopefully nobody does such a thing :)