From dc66648b30f507fa37bdef90f74ca4c64165ae61 Mon Sep 17 00:00:00 2001 From: Jakub Dyszkiewicz Date: Fri, 12 Jan 2024 13:29:35 +0100 Subject: [PATCH] feat(kumactl): more profiles in export (#8780) Signed-off-by: Jakub Dyszkiewicz --- api/openapi/specs/common/resource.yaml | 6 +- .../types/common/zz_generated.resource.go | 4 +- app/kumactl/cmd/export/export.go | 46 ++++++++-- app/kumactl/cmd/export/export_test.go | 12 +++ app/kumactl/pkg/client/resources_client.go | 54 ++++++++++++ .../pkg/client/resources_client_test.go | 62 ++++++++++++++ app/kumactl/pkg/cmd/root_context.go | 10 +++ docs/generated/openapi.yaml | 11 +-- pkg/api-server/policies_endpoints.go | 16 ++-- pkg/api-server/server.go | 2 +- .../testdata/_resources_list.golden.json | 84 +++++++++---------- 11 files changed, 241 insertions(+), 66 deletions(-) create mode 100644 app/kumactl/pkg/client/resources_client.go create mode 100644 app/kumactl/pkg/client/resources_client_test.go diff --git a/api/openapi/specs/common/resource.yaml b/api/openapi/specs/common/resource.yaml index 8ee32d5ed286..58fb2a2ba1cb 100644 --- a/api/openapi/specs/common/resource.yaml +++ b/api/openapi/specs/common/resource.yaml @@ -3,7 +3,7 @@ components: ResourceTypeDescription: description: Description of a resource type, this is useful for dynamically generated clients and the gui type: object - required: [name, scope, readOnly, path, singularDisplayName, pluralDisplayName, includeInDump] + required: [name, scope, readOnly, path, singularDisplayName, pluralDisplayName, includeInFederationWithPolicies] properties: name: description: the name of the resource type @@ -20,8 +20,8 @@ components: type: string pluralDisplayName: type: string - includeInDump: - description: description resources of this type should be included in dump (especially useful for moving from non-federated to federated or migrating to a new global). + includeInFederationWithPolicies: + description: description resources of this type should be included in federetion-with-policies export profile (especially useful for moving from non-federated to federated or migrating to a new global). type: boolean policy: $ref: "#/components/schemas/PolicyDescription" diff --git a/api/openapi/types/common/zz_generated.resource.go b/api/openapi/types/common/zz_generated.resource.go index c6e5f5c972b8..74fd587dd9b8 100644 --- a/api/openapi/types/common/zz_generated.resource.go +++ b/api/openapi/types/common/zz_generated.resource.go @@ -76,8 +76,8 @@ type ProxyRule struct { // ResourceTypeDescription Description of a resource type, this is useful for dynamically generated clients and the gui type ResourceTypeDescription struct { - // IncludeInDump description resources of this type should be included in dump (especially useful for moving from non-federated to federated or migrating to a new global). - IncludeInDump bool `json:"includeInDump"` + // IncludeInFederationWithPolicies description resources of this type should be included in federetion-with-policies export profile (especially useful for moving from non-federated to federated or migrating to a new global). + IncludeInFederationWithPolicies bool `json:"includeInFederationWithPolicies"` // Name the name of the resource type Name string `json:"name"` diff --git a/app/kumactl/cmd/export/export.go b/app/kumactl/cmd/export/export.go index 21d750873060..c95a6a64fa1a 100644 --- a/app/kumactl/cmd/export/export.go +++ b/app/kumactl/cmd/export/export.go @@ -1,6 +1,7 @@ package export import ( + "context" "fmt" "github.com/pkg/errors" @@ -27,13 +28,15 @@ type exportContext struct { } const ( - profileFederation = "federation" + profileFederation = "federation" + profileFederationWithPolicies = "federation-with-policies" + profileAll = "all" formatUniversal = "universal" formatKubernetes = "kubernetes" ) -var profiles = map[string][]model.ResourceType{ +var staticProfiles = map[string][]model.ResourceType{ profileFederation: { core_mesh.MeshType, core_system.GlobalSecretType, @@ -57,11 +60,15 @@ $ kumactl export --profile federation --format universal > policies.yaml cmd.PrintErrln(err) } - resTypes, ok := profiles[ctx.args.profile] - if !ok { + if ctx.args.profile != profileAll && ctx.args.profile != profileFederation && ctx.args.profile != profileFederationWithPolicies { return errors.New("invalid profile") } + resTypes, err := resourcesTypesToDump(cmd.Context(), ctx) + if err != nil { + return err + } + if ctx.args.format != formatUniversal && ctx.args.format != formatKubernetes { return errors.New("invalid format") } @@ -130,7 +137,7 @@ $ kumactl export --profile federation --format universal > policies.yaml return nil }, } - cmd.Flags().StringVarP(&ctx.args.profile, "profile", "p", profileFederation, fmt.Sprintf(`Profile. Available values: %q`, profileFederation)) + cmd.Flags().StringVarP(&ctx.args.profile, "profile", "p", profileFederation, fmt.Sprintf(`Profile. Available values: %q, %q, %q`, profileFederation, profileAll, profileFederationWithPolicies)) cmd.Flags().StringVarP(&ctx.args.format, "format", "f", formatUniversal, fmt.Sprintf(`Policy format output. Available values: %q, %q`, formatUniversal, formatKubernetes)) return cmd } @@ -144,3 +151,32 @@ func cleanKubeObject(obj map[string]interface{}) { delete(meta, "generation") delete(meta, "managedFields") } + +func resourcesTypesToDump(ctx context.Context, ectx *exportContext) ([]model.ResourceType, error) { + rt, ok := staticProfiles[ectx.args.profile] + if ok { + return rt, nil + } + client, err := ectx.CurrentResourcesListClient() + if err != nil { + return nil, err + } + list, err := client.List(ctx) + if err != nil { + return nil, err + } + var resTypes []model.ResourceType + for _, res := range list.Resources { + switch ectx.args.profile { + case profileAll: + resTypes = append(resTypes, model.ResourceType(res.Name)) + case profileFederationWithPolicies: + if res.IncludeInFederationWithPolicies { + resTypes = append(resTypes, model.ResourceType(res.Name)) + } + default: + return nil, errors.New("invalid profile") + } + } + return resTypes, nil +} diff --git a/app/kumactl/cmd/export/export_test.go b/app/kumactl/cmd/export/export_test.go index 4f7b463c2aff..c67c00409c48 100644 --- a/app/kumactl/cmd/export/export_test.go +++ b/app/kumactl/cmd/export/export_test.go @@ -13,6 +13,7 @@ import ( . "github.com/onsi/gomega" "github.com/spf13/cobra" + api_types "github.com/kumahq/kuma/api/openapi/types" "github.com/kumahq/kuma/app/kumactl/cmd" "github.com/kumahq/kuma/app/kumactl/pkg/client" "github.com/kumahq/kuma/pkg/core/resources/apis/mesh" @@ -40,6 +41,9 @@ var _ = Describe("kumactl export", func() { rootCtx.Runtime.NewKubernetesResourcesClient = func(client util_http.Client) client.KubernetesResourcesClient { return fileBasedKubernetesResourcesClient{} } + rootCtx.Runtime.NewResourcesListClient = func(u util_http.Client) client.ResourcesListClient { + return staticResourcesListClient{} + } rootCmd = cmd.NewRootCmd(rootCtx) buf = &bytes.Buffer{} @@ -149,3 +153,11 @@ func (f fileBasedKubernetesResourcesClient) Get(_ context.Context, descriptor mo } return res, nil } + +type staticResourcesListClient struct{} + +var _ client.ResourcesListClient = &staticResourcesListClient{} + +func (s staticResourcesListClient) List(ctx context.Context) (api_types.ResourceTypeDescriptionList, error) { + return api_types.ResourceTypeDescriptionList{}, nil +} diff --git a/app/kumactl/pkg/client/resources_client.go b/app/kumactl/pkg/client/resources_client.go new file mode 100644 index 000000000000..b8a0cec230e6 --- /dev/null +++ b/app/kumactl/pkg/client/resources_client.go @@ -0,0 +1,54 @@ +package client + +import ( + "context" + "encoding/json" + "io" + "net/http" + + "github.com/pkg/errors" + + api_types "github.com/kumahq/kuma/api/openapi/types" + util_http "github.com/kumahq/kuma/pkg/util/http" +) + +type ResourcesListClient interface { + List(ctx context.Context) (api_types.ResourceTypeDescriptionList, error) +} + +var _ ResourcesListClient = &HTTPResourcesListClient{} + +type HTTPResourcesListClient struct { + client util_http.Client +} + +func NewHTTPResourcesListClient(client util_http.Client) ResourcesListClient { + return &HTTPResourcesListClient{ + client: client, + } +} + +func (h HTTPResourcesListClient) List(ctx context.Context) (api_types.ResourceTypeDescriptionList, error) { + req, err := http.NewRequest("GET", "/_resources", nil) + if err != nil { + return api_types.ResourceTypeDescriptionList{}, err + } + req.Header.Set("Accept", "application/json") + resp, err := h.client.Do(req.WithContext(ctx)) + if err != nil { + return api_types.ResourceTypeDescriptionList{}, err + } + defer resp.Body.Close() + b, err := io.ReadAll(resp.Body) + if err != nil { + return api_types.ResourceTypeDescriptionList{}, err + } + if resp.StatusCode != 200 { + return api_types.ResourceTypeDescriptionList{}, errors.Errorf("unexpected status code: %d %s", resp.StatusCode, b) + } + list := api_types.ResourceTypeDescriptionList{} + if err := json.Unmarshal(b, &list); err != nil { + return api_types.ResourceTypeDescriptionList{}, err + } + return list, nil +} diff --git a/app/kumactl/pkg/client/resources_client_test.go b/app/kumactl/pkg/client/resources_client_test.go new file mode 100644 index 000000000000..e63489f463f3 --- /dev/null +++ b/app/kumactl/pkg/client/resources_client_test.go @@ -0,0 +1,62 @@ +package client + +import ( + "context" + "net/http" + "net/http/httptest" + "net/url" + + . "github.com/onsi/ginkgo/v2" + . "github.com/onsi/gomega" + + util_http "github.com/kumahq/kuma/pkg/util/http" +) + +var _ = Describe("Resources Client", func() { + It("should return resources list", func() { + // given + mux := http.NewServeMux() + server := httptest.NewServer(mux) + defer server.Close() + mux.HandleFunc("/_resources", func(writer http.ResponseWriter, req *http.Request) { + defer GinkgoRecover() + Expect(req.Header.Get("accept")).To(Equal("application/json")) + + resp := `{ + "resources": [ + { + "includeInDump": true, + "name": "CircuitBreaker", + "path": "circuit-breakers", + "pluralDisplayName": "Circuit Breakers", + "policy": { + "hasFromTargetRef": false, + "hasToTargetRef": false, + "isTargetRef": false + }, + "readOnly": false, + "scope": "Mesh", + "singularDisplayName": "Circuit Breaker" + } + ] +}` + + _, err := writer.Write([]byte(resp)) + Expect(err).ToNot(HaveOccurred()) + }) + serverURL, err := url.Parse(server.URL) + Expect(err).ToNot(HaveOccurred()) + + resListClient := NewHTTPResourcesListClient( + util_http.ClientWithBaseURL(http.DefaultClient, serverURL, nil), + ) + + // when + obj, err := resListClient.List(context.Background()) + + // then + Expect(err).ToNot(HaveOccurred()) + Expect(obj.Resources).To(HaveLen(1)) + Expect(obj.Resources[0].Name).To(Equal("CircuitBreaker")) + }) +}) diff --git a/app/kumactl/pkg/cmd/root_context.go b/app/kumactl/pkg/cmd/root_context.go index d29fab22f877..6cc8b69e5f2b 100644 --- a/app/kumactl/pkg/cmd/root_context.go +++ b/app/kumactl/pkg/cmd/root_context.go @@ -61,6 +61,7 @@ type RootRuntime struct { NewZoneTokenClient func(util_http.Client) tokens.ZoneTokenClient NewAPIServerClient func(util_http.Client) kumactl_resources.ApiServerClient NewKubernetesResourcesClient func(util_http.Client) client.KubernetesResourcesClient + NewResourcesListClient func(util_http.Client) client.ResourcesListClient Registry registry.TypeRegistry } @@ -118,6 +119,7 @@ func DefaultRootContext() *RootContext { NewKubernetesResourcesClient: func(c util_http.Client) client.KubernetesResourcesClient { return client.NewHTTPKubernetesResourcesClient(c, registry.Global().ObjectDescriptors()) }, + NewResourcesListClient: client.NewHTTPResourcesListClient, }, InstallCpContext: install_context.DefaultInstallCpContext(), InstallCRDContext: install_context.DefaultInstallCrdsContext(), @@ -222,6 +224,14 @@ func (rc *RootContext) CurrentKubernetesResourcesClient() (client.KubernetesReso return rc.Runtime.NewKubernetesResourcesClient(client), nil } +func (rc *RootContext) CurrentResourcesListClient() (client.ResourcesListClient, error) { + client, err := rc.BaseAPIServerClient() + if err != nil { + return nil, err + } + return rc.Runtime.NewResourcesListClient(client), nil +} + func (rc *RootContext) CurrentDataplaneOverviewClient() (kumactl_resources.DataplaneOverviewClient, error) { client, err := rc.BaseAPIServerClient() if err != nil { diff --git a/docs/generated/openapi.yaml b/docs/generated/openapi.yaml index f41a0a49097a..3295a264de1b 100644 --- a/docs/generated/openapi.yaml +++ b/docs/generated/openapi.yaml @@ -1555,7 +1555,7 @@ components: - path - singularDisplayName - pluralDisplayName - - includeInDump + - includeInFederationWithPolicies properties: name: description: the name of the resource type @@ -1576,11 +1576,12 @@ components: type: string pluralDisplayName: type: string - includeInDump: + includeInFederationWithPolicies: description: >- - description resources of this type should be included in dump - (especially useful for moving from non-federated to federated or - migrating to a new global). + description resources of this type should be included in + federetion-with-policies export profile (especially useful for + moving from non-federated to federated or migrating to a new + global). type: boolean policy: $ref: '#/components/schemas/PolicyDescription' diff --git a/pkg/api-server/policies_endpoints.go b/pkg/api-server/policies_endpoints.go index c863c7a2ca21..b658679b2ce3 100644 --- a/pkg/api-server/policies_endpoints.go +++ b/pkg/api-server/policies_endpoints.go @@ -11,7 +11,7 @@ import ( "github.com/kumahq/kuma/pkg/core/resources/model" ) -func addPoliciesWsEndpoints(ws *restful.WebService, isGlobal bool, federatedZone bool, readOnly bool, defs []model.ResourceTypeDescriptor) { +func addPoliciesWsEndpoints(ws *restful.WebService, federatedZone bool, readOnly bool, defs []model.ResourceTypeDescriptor) { ws.Route(ws.GET("/policies").To(func(req *restful.Request, resp *restful.Response) { response := types.PoliciesResponse{} for _, def := range defs { @@ -42,13 +42,13 @@ func addPoliciesWsEndpoints(ws *restful.WebService, isGlobal bool, federatedZone response := api_types.ResourceTypeDescriptionList{} for _, def := range defs { td := api_common.ResourceTypeDescription{ - Name: string(def.Name), - ReadOnly: readOnly || federatedZone || def.ReadOnly, - Path: def.WsPath, - SingularDisplayName: def.SingularDisplayName, - PluralDisplayName: def.PluralDisplayName, - Scope: api_common.ResourceTypeDescriptionScope(def.Scope), - IncludeInDump: isGlobal || def.DumpForGlobal, + Name: string(def.Name), + ReadOnly: readOnly || federatedZone || def.ReadOnly, + Path: def.WsPath, + SingularDisplayName: def.SingularDisplayName, + PluralDisplayName: def.PluralDisplayName, + Scope: api_common.ResourceTypeDescriptionScope(def.Scope), + IncludeInFederationWithPolicies: (def.KDSFlags & model.GlobalToAllZonesFlag) != 0, } if def.IsPolicy { td.Policy = &api_common.PolicyDescription{ diff --git a/pkg/api-server/server.go b/pkg/api-server/server.go index b0af3389c3ab..dc0d8e115c07 100644 --- a/pkg/api-server/server.go +++ b/pkg/api-server/server.go @@ -144,7 +144,7 @@ func NewApiServer( Produces(restful.MIME_JSON) addResourcesEndpoints(ws, defs, resManager, cfg, access.ResourceAccess, globalInsightService, meshContextBuilder) - addPoliciesWsEndpoints(ws, cfg.Mode == config_core.Global, cfg.IsFederatedZoneCP(), cfg.ApiServer.ReadOnly, defs) + addPoliciesWsEndpoints(ws, cfg.IsFederatedZoneCP(), cfg.ApiServer.ReadOnly, defs) addInspectEndpoints(ws, cfg, meshContextBuilder, resManager) addInspectEnvoyAdminEndpoints(ws, cfg, resManager, access.EnvoyAdminAccess, envoyAdminClient) addZoneEndpoints(ws, resManager) diff --git a/pkg/api-server/testdata/_resources_list.golden.json b/pkg/api-server/testdata/_resources_list.golden.json index 7034e816c957..606698c0732d 100644 --- a/pkg/api-server/testdata/_resources_list.golden.json +++ b/pkg/api-server/testdata/_resources_list.golden.json @@ -1,7 +1,7 @@ { "resources": [ { - "includeInDump": false, + "includeInFederationWithPolicies": true, "name": "CircuitBreaker", "path": "circuit-breakers", "pluralDisplayName": "Circuit Breakers", @@ -15,7 +15,7 @@ "singularDisplayName": "Circuit Breaker" }, { - "includeInDump": false, + "includeInFederationWithPolicies": false, "name": "Dataplane", "path": "dataplanes", "pluralDisplayName": "Dataplanes", @@ -24,7 +24,7 @@ "singularDisplayName": "Dataplane" }, { - "includeInDump": false, + "includeInFederationWithPolicies": false, "name": "DataplaneInsight", "path": "dataplane-insights", "pluralDisplayName": "Dataplane Insights", @@ -33,7 +33,7 @@ "singularDisplayName": "Dataplane Insight" }, { - "includeInDump": false, + "includeInFederationWithPolicies": true, "name": "ExternalService", "path": "external-services", "pluralDisplayName": "External Services", @@ -42,7 +42,7 @@ "singularDisplayName": "External Service" }, { - "includeInDump": false, + "includeInFederationWithPolicies": true, "name": "FaultInjection", "path": "fault-injections", "pluralDisplayName": "Fault Injections", @@ -56,7 +56,7 @@ "singularDisplayName": "Fault Injection" }, { - "includeInDump": false, + "includeInFederationWithPolicies": true, "name": "GlobalSecret", "path": "global-secrets", "pluralDisplayName": "", @@ -65,7 +65,7 @@ "singularDisplayName": "" }, { - "includeInDump": false, + "includeInFederationWithPolicies": true, "name": "HealthCheck", "path": "health-checks", "pluralDisplayName": "Health Checks", @@ -79,7 +79,7 @@ "singularDisplayName": "Health Check" }, { - "includeInDump": false, + "includeInFederationWithPolicies": true, "name": "Mesh", "path": "meshes", "pluralDisplayName": "Meshes", @@ -88,7 +88,7 @@ "singularDisplayName": "Mesh" }, { - "includeInDump": false, + "includeInFederationWithPolicies": true, "name": "MeshAccessLog", "path": "meshaccesslogs", "pluralDisplayName": "Mesh Access Logs", @@ -102,7 +102,7 @@ "singularDisplayName": "Mesh Access Log" }, { - "includeInDump": false, + "includeInFederationWithPolicies": true, "name": "MeshCircuitBreaker", "path": "meshcircuitbreakers", "pluralDisplayName": "Mesh Circuit Breakers", @@ -116,7 +116,7 @@ "singularDisplayName": "Mesh Circuit Breaker" }, { - "includeInDump": false, + "includeInFederationWithPolicies": true, "name": "MeshFaultInjection", "path": "meshfaultinjections", "pluralDisplayName": "Mesh Fault Injections", @@ -130,7 +130,7 @@ "singularDisplayName": "Mesh Fault Injection" }, { - "includeInDump": false, + "includeInFederationWithPolicies": true, "name": "MeshGateway", "path": "meshgateways", "pluralDisplayName": "Mesh Gateways", @@ -144,7 +144,7 @@ "singularDisplayName": "Mesh Gateway" }, { - "includeInDump": false, + "includeInFederationWithPolicies": true, "name": "MeshGatewayRoute", "path": "meshgatewayroutes", "pluralDisplayName": "Mesh Gateway Routes", @@ -158,7 +158,7 @@ "singularDisplayName": "Mesh Gateway Route" }, { - "includeInDump": false, + "includeInFederationWithPolicies": true, "name": "MeshHTTPRoute", "path": "meshhttproutes", "pluralDisplayName": "Mesh HTTP Routes", @@ -172,7 +172,7 @@ "singularDisplayName": "Mesh HTTP Route" }, { - "includeInDump": false, + "includeInFederationWithPolicies": true, "name": "MeshHealthCheck", "path": "meshhealthchecks", "pluralDisplayName": "Mesh Health Checks", @@ -186,7 +186,7 @@ "singularDisplayName": "Mesh Health Check" }, { - "includeInDump": false, + "includeInFederationWithPolicies": false, "name": "MeshInsight", "path": "mesh-insights", "pluralDisplayName": "Mesh Insights", @@ -195,7 +195,7 @@ "singularDisplayName": "Mesh Insight" }, { - "includeInDump": false, + "includeInFederationWithPolicies": true, "name": "MeshLoadBalancingStrategy", "path": "meshloadbalancingstrategies", "pluralDisplayName": "Mesh Load Balancing Strategies", @@ -209,7 +209,7 @@ "singularDisplayName": "Mesh Load Balancing Strategy" }, { - "includeInDump": false, + "includeInFederationWithPolicies": true, "name": "MeshMetric", "path": "meshmetrics", "pluralDisplayName": "Mesh Metrics", @@ -223,7 +223,7 @@ "singularDisplayName": "Mesh Metric" }, { - "includeInDump": false, + "includeInFederationWithPolicies": true, "name": "MeshProxyPatch", "path": "meshproxypatches", "pluralDisplayName": "Mesh Proxy Patches", @@ -237,7 +237,7 @@ "singularDisplayName": "Mesh Proxy Patch" }, { - "includeInDump": false, + "includeInFederationWithPolicies": true, "name": "MeshRateLimit", "path": "meshratelimits", "pluralDisplayName": "Mesh Rate Limits", @@ -251,7 +251,7 @@ "singularDisplayName": "Mesh Rate Limit" }, { - "includeInDump": false, + "includeInFederationWithPolicies": true, "name": "MeshRetry", "path": "meshretries", "pluralDisplayName": "Mesh Retries", @@ -265,7 +265,7 @@ "singularDisplayName": "Mesh Retry" }, { - "includeInDump": false, + "includeInFederationWithPolicies": true, "name": "MeshTCPRoute", "path": "meshtcproutes", "pluralDisplayName": "Mesh TCP Routes", @@ -279,7 +279,7 @@ "singularDisplayName": "Mesh TCP Route" }, { - "includeInDump": false, + "includeInFederationWithPolicies": true, "name": "MeshTimeout", "path": "meshtimeouts", "pluralDisplayName": "Mesh Timeouts", @@ -293,7 +293,7 @@ "singularDisplayName": "Mesh Timeout" }, { - "includeInDump": false, + "includeInFederationWithPolicies": true, "name": "MeshTrace", "path": "meshtraces", "pluralDisplayName": "Mesh Traces", @@ -307,7 +307,7 @@ "singularDisplayName": "Mesh Trace" }, { - "includeInDump": false, + "includeInFederationWithPolicies": true, "name": "MeshTrafficPermission", "path": "meshtrafficpermissions", "pluralDisplayName": "Mesh Traffic Permissions", @@ -321,7 +321,7 @@ "singularDisplayName": "Mesh Traffic Permission" }, { - "includeInDump": false, + "includeInFederationWithPolicies": true, "name": "ProxyTemplate", "path": "proxytemplates", "pluralDisplayName": "Proxy Templates", @@ -335,7 +335,7 @@ "singularDisplayName": "Proxy Template" }, { - "includeInDump": false, + "includeInFederationWithPolicies": true, "name": "RateLimit", "path": "rate-limits", "pluralDisplayName": "Rate Limits", @@ -349,7 +349,7 @@ "singularDisplayName": "Rate Limit" }, { - "includeInDump": false, + "includeInFederationWithPolicies": true, "name": "Retry", "path": "retries", "pluralDisplayName": "Retries", @@ -363,7 +363,7 @@ "singularDisplayName": "Retry" }, { - "includeInDump": false, + "includeInFederationWithPolicies": true, "name": "Secret", "path": "secrets", "pluralDisplayName": "Secrets", @@ -372,7 +372,7 @@ "singularDisplayName": "Secret" }, { - "includeInDump": false, + "includeInFederationWithPolicies": true, "name": "ServiceInsight", "path": "service-insights", "pluralDisplayName": "Service Insights", @@ -381,7 +381,7 @@ "singularDisplayName": "Service Insight" }, { - "includeInDump": false, + "includeInFederationWithPolicies": true, "name": "Timeout", "path": "timeouts", "pluralDisplayName": "Timeouts", @@ -395,7 +395,7 @@ "singularDisplayName": "Timeout" }, { - "includeInDump": false, + "includeInFederationWithPolicies": true, "name": "TrafficLog", "path": "traffic-logs", "pluralDisplayName": "Traffic Logs", @@ -409,7 +409,7 @@ "singularDisplayName": "Traffic Log" }, { - "includeInDump": false, + "includeInFederationWithPolicies": true, "name": "TrafficPermission", "path": "traffic-permissions", "pluralDisplayName": "Traffic Permissions", @@ -423,7 +423,7 @@ "singularDisplayName": "Traffic Permission" }, { - "includeInDump": false, + "includeInFederationWithPolicies": true, "name": "TrafficRoute", "path": "traffic-routes", "pluralDisplayName": "Traffic Routes", @@ -437,7 +437,7 @@ "singularDisplayName": "Traffic Route" }, { - "includeInDump": false, + "includeInFederationWithPolicies": true, "name": "TrafficTrace", "path": "traffic-traces", "pluralDisplayName": "Traffic Traces", @@ -451,7 +451,7 @@ "singularDisplayName": "Traffic Trace" }, { - "includeInDump": false, + "includeInFederationWithPolicies": true, "name": "VirtualOutbound", "path": "virtual-outbounds", "pluralDisplayName": "Virtual Outbounds", @@ -465,7 +465,7 @@ "singularDisplayName": "Virtual Outbound" }, { - "includeInDump": false, + "includeInFederationWithPolicies": false, "name": "Zone", "path": "zones", "pluralDisplayName": "Zones", @@ -474,7 +474,7 @@ "singularDisplayName": "Zone" }, { - "includeInDump": false, + "includeInFederationWithPolicies": false, "name": "ZoneEgress", "path": "zoneegresses", "pluralDisplayName": "Zone Egresses", @@ -483,7 +483,7 @@ "singularDisplayName": "Zone Egress" }, { - "includeInDump": false, + "includeInFederationWithPolicies": false, "name": "ZoneEgressInsight", "path": "zoneegressinsights", "pluralDisplayName": "Zone Egress Insights", @@ -492,7 +492,7 @@ "singularDisplayName": "Zone Egress Insight" }, { - "includeInDump": false, + "includeInFederationWithPolicies": false, "name": "ZoneIngress", "path": "zone-ingresses", "pluralDisplayName": "Zone Ingresses", @@ -501,7 +501,7 @@ "singularDisplayName": "Zone Ingress" }, { - "includeInDump": false, + "includeInFederationWithPolicies": false, "name": "ZoneIngressInsight", "path": "zone-ingress-insights", "pluralDisplayName": "Zone Ingress Insights", @@ -510,7 +510,7 @@ "singularDisplayName": "Zone Ingress Insight" }, { - "includeInDump": false, + "includeInFederationWithPolicies": false, "name": "ZoneInsight", "path": "zone-insights", "pluralDisplayName": "Zone Insights",