-
Notifications
You must be signed in to change notification settings - Fork 73
Run downstream test with net-istio & mTLS #1085
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
Merged
openshift-merge-robot
merged 14 commits into
openshift-knative:main
from
nak3:add-net-istio-downstream
Jul 29, 2021
Merged
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
731b794
Run downstream test with net-istio & mTLS
nak3 bb9aa6b
separate helpers
nak3 62ac63e
Fix lib
nak3 1ff4a95
Fix lint
nak3 071acbd
move deploy_kn_k8s_svc_in_same_namespace_test.go
nak3 727113d
Remove const
nak3 9ed0f29
Fix script error
nak3 f2599d6
Remove none metrics and add deploy_networkpolicy
nak3 18db639
Ship networkpolicy for monitoring
nak3 b832fd6
Remove networkpolicy from mesh.bash
nak3 57e69ff
Update labels
nak3 5d6890b
Remove unused values
nak3 c0ce927
Try to run both downstream and upstream in one job.
nak3 d8ce5e2
Cleanup Makefile
nak3 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 |
|---|---|---|
|
|
@@ -43,3 +43,21 @@ spec: | |
| ingress: | ||
| - {} | ||
| --- | ||
| apiVersion: networking.k8s.io/v1 | ||
| kind: NetworkPolicy | ||
| metadata: | ||
| name: allow-from-openshift-monitoring-ns | ||
| namespace: knative-serving | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This lacks the provider label, so it'll be applied even with kourier, which we don't want.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thank you! Updated. |
||
| labels: | ||
| serving.knative.dev/release: devel | ||
| networking.knative.dev/ingress-provider: istio | ||
| spec: | ||
| ingress: | ||
| - from: | ||
| - namespaceSelector: | ||
| matchLabels: | ||
| name: "openshift-monitoring" | ||
| podSelector: {} | ||
| policyTypes: | ||
| - Ingress | ||
| --- | ||
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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
2 changes: 1 addition & 1 deletion
2
test/servinge2e/custom_route_test.go → test/servinge2e/kourier/custom_route_test.go
This file contains hidden or 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,4 +1,4 @@ | ||
| package servinge2e | ||
| package kourier | ||
|
|
||
| import ( | ||
| "context" | ||
|
|
||
This file contains hidden or 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,56 @@ | ||
| package kourier | ||
|
|
||
| import ( | ||
| "context" | ||
|
|
||
| "github.com/openshift-knative/serverless-operator/test" | ||
| meta "k8s.io/apimachinery/pkg/apis/meta/v1" | ||
| servingv1 "knative.dev/serving/pkg/apis/serving/v1" | ||
| servingv1alpha1 "knative.dev/serving/pkg/apis/serving/v1alpha1" | ||
| ) | ||
|
|
||
| const ( | ||
| testNamespace = "serverless-tests" | ||
| image = "gcr.io/knative-samples/helloworld-go" | ||
| helloworldText = "Hello World!" | ||
| ) | ||
|
|
||
| func withServiceReadyOrFail(ctx *test.Context, service *servingv1.Service) *servingv1.Service { | ||
| service, err := ctx.Clients.Serving.ServingV1().Services(service.Namespace).Create(context.Background(), service, meta.CreateOptions{}) | ||
| if err != nil { | ||
| ctx.T.Fatalf("Error creating ksvc: %v", err) | ||
| } | ||
|
|
||
| // Let the ksvc be deleted after test | ||
| ctx.AddToCleanup(func() error { | ||
| ctx.T.Logf("Cleaning up Knative Service '%s/%s'", service.Namespace, service.Name) | ||
| return ctx.Clients.Serving.ServingV1().Services(service.Namespace).Delete(context.Background(), service.Name, meta.DeleteOptions{}) | ||
| }) | ||
|
|
||
| service, err = test.WaitForServiceState(ctx, service.Name, service.Namespace, test.IsServiceReady) | ||
| if err != nil { | ||
| ctx.T.Fatalf("Error waiting for ksvc readiness: %v", err) | ||
| } | ||
|
|
||
| return service | ||
| } | ||
|
|
||
| func withDomainMappingReadyOrFail(ctx *test.Context, dm *servingv1alpha1.DomainMapping) *servingv1alpha1.DomainMapping { | ||
| dm, err := ctx.Clients.Serving.ServingV1alpha1().DomainMappings(dm.Namespace).Create(context.Background(), dm, meta.CreateOptions{}) | ||
| if err != nil { | ||
| ctx.T.Fatalf("Error creating ksvc: %v", err) | ||
| } | ||
|
|
||
| // Let the ksvc be deleted after test | ||
| ctx.AddToCleanup(func() error { | ||
| ctx.T.Logf("Cleaning up Knative Service '%s/%s'", dm.Namespace, dm.Name) | ||
| return ctx.Clients.Serving.ServingV1alpha1().DomainMappings(dm.Namespace).Delete(context.Background(), dm.Name, meta.DeleteOptions{}) | ||
| }) | ||
|
|
||
| dm, err = test.WaitForDomainMappingState(ctx, dm.Name, dm.Namespace, test.IsDomainMappingReady) | ||
| if err != nil { | ||
| ctx.T.Fatalf("Error waiting for ksvc readiness: %v", err) | ||
| } | ||
|
|
||
| return dm | ||
| } |
2 changes: 1 addition & 1 deletion
2
test/servinge2e/service_to_service_test.go → ...inge2e/kourier/service_to_service_test.go
This file contains hidden or 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,4 +1,4 @@ | ||
| package servinge2e | ||
| package kourier | ||
|
|
||
| import ( | ||
| "context" | ||
|
|
||
2 changes: 1 addition & 1 deletion
2
test/servinge2e/servicemesh_test.go → test/servinge2e/kourier/servicemesh_test.go
This file contains hidden or 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,4 +1,4 @@ | ||
| package servinge2e | ||
| package kourier | ||
|
|
||
| import ( | ||
| "context" | ||
|
|
||
This file contains hidden or 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 hidden or 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 hidden or 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
YAY!