Skip to content
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

Updating with fixes #258

Merged
merged 4 commits into from
Sep 20, 2022
Merged

Updating with fixes #258

merged 4 commits into from
Sep 20, 2022

Conversation

vinay-g
Copy link
Collaborator

@vinay-g vinay-g commented Sep 13, 2022

3 Changes -

  • Removing duplicate controllers
  • Adding read-only mode to ensure only primary admiral can update entries
  • Adding plugin info into envoyFilter

Signed-off-by: vgonuguntla <vinay_gonuguntla@intuit.com>
Signed-off-by: vgonuguntla <vinay_gonuguntla@intuit.com>
Signed-off-by: vgonuguntla <vinay_gonuguntla@intuit.com>
{
name: "Readonly test - Routing Policy",
rp: &v1.RoutingPolicy{

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nitpick: remove extra line.

{
name: "Readonly false test - Routing Policy",
rp: &v1.RoutingPolicy{

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nitpick: remove extra line.

t.Run(c.name, func(t *testing.T) {
if c.readOnly {
CurrentAdmiralState.ReadOnly = true
}else{
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nitpick: space before/after else.

@@ -184,3 +186,8 @@ func getHosts(routingPolicy *v1.RoutingPolicy) string {
hosts = strings.TrimSuffix(hosts, ",")
return hostsKey + hosts
}

func getPlugin(routingPolicy *v1.RoutingPolicy) string {
plugin := routingPolicy.Spec.Plugin
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we check for nil here?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oops let me add that, its a check in quarter master so that should work

doesError bool
}{
{
name: "Readonly test - Routing Policy",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

may be slightly more context here, for instance what we are trying to assert here.

Signed-off-by: vgonuguntla <vinay_gonuguntla@intuit.com>
@vinay-g vinay-g merged commit 5b30512 into istio-ecosystem:master Sep 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants