-
Notifications
You must be signed in to change notification settings - Fork 43
Adding mTLS kuadrant installation mode #1170
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
Merged
Changes from all commits
Commits
Show all changes
26 commits
Select commit
Hold shift + click to select a range
85c4a60
adding mtls config
laurafitzgerald 9825e36
move istio check to before the reconciler
laurafitzgerald a2f852f
move limitador and authorino installed checks to reconciler initialis…
laurafitzgerald 7815995
refactor to add some cleanup logic and adding logic to link deploymen…
laurafitzgerald be5cae0
moving envoyfilter management to auth and rate limit reconcilers, som…
laurafitzgerald 861a1cc
cleanup of restmapper and variables
laurafitzgerald fc865ad
rebase and fixup and imports
laurafitzgerald 7b7dff8
updating bundle and chart
laurafitzgerald f102bd6
update sample kuadrant to default to not enable mtls
laurafitzgerald 54826b7
fixing up some issues after rebase
laurafitzgerald 43459bb
improved logic around ismtls and creating peerauthentication
laurafitzgerald 063c472
remove limitador conition
laurafitzgerald 66767b6
adding PeerAuthentication to schema for tests
laurafitzgerald ff67e2d
set LinkDeploymentToLimitador, unset LinkDeploymentToAuthorino
eguzki 3218402
authorino_reconciler.go: update logging level of traces
eguzki 88db720
api/v1beta1/topology.go: LinkLimitadorToDeployment unittests
eguzki ead00f7
authorino_istio_integration_reconciler
eguzki 5c81403
istio_peerauthentication_reconciler
eguzki 73a79aa
limitador_istio_integration_reconciler
eguzki 8acf925
split mtls_reconciler into several reconcilers
eguzki 6d6edd7
revert changes from config/samples/kuadrant_v1beta1_kuadrant.yaml
eguzki f563167
kuadrant CRD: additional printer column mtls
eguzki e23a4a6
internal/utils/map_utils.go: MergeMapStringString and unittests
eguzki 74e6557
mtls: integration tests
eguzki bade7f5
mtls: link kuadrant to peerauthentication
eguzki 8514c5d
s/AuthorionIsReady/AuthorinoIsReady/g
eguzki 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
//go:build unit | ||
|
||
package v1beta1 | ||
|
||
import ( | ||
"testing" | ||
|
||
limitadorv1alpha1 "github.com/kuadrant/limitador-operator/api/v1alpha1" | ||
"github.com/kuadrant/policy-machinery/controller" | ||
"github.com/kuadrant/policy-machinery/machinery" | ||
"gotest.tools/assert" | ||
is "gotest.tools/assert/cmp" | ||
appsv1 "k8s.io/api/apps/v1" | ||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" | ||
) | ||
|
||
func TestLinkLimitadorToDeployment(t *testing.T) { | ||
t.Run("empty store", func(subT *testing.T) { | ||
link := LinkLimitadorToDeployment(controller.Store{}) | ||
assert.Equal(subT, link.From, LimitadorGroupKind) | ||
assert.Equal(subT, link.To, DeploymentGroupKind) | ||
assert.Assert(subT, is.Len(link.Func(testDeployment("ns1", "foo")), 0)) | ||
}) | ||
|
||
t.Run("basic", func(subT *testing.T) { | ||
store := controller.Store{} | ||
store["limitador1"] = testLimitador("ns1", "limitador1") | ||
store["limitador2"] = testLimitador("ns2", "limitador2") | ||
link := LinkLimitadorToDeployment(store) | ||
parents := link.Func(testDeployment("ns1", "limitador-limitador")) | ||
assert.Assert(subT, is.Len(parents, 1)) | ||
assert.Equal(subT, parents[0].GetName(), "limitador1") | ||
assert.Equal(subT, parents[0].GetNamespace(), "ns1") | ||
parents = link.Func(testDeployment("ns1", "foo")) | ||
assert.Assert(subT, is.Len(parents, 0)) | ||
parents = link.Func(testDeployment("ns2", "limitador-limitador")) | ||
assert.Assert(subT, is.Len(parents, 1)) | ||
assert.Equal(subT, parents[0].GetName(), "limitador2") | ||
assert.Equal(subT, parents[0].GetNamespace(), "ns2") | ||
}) | ||
} | ||
|
||
func testDeployment(ns, name string) machinery.Object { | ||
return &controller.RuntimeObject{ | ||
Object: &appsv1.Deployment{ | ||
TypeMeta: metav1.TypeMeta{ | ||
Kind: DeploymentGroupKind.Kind, | ||
APIVersion: appsv1.SchemeGroupVersion.String(), | ||
}, | ||
ObjectMeta: metav1.ObjectMeta{ | ||
Name: name, | ||
Namespace: ns, | ||
}, | ||
}, | ||
} | ||
} | ||
|
||
func testLimitador(ns, name string) controller.Object { | ||
return &limitadorv1alpha1.Limitador{ | ||
TypeMeta: metav1.TypeMeta{ | ||
Kind: LimitadorGroupKind.Kind, | ||
APIVersion: limitadorv1alpha1.GroupVersion.String(), | ||
}, | ||
ObjectMeta: metav1.ObjectMeta{ | ||
Name: name, | ||
Namespace: ns, | ||
}, | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.