Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 8 of 8 for buildPatchStruct (0.18 sec)

  1. pilot/pkg/networking/core/envoyfilter/extension_configuration_patch_test.go

    				Context: networking.EnvoyFilter_SIDECAR_OUTBOUND,
    			},
    			Patch: &networking.EnvoyFilter_Patch{
    				Operation: networking.EnvoyFilter_Patch_ADD,
    				Value:     buildPatchStruct(`{"name":"add-extension-config1"}`),
    			},
    		},
    		{
    			ApplyTo: networking.EnvoyFilter_EXTENSION_CONFIG,
    			Match: &networking.EnvoyFilter_EnvoyConfigObjectMatch{
    				Context: networking.EnvoyFilter_SIDECAR_OUTBOUND,
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu Mar 28 17:09:02 UTC 2024
    - 3.4K bytes
    - Viewed (0)
  2. pilot/pkg/networking/core/envoyfilter/listener_patch_test.go

    				Priority:      priorities[i],
    			},
    		})
    		if err != nil {
    			log.Errorf("create envoyfilter failed %v", err)
    		}
    	}
    	return store
    }
    
    func buildPatchStruct(config string) *structpb.Struct {
    	val := &structpb.Struct{}
    	_ = protomarshal.UnmarshalString(config, val)
    	return val
    }
    
    // nolint: unparam
    func buildGolangPatchStruct(config string) *structpb.Struct {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Sun Apr 21 17:42:54 UTC 2024
    - 70.1K bytes
    - Viewed (0)
  3. pilot/pkg/networking/core/envoyfilter/cluster_patch_test.go

    				Value:     buildPatchStruct(`{"name":"new-cluster1"}`),
    			},
    		},
    		{
    			ApplyTo: networking.EnvoyFilter_CLUSTER,
    			Match: &networking.EnvoyFilter_EnvoyConfigObjectMatch{
    				Context: networking.EnvoyFilter_SIDECAR_OUTBOUND,
    			},
    			Patch: &networking.EnvoyFilter_Patch{
    				Operation: networking.EnvoyFilter_Patch_ADD,
    				Value:     buildPatchStruct(`{"name":"new-cluster2"}`),
    			},
    		},
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu Mar 28 17:09:02 UTC 2024
    - 20.7K bytes
    - Viewed (0)
  4. pilot/pkg/networking/core/envoyfilter/rc_patch_test.go

    						PortNumber: 80,
    					},
    				},
    			},
    			Patch: &networking.EnvoyFilter_Patch{
    				Operation: networking.EnvoyFilter_Patch_MERGE,
    				Value:     buildPatchStruct(`{"request_headers_to_remove":["h3", "h4"]}`),
    			},
    		},
    		{
    			ApplyTo: networking.EnvoyFilter_HTTP_ROUTE,
    			Match: &networking.EnvoyFilter_EnvoyConfigObjectMatch{
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu Mar 28 17:09:02 UTC 2024
    - 32.4K bytes
    - Viewed (0)
  5. pilot/pkg/model/envoyfilter_test.go

    				if got != match {
    					t.Errorf("expected %v to match %v, got %v", ver, match, got)
    				}
    			}
    		})
    	}
    }
    
    func TestConvertEnvoyFilter(t *testing.T) {
    	buildPatchStruct := func(config string) *structpb.Struct {
    		val := &structpb.Struct{}
    		_ = protomarshal.UnmarshalString(config, val)
    		return val
    	}
    
    	cfilter := convertToEnvoyFilterWrapper(&config.Config{
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed Dec 27 04:20:28 UTC 2023
    - 7.4K bytes
    - Viewed (0)
  6. pilot/pkg/networking/core/listener_builder_test.go

    				Value:     buildPatchStruct(`{"name":"new-inbound-listener"}`),
    			},
    		},
    		{
    			ApplyTo: networking.EnvoyFilter_LISTENER,
    			Match: &networking.EnvoyFilter_EnvoyConfigObjectMatch{
    				Context: networking.EnvoyFilter_GATEWAY,
    			},
    			Patch: &networking.EnvoyFilter_Patch{
    				Operation: networking.EnvoyFilter_Patch_ADD,
    				Value:     buildPatchStruct(`{"name":"new-gateway-listener"}`),
    			},
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu Jun 13 01:56:28 UTC 2024
    - 24.7K bytes
    - Viewed (0)
  7. pilot/pkg/model/push_context_test.go

    	}
    	if !reflect.DeepEqual(expectedns1, gotns1) {
    		t.Errorf("Envoy filters are not ordered as expected. expected: %v got: %v", expectedns1, gotns1)
    	}
    }
    
    func buildPatchStruct(config string) *structpb.Struct {
    	val := &structpb.Struct{}
    	_ = protomarshal.UnmarshalString(config, val)
    	return val
    }
    
    func TestEnvoyFilterOrderAcrossNamespaces(t *testing.T) {
    	env := &Environment{}
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Sun Apr 21 17:42:54 UTC 2024
    - 95.3K bytes
    - Viewed (0)
  8. pilot/pkg/networking/core/cluster_test.go

    						Context: networking.EnvoyFilter_SIDECAR_OUTBOUND,
    					},
    					Patch: &networking.EnvoyFilter_Patch{
    						Operation: networking.EnvoyFilter_Patch_ADD,
    						Value:     buildPatchStruct(`{"name":"new-cluster1"}`),
    					},
    				}},
    			}},
    			model.SidecarProxy,
    			service,
    		},
    		{
    			"remove cluster",
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu Jun 13 01:56:28 UTC 2024
    - 108.8K bytes
    - Viewed (0)
Back to top