From c2a0d4f9ca27aa69ec5555b2f92edff15e0d907c Mon Sep 17 00:00:00 2001 From: Ashwin Venkatesh Date: Fri, 13 Oct 2023 10:55:58 -0400 Subject: [PATCH] Create DeepCopy() and Json Marshal/Unmarshal for proto-public (#19015) * Override Marshal/UnmarshalJSON for proto-public types * Generate Deepcopy() for proto-public types for Kubernetes CRDs. --- build-support/scripts/devtools.sh | 4 + .../internal/generate/generate.go | 64 ++ internal/resource/protoc-gen-deepcopy/main.go | 30 + .../internal/generate/generate.go | 112 ++++ .../resource/protoc-gen-json-shim/main.go | 30 + .../ratelimit/ratelimit_deepcopy.gen.go | 27 + .../ratelimit/ratelimit_json.gen.go | 22 + proto-public/buf.gen.yaml | 6 + proto-public/pbacl/acl_deepcopy.gen.go | 111 ++++ proto-public/pbacl/acl_json.gen.go | 66 +++ ...mputed_traffic_permissions_deepcopy.gen.go | 27 + .../computed_traffic_permissions_json.gen.go | 22 + .../pbauth/v2beta1/traffic_permissions.pb.go | 34 +- .../pbauth/v2beta1/traffic_permissions.proto | 34 +- .../traffic_permissions_deepcopy.gen.go | 216 +++++++ .../v2beta1/traffic_permissions_json.gen.go | 121 ++++ .../v2beta1/workload_identity_deepcopy.gen.go | 27 + .../v2beta1/workload_identity_json.gen.go | 22 + .../pbcatalog/v2beta1/dns_deepcopy.gen.go | 48 ++ .../pbcatalog/v2beta1/dns_json.gen.go | 33 ++ .../v2beta1/failover_policy_deepcopy.gen.go | 69 +++ .../v2beta1/failover_policy_json.gen.go | 44 ++ proto-public/pbcatalog/v2beta1/health.pb.go | 11 +- proto-public/pbcatalog/v2beta1/health.proto | 3 + .../pbcatalog/v2beta1/health_deepcopy.gen.go | 195 +++++++ .../pbcatalog/v2beta1/health_json.gen.go | 110 ++++ .../pbcatalog/v2beta1/node_deepcopy.gen.go | 48 ++ .../pbcatalog/v2beta1/node_json.gen.go | 33 ++ proto-public/pbcatalog/v2beta1/protocol.pb.go | 2 + proto-public/pbcatalog/v2beta1/protocol.proto | 2 + .../v2beta1/selector_deepcopy.gen.go | 27 + .../pbcatalog/v2beta1/selector_json.gen.go | 22 + .../pbcatalog/v2beta1/service_deepcopy.gen.go | 48 ++ .../v2beta1/service_endpoints_deepcopy.gen.go | 48 ++ .../v2beta1/service_endpoints_json.gen.go | 33 ++ .../pbcatalog/v2beta1/service_json.gen.go | 33 ++ .../pbcatalog/v2beta1/vip_deepcopy.gen.go | 48 ++ .../pbcatalog/v2beta1/vip_json.gen.go | 33 ++ .../v2beta1/workload_deepcopy.gen.go | 90 +++ .../pbcatalog/v2beta1/workload_json.gen.go | 55 ++ proto-public/pbconnectca/ca_deepcopy.gen.go | 111 ++++ proto-public/pbconnectca/ca_json.gen.go | 66 +++ .../pbdataplane/dataplane_deepcopy.gen.go | 111 ++++ .../pbdataplane/dataplane_json.gen.go | 66 +++ proto-public/pbdns/dns_deepcopy.gen.go | 48 ++ proto-public/pbdns/dns_json.gen.go | 33 ++ proto-public/pbmesh/v2beta1/common.pb.go | 7 +- proto-public/pbmesh/v2beta1/common.proto | 7 +- .../pbmesh/v2beta1/common_deepcopy.gen.go | 48 ++ .../pbmesh/v2beta1/common_json.gen.go | 33 ++ ...uted_explicit_destinations_deepcopy.gen.go | 27 + ...computed_explicit_destinations_json.gen.go | 22 + ...mputed_proxy_configuration_deepcopy.gen.go | 27 + .../computed_proxy_configuration_json.gen.go | 22 + .../pbmesh/v2beta1/computed_routes.pb.go | 7 +- .../pbmesh/v2beta1/computed_routes.proto | 7 +- .../v2beta1/computed_routes_deepcopy.gen.go | 300 ++++++++++ .../v2beta1/computed_routes_json.gen.go | 165 ++++++ proto-public/pbmesh/v2beta1/connection.pb.go | 4 + proto-public/pbmesh/v2beta1/connection.proto | 4 + .../pbmesh/v2beta1/connection_deepcopy.gen.go | 48 ++ .../pbmesh/v2beta1/connection_json.gen.go | 33 ++ .../pbmesh/v2beta1/destination_policy.pb.go | 9 + .../pbmesh/v2beta1/destination_policy.proto | 9 + .../destination_policy_deepcopy.gen.go | 174 ++++++ .../v2beta1/destination_policy_json.gen.go | 99 ++++ .../pbmesh/v2beta1/destinations.pb.go | 22 +- .../pbmesh/v2beta1/destinations.proto | 22 +- .../v2beta1/destinations_configuration.pb.go | 36 +- .../v2beta1/destinations_configuration.proto | 36 +- ...destinations_configuration_deepcopy.gen.go | 111 ++++ .../destinations_configuration_json.gen.go | 66 +++ .../v2beta1/destinations_deepcopy.gen.go | 111 ++++ .../pbmesh/v2beta1/destinations_json.gen.go | 66 +++ proto-public/pbmesh/v2beta1/expose.pb.go | 2 + proto-public/pbmesh/v2beta1/expose.proto | 2 + .../pbmesh/v2beta1/expose_deepcopy.gen.go | 48 ++ .../pbmesh/v2beta1/expose_json.gen.go | 33 ++ proto-public/pbmesh/v2beta1/grpc_route.pb.go | 3 +- proto-public/pbmesh/v2beta1/grpc_route.proto | 3 +- .../pbmesh/v2beta1/grpc_route_deepcopy.gen.go | 153 +++++ .../pbmesh/v2beta1/grpc_route_json.gen.go | 88 +++ proto-public/pbmesh/v2beta1/http_route.pb.go | 8 + proto-public/pbmesh/v2beta1/http_route.proto | 16 +- .../pbmesh/v2beta1/http_route_deepcopy.gen.go | 237 ++++++++ .../pbmesh/v2beta1/http_route_json.gen.go | 132 +++++ .../http_route_retries_deepcopy.gen.go | 27 + .../v2beta1/http_route_retries_json.gen.go | 22 + .../pbmesh/v2beta1/http_route_timeouts.pb.go | 2 + .../pbmesh/v2beta1/http_route_timeouts.proto | 2 + .../http_route_timeouts_deepcopy.gen.go | 27 + .../v2beta1/http_route_timeouts_json.gen.go | 22 + .../v2beta1/pbproxystate/access_logs.pb.go | 2 + .../v2beta1/pbproxystate/access_logs.proto | 2 + .../pbproxystate/access_logs_deepcopy.gen.go | 27 + .../pbproxystate/access_logs_json.gen.go | 22 + .../pbproxystate/address_deepcopy.gen.go | 48 ++ .../v2beta1/pbproxystate/address_json.gen.go | 33 ++ .../pbmesh/v2beta1/pbproxystate/cluster.pb.go | 13 +- .../pbmesh/v2beta1/pbproxystate/cluster.proto | 9 + .../pbproxystate/cluster_deepcopy.gen.go | 552 ++++++++++++++++++ .../v2beta1/pbproxystate/cluster_json.gen.go | 297 ++++++++++ .../v2beta1/pbproxystate/endpoints.pb.go | 2 + .../v2beta1/pbproxystate/endpoints.proto | 2 + .../pbproxystate/endpoints_deepcopy.gen.go | 48 ++ .../pbproxystate/endpoints_json.gen.go | 33 ++ .../escape_hatches_deepcopy.gen.go | 27 + .../pbproxystate/escape_hatches_json.gen.go | 22 + .../pbproxystate/header_mutations.pb.go | 2 + .../pbproxystate/header_mutations.proto | 2 + .../header_mutations_deepcopy.gen.go | 132 +++++ .../pbproxystate/header_mutations_json.gen.go | 77 +++ .../v2beta1/pbproxystate/listener.pb.go | 11 + .../v2beta1/pbproxystate/listener.proto | 11 + .../pbproxystate/listener_deepcopy.gen.go | 174 ++++++ .../v2beta1/pbproxystate/listener_json.gen.go | 99 ++++ .../pbproxystate/references_deepcopy.gen.go | 69 +++ .../pbproxystate/references_json.gen.go | 44 ++ .../pbmesh/v2beta1/pbproxystate/route.pb.go | 7 +- .../pbmesh/v2beta1/pbproxystate/route.proto | 3 + .../pbproxystate/route_deepcopy.gen.go | 342 +++++++++++ .../v2beta1/pbproxystate/route_json.gen.go | 187 ++++++ .../traffic_permissions_deepcopy.gen.go | 90 +++ .../traffic_permissions_json.gen.go | 55 ++ .../pbproxystate/transport_socket.pb.go | 4 + .../pbproxystate/transport_socket.proto | 4 + .../transport_socket_deepcopy.gen.go | 279 +++++++++ .../pbproxystate/transport_socket_json.gen.go | 154 +++++ .../pbmesh/v2beta1/proxy_configuration.pb.go | 19 +- .../pbmesh/v2beta1/proxy_configuration.proto | 15 +- .../proxy_configuration_deepcopy.gen.go | 132 +++++ .../v2beta1/proxy_configuration_json.gen.go | 77 +++ proto-public/pbmesh/v2beta1/proxy_state.pb.go | 28 +- proto-public/pbmesh/v2beta1/proxy_state.proto | 28 +- .../v2beta1/proxy_state_deepcopy.gen.go | 48 ++ .../pbmesh/v2beta1/proxy_state_json.gen.go | 33 ++ proto-public/pbmesh/v2beta1/routing.pb.go | 2 + proto-public/pbmesh/v2beta1/routing.proto | 2 + proto-public/pbmesh/v2beta1/tcp_route.proto | 8 +- .../pbmesh/v2beta1/tcp_route_deepcopy.gen.go | 69 +++ .../pbmesh/v2beta1/tcp_route_json.gen.go | 44 ++ .../pbresource/annotations_deepcopy.gen.go | 27 + .../pbresource/annotations_json.gen.go | 22 + .../pbresource/resource_deepcopy.gen.go | 468 +++++++++++++++ proto-public/pbresource/resource_json.gen.go | 253 ++++++++ .../serverdiscovery_deepcopy.gen.go | 69 +++ .../serverdiscovery_json.gen.go | 44 ++ .../v1alpha1/namespace_deepcopy.gen.go | 27 + .../pbtenancy/v1alpha1/namespace_json.gen.go | 22 + 149 files changed, 8960 insertions(+), 156 deletions(-) create mode 100644 internal/resource/protoc-gen-deepcopy/internal/generate/generate.go create mode 100644 internal/resource/protoc-gen-deepcopy/main.go create mode 100644 internal/resource/protoc-gen-json-shim/internal/generate/generate.go create mode 100644 internal/resource/protoc-gen-json-shim/main.go create mode 100644 proto-public/annotations/ratelimit/ratelimit_deepcopy.gen.go create mode 100644 proto-public/annotations/ratelimit/ratelimit_json.gen.go create mode 100644 proto-public/pbacl/acl_deepcopy.gen.go create mode 100644 proto-public/pbacl/acl_json.gen.go create mode 100644 proto-public/pbauth/v2beta1/computed_traffic_permissions_deepcopy.gen.go create mode 100644 proto-public/pbauth/v2beta1/computed_traffic_permissions_json.gen.go create mode 100644 proto-public/pbauth/v2beta1/traffic_permissions_deepcopy.gen.go create mode 100644 proto-public/pbauth/v2beta1/traffic_permissions_json.gen.go create mode 100644 proto-public/pbauth/v2beta1/workload_identity_deepcopy.gen.go create mode 100644 proto-public/pbauth/v2beta1/workload_identity_json.gen.go create mode 100644 proto-public/pbcatalog/v2beta1/dns_deepcopy.gen.go create mode 100644 proto-public/pbcatalog/v2beta1/dns_json.gen.go create mode 100644 proto-public/pbcatalog/v2beta1/failover_policy_deepcopy.gen.go create mode 100644 proto-public/pbcatalog/v2beta1/failover_policy_json.gen.go create mode 100644 proto-public/pbcatalog/v2beta1/health_deepcopy.gen.go create mode 100644 proto-public/pbcatalog/v2beta1/health_json.gen.go create mode 100644 proto-public/pbcatalog/v2beta1/node_deepcopy.gen.go create mode 100644 proto-public/pbcatalog/v2beta1/node_json.gen.go create mode 100644 proto-public/pbcatalog/v2beta1/selector_deepcopy.gen.go create mode 100644 proto-public/pbcatalog/v2beta1/selector_json.gen.go create mode 100644 proto-public/pbcatalog/v2beta1/service_deepcopy.gen.go create mode 100644 proto-public/pbcatalog/v2beta1/service_endpoints_deepcopy.gen.go create mode 100644 proto-public/pbcatalog/v2beta1/service_endpoints_json.gen.go create mode 100644 proto-public/pbcatalog/v2beta1/service_json.gen.go create mode 100644 proto-public/pbcatalog/v2beta1/vip_deepcopy.gen.go create mode 100644 proto-public/pbcatalog/v2beta1/vip_json.gen.go create mode 100644 proto-public/pbcatalog/v2beta1/workload_deepcopy.gen.go create mode 100644 proto-public/pbcatalog/v2beta1/workload_json.gen.go create mode 100644 proto-public/pbconnectca/ca_deepcopy.gen.go create mode 100644 proto-public/pbconnectca/ca_json.gen.go create mode 100644 proto-public/pbdataplane/dataplane_deepcopy.gen.go create mode 100644 proto-public/pbdataplane/dataplane_json.gen.go create mode 100644 proto-public/pbdns/dns_deepcopy.gen.go create mode 100644 proto-public/pbdns/dns_json.gen.go create mode 100644 proto-public/pbmesh/v2beta1/common_deepcopy.gen.go create mode 100644 proto-public/pbmesh/v2beta1/common_json.gen.go create mode 100644 proto-public/pbmesh/v2beta1/computed_explicit_destinations_deepcopy.gen.go create mode 100644 proto-public/pbmesh/v2beta1/computed_explicit_destinations_json.gen.go create mode 100644 proto-public/pbmesh/v2beta1/computed_proxy_configuration_deepcopy.gen.go create mode 100644 proto-public/pbmesh/v2beta1/computed_proxy_configuration_json.gen.go create mode 100644 proto-public/pbmesh/v2beta1/computed_routes_deepcopy.gen.go create mode 100644 proto-public/pbmesh/v2beta1/computed_routes_json.gen.go create mode 100644 proto-public/pbmesh/v2beta1/connection_deepcopy.gen.go create mode 100644 proto-public/pbmesh/v2beta1/connection_json.gen.go create mode 100644 proto-public/pbmesh/v2beta1/destination_policy_deepcopy.gen.go create mode 100644 proto-public/pbmesh/v2beta1/destination_policy_json.gen.go create mode 100644 proto-public/pbmesh/v2beta1/destinations_configuration_deepcopy.gen.go create mode 100644 proto-public/pbmesh/v2beta1/destinations_configuration_json.gen.go create mode 100644 proto-public/pbmesh/v2beta1/destinations_deepcopy.gen.go create mode 100644 proto-public/pbmesh/v2beta1/destinations_json.gen.go create mode 100644 proto-public/pbmesh/v2beta1/expose_deepcopy.gen.go create mode 100644 proto-public/pbmesh/v2beta1/expose_json.gen.go create mode 100644 proto-public/pbmesh/v2beta1/grpc_route_deepcopy.gen.go create mode 100644 proto-public/pbmesh/v2beta1/grpc_route_json.gen.go create mode 100644 proto-public/pbmesh/v2beta1/http_route_deepcopy.gen.go create mode 100644 proto-public/pbmesh/v2beta1/http_route_json.gen.go create mode 100644 proto-public/pbmesh/v2beta1/http_route_retries_deepcopy.gen.go create mode 100644 proto-public/pbmesh/v2beta1/http_route_retries_json.gen.go create mode 100644 proto-public/pbmesh/v2beta1/http_route_timeouts_deepcopy.gen.go create mode 100644 proto-public/pbmesh/v2beta1/http_route_timeouts_json.gen.go create mode 100644 proto-public/pbmesh/v2beta1/pbproxystate/access_logs_deepcopy.gen.go create mode 100644 proto-public/pbmesh/v2beta1/pbproxystate/access_logs_json.gen.go create mode 100644 proto-public/pbmesh/v2beta1/pbproxystate/address_deepcopy.gen.go create mode 100644 proto-public/pbmesh/v2beta1/pbproxystate/address_json.gen.go create mode 100644 proto-public/pbmesh/v2beta1/pbproxystate/cluster_deepcopy.gen.go create mode 100644 proto-public/pbmesh/v2beta1/pbproxystate/cluster_json.gen.go create mode 100644 proto-public/pbmesh/v2beta1/pbproxystate/endpoints_deepcopy.gen.go create mode 100644 proto-public/pbmesh/v2beta1/pbproxystate/endpoints_json.gen.go create mode 100644 proto-public/pbmesh/v2beta1/pbproxystate/escape_hatches_deepcopy.gen.go create mode 100644 proto-public/pbmesh/v2beta1/pbproxystate/escape_hatches_json.gen.go create mode 100644 proto-public/pbmesh/v2beta1/pbproxystate/header_mutations_deepcopy.gen.go create mode 100644 proto-public/pbmesh/v2beta1/pbproxystate/header_mutations_json.gen.go create mode 100644 proto-public/pbmesh/v2beta1/pbproxystate/listener_deepcopy.gen.go create mode 100644 proto-public/pbmesh/v2beta1/pbproxystate/listener_json.gen.go create mode 100644 proto-public/pbmesh/v2beta1/pbproxystate/references_deepcopy.gen.go create mode 100644 proto-public/pbmesh/v2beta1/pbproxystate/references_json.gen.go create mode 100644 proto-public/pbmesh/v2beta1/pbproxystate/route_deepcopy.gen.go create mode 100644 proto-public/pbmesh/v2beta1/pbproxystate/route_json.gen.go create mode 100644 proto-public/pbmesh/v2beta1/pbproxystate/traffic_permissions_deepcopy.gen.go create mode 100644 proto-public/pbmesh/v2beta1/pbproxystate/traffic_permissions_json.gen.go create mode 100644 proto-public/pbmesh/v2beta1/pbproxystate/transport_socket_deepcopy.gen.go create mode 100644 proto-public/pbmesh/v2beta1/pbproxystate/transport_socket_json.gen.go create mode 100644 proto-public/pbmesh/v2beta1/proxy_configuration_deepcopy.gen.go create mode 100644 proto-public/pbmesh/v2beta1/proxy_configuration_json.gen.go create mode 100644 proto-public/pbmesh/v2beta1/proxy_state_deepcopy.gen.go create mode 100644 proto-public/pbmesh/v2beta1/proxy_state_json.gen.go create mode 100644 proto-public/pbmesh/v2beta1/tcp_route_deepcopy.gen.go create mode 100644 proto-public/pbmesh/v2beta1/tcp_route_json.gen.go create mode 100644 proto-public/pbresource/annotations_deepcopy.gen.go create mode 100644 proto-public/pbresource/annotations_json.gen.go create mode 100644 proto-public/pbresource/resource_deepcopy.gen.go create mode 100644 proto-public/pbresource/resource_json.gen.go create mode 100644 proto-public/pbserverdiscovery/serverdiscovery_deepcopy.gen.go create mode 100644 proto-public/pbserverdiscovery/serverdiscovery_json.gen.go create mode 100644 proto-public/pbtenancy/v1alpha1/namespace_deepcopy.gen.go create mode 100644 proto-public/pbtenancy/v1alpha1/namespace_json.gen.go diff --git a/build-support/scripts/devtools.sh b/build-support/scripts/devtools.sh index a52e238767..b4cf687460 100755 --- a/build-support/scripts/devtools.sh +++ b/build-support/scripts/devtools.sh @@ -128,6 +128,10 @@ function proto_tools_install { install_local_protoc_generator "${SOURCE_DIR}/internal/resource/protoc-gen-resource-types" + install_local_protoc_generator "${SOURCE_DIR}/internal/resource/protoc-gen-json-shim" + + install_local_protoc_generator "${SOURCE_DIR}/internal/resource/protoc-gen-deepcopy" + return 0 } diff --git a/internal/resource/protoc-gen-deepcopy/internal/generate/generate.go b/internal/resource/protoc-gen-deepcopy/internal/generate/generate.go new file mode 100644 index 0000000000..f9af3fa62a --- /dev/null +++ b/internal/resource/protoc-gen-deepcopy/internal/generate/generate.go @@ -0,0 +1,64 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: BUSL-1.1 + +package generate + +import ( + "google.golang.org/protobuf/compiler/protogen" + "google.golang.org/protobuf/types/descriptorpb" +) + +func Generate(gen *protogen.Plugin) error { + for _, file := range gen.Files { + if file.Generate != true { + continue + } + if len(file.Messages) == 0 { + continue + } + filename := file.GeneratedFilenamePrefix + "_deepcopy.gen.go" + p := gen.NewGeneratedFile(filename, file.GoImportPath) + + protoIdent := protogen.GoIdent{ + GoName: "Clone", + GoImportPath: "google.golang.org/protobuf/proto", + } + p.P("// Code generated by protoc-gen-deepcopy. DO NOT EDIT.") + p.P("package ", file.GoPackageName) + var process func([]*protogen.Message) + + process = func(messages []*protogen.Message) { + for _, message := range messages { + // skip maps in protos. + if message.Desc.Options().(*descriptorpb.MessageOptions).GetMapEntry() { + continue + } + typeName := message.GoIdent.GoName + // Generate DeepCopyInto() method for this type + p.P(`// DeepCopyInto supports using `, typeName, ` within kubernetes types, where deepcopy-gen is used.`) + p.P(`func (in *`, typeName, `) DeepCopyInto(out *`, typeName, `) {`) + p.P(`p := `, protoIdent, `(in).(*`, typeName, `)`) + p.P(`*out = *p`) + p.P(`}`) + + // Generate DeepCopy() method for this type + p.P(`// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new `, typeName, `. Required by controller-gen.`) + p.P(`func (in *`, typeName, `) DeepCopy() *`, typeName, ` {`) + p.P(`if in == nil { return nil }`) + p.P(`out := new(`, typeName, `)`) + p.P(`in.DeepCopyInto(out)`) + p.P(`return out`) + p.P(`}`) + + // Generate DeepCopyInterface() method for this type + p.P(`// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new `, typeName, `. Required by controller-gen.`) + p.P(`func (in *`, typeName, `) DeepCopyInterface() interface{} {`) + p.P(`return in.DeepCopy()`) + p.P(`}`) + process(message.Messages) + } + } + process(file.Messages) + } + return nil +} diff --git a/internal/resource/protoc-gen-deepcopy/main.go b/internal/resource/protoc-gen-deepcopy/main.go new file mode 100644 index 0000000000..2e700c4ed9 --- /dev/null +++ b/internal/resource/protoc-gen-deepcopy/main.go @@ -0,0 +1,30 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: BUSL-1.1 + +package main + +import ( + "flag" + + "google.golang.org/protobuf/compiler/protogen" + plugin "google.golang.org/protobuf/types/pluginpb" + + "github.com/hashicorp/consul/internal/resource/protoc-gen-deepcopy/internal/generate" +) + +var ( + file = flag.String("file", "-", "where to load data from") +) + +// This file is responsible for generating a DeepCopy and DeepCopyInto overwrite for proto +// structs which allows Kubernetes CRDs to get created directly from the proto-types. +func main() { + flag.Parse() + + protogen.Options{ + ParamFunc: flag.CommandLine.Set, + }.Run(func(gp *protogen.Plugin) error { + gp.SupportedFeatures = uint64(plugin.CodeGeneratorResponse_FEATURE_PROTO3_OPTIONAL) + return generate.Generate(gp) + }) +} diff --git a/internal/resource/protoc-gen-json-shim/internal/generate/generate.go b/internal/resource/protoc-gen-json-shim/internal/generate/generate.go new file mode 100644 index 0000000000..1c02c5df4a --- /dev/null +++ b/internal/resource/protoc-gen-json-shim/internal/generate/generate.go @@ -0,0 +1,112 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: BUSL-1.1 + +package generate + +import ( + "path" + "strings" + + "google.golang.org/protobuf/compiler/protogen" + "google.golang.org/protobuf/types/descriptorpb" +) + +func Generate(gen *protogen.Plugin) error { + for _, file := range gen.Files { + if file.Generate != true { + continue + } + if len(file.Messages) == 0 { + continue + } + filename := file.GeneratedFilenamePrefix + "_json.gen.go" + genFile := gen.NewGeneratedFile(filename, file.GoImportPath) + + genFile.P("// Code generated by protoc-json-shim. DO NOT EDIT.") + genFile.P("package ", file.GoPackageName) + var process func([]*protogen.Message) + + marshalerName := FileName(file) + "Marshaler" + unmarshalerName := FileName(file) + "Unmarshaler" + + process = func(messages []*protogen.Message) { + for _, message := range messages { + // skip maps in protos. + if message.Desc.Options().(*descriptorpb.MessageOptions).GetMapEntry() { + continue + } + typeName := message.GoIdent.GoName + genFile.P(`// MarshalJSON is a custom marshaler for `, typeName) + genFile.P(`func (this *`, typeName, `) MarshalJSON() ([]byte, error) {`) + genFile.P(`str, err := `, marshalerName, `.Marshal(this)`) + genFile.P(`return []byte(str), err`) + genFile.P(`}`) + // Generate UnmarshalJSON() method for this type + genFile.P(`// UnmarshalJSON is a custom unmarshaler for `, typeName) + genFile.P(`func (this *`, typeName, `) UnmarshalJSON(b []byte) error {`) + genFile.P(`return `, unmarshalerName, `.Unmarshal(b, this)`) + genFile.P(`}`) + process(message.Messages) + } + } + process(file.Messages) + + // write out globals + genFile.P(`var (`) + genFile.P(marshalerName, ` = &`, protogen.GoIdent{GoName: "MarshalOptions", GoImportPath: "google.golang.org/protobuf/encoding/protojson"}, `{}`) + genFile.P(unmarshalerName, ` = &`, protogen.GoIdent{GoName: "UnmarshalOptions", GoImportPath: "google.golang.org/protobuf/encoding/protojson"}, `{DiscardUnknown: false}`) + genFile.P(`)`) + } + return nil +} + +func FileName(file *protogen.File) string { + fname := path.Base(file.Proto.GetName()) + fname = strings.Replace(fname, ".proto", "", -1) + fname = strings.Replace(fname, "-", "_", -1) + fname = strings.Replace(fname, ".", "_", -1) + return toCamelInitCase(fname, true) +} + +// Converts a string to CamelCase +func toCamelInitCase(s string, initCase bool) string { + s = strings.TrimSpace(s) + if s == "" { + return s + } + + n := strings.Builder{} + n.Grow(len(s)) + capNext := initCase + prevIsCap := false + for i, v := range []byte(s) { + vIsCap := v >= 'A' && v <= 'Z' + vIsLow := v >= 'a' && v <= 'z' + if capNext { + if vIsLow { + v += 'A' + v -= 'a' + } + } else if i == 0 { + if vIsCap { + v += 'a' + v -= 'A' + } + } else if prevIsCap && vIsCap { + v += 'a' + v -= 'A' + } + prevIsCap = vIsCap + + if vIsCap || vIsLow { + n.WriteByte(v) + capNext = false + } else if vIsNum := v >= '0' && v <= '9'; vIsNum { + n.WriteByte(v) + capNext = true + } else { + capNext = v == '_' || v == ' ' || v == '-' || v == '.' + } + } + return n.String() +} diff --git a/internal/resource/protoc-gen-json-shim/main.go b/internal/resource/protoc-gen-json-shim/main.go new file mode 100644 index 0000000000..e81bc6c17a --- /dev/null +++ b/internal/resource/protoc-gen-json-shim/main.go @@ -0,0 +1,30 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: BUSL-1.1 + +package main + +import ( + "flag" + + "google.golang.org/protobuf/compiler/protogen" + plugin "google.golang.org/protobuf/types/pluginpb" + + "github.com/hashicorp/consul/internal/resource/protoc-gen-json-shim/internal/generate" +) + +var ( + file = flag.String("file", "-", "where to load data from") +) + +// This file is responsible for generating a JSON marhsal/unmarshal overwrite for proto +// structs which allows Kubernetes CRDs to get created directly from the proto-types. +func main() { + flag.Parse() + + protogen.Options{ + ParamFunc: flag.CommandLine.Set, + }.Run(func(gp *protogen.Plugin) error { + gp.SupportedFeatures = uint64(plugin.CodeGeneratorResponse_FEATURE_PROTO3_OPTIONAL) + return generate.Generate(gp) + }) +} diff --git a/proto-public/annotations/ratelimit/ratelimit_deepcopy.gen.go b/proto-public/annotations/ratelimit/ratelimit_deepcopy.gen.go new file mode 100644 index 0000000000..72ef4d990c --- /dev/null +++ b/proto-public/annotations/ratelimit/ratelimit_deepcopy.gen.go @@ -0,0 +1,27 @@ +// Code generated by protoc-gen-deepcopy. DO NOT EDIT. +package ratelimit + +import ( + proto "google.golang.org/protobuf/proto" +) + +// DeepCopyInto supports using Spec within kubernetes types, where deepcopy-gen is used. +func (in *Spec) DeepCopyInto(out *Spec) { + p := proto.Clone(in).(*Spec) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Spec. Required by controller-gen. +func (in *Spec) DeepCopy() *Spec { + if in == nil { + return nil + } + out := new(Spec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new Spec. Required by controller-gen. +func (in *Spec) DeepCopyInterface() interface{} { + return in.DeepCopy() +} diff --git a/proto-public/annotations/ratelimit/ratelimit_json.gen.go b/proto-public/annotations/ratelimit/ratelimit_json.gen.go new file mode 100644 index 0000000000..93cb514be9 --- /dev/null +++ b/proto-public/annotations/ratelimit/ratelimit_json.gen.go @@ -0,0 +1,22 @@ +// Code generated by protoc-json-shim. DO NOT EDIT. +package ratelimit + +import ( + protojson "google.golang.org/protobuf/encoding/protojson" +) + +// MarshalJSON is a custom marshaler for Spec +func (this *Spec) MarshalJSON() ([]byte, error) { + str, err := RatelimitMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for Spec +func (this *Spec) UnmarshalJSON(b []byte) error { + return RatelimitUnmarshaler.Unmarshal(b, this) +} + +var ( + RatelimitMarshaler = &protojson.MarshalOptions{} + RatelimitUnmarshaler = &protojson.UnmarshalOptions{DiscardUnknown: false} +) diff --git a/proto-public/buf.gen.yaml b/proto-public/buf.gen.yaml index 8ea9af5507..a58bd25119 100644 --- a/proto-public/buf.gen.yaml +++ b/proto-public/buf.gen.yaml @@ -28,3 +28,9 @@ plugins: out: . opt: - paths=source_relative + - name: deepcopy + out: . + opt: paths=source_relative + - name: json-shim + out: . + opt: paths=source_relative diff --git a/proto-public/pbacl/acl_deepcopy.gen.go b/proto-public/pbacl/acl_deepcopy.gen.go new file mode 100644 index 0000000000..9bf1dcb457 --- /dev/null +++ b/proto-public/pbacl/acl_deepcopy.gen.go @@ -0,0 +1,111 @@ +// Code generated by protoc-gen-deepcopy. DO NOT EDIT. +package pbacl + +import ( + proto "google.golang.org/protobuf/proto" +) + +// DeepCopyInto supports using LogoutResponse within kubernetes types, where deepcopy-gen is used. +func (in *LogoutResponse) DeepCopyInto(out *LogoutResponse) { + p := proto.Clone(in).(*LogoutResponse) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LogoutResponse. Required by controller-gen. +func (in *LogoutResponse) DeepCopy() *LogoutResponse { + if in == nil { + return nil + } + out := new(LogoutResponse) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new LogoutResponse. Required by controller-gen. +func (in *LogoutResponse) DeepCopyInterface() interface{} { + return in.DeepCopy() +} + +// DeepCopyInto supports using LoginRequest within kubernetes types, where deepcopy-gen is used. +func (in *LoginRequest) DeepCopyInto(out *LoginRequest) { + p := proto.Clone(in).(*LoginRequest) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LoginRequest. Required by controller-gen. +func (in *LoginRequest) DeepCopy() *LoginRequest { + if in == nil { + return nil + } + out := new(LoginRequest) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new LoginRequest. Required by controller-gen. +func (in *LoginRequest) DeepCopyInterface() interface{} { + return in.DeepCopy() +} + +// DeepCopyInto supports using LoginResponse within kubernetes types, where deepcopy-gen is used. +func (in *LoginResponse) DeepCopyInto(out *LoginResponse) { + p := proto.Clone(in).(*LoginResponse) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LoginResponse. Required by controller-gen. +func (in *LoginResponse) DeepCopy() *LoginResponse { + if in == nil { + return nil + } + out := new(LoginResponse) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new LoginResponse. Required by controller-gen. +func (in *LoginResponse) DeepCopyInterface() interface{} { + return in.DeepCopy() +} + +// DeepCopyInto supports using LoginToken within kubernetes types, where deepcopy-gen is used. +func (in *LoginToken) DeepCopyInto(out *LoginToken) { + p := proto.Clone(in).(*LoginToken) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LoginToken. Required by controller-gen. +func (in *LoginToken) DeepCopy() *LoginToken { + if in == nil { + return nil + } + out := new(LoginToken) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new LoginToken. Required by controller-gen. +func (in *LoginToken) DeepCopyInterface() interface{} { + return in.DeepCopy() +} + +// DeepCopyInto supports using LogoutRequest within kubernetes types, where deepcopy-gen is used. +func (in *LogoutRequest) DeepCopyInto(out *LogoutRequest) { + p := proto.Clone(in).(*LogoutRequest) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LogoutRequest. Required by controller-gen. +func (in *LogoutRequest) DeepCopy() *LogoutRequest { + if in == nil { + return nil + } + out := new(LogoutRequest) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new LogoutRequest. Required by controller-gen. +func (in *LogoutRequest) DeepCopyInterface() interface{} { + return in.DeepCopy() +} diff --git a/proto-public/pbacl/acl_json.gen.go b/proto-public/pbacl/acl_json.gen.go new file mode 100644 index 0000000000..8e0b49eb9a --- /dev/null +++ b/proto-public/pbacl/acl_json.gen.go @@ -0,0 +1,66 @@ +// Code generated by protoc-json-shim. DO NOT EDIT. +package pbacl + +import ( + protojson "google.golang.org/protobuf/encoding/protojson" +) + +// MarshalJSON is a custom marshaler for LogoutResponse +func (this *LogoutResponse) MarshalJSON() ([]byte, error) { + str, err := AclMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for LogoutResponse +func (this *LogoutResponse) UnmarshalJSON(b []byte) error { + return AclUnmarshaler.Unmarshal(b, this) +} + +// MarshalJSON is a custom marshaler for LoginRequest +func (this *LoginRequest) MarshalJSON() ([]byte, error) { + str, err := AclMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for LoginRequest +func (this *LoginRequest) UnmarshalJSON(b []byte) error { + return AclUnmarshaler.Unmarshal(b, this) +} + +// MarshalJSON is a custom marshaler for LoginResponse +func (this *LoginResponse) MarshalJSON() ([]byte, error) { + str, err := AclMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for LoginResponse +func (this *LoginResponse) UnmarshalJSON(b []byte) error { + return AclUnmarshaler.Unmarshal(b, this) +} + +// MarshalJSON is a custom marshaler for LoginToken +func (this *LoginToken) MarshalJSON() ([]byte, error) { + str, err := AclMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for LoginToken +func (this *LoginToken) UnmarshalJSON(b []byte) error { + return AclUnmarshaler.Unmarshal(b, this) +} + +// MarshalJSON is a custom marshaler for LogoutRequest +func (this *LogoutRequest) MarshalJSON() ([]byte, error) { + str, err := AclMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for LogoutRequest +func (this *LogoutRequest) UnmarshalJSON(b []byte) error { + return AclUnmarshaler.Unmarshal(b, this) +} + +var ( + AclMarshaler = &protojson.MarshalOptions{} + AclUnmarshaler = &protojson.UnmarshalOptions{DiscardUnknown: false} +) diff --git a/proto-public/pbauth/v2beta1/computed_traffic_permissions_deepcopy.gen.go b/proto-public/pbauth/v2beta1/computed_traffic_permissions_deepcopy.gen.go new file mode 100644 index 0000000000..b0b3baa087 --- /dev/null +++ b/proto-public/pbauth/v2beta1/computed_traffic_permissions_deepcopy.gen.go @@ -0,0 +1,27 @@ +// Code generated by protoc-gen-deepcopy. DO NOT EDIT. +package authv2beta1 + +import ( + proto "google.golang.org/protobuf/proto" +) + +// DeepCopyInto supports using ComputedTrafficPermissions within kubernetes types, where deepcopy-gen is used. +func (in *ComputedTrafficPermissions) DeepCopyInto(out *ComputedTrafficPermissions) { + p := proto.Clone(in).(*ComputedTrafficPermissions) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ComputedTrafficPermissions. Required by controller-gen. +func (in *ComputedTrafficPermissions) DeepCopy() *ComputedTrafficPermissions { + if in == nil { + return nil + } + out := new(ComputedTrafficPermissions) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new ComputedTrafficPermissions. Required by controller-gen. +func (in *ComputedTrafficPermissions) DeepCopyInterface() interface{} { + return in.DeepCopy() +} diff --git a/proto-public/pbauth/v2beta1/computed_traffic_permissions_json.gen.go b/proto-public/pbauth/v2beta1/computed_traffic_permissions_json.gen.go new file mode 100644 index 0000000000..cc81cf5ce2 --- /dev/null +++ b/proto-public/pbauth/v2beta1/computed_traffic_permissions_json.gen.go @@ -0,0 +1,22 @@ +// Code generated by protoc-json-shim. DO NOT EDIT. +package authv2beta1 + +import ( + protojson "google.golang.org/protobuf/encoding/protojson" +) + +// MarshalJSON is a custom marshaler for ComputedTrafficPermissions +func (this *ComputedTrafficPermissions) MarshalJSON() ([]byte, error) { + str, err := ComputedTrafficPermissionsMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for ComputedTrafficPermissions +func (this *ComputedTrafficPermissions) UnmarshalJSON(b []byte) error { + return ComputedTrafficPermissionsUnmarshaler.Unmarshal(b, this) +} + +var ( + ComputedTrafficPermissionsMarshaler = &protojson.MarshalOptions{} + ComputedTrafficPermissionsUnmarshaler = &protojson.UnmarshalOptions{DiscardUnknown: false} +) diff --git a/proto-public/pbauth/v2beta1/traffic_permissions.pb.go b/proto-public/pbauth/v2beta1/traffic_permissions.pb.go index e803c20e9f..4226925386 100644 --- a/proto-public/pbauth/v2beta1/traffic_permissions.pb.go +++ b/proto-public/pbauth/v2beta1/traffic_permissions.pb.go @@ -21,6 +21,8 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) +// +kubebuilder:validation:Enum=ACTION_ALLOW;ACTION_DENY;ACTION_UNKNOWN +// +kubebuilder:validation:Type=string type Action int32 const ( @@ -75,25 +77,22 @@ type TrafficPermissions struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // destination is a configuration of the destination proxies + // Destination is a configuration of the destination proxies // where these traffic permissions should apply. Destination *Destination `protobuf:"bytes,1,opt,name=destination,proto3" json:"destination,omitempty"` // Action can be either allow or deny for the entire object. It will default to allow. // - // If action is allow, - // we will allow the connection if one of the rules in Rules matches, in other words, we will deny + // If action is allow, we will allow the connection if one of the rules in Rules matches, in other words, we will deny // all requests except for the ones that match Rules. If Consul is in default allow mode, then allow // actions have no effect without a deny permission as everything is allowed by default. // - // If action is deny, - // we will deny the connection if one of the rules in Rules match, in other words, + // If action is deny, we will deny the connection if one of the rules in Rules match, in other words, // we will allow all requests except for the ones that match Rules. If Consul is default deny mode, // then deny permissions have no effect without an allow permission as everything is denied by default. // // Action unspecified is reserved for compatibility with the addition of future actions. Action Action `protobuf:"varint,2,opt,name=action,proto3,enum=hashicorp.consul.auth.v2beta1.Action" json:"action,omitempty"` - // permissions is a list of permissions to match on. - // They are applied using OR semantics. + // Permissions is a list of permissions to match on. They are applied using OR semantics. Permissions []*Permission `protobuf:"bytes,3,rep,name=permissions,proto3" json:"permissions,omitempty"` } @@ -261,8 +260,7 @@ func (x *PartitionTrafficPermissions) GetPermissions() []*Permission { } // Destination contains the name or name-prefix of the WorkloadIdentity. -// The WorkloadIdentity resource must -// be in the same tenancy as the TrafficPermissions resource. +// The WorkloadIdentity resource must be in the same tenancy as the TrafficPermissions resource. type Destination struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -310,15 +308,15 @@ func (x *Destination) GetIdentityName() string { return "" } -// permissions is a list of permissions to match on. +// Permissions is a list of permissions to match on. type Permission struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // sources is a list of sources in this traffic permission. + // Sources is a list of sources in this traffic permission. Sources []*Source `protobuf:"bytes,1,rep,name=sources,proto3" json:"sources,omitempty"` - // destination_rules is a list of rules to apply for matching sources in this Permission. + // DestinationRules is a list of rules to apply for matching sources in this Permission. // These rules are specific to the request or connection that is going to the destination(s) // selected by the TrafficPermissions resource. DestinationRules []*DestinationRule `protobuf:"bytes,2,rep,name=destination_rules,json=destinationRules,proto3" json:"destination_rules,omitempty"` @@ -383,7 +381,7 @@ type Source struct { Partition string `protobuf:"bytes,3,opt,name=partition,proto3" json:"partition,omitempty"` Peer string `protobuf:"bytes,4,opt,name=peer,proto3" json:"peer,omitempty"` SamenessGroup string `protobuf:"bytes,5,opt,name=sameness_group,json=samenessGroup,proto3" json:"sameness_group,omitempty"` - // exclude is a list of sources to exclude from this source. + // Exclude is a list of sources to exclude from this source. Exclude []*ExcludeSource `protobuf:"bytes,6,rep,name=exclude,proto3" json:"exclude,omitempty"` } @@ -462,7 +460,7 @@ func (x *Source) GetExclude() []*ExcludeSource { } // ExcludeSource is almost the same as source but it prevents the addition of -// matchiing sources. +// matching sources. type ExcludeSource struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -551,12 +549,12 @@ type DestinationRule struct { PathExact string `protobuf:"bytes,1,opt,name=path_exact,json=pathExact,proto3" json:"path_exact,omitempty"` PathPrefix string `protobuf:"bytes,2,opt,name=path_prefix,json=pathPrefix,proto3" json:"path_prefix,omitempty"` PathRegex string `protobuf:"bytes,3,opt,name=path_regex,json=pathRegex,proto3" json:"path_regex,omitempty"` - // methods is the list of HTTP methods. If no methods are specified, + // Methods is the list of HTTP methods. If no methods are specified, // this rule will apply to all methods. Methods []string `protobuf:"bytes,4,rep,name=methods,proto3" json:"methods,omitempty"` Header *DestinationRuleHeader `protobuf:"bytes,5,opt,name=header,proto3" json:"header,omitempty"` PortNames []string `protobuf:"bytes,6,rep,name=port_names,json=portNames,proto3" json:"port_names,omitempty"` - // exclude contains a list of rules to exclude when evaluating rules for the incoming connection. + // Exclude contains a list of rules to exclude when evaluating rules for the incoming connection. Exclude []*ExcludePermissionRule `protobuf:"bytes,7,rep,name=exclude,proto3" json:"exclude,omitempty"` } @@ -649,10 +647,10 @@ type ExcludePermissionRule struct { PathExact string `protobuf:"bytes,1,opt,name=path_exact,json=pathExact,proto3" json:"path_exact,omitempty"` PathPrefix string `protobuf:"bytes,2,opt,name=path_prefix,json=pathPrefix,proto3" json:"path_prefix,omitempty"` PathRegex string `protobuf:"bytes,3,opt,name=path_regex,json=pathRegex,proto3" json:"path_regex,omitempty"` - // methods is the list of HTTP methods. + // Methods is the list of HTTP methods. Methods []string `protobuf:"bytes,4,rep,name=methods,proto3" json:"methods,omitempty"` Header *DestinationRuleHeader `protobuf:"bytes,5,opt,name=header,proto3" json:"header,omitempty"` - // port_names is a list of workload ports to apply this rule to. The ports specified here + // PortNames is a list of workload ports to apply this rule to. The ports specified here // must be the ports used in the connection. PortNames []string `protobuf:"bytes,6,rep,name=port_names,json=portNames,proto3" json:"port_names,omitempty"` } diff --git a/proto-public/pbauth/v2beta1/traffic_permissions.proto b/proto-public/pbauth/v2beta1/traffic_permissions.proto index 9eab225026..c36da643f4 100644 --- a/proto-public/pbauth/v2beta1/traffic_permissions.proto +++ b/proto-public/pbauth/v2beta1/traffic_permissions.proto @@ -7,27 +7,24 @@ import "pbresource/annotations.proto"; message TrafficPermissions { option (hashicorp.consul.resource.spec) = {scope: SCOPE_NAMESPACE}; - // destination is a configuration of the destination proxies + // Destination is a configuration of the destination proxies // where these traffic permissions should apply. Destination destination = 1; // Action can be either allow or deny for the entire object. It will default to allow. // - // If action is allow, - // we will allow the connection if one of the rules in Rules matches, in other words, we will deny + // If action is allow, we will allow the connection if one of the rules in Rules matches, in other words, we will deny // all requests except for the ones that match Rules. If Consul is in default allow mode, then allow // actions have no effect without a deny permission as everything is allowed by default. // - // If action is deny, - // we will deny the connection if one of the rules in Rules match, in other words, + // If action is deny, we will deny the connection if one of the rules in Rules match, in other words, // we will allow all requests except for the ones that match Rules. If Consul is default deny mode, // then deny permissions have no effect without an allow permission as everything is denied by default. // // Action unspecified is reserved for compatibility with the addition of future actions. Action action = 2; - // permissions is a list of permissions to match on. - // They are applied using OR semantics. + // Permissions is a list of permissions to match on. They are applied using OR semantics. repeated Permission permissions = 3; } @@ -46,23 +43,24 @@ message PartitionTrafficPermissions { } // Destination contains the name or name-prefix of the WorkloadIdentity. -// The WorkloadIdentity resource must -// be in the same tenancy as the TrafficPermissions resource. +// The WorkloadIdentity resource must be in the same tenancy as the TrafficPermissions resource. message Destination { string identity_name = 1; } +// +kubebuilder:validation:Enum=ACTION_ALLOW;ACTION_DENY;ACTION_UNKNOWN +// +kubebuilder:validation:Type=string enum Action { ACTION_UNSPECIFIED = 0; ACTION_DENY = 1; ACTION_ALLOW = 2; } -// permissions is a list of permissions to match on. +// Permissions is a list of permissions to match on. message Permission { - // sources is a list of sources in this traffic permission. + // Sources is a list of sources in this traffic permission. repeated Source sources = 1; - // destination_rules is a list of rules to apply for matching sources in this Permission. + // DestinationRules is a list of rules to apply for matching sources in this Permission. // These rules are specific to the request or connection that is going to the destination(s) // selected by the TrafficPermissions resource. repeated DestinationRule destination_rules = 2; @@ -78,12 +76,12 @@ message Source { string peer = 4; string sameness_group = 5; - // exclude is a list of sources to exclude from this source. + // Exclude is a list of sources to exclude from this source. repeated ExcludeSource exclude = 6; } // ExcludeSource is almost the same as source but it prevents the addition of -// matchiing sources. +// matching sources. message ExcludeSource { string identity_name = 1; string namespace = 2; @@ -97,12 +95,12 @@ message DestinationRule { string path_exact = 1; string path_prefix = 2; string path_regex = 3; - // methods is the list of HTTP methods. If no methods are specified, + // Methods is the list of HTTP methods. If no methods are specified, // this rule will apply to all methods. repeated string methods = 4; DestinationRuleHeader header = 5; repeated string port_names = 6; - // exclude contains a list of rules to exclude when evaluating rules for the incoming connection. + // Exclude contains a list of rules to exclude when evaluating rules for the incoming connection. repeated ExcludePermissionRule exclude = 7; } @@ -110,12 +108,12 @@ message ExcludePermissionRule { string path_exact = 1; string path_prefix = 2; string path_regex = 3; - // methods is the list of HTTP methods. + // Methods is the list of HTTP methods. repeated string methods = 4; DestinationRuleHeader header = 5; - // port_names is a list of workload ports to apply this rule to. The ports specified here + // PortNames is a list of workload ports to apply this rule to. The ports specified here // must be the ports used in the connection. repeated string port_names = 6; } diff --git a/proto-public/pbauth/v2beta1/traffic_permissions_deepcopy.gen.go b/proto-public/pbauth/v2beta1/traffic_permissions_deepcopy.gen.go new file mode 100644 index 0000000000..177c60c14a --- /dev/null +++ b/proto-public/pbauth/v2beta1/traffic_permissions_deepcopy.gen.go @@ -0,0 +1,216 @@ +// Code generated by protoc-gen-deepcopy. DO NOT EDIT. +package authv2beta1 + +import ( + proto "google.golang.org/protobuf/proto" +) + +// DeepCopyInto supports using TrafficPermissions within kubernetes types, where deepcopy-gen is used. +func (in *TrafficPermissions) DeepCopyInto(out *TrafficPermissions) { + p := proto.Clone(in).(*TrafficPermissions) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TrafficPermissions. Required by controller-gen. +func (in *TrafficPermissions) DeepCopy() *TrafficPermissions { + if in == nil { + return nil + } + out := new(TrafficPermissions) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new TrafficPermissions. Required by controller-gen. +func (in *TrafficPermissions) DeepCopyInterface() interface{} { + return in.DeepCopy() +} + +// DeepCopyInto supports using NamespaceTrafficPermissions within kubernetes types, where deepcopy-gen is used. +func (in *NamespaceTrafficPermissions) DeepCopyInto(out *NamespaceTrafficPermissions) { + p := proto.Clone(in).(*NamespaceTrafficPermissions) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NamespaceTrafficPermissions. Required by controller-gen. +func (in *NamespaceTrafficPermissions) DeepCopy() *NamespaceTrafficPermissions { + if in == nil { + return nil + } + out := new(NamespaceTrafficPermissions) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new NamespaceTrafficPermissions. Required by controller-gen. +func (in *NamespaceTrafficPermissions) DeepCopyInterface() interface{} { + return in.DeepCopy() +} + +// DeepCopyInto supports using PartitionTrafficPermissions within kubernetes types, where deepcopy-gen is used. +func (in *PartitionTrafficPermissions) DeepCopyInto(out *PartitionTrafficPermissions) { + p := proto.Clone(in).(*PartitionTrafficPermissions) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PartitionTrafficPermissions. Required by controller-gen. +func (in *PartitionTrafficPermissions) DeepCopy() *PartitionTrafficPermissions { + if in == nil { + return nil + } + out := new(PartitionTrafficPermissions) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new PartitionTrafficPermissions. Required by controller-gen. +func (in *PartitionTrafficPermissions) DeepCopyInterface() interface{} { + return in.DeepCopy() +} + +// DeepCopyInto supports using Destination within kubernetes types, where deepcopy-gen is used. +func (in *Destination) DeepCopyInto(out *Destination) { + p := proto.Clone(in).(*Destination) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Destination. Required by controller-gen. +func (in *Destination) DeepCopy() *Destination { + if in == nil { + return nil + } + out := new(Destination) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new Destination. Required by controller-gen. +func (in *Destination) DeepCopyInterface() interface{} { + return in.DeepCopy() +} + +// DeepCopyInto supports using Permission within kubernetes types, where deepcopy-gen is used. +func (in *Permission) DeepCopyInto(out *Permission) { + p := proto.Clone(in).(*Permission) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Permission. Required by controller-gen. +func (in *Permission) DeepCopy() *Permission { + if in == nil { + return nil + } + out := new(Permission) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new Permission. Required by controller-gen. +func (in *Permission) DeepCopyInterface() interface{} { + return in.DeepCopy() +} + +// DeepCopyInto supports using Source within kubernetes types, where deepcopy-gen is used. +func (in *Source) DeepCopyInto(out *Source) { + p := proto.Clone(in).(*Source) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Source. Required by controller-gen. +func (in *Source) DeepCopy() *Source { + if in == nil { + return nil + } + out := new(Source) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new Source. Required by controller-gen. +func (in *Source) DeepCopyInterface() interface{} { + return in.DeepCopy() +} + +// DeepCopyInto supports using ExcludeSource within kubernetes types, where deepcopy-gen is used. +func (in *ExcludeSource) DeepCopyInto(out *ExcludeSource) { + p := proto.Clone(in).(*ExcludeSource) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExcludeSource. Required by controller-gen. +func (in *ExcludeSource) DeepCopy() *ExcludeSource { + if in == nil { + return nil + } + out := new(ExcludeSource) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new ExcludeSource. Required by controller-gen. +func (in *ExcludeSource) DeepCopyInterface() interface{} { + return in.DeepCopy() +} + +// DeepCopyInto supports using DestinationRule within kubernetes types, where deepcopy-gen is used. +func (in *DestinationRule) DeepCopyInto(out *DestinationRule) { + p := proto.Clone(in).(*DestinationRule) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DestinationRule. Required by controller-gen. +func (in *DestinationRule) DeepCopy() *DestinationRule { + if in == nil { + return nil + } + out := new(DestinationRule) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new DestinationRule. Required by controller-gen. +func (in *DestinationRule) DeepCopyInterface() interface{} { + return in.DeepCopy() +} + +// DeepCopyInto supports using ExcludePermissionRule within kubernetes types, where deepcopy-gen is used. +func (in *ExcludePermissionRule) DeepCopyInto(out *ExcludePermissionRule) { + p := proto.Clone(in).(*ExcludePermissionRule) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExcludePermissionRule. Required by controller-gen. +func (in *ExcludePermissionRule) DeepCopy() *ExcludePermissionRule { + if in == nil { + return nil + } + out := new(ExcludePermissionRule) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new ExcludePermissionRule. Required by controller-gen. +func (in *ExcludePermissionRule) DeepCopyInterface() interface{} { + return in.DeepCopy() +} + +// DeepCopyInto supports using DestinationRuleHeader within kubernetes types, where deepcopy-gen is used. +func (in *DestinationRuleHeader) DeepCopyInto(out *DestinationRuleHeader) { + p := proto.Clone(in).(*DestinationRuleHeader) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DestinationRuleHeader. Required by controller-gen. +func (in *DestinationRuleHeader) DeepCopy() *DestinationRuleHeader { + if in == nil { + return nil + } + out := new(DestinationRuleHeader) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new DestinationRuleHeader. Required by controller-gen. +func (in *DestinationRuleHeader) DeepCopyInterface() interface{} { + return in.DeepCopy() +} diff --git a/proto-public/pbauth/v2beta1/traffic_permissions_json.gen.go b/proto-public/pbauth/v2beta1/traffic_permissions_json.gen.go new file mode 100644 index 0000000000..7f6ddde290 --- /dev/null +++ b/proto-public/pbauth/v2beta1/traffic_permissions_json.gen.go @@ -0,0 +1,121 @@ +// Code generated by protoc-json-shim. DO NOT EDIT. +package authv2beta1 + +import ( + protojson "google.golang.org/protobuf/encoding/protojson" +) + +// MarshalJSON is a custom marshaler for TrafficPermissions +func (this *TrafficPermissions) MarshalJSON() ([]byte, error) { + str, err := TrafficPermissionsMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for TrafficPermissions +func (this *TrafficPermissions) UnmarshalJSON(b []byte) error { + return TrafficPermissionsUnmarshaler.Unmarshal(b, this) +} + +// MarshalJSON is a custom marshaler for NamespaceTrafficPermissions +func (this *NamespaceTrafficPermissions) MarshalJSON() ([]byte, error) { + str, err := TrafficPermissionsMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for NamespaceTrafficPermissions +func (this *NamespaceTrafficPermissions) UnmarshalJSON(b []byte) error { + return TrafficPermissionsUnmarshaler.Unmarshal(b, this) +} + +// MarshalJSON is a custom marshaler for PartitionTrafficPermissions +func (this *PartitionTrafficPermissions) MarshalJSON() ([]byte, error) { + str, err := TrafficPermissionsMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for PartitionTrafficPermissions +func (this *PartitionTrafficPermissions) UnmarshalJSON(b []byte) error { + return TrafficPermissionsUnmarshaler.Unmarshal(b, this) +} + +// MarshalJSON is a custom marshaler for Destination +func (this *Destination) MarshalJSON() ([]byte, error) { + str, err := TrafficPermissionsMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for Destination +func (this *Destination) UnmarshalJSON(b []byte) error { + return TrafficPermissionsUnmarshaler.Unmarshal(b, this) +} + +// MarshalJSON is a custom marshaler for Permission +func (this *Permission) MarshalJSON() ([]byte, error) { + str, err := TrafficPermissionsMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for Permission +func (this *Permission) UnmarshalJSON(b []byte) error { + return TrafficPermissionsUnmarshaler.Unmarshal(b, this) +} + +// MarshalJSON is a custom marshaler for Source +func (this *Source) MarshalJSON() ([]byte, error) { + str, err := TrafficPermissionsMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for Source +func (this *Source) UnmarshalJSON(b []byte) error { + return TrafficPermissionsUnmarshaler.Unmarshal(b, this) +} + +// MarshalJSON is a custom marshaler for ExcludeSource +func (this *ExcludeSource) MarshalJSON() ([]byte, error) { + str, err := TrafficPermissionsMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for ExcludeSource +func (this *ExcludeSource) UnmarshalJSON(b []byte) error { + return TrafficPermissionsUnmarshaler.Unmarshal(b, this) +} + +// MarshalJSON is a custom marshaler for DestinationRule +func (this *DestinationRule) MarshalJSON() ([]byte, error) { + str, err := TrafficPermissionsMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for DestinationRule +func (this *DestinationRule) UnmarshalJSON(b []byte) error { + return TrafficPermissionsUnmarshaler.Unmarshal(b, this) +} + +// MarshalJSON is a custom marshaler for ExcludePermissionRule +func (this *ExcludePermissionRule) MarshalJSON() ([]byte, error) { + str, err := TrafficPermissionsMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for ExcludePermissionRule +func (this *ExcludePermissionRule) UnmarshalJSON(b []byte) error { + return TrafficPermissionsUnmarshaler.Unmarshal(b, this) +} + +// MarshalJSON is a custom marshaler for DestinationRuleHeader +func (this *DestinationRuleHeader) MarshalJSON() ([]byte, error) { + str, err := TrafficPermissionsMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for DestinationRuleHeader +func (this *DestinationRuleHeader) UnmarshalJSON(b []byte) error { + return TrafficPermissionsUnmarshaler.Unmarshal(b, this) +} + +var ( + TrafficPermissionsMarshaler = &protojson.MarshalOptions{} + TrafficPermissionsUnmarshaler = &protojson.UnmarshalOptions{DiscardUnknown: false} +) diff --git a/proto-public/pbauth/v2beta1/workload_identity_deepcopy.gen.go b/proto-public/pbauth/v2beta1/workload_identity_deepcopy.gen.go new file mode 100644 index 0000000000..7684b5ef83 --- /dev/null +++ b/proto-public/pbauth/v2beta1/workload_identity_deepcopy.gen.go @@ -0,0 +1,27 @@ +// Code generated by protoc-gen-deepcopy. DO NOT EDIT. +package authv2beta1 + +import ( + proto "google.golang.org/protobuf/proto" +) + +// DeepCopyInto supports using WorkloadIdentity within kubernetes types, where deepcopy-gen is used. +func (in *WorkloadIdentity) DeepCopyInto(out *WorkloadIdentity) { + p := proto.Clone(in).(*WorkloadIdentity) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkloadIdentity. Required by controller-gen. +func (in *WorkloadIdentity) DeepCopy() *WorkloadIdentity { + if in == nil { + return nil + } + out := new(WorkloadIdentity) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new WorkloadIdentity. Required by controller-gen. +func (in *WorkloadIdentity) DeepCopyInterface() interface{} { + return in.DeepCopy() +} diff --git a/proto-public/pbauth/v2beta1/workload_identity_json.gen.go b/proto-public/pbauth/v2beta1/workload_identity_json.gen.go new file mode 100644 index 0000000000..8c49cd53e1 --- /dev/null +++ b/proto-public/pbauth/v2beta1/workload_identity_json.gen.go @@ -0,0 +1,22 @@ +// Code generated by protoc-json-shim. DO NOT EDIT. +package authv2beta1 + +import ( + protojson "google.golang.org/protobuf/encoding/protojson" +) + +// MarshalJSON is a custom marshaler for WorkloadIdentity +func (this *WorkloadIdentity) MarshalJSON() ([]byte, error) { + str, err := WorkloadIdentityMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for WorkloadIdentity +func (this *WorkloadIdentity) UnmarshalJSON(b []byte) error { + return WorkloadIdentityUnmarshaler.Unmarshal(b, this) +} + +var ( + WorkloadIdentityMarshaler = &protojson.MarshalOptions{} + WorkloadIdentityUnmarshaler = &protojson.UnmarshalOptions{DiscardUnknown: false} +) diff --git a/proto-public/pbcatalog/v2beta1/dns_deepcopy.gen.go b/proto-public/pbcatalog/v2beta1/dns_deepcopy.gen.go new file mode 100644 index 0000000000..f2a7b3564f --- /dev/null +++ b/proto-public/pbcatalog/v2beta1/dns_deepcopy.gen.go @@ -0,0 +1,48 @@ +// Code generated by protoc-gen-deepcopy. DO NOT EDIT. +package catalogv2beta1 + +import ( + proto "google.golang.org/protobuf/proto" +) + +// DeepCopyInto supports using DNSPolicy within kubernetes types, where deepcopy-gen is used. +func (in *DNSPolicy) DeepCopyInto(out *DNSPolicy) { + p := proto.Clone(in).(*DNSPolicy) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DNSPolicy. Required by controller-gen. +func (in *DNSPolicy) DeepCopy() *DNSPolicy { + if in == nil { + return nil + } + out := new(DNSPolicy) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new DNSPolicy. Required by controller-gen. +func (in *DNSPolicy) DeepCopyInterface() interface{} { + return in.DeepCopy() +} + +// DeepCopyInto supports using Weights within kubernetes types, where deepcopy-gen is used. +func (in *Weights) DeepCopyInto(out *Weights) { + p := proto.Clone(in).(*Weights) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Weights. Required by controller-gen. +func (in *Weights) DeepCopy() *Weights { + if in == nil { + return nil + } + out := new(Weights) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new Weights. Required by controller-gen. +func (in *Weights) DeepCopyInterface() interface{} { + return in.DeepCopy() +} diff --git a/proto-public/pbcatalog/v2beta1/dns_json.gen.go b/proto-public/pbcatalog/v2beta1/dns_json.gen.go new file mode 100644 index 0000000000..fd320300a3 --- /dev/null +++ b/proto-public/pbcatalog/v2beta1/dns_json.gen.go @@ -0,0 +1,33 @@ +// Code generated by protoc-json-shim. DO NOT EDIT. +package catalogv2beta1 + +import ( + protojson "google.golang.org/protobuf/encoding/protojson" +) + +// MarshalJSON is a custom marshaler for DNSPolicy +func (this *DNSPolicy) MarshalJSON() ([]byte, error) { + str, err := DnsMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for DNSPolicy +func (this *DNSPolicy) UnmarshalJSON(b []byte) error { + return DnsUnmarshaler.Unmarshal(b, this) +} + +// MarshalJSON is a custom marshaler for Weights +func (this *Weights) MarshalJSON() ([]byte, error) { + str, err := DnsMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for Weights +func (this *Weights) UnmarshalJSON(b []byte) error { + return DnsUnmarshaler.Unmarshal(b, this) +} + +var ( + DnsMarshaler = &protojson.MarshalOptions{} + DnsUnmarshaler = &protojson.UnmarshalOptions{DiscardUnknown: false} +) diff --git a/proto-public/pbcatalog/v2beta1/failover_policy_deepcopy.gen.go b/proto-public/pbcatalog/v2beta1/failover_policy_deepcopy.gen.go new file mode 100644 index 0000000000..b0fc57e972 --- /dev/null +++ b/proto-public/pbcatalog/v2beta1/failover_policy_deepcopy.gen.go @@ -0,0 +1,69 @@ +// Code generated by protoc-gen-deepcopy. DO NOT EDIT. +package catalogv2beta1 + +import ( + proto "google.golang.org/protobuf/proto" +) + +// DeepCopyInto supports using FailoverPolicy within kubernetes types, where deepcopy-gen is used. +func (in *FailoverPolicy) DeepCopyInto(out *FailoverPolicy) { + p := proto.Clone(in).(*FailoverPolicy) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FailoverPolicy. Required by controller-gen. +func (in *FailoverPolicy) DeepCopy() *FailoverPolicy { + if in == nil { + return nil + } + out := new(FailoverPolicy) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new FailoverPolicy. Required by controller-gen. +func (in *FailoverPolicy) DeepCopyInterface() interface{} { + return in.DeepCopy() +} + +// DeepCopyInto supports using FailoverConfig within kubernetes types, where deepcopy-gen is used. +func (in *FailoverConfig) DeepCopyInto(out *FailoverConfig) { + p := proto.Clone(in).(*FailoverConfig) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FailoverConfig. Required by controller-gen. +func (in *FailoverConfig) DeepCopy() *FailoverConfig { + if in == nil { + return nil + } + out := new(FailoverConfig) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new FailoverConfig. Required by controller-gen. +func (in *FailoverConfig) DeepCopyInterface() interface{} { + return in.DeepCopy() +} + +// DeepCopyInto supports using FailoverDestination within kubernetes types, where deepcopy-gen is used. +func (in *FailoverDestination) DeepCopyInto(out *FailoverDestination) { + p := proto.Clone(in).(*FailoverDestination) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FailoverDestination. Required by controller-gen. +func (in *FailoverDestination) DeepCopy() *FailoverDestination { + if in == nil { + return nil + } + out := new(FailoverDestination) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new FailoverDestination. Required by controller-gen. +func (in *FailoverDestination) DeepCopyInterface() interface{} { + return in.DeepCopy() +} diff --git a/proto-public/pbcatalog/v2beta1/failover_policy_json.gen.go b/proto-public/pbcatalog/v2beta1/failover_policy_json.gen.go new file mode 100644 index 0000000000..85998288a0 --- /dev/null +++ b/proto-public/pbcatalog/v2beta1/failover_policy_json.gen.go @@ -0,0 +1,44 @@ +// Code generated by protoc-json-shim. DO NOT EDIT. +package catalogv2beta1 + +import ( + protojson "google.golang.org/protobuf/encoding/protojson" +) + +// MarshalJSON is a custom marshaler for FailoverPolicy +func (this *FailoverPolicy) MarshalJSON() ([]byte, error) { + str, err := FailoverPolicyMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for FailoverPolicy +func (this *FailoverPolicy) UnmarshalJSON(b []byte) error { + return FailoverPolicyUnmarshaler.Unmarshal(b, this) +} + +// MarshalJSON is a custom marshaler for FailoverConfig +func (this *FailoverConfig) MarshalJSON() ([]byte, error) { + str, err := FailoverPolicyMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for FailoverConfig +func (this *FailoverConfig) UnmarshalJSON(b []byte) error { + return FailoverPolicyUnmarshaler.Unmarshal(b, this) +} + +// MarshalJSON is a custom marshaler for FailoverDestination +func (this *FailoverDestination) MarshalJSON() ([]byte, error) { + str, err := FailoverPolicyMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for FailoverDestination +func (this *FailoverDestination) UnmarshalJSON(b []byte) error { + return FailoverPolicyUnmarshaler.Unmarshal(b, this) +} + +var ( + FailoverPolicyMarshaler = &protojson.MarshalOptions{} + FailoverPolicyUnmarshaler = &protojson.UnmarshalOptions{DiscardUnknown: false} +) diff --git a/proto-public/pbcatalog/v2beta1/health.pb.go b/proto-public/pbcatalog/v2beta1/health.pb.go index efb9cdfcaf..93b045b017 100644 --- a/proto-public/pbcatalog/v2beta1/health.pb.go +++ b/proto-public/pbcatalog/v2beta1/health.pb.go @@ -225,10 +225,13 @@ type HealthCheck struct { // *HealthCheck_Udp // *HealthCheck_Grpc // *HealthCheck_OsService - Definition isHealthCheck_Definition `protobuf_oneof:"definition"` - Interval *durationpb.Duration `protobuf:"bytes,7,opt,name=interval,proto3" json:"interval,omitempty"` - Timeout *durationpb.Duration `protobuf:"bytes,8,opt,name=timeout,proto3" json:"timeout,omitempty"` - DeregisterCriticalAfter *durationpb.Duration `protobuf:"bytes,9,opt,name=deregister_critical_after,json=deregisterCriticalAfter,proto3" json:"deregister_critical_after,omitempty"` + Definition isHealthCheck_Definition `protobuf_oneof:"definition"` + // +kubebuilder:validation:Format=duration + Interval *durationpb.Duration `protobuf:"bytes,7,opt,name=interval,proto3" json:"interval,omitempty"` + // +kubebuilder:validation:Format=duration + Timeout *durationpb.Duration `protobuf:"bytes,8,opt,name=timeout,proto3" json:"timeout,omitempty"` + // +kubebuilder:validation:Format=duration + DeregisterCriticalAfter *durationpb.Duration `protobuf:"bytes,9,opt,name=deregister_critical_after,json=deregisterCriticalAfter,proto3" json:"deregister_critical_after,omitempty"` } func (x *HealthCheck) Reset() { diff --git a/proto-public/pbcatalog/v2beta1/health.proto b/proto-public/pbcatalog/v2beta1/health.proto index 022a6169e9..316c58d5d1 100644 --- a/proto-public/pbcatalog/v2beta1/health.proto +++ b/proto-public/pbcatalog/v2beta1/health.proto @@ -48,8 +48,11 @@ message HealthCheck { GRPCCheck grpc = 5; OSServiceCheck os_service = 6; } + // +kubebuilder:validation:Format=duration google.protobuf.Duration interval = 7; + // +kubebuilder:validation:Format=duration google.protobuf.Duration timeout = 8; + // +kubebuilder:validation:Format=duration google.protobuf.Duration deregister_critical_after = 9; } diff --git a/proto-public/pbcatalog/v2beta1/health_deepcopy.gen.go b/proto-public/pbcatalog/v2beta1/health_deepcopy.gen.go new file mode 100644 index 0000000000..bb24cbe052 --- /dev/null +++ b/proto-public/pbcatalog/v2beta1/health_deepcopy.gen.go @@ -0,0 +1,195 @@ +// Code generated by protoc-gen-deepcopy. DO NOT EDIT. +package catalogv2beta1 + +import ( + proto "google.golang.org/protobuf/proto" +) + +// DeepCopyInto supports using HealthStatus within kubernetes types, where deepcopy-gen is used. +func (in *HealthStatus) DeepCopyInto(out *HealthStatus) { + p := proto.Clone(in).(*HealthStatus) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HealthStatus. Required by controller-gen. +func (in *HealthStatus) DeepCopy() *HealthStatus { + if in == nil { + return nil + } + out := new(HealthStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new HealthStatus. Required by controller-gen. +func (in *HealthStatus) DeepCopyInterface() interface{} { + return in.DeepCopy() +} + +// DeepCopyInto supports using HealthChecks within kubernetes types, where deepcopy-gen is used. +func (in *HealthChecks) DeepCopyInto(out *HealthChecks) { + p := proto.Clone(in).(*HealthChecks) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HealthChecks. Required by controller-gen. +func (in *HealthChecks) DeepCopy() *HealthChecks { + if in == nil { + return nil + } + out := new(HealthChecks) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new HealthChecks. Required by controller-gen. +func (in *HealthChecks) DeepCopyInterface() interface{} { + return in.DeepCopy() +} + +// DeepCopyInto supports using HealthCheck within kubernetes types, where deepcopy-gen is used. +func (in *HealthCheck) DeepCopyInto(out *HealthCheck) { + p := proto.Clone(in).(*HealthCheck) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HealthCheck. Required by controller-gen. +func (in *HealthCheck) DeepCopy() *HealthCheck { + if in == nil { + return nil + } + out := new(HealthCheck) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new HealthCheck. Required by controller-gen. +func (in *HealthCheck) DeepCopyInterface() interface{} { + return in.DeepCopy() +} + +// DeepCopyInto supports using HTTPCheck within kubernetes types, where deepcopy-gen is used. +func (in *HTTPCheck) DeepCopyInto(out *HTTPCheck) { + p := proto.Clone(in).(*HTTPCheck) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HTTPCheck. Required by controller-gen. +func (in *HTTPCheck) DeepCopy() *HTTPCheck { + if in == nil { + return nil + } + out := new(HTTPCheck) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new HTTPCheck. Required by controller-gen. +func (in *HTTPCheck) DeepCopyInterface() interface{} { + return in.DeepCopy() +} + +// DeepCopyInto supports using TCPCheck within kubernetes types, where deepcopy-gen is used. +func (in *TCPCheck) DeepCopyInto(out *TCPCheck) { + p := proto.Clone(in).(*TCPCheck) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TCPCheck. Required by controller-gen. +func (in *TCPCheck) DeepCopy() *TCPCheck { + if in == nil { + return nil + } + out := new(TCPCheck) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new TCPCheck. Required by controller-gen. +func (in *TCPCheck) DeepCopyInterface() interface{} { + return in.DeepCopy() +} + +// DeepCopyInto supports using UDPCheck within kubernetes types, where deepcopy-gen is used. +func (in *UDPCheck) DeepCopyInto(out *UDPCheck) { + p := proto.Clone(in).(*UDPCheck) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UDPCheck. Required by controller-gen. +func (in *UDPCheck) DeepCopy() *UDPCheck { + if in == nil { + return nil + } + out := new(UDPCheck) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new UDPCheck. Required by controller-gen. +func (in *UDPCheck) DeepCopyInterface() interface{} { + return in.DeepCopy() +} + +// DeepCopyInto supports using GRPCCheck within kubernetes types, where deepcopy-gen is used. +func (in *GRPCCheck) DeepCopyInto(out *GRPCCheck) { + p := proto.Clone(in).(*GRPCCheck) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GRPCCheck. Required by controller-gen. +func (in *GRPCCheck) DeepCopy() *GRPCCheck { + if in == nil { + return nil + } + out := new(GRPCCheck) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new GRPCCheck. Required by controller-gen. +func (in *GRPCCheck) DeepCopyInterface() interface{} { + return in.DeepCopy() +} + +// DeepCopyInto supports using OSServiceCheck within kubernetes types, where deepcopy-gen is used. +func (in *OSServiceCheck) DeepCopyInto(out *OSServiceCheck) { + p := proto.Clone(in).(*OSServiceCheck) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OSServiceCheck. Required by controller-gen. +func (in *OSServiceCheck) DeepCopy() *OSServiceCheck { + if in == nil { + return nil + } + out := new(OSServiceCheck) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new OSServiceCheck. Required by controller-gen. +func (in *OSServiceCheck) DeepCopyInterface() interface{} { + return in.DeepCopy() +} + +// DeepCopyInto supports using CheckTLSConfig within kubernetes types, where deepcopy-gen is used. +func (in *CheckTLSConfig) DeepCopyInto(out *CheckTLSConfig) { + p := proto.Clone(in).(*CheckTLSConfig) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CheckTLSConfig. Required by controller-gen. +func (in *CheckTLSConfig) DeepCopy() *CheckTLSConfig { + if in == nil { + return nil + } + out := new(CheckTLSConfig) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new CheckTLSConfig. Required by controller-gen. +func (in *CheckTLSConfig) DeepCopyInterface() interface{} { + return in.DeepCopy() +} diff --git a/proto-public/pbcatalog/v2beta1/health_json.gen.go b/proto-public/pbcatalog/v2beta1/health_json.gen.go new file mode 100644 index 0000000000..7c0065d922 --- /dev/null +++ b/proto-public/pbcatalog/v2beta1/health_json.gen.go @@ -0,0 +1,110 @@ +// Code generated by protoc-json-shim. DO NOT EDIT. +package catalogv2beta1 + +import ( + protojson "google.golang.org/protobuf/encoding/protojson" +) + +// MarshalJSON is a custom marshaler for HealthStatus +func (this *HealthStatus) MarshalJSON() ([]byte, error) { + str, err := HealthMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for HealthStatus +func (this *HealthStatus) UnmarshalJSON(b []byte) error { + return HealthUnmarshaler.Unmarshal(b, this) +} + +// MarshalJSON is a custom marshaler for HealthChecks +func (this *HealthChecks) MarshalJSON() ([]byte, error) { + str, err := HealthMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for HealthChecks +func (this *HealthChecks) UnmarshalJSON(b []byte) error { + return HealthUnmarshaler.Unmarshal(b, this) +} + +// MarshalJSON is a custom marshaler for HealthCheck +func (this *HealthCheck) MarshalJSON() ([]byte, error) { + str, err := HealthMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for HealthCheck +func (this *HealthCheck) UnmarshalJSON(b []byte) error { + return HealthUnmarshaler.Unmarshal(b, this) +} + +// MarshalJSON is a custom marshaler for HTTPCheck +func (this *HTTPCheck) MarshalJSON() ([]byte, error) { + str, err := HealthMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for HTTPCheck +func (this *HTTPCheck) UnmarshalJSON(b []byte) error { + return HealthUnmarshaler.Unmarshal(b, this) +} + +// MarshalJSON is a custom marshaler for TCPCheck +func (this *TCPCheck) MarshalJSON() ([]byte, error) { + str, err := HealthMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for TCPCheck +func (this *TCPCheck) UnmarshalJSON(b []byte) error { + return HealthUnmarshaler.Unmarshal(b, this) +} + +// MarshalJSON is a custom marshaler for UDPCheck +func (this *UDPCheck) MarshalJSON() ([]byte, error) { + str, err := HealthMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for UDPCheck +func (this *UDPCheck) UnmarshalJSON(b []byte) error { + return HealthUnmarshaler.Unmarshal(b, this) +} + +// MarshalJSON is a custom marshaler for GRPCCheck +func (this *GRPCCheck) MarshalJSON() ([]byte, error) { + str, err := HealthMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for GRPCCheck +func (this *GRPCCheck) UnmarshalJSON(b []byte) error { + return HealthUnmarshaler.Unmarshal(b, this) +} + +// MarshalJSON is a custom marshaler for OSServiceCheck +func (this *OSServiceCheck) MarshalJSON() ([]byte, error) { + str, err := HealthMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for OSServiceCheck +func (this *OSServiceCheck) UnmarshalJSON(b []byte) error { + return HealthUnmarshaler.Unmarshal(b, this) +} + +// MarshalJSON is a custom marshaler for CheckTLSConfig +func (this *CheckTLSConfig) MarshalJSON() ([]byte, error) { + str, err := HealthMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for CheckTLSConfig +func (this *CheckTLSConfig) UnmarshalJSON(b []byte) error { + return HealthUnmarshaler.Unmarshal(b, this) +} + +var ( + HealthMarshaler = &protojson.MarshalOptions{} + HealthUnmarshaler = &protojson.UnmarshalOptions{DiscardUnknown: false} +) diff --git a/proto-public/pbcatalog/v2beta1/node_deepcopy.gen.go b/proto-public/pbcatalog/v2beta1/node_deepcopy.gen.go new file mode 100644 index 0000000000..775faa3d53 --- /dev/null +++ b/proto-public/pbcatalog/v2beta1/node_deepcopy.gen.go @@ -0,0 +1,48 @@ +// Code generated by protoc-gen-deepcopy. DO NOT EDIT. +package catalogv2beta1 + +import ( + proto "google.golang.org/protobuf/proto" +) + +// DeepCopyInto supports using Node within kubernetes types, where deepcopy-gen is used. +func (in *Node) DeepCopyInto(out *Node) { + p := proto.Clone(in).(*Node) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Node. Required by controller-gen. +func (in *Node) DeepCopy() *Node { + if in == nil { + return nil + } + out := new(Node) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new Node. Required by controller-gen. +func (in *Node) DeepCopyInterface() interface{} { + return in.DeepCopy() +} + +// DeepCopyInto supports using NodeAddress within kubernetes types, where deepcopy-gen is used. +func (in *NodeAddress) DeepCopyInto(out *NodeAddress) { + p := proto.Clone(in).(*NodeAddress) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeAddress. Required by controller-gen. +func (in *NodeAddress) DeepCopy() *NodeAddress { + if in == nil { + return nil + } + out := new(NodeAddress) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new NodeAddress. Required by controller-gen. +func (in *NodeAddress) DeepCopyInterface() interface{} { + return in.DeepCopy() +} diff --git a/proto-public/pbcatalog/v2beta1/node_json.gen.go b/proto-public/pbcatalog/v2beta1/node_json.gen.go new file mode 100644 index 0000000000..f599ddb501 --- /dev/null +++ b/proto-public/pbcatalog/v2beta1/node_json.gen.go @@ -0,0 +1,33 @@ +// Code generated by protoc-json-shim. DO NOT EDIT. +package catalogv2beta1 + +import ( + protojson "google.golang.org/protobuf/encoding/protojson" +) + +// MarshalJSON is a custom marshaler for Node +func (this *Node) MarshalJSON() ([]byte, error) { + str, err := NodeMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for Node +func (this *Node) UnmarshalJSON(b []byte) error { + return NodeUnmarshaler.Unmarshal(b, this) +} + +// MarshalJSON is a custom marshaler for NodeAddress +func (this *NodeAddress) MarshalJSON() ([]byte, error) { + str, err := NodeMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for NodeAddress +func (this *NodeAddress) UnmarshalJSON(b []byte) error { + return NodeUnmarshaler.Unmarshal(b, this) +} + +var ( + NodeMarshaler = &protojson.MarshalOptions{} + NodeUnmarshaler = &protojson.UnmarshalOptions{DiscardUnknown: false} +) diff --git a/proto-public/pbcatalog/v2beta1/protocol.pb.go b/proto-public/pbcatalog/v2beta1/protocol.pb.go index dec440c52f..a1bdc899d9 100644 --- a/proto-public/pbcatalog/v2beta1/protocol.pb.go +++ b/proto-public/pbcatalog/v2beta1/protocol.pb.go @@ -23,6 +23,8 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) +// +kubebuilder:validation:Enum=PROTOCOL_UNSPECIFIED;PROTOCOL_TCP;PROTOCOL_HTTP;PROTOCOL_HTTP2;PROTOCOL_GRPC +// +kubebuilder:validation:Type=string type Protocol int32 const ( diff --git a/proto-public/pbcatalog/v2beta1/protocol.proto b/proto-public/pbcatalog/v2beta1/protocol.proto index 698756934a..faebe9f0b0 100644 --- a/proto-public/pbcatalog/v2beta1/protocol.proto +++ b/proto-public/pbcatalog/v2beta1/protocol.proto @@ -5,6 +5,8 @@ syntax = "proto3"; package hashicorp.consul.catalog.v2beta1; +// +kubebuilder:validation:Enum=PROTOCOL_UNSPECIFIED;PROTOCOL_TCP;PROTOCOL_HTTP;PROTOCOL_HTTP2;PROTOCOL_GRPC +// +kubebuilder:validation:Type=string enum Protocol { PROTOCOL_UNSPECIFIED = 0; PROTOCOL_TCP = 1; diff --git a/proto-public/pbcatalog/v2beta1/selector_deepcopy.gen.go b/proto-public/pbcatalog/v2beta1/selector_deepcopy.gen.go new file mode 100644 index 0000000000..1f4ae1c7ff --- /dev/null +++ b/proto-public/pbcatalog/v2beta1/selector_deepcopy.gen.go @@ -0,0 +1,27 @@ +// Code generated by protoc-gen-deepcopy. DO NOT EDIT. +package catalogv2beta1 + +import ( + proto "google.golang.org/protobuf/proto" +) + +// DeepCopyInto supports using WorkloadSelector within kubernetes types, where deepcopy-gen is used. +func (in *WorkloadSelector) DeepCopyInto(out *WorkloadSelector) { + p := proto.Clone(in).(*WorkloadSelector) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkloadSelector. Required by controller-gen. +func (in *WorkloadSelector) DeepCopy() *WorkloadSelector { + if in == nil { + return nil + } + out := new(WorkloadSelector) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new WorkloadSelector. Required by controller-gen. +func (in *WorkloadSelector) DeepCopyInterface() interface{} { + return in.DeepCopy() +} diff --git a/proto-public/pbcatalog/v2beta1/selector_json.gen.go b/proto-public/pbcatalog/v2beta1/selector_json.gen.go new file mode 100644 index 0000000000..047e8d4c96 --- /dev/null +++ b/proto-public/pbcatalog/v2beta1/selector_json.gen.go @@ -0,0 +1,22 @@ +// Code generated by protoc-json-shim. DO NOT EDIT. +package catalogv2beta1 + +import ( + protojson "google.golang.org/protobuf/encoding/protojson" +) + +// MarshalJSON is a custom marshaler for WorkloadSelector +func (this *WorkloadSelector) MarshalJSON() ([]byte, error) { + str, err := SelectorMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for WorkloadSelector +func (this *WorkloadSelector) UnmarshalJSON(b []byte) error { + return SelectorUnmarshaler.Unmarshal(b, this) +} + +var ( + SelectorMarshaler = &protojson.MarshalOptions{} + SelectorUnmarshaler = &protojson.UnmarshalOptions{DiscardUnknown: false} +) diff --git a/proto-public/pbcatalog/v2beta1/service_deepcopy.gen.go b/proto-public/pbcatalog/v2beta1/service_deepcopy.gen.go new file mode 100644 index 0000000000..92e77ecb9d --- /dev/null +++ b/proto-public/pbcatalog/v2beta1/service_deepcopy.gen.go @@ -0,0 +1,48 @@ +// Code generated by protoc-gen-deepcopy. DO NOT EDIT. +package catalogv2beta1 + +import ( + proto "google.golang.org/protobuf/proto" +) + +// DeepCopyInto supports using Service within kubernetes types, where deepcopy-gen is used. +func (in *Service) DeepCopyInto(out *Service) { + p := proto.Clone(in).(*Service) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Service. Required by controller-gen. +func (in *Service) DeepCopy() *Service { + if in == nil { + return nil + } + out := new(Service) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new Service. Required by controller-gen. +func (in *Service) DeepCopyInterface() interface{} { + return in.DeepCopy() +} + +// DeepCopyInto supports using ServicePort within kubernetes types, where deepcopy-gen is used. +func (in *ServicePort) DeepCopyInto(out *ServicePort) { + p := proto.Clone(in).(*ServicePort) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServicePort. Required by controller-gen. +func (in *ServicePort) DeepCopy() *ServicePort { + if in == nil { + return nil + } + out := new(ServicePort) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new ServicePort. Required by controller-gen. +func (in *ServicePort) DeepCopyInterface() interface{} { + return in.DeepCopy() +} diff --git a/proto-public/pbcatalog/v2beta1/service_endpoints_deepcopy.gen.go b/proto-public/pbcatalog/v2beta1/service_endpoints_deepcopy.gen.go new file mode 100644 index 0000000000..6c1e3833bf --- /dev/null +++ b/proto-public/pbcatalog/v2beta1/service_endpoints_deepcopy.gen.go @@ -0,0 +1,48 @@ +// Code generated by protoc-gen-deepcopy. DO NOT EDIT. +package catalogv2beta1 + +import ( + proto "google.golang.org/protobuf/proto" +) + +// DeepCopyInto supports using ServiceEndpoints within kubernetes types, where deepcopy-gen is used. +func (in *ServiceEndpoints) DeepCopyInto(out *ServiceEndpoints) { + p := proto.Clone(in).(*ServiceEndpoints) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceEndpoints. Required by controller-gen. +func (in *ServiceEndpoints) DeepCopy() *ServiceEndpoints { + if in == nil { + return nil + } + out := new(ServiceEndpoints) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new ServiceEndpoints. Required by controller-gen. +func (in *ServiceEndpoints) DeepCopyInterface() interface{} { + return in.DeepCopy() +} + +// DeepCopyInto supports using Endpoint within kubernetes types, where deepcopy-gen is used. +func (in *Endpoint) DeepCopyInto(out *Endpoint) { + p := proto.Clone(in).(*Endpoint) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Endpoint. Required by controller-gen. +func (in *Endpoint) DeepCopy() *Endpoint { + if in == nil { + return nil + } + out := new(Endpoint) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new Endpoint. Required by controller-gen. +func (in *Endpoint) DeepCopyInterface() interface{} { + return in.DeepCopy() +} diff --git a/proto-public/pbcatalog/v2beta1/service_endpoints_json.gen.go b/proto-public/pbcatalog/v2beta1/service_endpoints_json.gen.go new file mode 100644 index 0000000000..2eef380ae6 --- /dev/null +++ b/proto-public/pbcatalog/v2beta1/service_endpoints_json.gen.go @@ -0,0 +1,33 @@ +// Code generated by protoc-json-shim. DO NOT EDIT. +package catalogv2beta1 + +import ( + protojson "google.golang.org/protobuf/encoding/protojson" +) + +// MarshalJSON is a custom marshaler for ServiceEndpoints +func (this *ServiceEndpoints) MarshalJSON() ([]byte, error) { + str, err := ServiceEndpointsMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for ServiceEndpoints +func (this *ServiceEndpoints) UnmarshalJSON(b []byte) error { + return ServiceEndpointsUnmarshaler.Unmarshal(b, this) +} + +// MarshalJSON is a custom marshaler for Endpoint +func (this *Endpoint) MarshalJSON() ([]byte, error) { + str, err := ServiceEndpointsMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for Endpoint +func (this *Endpoint) UnmarshalJSON(b []byte) error { + return ServiceEndpointsUnmarshaler.Unmarshal(b, this) +} + +var ( + ServiceEndpointsMarshaler = &protojson.MarshalOptions{} + ServiceEndpointsUnmarshaler = &protojson.UnmarshalOptions{DiscardUnknown: false} +) diff --git a/proto-public/pbcatalog/v2beta1/service_json.gen.go b/proto-public/pbcatalog/v2beta1/service_json.gen.go new file mode 100644 index 0000000000..6b9850f3a1 --- /dev/null +++ b/proto-public/pbcatalog/v2beta1/service_json.gen.go @@ -0,0 +1,33 @@ +// Code generated by protoc-json-shim. DO NOT EDIT. +package catalogv2beta1 + +import ( + protojson "google.golang.org/protobuf/encoding/protojson" +) + +// MarshalJSON is a custom marshaler for Service +func (this *Service) MarshalJSON() ([]byte, error) { + str, err := ServiceMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for Service +func (this *Service) UnmarshalJSON(b []byte) error { + return ServiceUnmarshaler.Unmarshal(b, this) +} + +// MarshalJSON is a custom marshaler for ServicePort +func (this *ServicePort) MarshalJSON() ([]byte, error) { + str, err := ServiceMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for ServicePort +func (this *ServicePort) UnmarshalJSON(b []byte) error { + return ServiceUnmarshaler.Unmarshal(b, this) +} + +var ( + ServiceMarshaler = &protojson.MarshalOptions{} + ServiceUnmarshaler = &protojson.UnmarshalOptions{DiscardUnknown: false} +) diff --git a/proto-public/pbcatalog/v2beta1/vip_deepcopy.gen.go b/proto-public/pbcatalog/v2beta1/vip_deepcopy.gen.go new file mode 100644 index 0000000000..d49da5045b --- /dev/null +++ b/proto-public/pbcatalog/v2beta1/vip_deepcopy.gen.go @@ -0,0 +1,48 @@ +// Code generated by protoc-gen-deepcopy. DO NOT EDIT. +package catalogv2beta1 + +import ( + proto "google.golang.org/protobuf/proto" +) + +// DeepCopyInto supports using VirtualIPs within kubernetes types, where deepcopy-gen is used. +func (in *VirtualIPs) DeepCopyInto(out *VirtualIPs) { + p := proto.Clone(in).(*VirtualIPs) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualIPs. Required by controller-gen. +func (in *VirtualIPs) DeepCopy() *VirtualIPs { + if in == nil { + return nil + } + out := new(VirtualIPs) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new VirtualIPs. Required by controller-gen. +func (in *VirtualIPs) DeepCopyInterface() interface{} { + return in.DeepCopy() +} + +// DeepCopyInto supports using IP within kubernetes types, where deepcopy-gen is used. +func (in *IP) DeepCopyInto(out *IP) { + p := proto.Clone(in).(*IP) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IP. Required by controller-gen. +func (in *IP) DeepCopy() *IP { + if in == nil { + return nil + } + out := new(IP) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new IP. Required by controller-gen. +func (in *IP) DeepCopyInterface() interface{} { + return in.DeepCopy() +} diff --git a/proto-public/pbcatalog/v2beta1/vip_json.gen.go b/proto-public/pbcatalog/v2beta1/vip_json.gen.go new file mode 100644 index 0000000000..b464c31073 --- /dev/null +++ b/proto-public/pbcatalog/v2beta1/vip_json.gen.go @@ -0,0 +1,33 @@ +// Code generated by protoc-json-shim. DO NOT EDIT. +package catalogv2beta1 + +import ( + protojson "google.golang.org/protobuf/encoding/protojson" +) + +// MarshalJSON is a custom marshaler for VirtualIPs +func (this *VirtualIPs) MarshalJSON() ([]byte, error) { + str, err := VipMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for VirtualIPs +func (this *VirtualIPs) UnmarshalJSON(b []byte) error { + return VipUnmarshaler.Unmarshal(b, this) +} + +// MarshalJSON is a custom marshaler for IP +func (this *IP) MarshalJSON() ([]byte, error) { + str, err := VipMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for IP +func (this *IP) UnmarshalJSON(b []byte) error { + return VipUnmarshaler.Unmarshal(b, this) +} + +var ( + VipMarshaler = &protojson.MarshalOptions{} + VipUnmarshaler = &protojson.UnmarshalOptions{DiscardUnknown: false} +) diff --git a/proto-public/pbcatalog/v2beta1/workload_deepcopy.gen.go b/proto-public/pbcatalog/v2beta1/workload_deepcopy.gen.go new file mode 100644 index 0000000000..fbb4b50af3 --- /dev/null +++ b/proto-public/pbcatalog/v2beta1/workload_deepcopy.gen.go @@ -0,0 +1,90 @@ +// Code generated by protoc-gen-deepcopy. DO NOT EDIT. +package catalogv2beta1 + +import ( + proto "google.golang.org/protobuf/proto" +) + +// DeepCopyInto supports using Workload within kubernetes types, where deepcopy-gen is used. +func (in *Workload) DeepCopyInto(out *Workload) { + p := proto.Clone(in).(*Workload) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Workload. Required by controller-gen. +func (in *Workload) DeepCopy() *Workload { + if in == nil { + return nil + } + out := new(Workload) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new Workload. Required by controller-gen. +func (in *Workload) DeepCopyInterface() interface{} { + return in.DeepCopy() +} + +// DeepCopyInto supports using WorkloadAddress within kubernetes types, where deepcopy-gen is used. +func (in *WorkloadAddress) DeepCopyInto(out *WorkloadAddress) { + p := proto.Clone(in).(*WorkloadAddress) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkloadAddress. Required by controller-gen. +func (in *WorkloadAddress) DeepCopy() *WorkloadAddress { + if in == nil { + return nil + } + out := new(WorkloadAddress) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new WorkloadAddress. Required by controller-gen. +func (in *WorkloadAddress) DeepCopyInterface() interface{} { + return in.DeepCopy() +} + +// DeepCopyInto supports using WorkloadPort within kubernetes types, where deepcopy-gen is used. +func (in *WorkloadPort) DeepCopyInto(out *WorkloadPort) { + p := proto.Clone(in).(*WorkloadPort) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkloadPort. Required by controller-gen. +func (in *WorkloadPort) DeepCopy() *WorkloadPort { + if in == nil { + return nil + } + out := new(WorkloadPort) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new WorkloadPort. Required by controller-gen. +func (in *WorkloadPort) DeepCopyInterface() interface{} { + return in.DeepCopy() +} + +// DeepCopyInto supports using Locality within kubernetes types, where deepcopy-gen is used. +func (in *Locality) DeepCopyInto(out *Locality) { + p := proto.Clone(in).(*Locality) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Locality. Required by controller-gen. +func (in *Locality) DeepCopy() *Locality { + if in == nil { + return nil + } + out := new(Locality) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new Locality. Required by controller-gen. +func (in *Locality) DeepCopyInterface() interface{} { + return in.DeepCopy() +} diff --git a/proto-public/pbcatalog/v2beta1/workload_json.gen.go b/proto-public/pbcatalog/v2beta1/workload_json.gen.go new file mode 100644 index 0000000000..98592bbd45 --- /dev/null +++ b/proto-public/pbcatalog/v2beta1/workload_json.gen.go @@ -0,0 +1,55 @@ +// Code generated by protoc-json-shim. DO NOT EDIT. +package catalogv2beta1 + +import ( + protojson "google.golang.org/protobuf/encoding/protojson" +) + +// MarshalJSON is a custom marshaler for Workload +func (this *Workload) MarshalJSON() ([]byte, error) { + str, err := WorkloadMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for Workload +func (this *Workload) UnmarshalJSON(b []byte) error { + return WorkloadUnmarshaler.Unmarshal(b, this) +} + +// MarshalJSON is a custom marshaler for WorkloadAddress +func (this *WorkloadAddress) MarshalJSON() ([]byte, error) { + str, err := WorkloadMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for WorkloadAddress +func (this *WorkloadAddress) UnmarshalJSON(b []byte) error { + return WorkloadUnmarshaler.Unmarshal(b, this) +} + +// MarshalJSON is a custom marshaler for WorkloadPort +func (this *WorkloadPort) MarshalJSON() ([]byte, error) { + str, err := WorkloadMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for WorkloadPort +func (this *WorkloadPort) UnmarshalJSON(b []byte) error { + return WorkloadUnmarshaler.Unmarshal(b, this) +} + +// MarshalJSON is a custom marshaler for Locality +func (this *Locality) MarshalJSON() ([]byte, error) { + str, err := WorkloadMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for Locality +func (this *Locality) UnmarshalJSON(b []byte) error { + return WorkloadUnmarshaler.Unmarshal(b, this) +} + +var ( + WorkloadMarshaler = &protojson.MarshalOptions{} + WorkloadUnmarshaler = &protojson.UnmarshalOptions{DiscardUnknown: false} +) diff --git a/proto-public/pbconnectca/ca_deepcopy.gen.go b/proto-public/pbconnectca/ca_deepcopy.gen.go new file mode 100644 index 0000000000..5200e4d9ca --- /dev/null +++ b/proto-public/pbconnectca/ca_deepcopy.gen.go @@ -0,0 +1,111 @@ +// Code generated by protoc-gen-deepcopy. DO NOT EDIT. +package pbconnectca + +import ( + proto "google.golang.org/protobuf/proto" +) + +// DeepCopyInto supports using WatchRootsRequest within kubernetes types, where deepcopy-gen is used. +func (in *WatchRootsRequest) DeepCopyInto(out *WatchRootsRequest) { + p := proto.Clone(in).(*WatchRootsRequest) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WatchRootsRequest. Required by controller-gen. +func (in *WatchRootsRequest) DeepCopy() *WatchRootsRequest { + if in == nil { + return nil + } + out := new(WatchRootsRequest) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new WatchRootsRequest. Required by controller-gen. +func (in *WatchRootsRequest) DeepCopyInterface() interface{} { + return in.DeepCopy() +} + +// DeepCopyInto supports using WatchRootsResponse within kubernetes types, where deepcopy-gen is used. +func (in *WatchRootsResponse) DeepCopyInto(out *WatchRootsResponse) { + p := proto.Clone(in).(*WatchRootsResponse) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WatchRootsResponse. Required by controller-gen. +func (in *WatchRootsResponse) DeepCopy() *WatchRootsResponse { + if in == nil { + return nil + } + out := new(WatchRootsResponse) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new WatchRootsResponse. Required by controller-gen. +func (in *WatchRootsResponse) DeepCopyInterface() interface{} { + return in.DeepCopy() +} + +// DeepCopyInto supports using CARoot within kubernetes types, where deepcopy-gen is used. +func (in *CARoot) DeepCopyInto(out *CARoot) { + p := proto.Clone(in).(*CARoot) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CARoot. Required by controller-gen. +func (in *CARoot) DeepCopy() *CARoot { + if in == nil { + return nil + } + out := new(CARoot) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new CARoot. Required by controller-gen. +func (in *CARoot) DeepCopyInterface() interface{} { + return in.DeepCopy() +} + +// DeepCopyInto supports using SignRequest within kubernetes types, where deepcopy-gen is used. +func (in *SignRequest) DeepCopyInto(out *SignRequest) { + p := proto.Clone(in).(*SignRequest) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SignRequest. Required by controller-gen. +func (in *SignRequest) DeepCopy() *SignRequest { + if in == nil { + return nil + } + out := new(SignRequest) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new SignRequest. Required by controller-gen. +func (in *SignRequest) DeepCopyInterface() interface{} { + return in.DeepCopy() +} + +// DeepCopyInto supports using SignResponse within kubernetes types, where deepcopy-gen is used. +func (in *SignResponse) DeepCopyInto(out *SignResponse) { + p := proto.Clone(in).(*SignResponse) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SignResponse. Required by controller-gen. +func (in *SignResponse) DeepCopy() *SignResponse { + if in == nil { + return nil + } + out := new(SignResponse) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new SignResponse. Required by controller-gen. +func (in *SignResponse) DeepCopyInterface() interface{} { + return in.DeepCopy() +} diff --git a/proto-public/pbconnectca/ca_json.gen.go b/proto-public/pbconnectca/ca_json.gen.go new file mode 100644 index 0000000000..92ee77db53 --- /dev/null +++ b/proto-public/pbconnectca/ca_json.gen.go @@ -0,0 +1,66 @@ +// Code generated by protoc-json-shim. DO NOT EDIT. +package pbconnectca + +import ( + protojson "google.golang.org/protobuf/encoding/protojson" +) + +// MarshalJSON is a custom marshaler for WatchRootsRequest +func (this *WatchRootsRequest) MarshalJSON() ([]byte, error) { + str, err := CaMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for WatchRootsRequest +func (this *WatchRootsRequest) UnmarshalJSON(b []byte) error { + return CaUnmarshaler.Unmarshal(b, this) +} + +// MarshalJSON is a custom marshaler for WatchRootsResponse +func (this *WatchRootsResponse) MarshalJSON() ([]byte, error) { + str, err := CaMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for WatchRootsResponse +func (this *WatchRootsResponse) UnmarshalJSON(b []byte) error { + return CaUnmarshaler.Unmarshal(b, this) +} + +// MarshalJSON is a custom marshaler for CARoot +func (this *CARoot) MarshalJSON() ([]byte, error) { + str, err := CaMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for CARoot +func (this *CARoot) UnmarshalJSON(b []byte) error { + return CaUnmarshaler.Unmarshal(b, this) +} + +// MarshalJSON is a custom marshaler for SignRequest +func (this *SignRequest) MarshalJSON() ([]byte, error) { + str, err := CaMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for SignRequest +func (this *SignRequest) UnmarshalJSON(b []byte) error { + return CaUnmarshaler.Unmarshal(b, this) +} + +// MarshalJSON is a custom marshaler for SignResponse +func (this *SignResponse) MarshalJSON() ([]byte, error) { + str, err := CaMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for SignResponse +func (this *SignResponse) UnmarshalJSON(b []byte) error { + return CaUnmarshaler.Unmarshal(b, this) +} + +var ( + CaMarshaler = &protojson.MarshalOptions{} + CaUnmarshaler = &protojson.UnmarshalOptions{DiscardUnknown: false} +) diff --git a/proto-public/pbdataplane/dataplane_deepcopy.gen.go b/proto-public/pbdataplane/dataplane_deepcopy.gen.go new file mode 100644 index 0000000000..1d787b7072 --- /dev/null +++ b/proto-public/pbdataplane/dataplane_deepcopy.gen.go @@ -0,0 +1,111 @@ +// Code generated by protoc-gen-deepcopy. DO NOT EDIT. +package pbdataplane + +import ( + proto "google.golang.org/protobuf/proto" +) + +// DeepCopyInto supports using GetSupportedDataplaneFeaturesRequest within kubernetes types, where deepcopy-gen is used. +func (in *GetSupportedDataplaneFeaturesRequest) DeepCopyInto(out *GetSupportedDataplaneFeaturesRequest) { + p := proto.Clone(in).(*GetSupportedDataplaneFeaturesRequest) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GetSupportedDataplaneFeaturesRequest. Required by controller-gen. +func (in *GetSupportedDataplaneFeaturesRequest) DeepCopy() *GetSupportedDataplaneFeaturesRequest { + if in == nil { + return nil + } + out := new(GetSupportedDataplaneFeaturesRequest) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new GetSupportedDataplaneFeaturesRequest. Required by controller-gen. +func (in *GetSupportedDataplaneFeaturesRequest) DeepCopyInterface() interface{} { + return in.DeepCopy() +} + +// DeepCopyInto supports using DataplaneFeatureSupport within kubernetes types, where deepcopy-gen is used. +func (in *DataplaneFeatureSupport) DeepCopyInto(out *DataplaneFeatureSupport) { + p := proto.Clone(in).(*DataplaneFeatureSupport) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DataplaneFeatureSupport. Required by controller-gen. +func (in *DataplaneFeatureSupport) DeepCopy() *DataplaneFeatureSupport { + if in == nil { + return nil + } + out := new(DataplaneFeatureSupport) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new DataplaneFeatureSupport. Required by controller-gen. +func (in *DataplaneFeatureSupport) DeepCopyInterface() interface{} { + return in.DeepCopy() +} + +// DeepCopyInto supports using GetSupportedDataplaneFeaturesResponse within kubernetes types, where deepcopy-gen is used. +func (in *GetSupportedDataplaneFeaturesResponse) DeepCopyInto(out *GetSupportedDataplaneFeaturesResponse) { + p := proto.Clone(in).(*GetSupportedDataplaneFeaturesResponse) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GetSupportedDataplaneFeaturesResponse. Required by controller-gen. +func (in *GetSupportedDataplaneFeaturesResponse) DeepCopy() *GetSupportedDataplaneFeaturesResponse { + if in == nil { + return nil + } + out := new(GetSupportedDataplaneFeaturesResponse) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new GetSupportedDataplaneFeaturesResponse. Required by controller-gen. +func (in *GetSupportedDataplaneFeaturesResponse) DeepCopyInterface() interface{} { + return in.DeepCopy() +} + +// DeepCopyInto supports using GetEnvoyBootstrapParamsRequest within kubernetes types, where deepcopy-gen is used. +func (in *GetEnvoyBootstrapParamsRequest) DeepCopyInto(out *GetEnvoyBootstrapParamsRequest) { + p := proto.Clone(in).(*GetEnvoyBootstrapParamsRequest) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GetEnvoyBootstrapParamsRequest. Required by controller-gen. +func (in *GetEnvoyBootstrapParamsRequest) DeepCopy() *GetEnvoyBootstrapParamsRequest { + if in == nil { + return nil + } + out := new(GetEnvoyBootstrapParamsRequest) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new GetEnvoyBootstrapParamsRequest. Required by controller-gen. +func (in *GetEnvoyBootstrapParamsRequest) DeepCopyInterface() interface{} { + return in.DeepCopy() +} + +// DeepCopyInto supports using GetEnvoyBootstrapParamsResponse within kubernetes types, where deepcopy-gen is used. +func (in *GetEnvoyBootstrapParamsResponse) DeepCopyInto(out *GetEnvoyBootstrapParamsResponse) { + p := proto.Clone(in).(*GetEnvoyBootstrapParamsResponse) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GetEnvoyBootstrapParamsResponse. Required by controller-gen. +func (in *GetEnvoyBootstrapParamsResponse) DeepCopy() *GetEnvoyBootstrapParamsResponse { + if in == nil { + return nil + } + out := new(GetEnvoyBootstrapParamsResponse) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new GetEnvoyBootstrapParamsResponse. Required by controller-gen. +func (in *GetEnvoyBootstrapParamsResponse) DeepCopyInterface() interface{} { + return in.DeepCopy() +} diff --git a/proto-public/pbdataplane/dataplane_json.gen.go b/proto-public/pbdataplane/dataplane_json.gen.go new file mode 100644 index 0000000000..55c54e7771 --- /dev/null +++ b/proto-public/pbdataplane/dataplane_json.gen.go @@ -0,0 +1,66 @@ +// Code generated by protoc-json-shim. DO NOT EDIT. +package pbdataplane + +import ( + protojson "google.golang.org/protobuf/encoding/protojson" +) + +// MarshalJSON is a custom marshaler for GetSupportedDataplaneFeaturesRequest +func (this *GetSupportedDataplaneFeaturesRequest) MarshalJSON() ([]byte, error) { + str, err := DataplaneMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for GetSupportedDataplaneFeaturesRequest +func (this *GetSupportedDataplaneFeaturesRequest) UnmarshalJSON(b []byte) error { + return DataplaneUnmarshaler.Unmarshal(b, this) +} + +// MarshalJSON is a custom marshaler for DataplaneFeatureSupport +func (this *DataplaneFeatureSupport) MarshalJSON() ([]byte, error) { + str, err := DataplaneMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for DataplaneFeatureSupport +func (this *DataplaneFeatureSupport) UnmarshalJSON(b []byte) error { + return DataplaneUnmarshaler.Unmarshal(b, this) +} + +// MarshalJSON is a custom marshaler for GetSupportedDataplaneFeaturesResponse +func (this *GetSupportedDataplaneFeaturesResponse) MarshalJSON() ([]byte, error) { + str, err := DataplaneMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for GetSupportedDataplaneFeaturesResponse +func (this *GetSupportedDataplaneFeaturesResponse) UnmarshalJSON(b []byte) error { + return DataplaneUnmarshaler.Unmarshal(b, this) +} + +// MarshalJSON is a custom marshaler for GetEnvoyBootstrapParamsRequest +func (this *GetEnvoyBootstrapParamsRequest) MarshalJSON() ([]byte, error) { + str, err := DataplaneMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for GetEnvoyBootstrapParamsRequest +func (this *GetEnvoyBootstrapParamsRequest) UnmarshalJSON(b []byte) error { + return DataplaneUnmarshaler.Unmarshal(b, this) +} + +// MarshalJSON is a custom marshaler for GetEnvoyBootstrapParamsResponse +func (this *GetEnvoyBootstrapParamsResponse) MarshalJSON() ([]byte, error) { + str, err := DataplaneMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for GetEnvoyBootstrapParamsResponse +func (this *GetEnvoyBootstrapParamsResponse) UnmarshalJSON(b []byte) error { + return DataplaneUnmarshaler.Unmarshal(b, this) +} + +var ( + DataplaneMarshaler = &protojson.MarshalOptions{} + DataplaneUnmarshaler = &protojson.UnmarshalOptions{DiscardUnknown: false} +) diff --git a/proto-public/pbdns/dns_deepcopy.gen.go b/proto-public/pbdns/dns_deepcopy.gen.go new file mode 100644 index 0000000000..c2975e2d7f --- /dev/null +++ b/proto-public/pbdns/dns_deepcopy.gen.go @@ -0,0 +1,48 @@ +// Code generated by protoc-gen-deepcopy. DO NOT EDIT. +package pbdns + +import ( + proto "google.golang.org/protobuf/proto" +) + +// DeepCopyInto supports using QueryRequest within kubernetes types, where deepcopy-gen is used. +func (in *QueryRequest) DeepCopyInto(out *QueryRequest) { + p := proto.Clone(in).(*QueryRequest) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new QueryRequest. Required by controller-gen. +func (in *QueryRequest) DeepCopy() *QueryRequest { + if in == nil { + return nil + } + out := new(QueryRequest) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new QueryRequest. Required by controller-gen. +func (in *QueryRequest) DeepCopyInterface() interface{} { + return in.DeepCopy() +} + +// DeepCopyInto supports using QueryResponse within kubernetes types, where deepcopy-gen is used. +func (in *QueryResponse) DeepCopyInto(out *QueryResponse) { + p := proto.Clone(in).(*QueryResponse) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new QueryResponse. Required by controller-gen. +func (in *QueryResponse) DeepCopy() *QueryResponse { + if in == nil { + return nil + } + out := new(QueryResponse) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new QueryResponse. Required by controller-gen. +func (in *QueryResponse) DeepCopyInterface() interface{} { + return in.DeepCopy() +} diff --git a/proto-public/pbdns/dns_json.gen.go b/proto-public/pbdns/dns_json.gen.go new file mode 100644 index 0000000000..ac9789a7cb --- /dev/null +++ b/proto-public/pbdns/dns_json.gen.go @@ -0,0 +1,33 @@ +// Code generated by protoc-json-shim. DO NOT EDIT. +package pbdns + +import ( + protojson "google.golang.org/protobuf/encoding/protojson" +) + +// MarshalJSON is a custom marshaler for QueryRequest +func (this *QueryRequest) MarshalJSON() ([]byte, error) { + str, err := DnsMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for QueryRequest +func (this *QueryRequest) UnmarshalJSON(b []byte) error { + return DnsUnmarshaler.Unmarshal(b, this) +} + +// MarshalJSON is a custom marshaler for QueryResponse +func (this *QueryResponse) MarshalJSON() ([]byte, error) { + str, err := DnsMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for QueryResponse +func (this *QueryResponse) UnmarshalJSON(b []byte) error { + return DnsUnmarshaler.Unmarshal(b, this) +} + +var ( + DnsMarshaler = &protojson.MarshalOptions{} + DnsUnmarshaler = &protojson.UnmarshalOptions{DiscardUnknown: false} +) diff --git a/proto-public/pbmesh/v2beta1/common.pb.go b/proto-public/pbmesh/v2beta1/common.pb.go index 113434b29f..c960d7c923 100644 --- a/proto-public/pbmesh/v2beta1/common.pb.go +++ b/proto-public/pbmesh/v2beta1/common.pb.go @@ -30,12 +30,11 @@ type ParentReference struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // For east/west configuration, this should point to a pbcatalog.Service. - // For north/south it should point to a gateway (TBD) + // For east/west configuration, this should point to a Service. + // For north/south it should point to a Gateway. Ref *pbresource.Reference `protobuf:"bytes,1,opt,name=ref,proto3" json:"ref,omitempty"` // For east/west this is the name of the Consul Service port to direct traffic to // or empty to imply all. - // // For north/south this is TBD. Port string `protobuf:"bytes,2,opt,name=port,proto3" json:"port,omitempty"` } @@ -91,7 +90,7 @@ type BackendReference struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // For east/west configuration, this should point to a pbcatalog.Service. + // For east/west configuration, this should point to a Service. Ref *pbresource.Reference `protobuf:"bytes,1,opt,name=ref,proto3" json:"ref,omitempty"` // For east/west this is the name of the Consul Service port to direct traffic to // or empty to imply using the same value as the parent ref. diff --git a/proto-public/pbmesh/v2beta1/common.proto b/proto-public/pbmesh/v2beta1/common.proto index fa61867c5e..02ab5de340 100644 --- a/proto-public/pbmesh/v2beta1/common.proto +++ b/proto-public/pbmesh/v2beta1/common.proto @@ -9,19 +9,18 @@ import "pbresource/resource.proto"; // NOTE: roughly equivalent to structs.ResourceReference message ParentReference { - // For east/west configuration, this should point to a pbcatalog.Service. - // For north/south it should point to a gateway (TBD) + // For east/west configuration, this should point to a Service. + // For north/south it should point to a Gateway. hashicorp.consul.resource.Reference ref = 1; // For east/west this is the name of the Consul Service port to direct traffic to // or empty to imply all. - // // For north/south this is TBD. string port = 2; } message BackendReference { - // For east/west configuration, this should point to a pbcatalog.Service. + // For east/west configuration, this should point to a Service. hashicorp.consul.resource.Reference ref = 1; // For east/west this is the name of the Consul Service port to direct traffic to diff --git a/proto-public/pbmesh/v2beta1/common_deepcopy.gen.go b/proto-public/pbmesh/v2beta1/common_deepcopy.gen.go new file mode 100644 index 0000000000..dae015adf7 --- /dev/null +++ b/proto-public/pbmesh/v2beta1/common_deepcopy.gen.go @@ -0,0 +1,48 @@ +// Code generated by protoc-gen-deepcopy. DO NOT EDIT. +package meshv2beta1 + +import ( + proto "google.golang.org/protobuf/proto" +) + +// DeepCopyInto supports using ParentReference within kubernetes types, where deepcopy-gen is used. +func (in *ParentReference) DeepCopyInto(out *ParentReference) { + p := proto.Clone(in).(*ParentReference) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ParentReference. Required by controller-gen. +func (in *ParentReference) DeepCopy() *ParentReference { + if in == nil { + return nil + } + out := new(ParentReference) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new ParentReference. Required by controller-gen. +func (in *ParentReference) DeepCopyInterface() interface{} { + return in.DeepCopy() +} + +// DeepCopyInto supports using BackendReference within kubernetes types, where deepcopy-gen is used. +func (in *BackendReference) DeepCopyInto(out *BackendReference) { + p := proto.Clone(in).(*BackendReference) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BackendReference. Required by controller-gen. +func (in *BackendReference) DeepCopy() *BackendReference { + if in == nil { + return nil + } + out := new(BackendReference) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new BackendReference. Required by controller-gen. +func (in *BackendReference) DeepCopyInterface() interface{} { + return in.DeepCopy() +} diff --git a/proto-public/pbmesh/v2beta1/common_json.gen.go b/proto-public/pbmesh/v2beta1/common_json.gen.go new file mode 100644 index 0000000000..f5bc4a9627 --- /dev/null +++ b/proto-public/pbmesh/v2beta1/common_json.gen.go @@ -0,0 +1,33 @@ +// Code generated by protoc-json-shim. DO NOT EDIT. +package meshv2beta1 + +import ( + protojson "google.golang.org/protobuf/encoding/protojson" +) + +// MarshalJSON is a custom marshaler for ParentReference +func (this *ParentReference) MarshalJSON() ([]byte, error) { + str, err := CommonMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for ParentReference +func (this *ParentReference) UnmarshalJSON(b []byte) error { + return CommonUnmarshaler.Unmarshal(b, this) +} + +// MarshalJSON is a custom marshaler for BackendReference +func (this *BackendReference) MarshalJSON() ([]byte, error) { + str, err := CommonMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for BackendReference +func (this *BackendReference) UnmarshalJSON(b []byte) error { + return CommonUnmarshaler.Unmarshal(b, this) +} + +var ( + CommonMarshaler = &protojson.MarshalOptions{} + CommonUnmarshaler = &protojson.UnmarshalOptions{DiscardUnknown: false} +) diff --git a/proto-public/pbmesh/v2beta1/computed_explicit_destinations_deepcopy.gen.go b/proto-public/pbmesh/v2beta1/computed_explicit_destinations_deepcopy.gen.go new file mode 100644 index 0000000000..3e237e2ac0 --- /dev/null +++ b/proto-public/pbmesh/v2beta1/computed_explicit_destinations_deepcopy.gen.go @@ -0,0 +1,27 @@ +// Code generated by protoc-gen-deepcopy. DO NOT EDIT. +package meshv2beta1 + +import ( + proto "google.golang.org/protobuf/proto" +) + +// DeepCopyInto supports using ComputedExplicitDestinations within kubernetes types, where deepcopy-gen is used. +func (in *ComputedExplicitDestinations) DeepCopyInto(out *ComputedExplicitDestinations) { + p := proto.Clone(in).(*ComputedExplicitDestinations) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ComputedExplicitDestinations. Required by controller-gen. +func (in *ComputedExplicitDestinations) DeepCopy() *ComputedExplicitDestinations { + if in == nil { + return nil + } + out := new(ComputedExplicitDestinations) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new ComputedExplicitDestinations. Required by controller-gen. +func (in *ComputedExplicitDestinations) DeepCopyInterface() interface{} { + return in.DeepCopy() +} diff --git a/proto-public/pbmesh/v2beta1/computed_explicit_destinations_json.gen.go b/proto-public/pbmesh/v2beta1/computed_explicit_destinations_json.gen.go new file mode 100644 index 0000000000..d483944a11 --- /dev/null +++ b/proto-public/pbmesh/v2beta1/computed_explicit_destinations_json.gen.go @@ -0,0 +1,22 @@ +// Code generated by protoc-json-shim. DO NOT EDIT. +package meshv2beta1 + +import ( + protojson "google.golang.org/protobuf/encoding/protojson" +) + +// MarshalJSON is a custom marshaler for ComputedExplicitDestinations +func (this *ComputedExplicitDestinations) MarshalJSON() ([]byte, error) { + str, err := ComputedExplicitDestinationsMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for ComputedExplicitDestinations +func (this *ComputedExplicitDestinations) UnmarshalJSON(b []byte) error { + return ComputedExplicitDestinationsUnmarshaler.Unmarshal(b, this) +} + +var ( + ComputedExplicitDestinationsMarshaler = &protojson.MarshalOptions{} + ComputedExplicitDestinationsUnmarshaler = &protojson.UnmarshalOptions{DiscardUnknown: false} +) diff --git a/proto-public/pbmesh/v2beta1/computed_proxy_configuration_deepcopy.gen.go b/proto-public/pbmesh/v2beta1/computed_proxy_configuration_deepcopy.gen.go new file mode 100644 index 0000000000..c8d6081222 --- /dev/null +++ b/proto-public/pbmesh/v2beta1/computed_proxy_configuration_deepcopy.gen.go @@ -0,0 +1,27 @@ +// Code generated by protoc-gen-deepcopy. DO NOT EDIT. +package meshv2beta1 + +import ( + proto "google.golang.org/protobuf/proto" +) + +// DeepCopyInto supports using ComputedProxyConfiguration within kubernetes types, where deepcopy-gen is used. +func (in *ComputedProxyConfiguration) DeepCopyInto(out *ComputedProxyConfiguration) { + p := proto.Clone(in).(*ComputedProxyConfiguration) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ComputedProxyConfiguration. Required by controller-gen. +func (in *ComputedProxyConfiguration) DeepCopy() *ComputedProxyConfiguration { + if in == nil { + return nil + } + out := new(ComputedProxyConfiguration) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new ComputedProxyConfiguration. Required by controller-gen. +func (in *ComputedProxyConfiguration) DeepCopyInterface() interface{} { + return in.DeepCopy() +} diff --git a/proto-public/pbmesh/v2beta1/computed_proxy_configuration_json.gen.go b/proto-public/pbmesh/v2beta1/computed_proxy_configuration_json.gen.go new file mode 100644 index 0000000000..614a75c365 --- /dev/null +++ b/proto-public/pbmesh/v2beta1/computed_proxy_configuration_json.gen.go @@ -0,0 +1,22 @@ +// Code generated by protoc-json-shim. DO NOT EDIT. +package meshv2beta1 + +import ( + protojson "google.golang.org/protobuf/encoding/protojson" +) + +// MarshalJSON is a custom marshaler for ComputedProxyConfiguration +func (this *ComputedProxyConfiguration) MarshalJSON() ([]byte, error) { + str, err := ComputedProxyConfigurationMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for ComputedProxyConfiguration +func (this *ComputedProxyConfiguration) UnmarshalJSON(b []byte) error { + return ComputedProxyConfigurationUnmarshaler.Unmarshal(b, this) +} + +var ( + ComputedProxyConfigurationMarshaler = &protojson.MarshalOptions{} + ComputedProxyConfigurationUnmarshaler = &protojson.UnmarshalOptions{DiscardUnknown: false} +) diff --git a/proto-public/pbmesh/v2beta1/computed_routes.pb.go b/proto-public/pbmesh/v2beta1/computed_routes.pb.go index 4e01b3a80d..612da01c24 100644 --- a/proto-public/pbmesh/v2beta1/computed_routes.pb.go +++ b/proto-public/pbmesh/v2beta1/computed_routes.pb.go @@ -25,6 +25,8 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) +// +kubebuilder:validation:Enum=BACKEND_TARGET_DETAILS_TYPE_UNSPECIFIED;BACKEND_TARGET_DETAILS_TYPE_DIRECT;BACKEND_TARGET_DETAILS_TYPE_INDIRECT +// +kubebuilder:validation:Type=string type BackendTargetDetailsType int32 const ( @@ -754,8 +756,7 @@ func (x *ComputedTCPRouteRule) GetBackendRefs() []*ComputedTCPBackendRef { return nil } -// TODO: look into smuggling the target through a different typeURL, or just -// skip in favor of letting the caller do their own lookups? +// TODO: look into smuggling the target through a different typeURL, or just skip in favor of letting the caller do their own lookups? type ComputedTCPBackendRef struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -1004,7 +1005,7 @@ type ComputedFailoverDestination struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // This must be a Service. + // BackendTarget must be a Service. BackendTarget string `protobuf:"bytes,1,opt,name=backend_target,json=backendTarget,proto3" json:"backend_target,omitempty"` } diff --git a/proto-public/pbmesh/v2beta1/computed_routes.proto b/proto-public/pbmesh/v2beta1/computed_routes.proto index 09ebb3a31f..f9243bff4b 100644 --- a/proto-public/pbmesh/v2beta1/computed_routes.proto +++ b/proto-public/pbmesh/v2beta1/computed_routes.proto @@ -106,8 +106,7 @@ message ComputedTCPRouteRule { repeated ComputedTCPBackendRef backend_refs = 1; } -// TODO: look into smuggling the target through a different typeURL, or just -// skip in favor of letting the caller do their own lookups? +// TODO: look into smuggling the target through a different typeURL, or just skip in favor of letting the caller do their own lookups? message ComputedTCPBackendRef { // BackendTarget indicates which key in the targets map provides // the rest of the configuration. @@ -143,6 +142,8 @@ message BackendTargetDetails { repeated hashicorp.consul.resource.Reference identity_refs = 23; } +// +kubebuilder:validation:Enum=BACKEND_TARGET_DETAILS_TYPE_UNSPECIFIED;BACKEND_TARGET_DETAILS_TYPE_DIRECT;BACKEND_TARGET_DETAILS_TYPE_INDIRECT +// +kubebuilder:validation:Type=string enum BackendTargetDetailsType { BACKEND_TARGET_DETAILS_TYPE_UNSPECIFIED = 0; @@ -166,6 +167,6 @@ message ComputedFailoverConfig { } message ComputedFailoverDestination { - // This must be a Service. + // BackendTarget must be a Service. string backend_target = 1; } diff --git a/proto-public/pbmesh/v2beta1/computed_routes_deepcopy.gen.go b/proto-public/pbmesh/v2beta1/computed_routes_deepcopy.gen.go new file mode 100644 index 0000000000..01e077aacf --- /dev/null +++ b/proto-public/pbmesh/v2beta1/computed_routes_deepcopy.gen.go @@ -0,0 +1,300 @@ +// Code generated by protoc-gen-deepcopy. DO NOT EDIT. +package meshv2beta1 + +import ( + proto "google.golang.org/protobuf/proto" +) + +// DeepCopyInto supports using ComputedRoutes within kubernetes types, where deepcopy-gen is used. +func (in *ComputedRoutes) DeepCopyInto(out *ComputedRoutes) { + p := proto.Clone(in).(*ComputedRoutes) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ComputedRoutes. Required by controller-gen. +func (in *ComputedRoutes) DeepCopy() *ComputedRoutes { + if in == nil { + return nil + } + out := new(ComputedRoutes) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new ComputedRoutes. Required by controller-gen. +func (in *ComputedRoutes) DeepCopyInterface() interface{} { + return in.DeepCopy() +} + +// DeepCopyInto supports using ComputedPortRoutes within kubernetes types, where deepcopy-gen is used. +func (in *ComputedPortRoutes) DeepCopyInto(out *ComputedPortRoutes) { + p := proto.Clone(in).(*ComputedPortRoutes) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ComputedPortRoutes. Required by controller-gen. +func (in *ComputedPortRoutes) DeepCopy() *ComputedPortRoutes { + if in == nil { + return nil + } + out := new(ComputedPortRoutes) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new ComputedPortRoutes. Required by controller-gen. +func (in *ComputedPortRoutes) DeepCopyInterface() interface{} { + return in.DeepCopy() +} + +// DeepCopyInto supports using ComputedHTTPRoute within kubernetes types, where deepcopy-gen is used. +func (in *ComputedHTTPRoute) DeepCopyInto(out *ComputedHTTPRoute) { + p := proto.Clone(in).(*ComputedHTTPRoute) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ComputedHTTPRoute. Required by controller-gen. +func (in *ComputedHTTPRoute) DeepCopy() *ComputedHTTPRoute { + if in == nil { + return nil + } + out := new(ComputedHTTPRoute) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new ComputedHTTPRoute. Required by controller-gen. +func (in *ComputedHTTPRoute) DeepCopyInterface() interface{} { + return in.DeepCopy() +} + +// DeepCopyInto supports using ComputedHTTPRouteRule within kubernetes types, where deepcopy-gen is used. +func (in *ComputedHTTPRouteRule) DeepCopyInto(out *ComputedHTTPRouteRule) { + p := proto.Clone(in).(*ComputedHTTPRouteRule) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ComputedHTTPRouteRule. Required by controller-gen. +func (in *ComputedHTTPRouteRule) DeepCopy() *ComputedHTTPRouteRule { + if in == nil { + return nil + } + out := new(ComputedHTTPRouteRule) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new ComputedHTTPRouteRule. Required by controller-gen. +func (in *ComputedHTTPRouteRule) DeepCopyInterface() interface{} { + return in.DeepCopy() +} + +// DeepCopyInto supports using ComputedHTTPBackendRef within kubernetes types, where deepcopy-gen is used. +func (in *ComputedHTTPBackendRef) DeepCopyInto(out *ComputedHTTPBackendRef) { + p := proto.Clone(in).(*ComputedHTTPBackendRef) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ComputedHTTPBackendRef. Required by controller-gen. +func (in *ComputedHTTPBackendRef) DeepCopy() *ComputedHTTPBackendRef { + if in == nil { + return nil + } + out := new(ComputedHTTPBackendRef) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new ComputedHTTPBackendRef. Required by controller-gen. +func (in *ComputedHTTPBackendRef) DeepCopyInterface() interface{} { + return in.DeepCopy() +} + +// DeepCopyInto supports using ComputedGRPCRoute within kubernetes types, where deepcopy-gen is used. +func (in *ComputedGRPCRoute) DeepCopyInto(out *ComputedGRPCRoute) { + p := proto.Clone(in).(*ComputedGRPCRoute) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ComputedGRPCRoute. Required by controller-gen. +func (in *ComputedGRPCRoute) DeepCopy() *ComputedGRPCRoute { + if in == nil { + return nil + } + out := new(ComputedGRPCRoute) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new ComputedGRPCRoute. Required by controller-gen. +func (in *ComputedGRPCRoute) DeepCopyInterface() interface{} { + return in.DeepCopy() +} + +// DeepCopyInto supports using ComputedGRPCRouteRule within kubernetes types, where deepcopy-gen is used. +func (in *ComputedGRPCRouteRule) DeepCopyInto(out *ComputedGRPCRouteRule) { + p := proto.Clone(in).(*ComputedGRPCRouteRule) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ComputedGRPCRouteRule. Required by controller-gen. +func (in *ComputedGRPCRouteRule) DeepCopy() *ComputedGRPCRouteRule { + if in == nil { + return nil + } + out := new(ComputedGRPCRouteRule) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new ComputedGRPCRouteRule. Required by controller-gen. +func (in *ComputedGRPCRouteRule) DeepCopyInterface() interface{} { + return in.DeepCopy() +} + +// DeepCopyInto supports using ComputedGRPCBackendRef within kubernetes types, where deepcopy-gen is used. +func (in *ComputedGRPCBackendRef) DeepCopyInto(out *ComputedGRPCBackendRef) { + p := proto.Clone(in).(*ComputedGRPCBackendRef) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ComputedGRPCBackendRef. Required by controller-gen. +func (in *ComputedGRPCBackendRef) DeepCopy() *ComputedGRPCBackendRef { + if in == nil { + return nil + } + out := new(ComputedGRPCBackendRef) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new ComputedGRPCBackendRef. Required by controller-gen. +func (in *ComputedGRPCBackendRef) DeepCopyInterface() interface{} { + return in.DeepCopy() +} + +// DeepCopyInto supports using ComputedTCPRoute within kubernetes types, where deepcopy-gen is used. +func (in *ComputedTCPRoute) DeepCopyInto(out *ComputedTCPRoute) { + p := proto.Clone(in).(*ComputedTCPRoute) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ComputedTCPRoute. Required by controller-gen. +func (in *ComputedTCPRoute) DeepCopy() *ComputedTCPRoute { + if in == nil { + return nil + } + out := new(ComputedTCPRoute) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new ComputedTCPRoute. Required by controller-gen. +func (in *ComputedTCPRoute) DeepCopyInterface() interface{} { + return in.DeepCopy() +} + +// DeepCopyInto supports using ComputedTCPRouteRule within kubernetes types, where deepcopy-gen is used. +func (in *ComputedTCPRouteRule) DeepCopyInto(out *ComputedTCPRouteRule) { + p := proto.Clone(in).(*ComputedTCPRouteRule) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ComputedTCPRouteRule. Required by controller-gen. +func (in *ComputedTCPRouteRule) DeepCopy() *ComputedTCPRouteRule { + if in == nil { + return nil + } + out := new(ComputedTCPRouteRule) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new ComputedTCPRouteRule. Required by controller-gen. +func (in *ComputedTCPRouteRule) DeepCopyInterface() interface{} { + return in.DeepCopy() +} + +// DeepCopyInto supports using ComputedTCPBackendRef within kubernetes types, where deepcopy-gen is used. +func (in *ComputedTCPBackendRef) DeepCopyInto(out *ComputedTCPBackendRef) { + p := proto.Clone(in).(*ComputedTCPBackendRef) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ComputedTCPBackendRef. Required by controller-gen. +func (in *ComputedTCPBackendRef) DeepCopy() *ComputedTCPBackendRef { + if in == nil { + return nil + } + out := new(ComputedTCPBackendRef) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new ComputedTCPBackendRef. Required by controller-gen. +func (in *ComputedTCPBackendRef) DeepCopyInterface() interface{} { + return in.DeepCopy() +} + +// DeepCopyInto supports using BackendTargetDetails within kubernetes types, where deepcopy-gen is used. +func (in *BackendTargetDetails) DeepCopyInto(out *BackendTargetDetails) { + p := proto.Clone(in).(*BackendTargetDetails) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BackendTargetDetails. Required by controller-gen. +func (in *BackendTargetDetails) DeepCopy() *BackendTargetDetails { + if in == nil { + return nil + } + out := new(BackendTargetDetails) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new BackendTargetDetails. Required by controller-gen. +func (in *BackendTargetDetails) DeepCopyInterface() interface{} { + return in.DeepCopy() +} + +// DeepCopyInto supports using ComputedFailoverConfig within kubernetes types, where deepcopy-gen is used. +func (in *ComputedFailoverConfig) DeepCopyInto(out *ComputedFailoverConfig) { + p := proto.Clone(in).(*ComputedFailoverConfig) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ComputedFailoverConfig. Required by controller-gen. +func (in *ComputedFailoverConfig) DeepCopy() *ComputedFailoverConfig { + if in == nil { + return nil + } + out := new(ComputedFailoverConfig) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new ComputedFailoverConfig. Required by controller-gen. +func (in *ComputedFailoverConfig) DeepCopyInterface() interface{} { + return in.DeepCopy() +} + +// DeepCopyInto supports using ComputedFailoverDestination within kubernetes types, where deepcopy-gen is used. +func (in *ComputedFailoverDestination) DeepCopyInto(out *ComputedFailoverDestination) { + p := proto.Clone(in).(*ComputedFailoverDestination) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ComputedFailoverDestination. Required by controller-gen. +func (in *ComputedFailoverDestination) DeepCopy() *ComputedFailoverDestination { + if in == nil { + return nil + } + out := new(ComputedFailoverDestination) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new ComputedFailoverDestination. Required by controller-gen. +func (in *ComputedFailoverDestination) DeepCopyInterface() interface{} { + return in.DeepCopy() +} diff --git a/proto-public/pbmesh/v2beta1/computed_routes_json.gen.go b/proto-public/pbmesh/v2beta1/computed_routes_json.gen.go new file mode 100644 index 0000000000..e1a60cf422 --- /dev/null +++ b/proto-public/pbmesh/v2beta1/computed_routes_json.gen.go @@ -0,0 +1,165 @@ +// Code generated by protoc-json-shim. DO NOT EDIT. +package meshv2beta1 + +import ( + protojson "google.golang.org/protobuf/encoding/protojson" +) + +// MarshalJSON is a custom marshaler for ComputedRoutes +func (this *ComputedRoutes) MarshalJSON() ([]byte, error) { + str, err := ComputedRoutesMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for ComputedRoutes +func (this *ComputedRoutes) UnmarshalJSON(b []byte) error { + return ComputedRoutesUnmarshaler.Unmarshal(b, this) +} + +// MarshalJSON is a custom marshaler for ComputedPortRoutes +func (this *ComputedPortRoutes) MarshalJSON() ([]byte, error) { + str, err := ComputedRoutesMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for ComputedPortRoutes +func (this *ComputedPortRoutes) UnmarshalJSON(b []byte) error { + return ComputedRoutesUnmarshaler.Unmarshal(b, this) +} + +// MarshalJSON is a custom marshaler for ComputedHTTPRoute +func (this *ComputedHTTPRoute) MarshalJSON() ([]byte, error) { + str, err := ComputedRoutesMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for ComputedHTTPRoute +func (this *ComputedHTTPRoute) UnmarshalJSON(b []byte) error { + return ComputedRoutesUnmarshaler.Unmarshal(b, this) +} + +// MarshalJSON is a custom marshaler for ComputedHTTPRouteRule +func (this *ComputedHTTPRouteRule) MarshalJSON() ([]byte, error) { + str, err := ComputedRoutesMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for ComputedHTTPRouteRule +func (this *ComputedHTTPRouteRule) UnmarshalJSON(b []byte) error { + return ComputedRoutesUnmarshaler.Unmarshal(b, this) +} + +// MarshalJSON is a custom marshaler for ComputedHTTPBackendRef +func (this *ComputedHTTPBackendRef) MarshalJSON() ([]byte, error) { + str, err := ComputedRoutesMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for ComputedHTTPBackendRef +func (this *ComputedHTTPBackendRef) UnmarshalJSON(b []byte) error { + return ComputedRoutesUnmarshaler.Unmarshal(b, this) +} + +// MarshalJSON is a custom marshaler for ComputedGRPCRoute +func (this *ComputedGRPCRoute) MarshalJSON() ([]byte, error) { + str, err := ComputedRoutesMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for ComputedGRPCRoute +func (this *ComputedGRPCRoute) UnmarshalJSON(b []byte) error { + return ComputedRoutesUnmarshaler.Unmarshal(b, this) +} + +// MarshalJSON is a custom marshaler for ComputedGRPCRouteRule +func (this *ComputedGRPCRouteRule) MarshalJSON() ([]byte, error) { + str, err := ComputedRoutesMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for ComputedGRPCRouteRule +func (this *ComputedGRPCRouteRule) UnmarshalJSON(b []byte) error { + return ComputedRoutesUnmarshaler.Unmarshal(b, this) +} + +// MarshalJSON is a custom marshaler for ComputedGRPCBackendRef +func (this *ComputedGRPCBackendRef) MarshalJSON() ([]byte, error) { + str, err := ComputedRoutesMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for ComputedGRPCBackendRef +func (this *ComputedGRPCBackendRef) UnmarshalJSON(b []byte) error { + return ComputedRoutesUnmarshaler.Unmarshal(b, this) +} + +// MarshalJSON is a custom marshaler for ComputedTCPRoute +func (this *ComputedTCPRoute) MarshalJSON() ([]byte, error) { + str, err := ComputedRoutesMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for ComputedTCPRoute +func (this *ComputedTCPRoute) UnmarshalJSON(b []byte) error { + return ComputedRoutesUnmarshaler.Unmarshal(b, this) +} + +// MarshalJSON is a custom marshaler for ComputedTCPRouteRule +func (this *ComputedTCPRouteRule) MarshalJSON() ([]byte, error) { + str, err := ComputedRoutesMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for ComputedTCPRouteRule +func (this *ComputedTCPRouteRule) UnmarshalJSON(b []byte) error { + return ComputedRoutesUnmarshaler.Unmarshal(b, this) +} + +// MarshalJSON is a custom marshaler for ComputedTCPBackendRef +func (this *ComputedTCPBackendRef) MarshalJSON() ([]byte, error) { + str, err := ComputedRoutesMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for ComputedTCPBackendRef +func (this *ComputedTCPBackendRef) UnmarshalJSON(b []byte) error { + return ComputedRoutesUnmarshaler.Unmarshal(b, this) +} + +// MarshalJSON is a custom marshaler for BackendTargetDetails +func (this *BackendTargetDetails) MarshalJSON() ([]byte, error) { + str, err := ComputedRoutesMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for BackendTargetDetails +func (this *BackendTargetDetails) UnmarshalJSON(b []byte) error { + return ComputedRoutesUnmarshaler.Unmarshal(b, this) +} + +// MarshalJSON is a custom marshaler for ComputedFailoverConfig +func (this *ComputedFailoverConfig) MarshalJSON() ([]byte, error) { + str, err := ComputedRoutesMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for ComputedFailoverConfig +func (this *ComputedFailoverConfig) UnmarshalJSON(b []byte) error { + return ComputedRoutesUnmarshaler.Unmarshal(b, this) +} + +// MarshalJSON is a custom marshaler for ComputedFailoverDestination +func (this *ComputedFailoverDestination) MarshalJSON() ([]byte, error) { + str, err := ComputedRoutesMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for ComputedFailoverDestination +func (this *ComputedFailoverDestination) UnmarshalJSON(b []byte) error { + return ComputedRoutesUnmarshaler.Unmarshal(b, this) +} + +var ( + ComputedRoutesMarshaler = &protojson.MarshalOptions{} + ComputedRoutesUnmarshaler = &protojson.UnmarshalOptions{DiscardUnknown: false} +) diff --git a/proto-public/pbmesh/v2beta1/connection.pb.go b/proto-public/pbmesh/v2beta1/connection.pb.go index b1009ba22a..d8ccaba7d7 100644 --- a/proto-public/pbmesh/v2beta1/connection.pb.go +++ b/proto-public/pbmesh/v2beta1/connection.pb.go @@ -24,6 +24,8 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) +// +kubebuilder:validation:Enum=BALANCE_CONNECTIONS_DEFAULT;BALANCE_CONNECTIONS_EXACT +// +kubebuilder:validation:Type=string type BalanceConnections int32 const ( @@ -77,7 +79,9 @@ type ConnectionConfig struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + // +kubebuilder:validation:Format=duration ConnectTimeout *durationpb.Duration `protobuf:"bytes,1,opt,name=connect_timeout,json=connectTimeout,proto3" json:"connect_timeout,omitempty"` + // +kubebuilder:validation:Format=duration RequestTimeout *durationpb.Duration `protobuf:"bytes,2,opt,name=request_timeout,json=requestTimeout,proto3" json:"request_timeout,omitempty"` } diff --git a/proto-public/pbmesh/v2beta1/connection.proto b/proto-public/pbmesh/v2beta1/connection.proto index a0e6cb9150..fdb7217a12 100644 --- a/proto-public/pbmesh/v2beta1/connection.proto +++ b/proto-public/pbmesh/v2beta1/connection.proto @@ -9,7 +9,9 @@ import "google/protobuf/duration.proto"; // Referenced by ProxyConfiguration message ConnectionConfig { + // +kubebuilder:validation:Format=duration google.protobuf.Duration connect_timeout = 1; + // +kubebuilder:validation:Format=duration google.protobuf.Duration request_timeout = 2; } @@ -19,6 +21,8 @@ message InboundConnectionsConfig { BalanceConnections balance_inbound_connections = 13; } +// +kubebuilder:validation:Enum=BALANCE_CONNECTIONS_DEFAULT;BALANCE_CONNECTIONS_EXACT +// +kubebuilder:validation:Type=string enum BalanceConnections { // buf:lint:ignore ENUM_ZERO_VALUE_SUFFIX BALANCE_CONNECTIONS_DEFAULT = 0; diff --git a/proto-public/pbmesh/v2beta1/connection_deepcopy.gen.go b/proto-public/pbmesh/v2beta1/connection_deepcopy.gen.go new file mode 100644 index 0000000000..97666ed9eb --- /dev/null +++ b/proto-public/pbmesh/v2beta1/connection_deepcopy.gen.go @@ -0,0 +1,48 @@ +// Code generated by protoc-gen-deepcopy. DO NOT EDIT. +package meshv2beta1 + +import ( + proto "google.golang.org/protobuf/proto" +) + +// DeepCopyInto supports using ConnectionConfig within kubernetes types, where deepcopy-gen is used. +func (in *ConnectionConfig) DeepCopyInto(out *ConnectionConfig) { + p := proto.Clone(in).(*ConnectionConfig) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConnectionConfig. Required by controller-gen. +func (in *ConnectionConfig) DeepCopy() *ConnectionConfig { + if in == nil { + return nil + } + out := new(ConnectionConfig) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new ConnectionConfig. Required by controller-gen. +func (in *ConnectionConfig) DeepCopyInterface() interface{} { + return in.DeepCopy() +} + +// DeepCopyInto supports using InboundConnectionsConfig within kubernetes types, where deepcopy-gen is used. +func (in *InboundConnectionsConfig) DeepCopyInto(out *InboundConnectionsConfig) { + p := proto.Clone(in).(*InboundConnectionsConfig) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InboundConnectionsConfig. Required by controller-gen. +func (in *InboundConnectionsConfig) DeepCopy() *InboundConnectionsConfig { + if in == nil { + return nil + } + out := new(InboundConnectionsConfig) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new InboundConnectionsConfig. Required by controller-gen. +func (in *InboundConnectionsConfig) DeepCopyInterface() interface{} { + return in.DeepCopy() +} diff --git a/proto-public/pbmesh/v2beta1/connection_json.gen.go b/proto-public/pbmesh/v2beta1/connection_json.gen.go new file mode 100644 index 0000000000..15649a3f25 --- /dev/null +++ b/proto-public/pbmesh/v2beta1/connection_json.gen.go @@ -0,0 +1,33 @@ +// Code generated by protoc-json-shim. DO NOT EDIT. +package meshv2beta1 + +import ( + protojson "google.golang.org/protobuf/encoding/protojson" +) + +// MarshalJSON is a custom marshaler for ConnectionConfig +func (this *ConnectionConfig) MarshalJSON() ([]byte, error) { + str, err := ConnectionMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for ConnectionConfig +func (this *ConnectionConfig) UnmarshalJSON(b []byte) error { + return ConnectionUnmarshaler.Unmarshal(b, this) +} + +// MarshalJSON is a custom marshaler for InboundConnectionsConfig +func (this *InboundConnectionsConfig) MarshalJSON() ([]byte, error) { + str, err := ConnectionMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for InboundConnectionsConfig +func (this *InboundConnectionsConfig) UnmarshalJSON(b []byte) error { + return ConnectionUnmarshaler.Unmarshal(b, this) +} + +var ( + ConnectionMarshaler = &protojson.MarshalOptions{} + ConnectionUnmarshaler = &protojson.UnmarshalOptions{DiscardUnknown: false} +) diff --git a/proto-public/pbmesh/v2beta1/destination_policy.pb.go b/proto-public/pbmesh/v2beta1/destination_policy.pb.go index ee17c97b64..99d7c7eaea 100644 --- a/proto-public/pbmesh/v2beta1/destination_policy.pb.go +++ b/proto-public/pbmesh/v2beta1/destination_policy.pb.go @@ -25,6 +25,8 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) +// +kubebuilder:validation:Enum=LOCALITY_PRIORITIZATION_MODE_UNSPECIFIED;LOCALITY_PRIORITIZATION_MODE_NONE;LOCALITY_PRIORITIZATION_MODE_FAILOVER +// +kubebuilder:validation:Type=string type LocalityPrioritizationMode int32 const ( @@ -74,6 +76,8 @@ func (LocalityPrioritizationMode) EnumDescriptor() ([]byte, []int) { return file_pbmesh_v2beta1_destination_policy_proto_rawDescGZIP(), []int{0} } +// +kubebuilder:validation:Enum=LOAD_BALANCER_POLICY_UNSPECIFIED;LOAD_BALANCER_POLICY_RANDOM;LOAD_BALANCER_POLICY_ROUND_ROBIN;LOAD_BALANCER_POLICY_LEAST_REQUEST;LOAD_BALANCER_POLICY_MAGLEV;LOAD_BALANCER_POLICY_RING_HASH +// +kubebuilder:validation:Type=string type LoadBalancerPolicy int32 const ( @@ -132,6 +136,8 @@ func (LoadBalancerPolicy) EnumDescriptor() ([]byte, []int) { return file_pbmesh_v2beta1_destination_policy_proto_rawDescGZIP(), []int{1} } +// +kubebuilder:validation:Enum=HASH_POLICY_FIELD_UNSPECIFIED;HASH_POLICY_FIELD_HEADER;HASH_POLICY_FIELD_COOKIE;HASH_POLICY_FIELD_QUERY_PARAMETER +// +kubebuilder:validation:Type=string type HashPolicyField int32 const ( @@ -248,10 +254,12 @@ type DestinationConfig struct { // ConnectTimeout is the timeout for establishing new network connections // to this service. + // +kubebuilder:validation:Format=duration ConnectTimeout *durationpb.Duration `protobuf:"bytes,1,opt,name=connect_timeout,json=connectTimeout,proto3" json:"connect_timeout,omitempty"` // RequestTimeout is the timeout for an HTTP request to complete before the // connection is automatically terminated. If unspecified, defaults to 15 // seconds. + // +kubebuilder:validation:Format=duration RequestTimeout *durationpb.Duration `protobuf:"bytes,2,opt,name=request_timeout,json=requestTimeout,proto3" json:"request_timeout,omitempty"` // LoadBalancer determines the load balancing policy and configuration for // services issuing requests to this upstream service. @@ -688,6 +696,7 @@ type CookieConfig struct { // Generates a session cookie with no expiration. Session bool `protobuf:"varint,1,opt,name=session,proto3" json:"session,omitempty"` // TTL for generated cookies. Cannot be specified for session cookies. + // +kubebuilder:validation:Format=duration Ttl *durationpb.Duration `protobuf:"bytes,2,opt,name=ttl,proto3" json:"ttl,omitempty"` // The path to set for the cookie Path string `protobuf:"bytes,3,opt,name=path,proto3" json:"path,omitempty"` diff --git a/proto-public/pbmesh/v2beta1/destination_policy.proto b/proto-public/pbmesh/v2beta1/destination_policy.proto index a5fd32e238..0a18fd8c49 100644 --- a/proto-public/pbmesh/v2beta1/destination_policy.proto +++ b/proto-public/pbmesh/v2beta1/destination_policy.proto @@ -27,11 +27,13 @@ message DestinationPolicy { message DestinationConfig { // ConnectTimeout is the timeout for establishing new network connections // to this service. + // +kubebuilder:validation:Format=duration google.protobuf.Duration connect_timeout = 1; // RequestTimeout is the timeout for an HTTP request to complete before the // connection is automatically terminated. If unspecified, defaults to 15 // seconds. + // +kubebuilder:validation:Format=duration google.protobuf.Duration request_timeout = 2; // LoadBalancer determines the load balancing policy and configuration for @@ -50,6 +52,8 @@ message LocalityPrioritization { LocalityPrioritizationMode mode = 1; } +// +kubebuilder:validation:Enum=LOCALITY_PRIORITIZATION_MODE_UNSPECIFIED;LOCALITY_PRIORITIZATION_MODE_NONE;LOCALITY_PRIORITIZATION_MODE_FAILOVER +// +kubebuilder:validation:Type=string enum LocalityPrioritizationMode { LOCALITY_PRIORITIZATION_MODE_UNSPECIFIED = 0; LOCALITY_PRIORITIZATION_MODE_NONE = 1; @@ -80,6 +84,8 @@ message LoadBalancer { } } +// +kubebuilder:validation:Enum=LOAD_BALANCER_POLICY_UNSPECIFIED;LOAD_BALANCER_POLICY_RANDOM;LOAD_BALANCER_POLICY_ROUND_ROBIN;LOAD_BALANCER_POLICY_LEAST_REQUEST;LOAD_BALANCER_POLICY_MAGLEV;LOAD_BALANCER_POLICY_RING_HASH +// +kubebuilder:validation:Type=string enum LoadBalancerPolicy { LOAD_BALANCER_POLICY_UNSPECIFIED = 0; LOAD_BALANCER_POLICY_RANDOM = 1; @@ -129,6 +135,8 @@ message HashPolicy { bool terminal = 5; } +// +kubebuilder:validation:Enum=HASH_POLICY_FIELD_UNSPECIFIED;HASH_POLICY_FIELD_HEADER;HASH_POLICY_FIELD_COOKIE;HASH_POLICY_FIELD_QUERY_PARAMETER +// +kubebuilder:validation:Type=string enum HashPolicyField { HASH_POLICY_FIELD_UNSPECIFIED = 0; HASH_POLICY_FIELD_HEADER = 1; @@ -143,6 +151,7 @@ message CookieConfig { bool session = 1; // TTL for generated cookies. Cannot be specified for session cookies. + // +kubebuilder:validation:Format=duration google.protobuf.Duration ttl = 2; // The path to set for the cookie diff --git a/proto-public/pbmesh/v2beta1/destination_policy_deepcopy.gen.go b/proto-public/pbmesh/v2beta1/destination_policy_deepcopy.gen.go new file mode 100644 index 0000000000..5ac5542a54 --- /dev/null +++ b/proto-public/pbmesh/v2beta1/destination_policy_deepcopy.gen.go @@ -0,0 +1,174 @@ +// Code generated by protoc-gen-deepcopy. DO NOT EDIT. +package meshv2beta1 + +import ( + proto "google.golang.org/protobuf/proto" +) + +// DeepCopyInto supports using DestinationPolicy within kubernetes types, where deepcopy-gen is used. +func (in *DestinationPolicy) DeepCopyInto(out *DestinationPolicy) { + p := proto.Clone(in).(*DestinationPolicy) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DestinationPolicy. Required by controller-gen. +func (in *DestinationPolicy) DeepCopy() *DestinationPolicy { + if in == nil { + return nil + } + out := new(DestinationPolicy) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new DestinationPolicy. Required by controller-gen. +func (in *DestinationPolicy) DeepCopyInterface() interface{} { + return in.DeepCopy() +} + +// DeepCopyInto supports using DestinationConfig within kubernetes types, where deepcopy-gen is used. +func (in *DestinationConfig) DeepCopyInto(out *DestinationConfig) { + p := proto.Clone(in).(*DestinationConfig) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DestinationConfig. Required by controller-gen. +func (in *DestinationConfig) DeepCopy() *DestinationConfig { + if in == nil { + return nil + } + out := new(DestinationConfig) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new DestinationConfig. Required by controller-gen. +func (in *DestinationConfig) DeepCopyInterface() interface{} { + return in.DeepCopy() +} + +// DeepCopyInto supports using LocalityPrioritization within kubernetes types, where deepcopy-gen is used. +func (in *LocalityPrioritization) DeepCopyInto(out *LocalityPrioritization) { + p := proto.Clone(in).(*LocalityPrioritization) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LocalityPrioritization. Required by controller-gen. +func (in *LocalityPrioritization) DeepCopy() *LocalityPrioritization { + if in == nil { + return nil + } + out := new(LocalityPrioritization) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new LocalityPrioritization. Required by controller-gen. +func (in *LocalityPrioritization) DeepCopyInterface() interface{} { + return in.DeepCopy() +} + +// DeepCopyInto supports using LoadBalancer within kubernetes types, where deepcopy-gen is used. +func (in *LoadBalancer) DeepCopyInto(out *LoadBalancer) { + p := proto.Clone(in).(*LoadBalancer) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LoadBalancer. Required by controller-gen. +func (in *LoadBalancer) DeepCopy() *LoadBalancer { + if in == nil { + return nil + } + out := new(LoadBalancer) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new LoadBalancer. Required by controller-gen. +func (in *LoadBalancer) DeepCopyInterface() interface{} { + return in.DeepCopy() +} + +// DeepCopyInto supports using RingHashConfig within kubernetes types, where deepcopy-gen is used. +func (in *RingHashConfig) DeepCopyInto(out *RingHashConfig) { + p := proto.Clone(in).(*RingHashConfig) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RingHashConfig. Required by controller-gen. +func (in *RingHashConfig) DeepCopy() *RingHashConfig { + if in == nil { + return nil + } + out := new(RingHashConfig) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new RingHashConfig. Required by controller-gen. +func (in *RingHashConfig) DeepCopyInterface() interface{} { + return in.DeepCopy() +} + +// DeepCopyInto supports using LeastRequestConfig within kubernetes types, where deepcopy-gen is used. +func (in *LeastRequestConfig) DeepCopyInto(out *LeastRequestConfig) { + p := proto.Clone(in).(*LeastRequestConfig) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LeastRequestConfig. Required by controller-gen. +func (in *LeastRequestConfig) DeepCopy() *LeastRequestConfig { + if in == nil { + return nil + } + out := new(LeastRequestConfig) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new LeastRequestConfig. Required by controller-gen. +func (in *LeastRequestConfig) DeepCopyInterface() interface{} { + return in.DeepCopy() +} + +// DeepCopyInto supports using HashPolicy within kubernetes types, where deepcopy-gen is used. +func (in *HashPolicy) DeepCopyInto(out *HashPolicy) { + p := proto.Clone(in).(*HashPolicy) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HashPolicy. Required by controller-gen. +func (in *HashPolicy) DeepCopy() *HashPolicy { + if in == nil { + return nil + } + out := new(HashPolicy) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new HashPolicy. Required by controller-gen. +func (in *HashPolicy) DeepCopyInterface() interface{} { + return in.DeepCopy() +} + +// DeepCopyInto supports using CookieConfig within kubernetes types, where deepcopy-gen is used. +func (in *CookieConfig) DeepCopyInto(out *CookieConfig) { + p := proto.Clone(in).(*CookieConfig) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CookieConfig. Required by controller-gen. +func (in *CookieConfig) DeepCopy() *CookieConfig { + if in == nil { + return nil + } + out := new(CookieConfig) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new CookieConfig. Required by controller-gen. +func (in *CookieConfig) DeepCopyInterface() interface{} { + return in.DeepCopy() +} diff --git a/proto-public/pbmesh/v2beta1/destination_policy_json.gen.go b/proto-public/pbmesh/v2beta1/destination_policy_json.gen.go new file mode 100644 index 0000000000..fc1c98b08d --- /dev/null +++ b/proto-public/pbmesh/v2beta1/destination_policy_json.gen.go @@ -0,0 +1,99 @@ +// Code generated by protoc-json-shim. DO NOT EDIT. +package meshv2beta1 + +import ( + protojson "google.golang.org/protobuf/encoding/protojson" +) + +// MarshalJSON is a custom marshaler for DestinationPolicy +func (this *DestinationPolicy) MarshalJSON() ([]byte, error) { + str, err := DestinationPolicyMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for DestinationPolicy +func (this *DestinationPolicy) UnmarshalJSON(b []byte) error { + return DestinationPolicyUnmarshaler.Unmarshal(b, this) +} + +// MarshalJSON is a custom marshaler for DestinationConfig +func (this *DestinationConfig) MarshalJSON() ([]byte, error) { + str, err := DestinationPolicyMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for DestinationConfig +func (this *DestinationConfig) UnmarshalJSON(b []byte) error { + return DestinationPolicyUnmarshaler.Unmarshal(b, this) +} + +// MarshalJSON is a custom marshaler for LocalityPrioritization +func (this *LocalityPrioritization) MarshalJSON() ([]byte, error) { + str, err := DestinationPolicyMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for LocalityPrioritization +func (this *LocalityPrioritization) UnmarshalJSON(b []byte) error { + return DestinationPolicyUnmarshaler.Unmarshal(b, this) +} + +// MarshalJSON is a custom marshaler for LoadBalancer +func (this *LoadBalancer) MarshalJSON() ([]byte, error) { + str, err := DestinationPolicyMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for LoadBalancer +func (this *LoadBalancer) UnmarshalJSON(b []byte) error { + return DestinationPolicyUnmarshaler.Unmarshal(b, this) +} + +// MarshalJSON is a custom marshaler for RingHashConfig +func (this *RingHashConfig) MarshalJSON() ([]byte, error) { + str, err := DestinationPolicyMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for RingHashConfig +func (this *RingHashConfig) UnmarshalJSON(b []byte) error { + return DestinationPolicyUnmarshaler.Unmarshal(b, this) +} + +// MarshalJSON is a custom marshaler for LeastRequestConfig +func (this *LeastRequestConfig) MarshalJSON() ([]byte, error) { + str, err := DestinationPolicyMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for LeastRequestConfig +func (this *LeastRequestConfig) UnmarshalJSON(b []byte) error { + return DestinationPolicyUnmarshaler.Unmarshal(b, this) +} + +// MarshalJSON is a custom marshaler for HashPolicy +func (this *HashPolicy) MarshalJSON() ([]byte, error) { + str, err := DestinationPolicyMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for HashPolicy +func (this *HashPolicy) UnmarshalJSON(b []byte) error { + return DestinationPolicyUnmarshaler.Unmarshal(b, this) +} + +// MarshalJSON is a custom marshaler for CookieConfig +func (this *CookieConfig) MarshalJSON() ([]byte, error) { + str, err := DestinationPolicyMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for CookieConfig +func (this *CookieConfig) UnmarshalJSON(b []byte) error { + return DestinationPolicyUnmarshaler.Unmarshal(b, this) +} + +var ( + DestinationPolicyMarshaler = &protojson.MarshalOptions{} + DestinationPolicyUnmarshaler = &protojson.UnmarshalOptions{DiscardUnknown: false} +) diff --git a/proto-public/pbmesh/v2beta1/destinations.pb.go b/proto-public/pbmesh/v2beta1/destinations.pb.go index 0fe229cee8..623920c514 100644 --- a/proto-public/pbmesh/v2beta1/destinations.pb.go +++ b/proto-public/pbmesh/v2beta1/destinations.pb.go @@ -33,9 +33,9 @@ type Destinations struct { // Selection of workloads these destinations should apply to. // These can be prefixes or specific workload names. Workloads *v2beta1.WorkloadSelector `protobuf:"bytes,1,opt,name=workloads,proto3" json:"workloads,omitempty"` - // destinations is the list of explicit destinations to define for the selected workloads. + // Destinations is the list of explicit destinations to define for the selected workloads. Destinations []*Destination `protobuf:"bytes,2,rep,name=destinations,proto3" json:"destinations,omitempty"` - // pq_destinations is the list of prepared query destinations. This field is not supported directly in v2 + // PQDestinations is the list of prepared query destinations. This field is not supported directly in v2 // and should only be used for migration reasons. PqDestinations []*PreparedQueryDestination `protobuf:"bytes,3,rep,name=pq_destinations,json=pqDestinations,proto3" json:"pq_destinations,omitempty"` } @@ -98,14 +98,14 @@ type Destination struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // destination_ref is the reference to an destination service. This has to be pbcatalog.Service type. + // DestinationRef is the reference to an destination service. This has to be pbcatalog.Service type. DestinationRef *pbresource.Reference `protobuf:"bytes,1,opt,name=destination_ref,json=destinationRef,proto3" json:"destination_ref,omitempty"` - // destination_port is the port name of the destination service. This should be the name + // DestinationPort is the port name of the destination service. This should be the name // of the service's target port. DestinationPort string `protobuf:"bytes,2,opt,name=destination_port,json=destinationPort,proto3" json:"destination_port,omitempty"` - // datacenter is the datacenter for where this destination service lives. + // Datacenter is the datacenter for where this destination service lives. Datacenter string `protobuf:"bytes,3,opt,name=datacenter,proto3" json:"datacenter,omitempty"` - // listen_addr is the address where Envoy will listen for requests to this destination. + // ListenAddr is the address where Envoy will listen for requests to this destination. // It can provided either as an ip:port or as a Unix domain socket. // // Types that are assignable to ListenAddr: @@ -267,9 +267,9 @@ type UnixSocketAddress struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // path is the file system path at which to bind a Unix domain socket listener. + // Path is the file system path at which to bind a Unix domain socket listener. Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"` - // mode is the Unix file mode for the socket file. It should be provided + // Mode is the Unix file mode for the socket file. It should be provided // in the numeric notation, for example, "0600". Mode string `protobuf:"bytes,2,opt,name=mode,proto3" json:"mode,omitempty"` } @@ -325,11 +325,11 @@ type PreparedQueryDestination struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // name is the name of the prepared query to use as an destination. + // Name is the name of the prepared query to use as an destination. Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // datacenter is the datacenter for where this destination service lives. + // Datacenter is the datacenter for where this destination service lives. Datacenter string `protobuf:"bytes,2,opt,name=datacenter,proto3" json:"datacenter,omitempty"` - // listen_addr is the address where Envoy will listen for requests to this destination. + // ListenAddr is the address where Envoy will listen for requests to this destination. // It can provided either as an ip:port or as a Unix domain socket. // // Types that are assignable to ListenAddr: diff --git a/proto-public/pbmesh/v2beta1/destinations.proto b/proto-public/pbmesh/v2beta1/destinations.proto index 7f5307842f..33c7ea9195 100644 --- a/proto-public/pbmesh/v2beta1/destinations.proto +++ b/proto-public/pbmesh/v2beta1/destinations.proto @@ -17,26 +17,26 @@ message Destinations { // These can be prefixes or specific workload names. hashicorp.consul.catalog.v2beta1.WorkloadSelector workloads = 1; - // destinations is the list of explicit destinations to define for the selected workloads. + // Destinations is the list of explicit destinations to define for the selected workloads. repeated Destination destinations = 2; - // pq_destinations is the list of prepared query destinations. This field is not supported directly in v2 + // PQDestinations is the list of prepared query destinations. This field is not supported directly in v2 // and should only be used for migration reasons. repeated PreparedQueryDestination pq_destinations = 3; } message Destination { - // destination_ref is the reference to an destination service. This has to be pbcatalog.Service type. + // DestinationRef is the reference to an destination service. This has to be pbcatalog.Service type. hashicorp.consul.resource.Reference destination_ref = 1; - // destination_port is the port name of the destination service. This should be the name + // DestinationPort is the port name of the destination service. This should be the name // of the service's target port. string destination_port = 2; - // datacenter is the datacenter for where this destination service lives. + // Datacenter is the datacenter for where this destination service lives. string datacenter = 3; - // listen_addr is the address where Envoy will listen for requests to this destination. + // ListenAddr is the address where Envoy will listen for requests to this destination. // It can provided either as an ip:port or as a Unix domain socket. oneof listen_addr { IPPortAddress ip_port = 4; @@ -53,22 +53,22 @@ message IPPortAddress { } message UnixSocketAddress { - // path is the file system path at which to bind a Unix domain socket listener. + // Path is the file system path at which to bind a Unix domain socket listener. string path = 1; - // mode is the Unix file mode for the socket file. It should be provided + // Mode is the Unix file mode for the socket file. It should be provided // in the numeric notation, for example, "0600". string mode = 2; } message PreparedQueryDestination { - // name is the name of the prepared query to use as an destination. + // Name is the name of the prepared query to use as an destination. string name = 1; - // datacenter is the datacenter for where this destination service lives. + // Datacenter is the datacenter for where this destination service lives. string datacenter = 2; - // listen_addr is the address where Envoy will listen for requests to this destination. + // ListenAddr is the address where Envoy will listen for requests to this destination. // It can provided either as an ip:port or as a Unix domain socket. oneof listen_addr { IPPortAddress tcp = 4; diff --git a/proto-public/pbmesh/v2beta1/destinations_configuration.pb.go b/proto-public/pbmesh/v2beta1/destinations_configuration.pb.go index 28bb77f9b3..2e6a8f5e96 100644 --- a/proto-public/pbmesh/v2beta1/destinations_configuration.pb.go +++ b/proto-public/pbmesh/v2beta1/destinations_configuration.pb.go @@ -35,9 +35,9 @@ type DestinationsConfiguration struct { // Selection of workloads these destinations should apply to. // These can be prefixes or specific workload names. Workloads *v2beta1.WorkloadSelector `protobuf:"bytes,1,opt,name=workloads,proto3" json:"workloads,omitempty"` - // default_config applies to all destinations for the workloads selected by this resource. + // DefaultConfig applies to all destinations for the workloads selected by this resource. DefaultConfig *DestinationConfiguration `protobuf:"bytes,2,opt,name=default_config,json=defaultConfig,proto3" json:"default_config,omitempty"` - // config_overrides provides per-destination or per-destination-port config overrides. + // ConfigOverrides provides per-destination or per-destination-port config overrides. ConfigOverrides []*DestinationConfigOverrides `protobuf:"bytes,3,rep,name=config_overrides,json=configOverrides,proto3" json:"config_overrides,omitempty"` } @@ -102,15 +102,15 @@ type DestinationConfigOverrides struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // destination_ref is the reference to an destination service that this configuration applies to. + // DestinationRef is the reference to an destination service that this configuration applies to. // This has to be pbcatalog.Service type. DestinationRef *pbresource.Reference `protobuf:"bytes,1,opt,name=destination_ref,json=destinationRef,proto3" json:"destination_ref,omitempty"` - // destination_port is the port name of the destination service. This should be the name + // DestinationPort is the port name of the destination service. This should be the name // of the service's target port. If not provided, this configuration will apply to all ports of an destination. DestinationPort string `protobuf:"bytes,2,opt,name=destination_port,json=destinationPort,proto3" json:"destination_port,omitempty"` - // datacenter is the datacenter for where this destination service lives. + // Datacenter is the datacenter for where this destination service lives. Datacenter string `protobuf:"bytes,3,opt,name=datacenter,proto3" json:"datacenter,omitempty"` - // config is the configuration that should apply to this destination. + // Config is the configuration that should apply to this destination. Config *DestinationConfiguration `protobuf:"bytes,4,opt,name=config,proto3" json:"config,omitempty"` } @@ -179,19 +179,20 @@ type DestinationConfiguration struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // protocol overrides destination's port protocol. If no port for an destination is specified + // Protocol overrides destination's port protocol. If no port for an destination is specified // or if used in the default configuration, this protocol will be used for all ports // or for all ports of all destinations respectively. Protocol v2beta1.Protocol `protobuf:"varint,1,opt,name=protocol,proto3,enum=hashicorp.consul.catalog.v2beta1.Protocol" json:"protocol,omitempty"` - // connect_timeout is the timeout used when making a new + // ConnectTimeout is the timeout used when making a new // connection to this destination. Defaults to 5 seconds if not set. + // +kubebuilder:validation:Format=duration ConnectTimeout *durationpb.Duration `protobuf:"bytes,2,opt,name=connect_timeout,json=connectTimeout,proto3" json:"connect_timeout,omitempty"` - // limits are the set of limits that are applied to the proxy for a specific destination. + // Limits are the set of limits that are applied to the proxy for a specific destination. Limits *DestinationLimits `protobuf:"bytes,3,opt,name=limits,proto3" json:"limits,omitempty"` - // passive_health_check configuration determines how destination proxy instances will + // PassiveHealthCheck configuration determines how destination proxy instances will // be monitored for removal from the load balancing pool. PassiveHealthCheck *PassiveHealthCheck `protobuf:"bytes,4,opt,name=passive_health_check,json=passiveHealthCheck,proto3" json:"passive_health_check,omitempty"` - // balance_outbound_connections indicates how the proxy should attempt to distribute + // BalanceOutboundConnections indicates how the proxy should attempt to distribute // connections across worker threads. BalanceOutboundConnections BalanceConnections `protobuf:"varint,5,opt,name=balance_outbound_connections,json=balanceOutboundConnections,proto3,enum=hashicorp.consul.mesh.v2beta1.BalanceConnections" json:"balance_outbound_connections,omitempty"` // MeshGatewayMode is the Mesh Gateway routing mode. @@ -279,15 +280,15 @@ type DestinationLimits struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // max_connections is the maximum number of connections the local proxy can + // MaxConnections is the maximum number of connections the local proxy can // make to the destination service. MaxConnections *wrapperspb.UInt32Value `protobuf:"bytes,1,opt,name=max_connections,json=maxConnections,proto3" json:"max_connections,omitempty"` - // max_pending_requests is the maximum number of requests that will be queued + // MaxPendingRequests is the maximum number of requests that will be queued // waiting for an available connection. This is mostly applicable to HTTP/1.1 // clusters since all HTTP/2 requests are streamed over a single // connection. MaxPendingRequests *wrapperspb.UInt32Value `protobuf:"bytes,2,opt,name=max_pending_requests,json=maxPendingRequests,proto3" json:"max_pending_requests,omitempty"` - // max_concurrent_requests is the maximum number of in-flight requests that will be allowed + // MaxConcurrentRequests is the maximum number of in-flight requests that will be allowed // to the destination cluster at a point in time. This is mostly applicable to HTTP/2 // clusters since all HTTP/1.1 requests are limited by MaxConnections. MaxConcurrentRequests *wrapperspb.UInt32Value `protobuf:"bytes,3,opt,name=max_concurrent_requests,json=maxConcurrentRequests,proto3" json:"max_concurrent_requests,omitempty"` @@ -351,13 +352,14 @@ type PassiveHealthCheck struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // interval between health check analysis sweeps. Each sweep may remove + // Interval between health check analysis sweeps. Each sweep may remove // hosts or return hosts to the pool. + // +kubebuilder:validation:Format=duration Interval *durationpb.Duration `protobuf:"bytes,1,opt,name=interval,proto3" json:"interval,omitempty"` - // max_failures is the count of consecutive failures that results in a host + // MaxFailures is the count of consecutive failures that results in a host // being removed from the pool. MaxFailures uint32 `protobuf:"varint,2,opt,name=max_failures,json=maxFailures,proto3" json:"max_failures,omitempty"` - // enforcing_consecutive_5xx is the % chance that a host will be actually ejected + // EnforcingConsecutive5XX is the % chance that a host will be actually ejected // when an outlier status is detected through consecutive 5xx. // This setting can be used to disable ejection or to ramp it up slowly. Defaults to 100. EnforcingConsecutive_5Xx uint32 `protobuf:"varint,3,opt,name=enforcing_consecutive_5xx,json=enforcingConsecutive5xx,proto3" json:"enforcing_consecutive_5xx,omitempty"` diff --git a/proto-public/pbmesh/v2beta1/destinations_configuration.proto b/proto-public/pbmesh/v2beta1/destinations_configuration.proto index 1ec5d57418..facdde6e1f 100644 --- a/proto-public/pbmesh/v2beta1/destinations_configuration.proto +++ b/proto-public/pbmesh/v2beta1/destinations_configuration.proto @@ -21,10 +21,10 @@ message DestinationsConfiguration { // These can be prefixes or specific workload names. hashicorp.consul.catalog.v2beta1.WorkloadSelector workloads = 1; - // default_config applies to all destinations for the workloads selected by this resource. + // DefaultConfig applies to all destinations for the workloads selected by this resource. DestinationConfiguration default_config = 2; - // config_overrides provides per-destination or per-destination-port config overrides. + // ConfigOverrides provides per-destination or per-destination-port config overrides. repeated DestinationConfigOverrides config_overrides = 3; } @@ -32,39 +32,40 @@ message DestinationsConfiguration { // In that sense, those three fields (destination_ref, destination_port and datacenter) are treated // sort of like map keys and config is a like a map value for that key. message DestinationConfigOverrides { - // destination_ref is the reference to an destination service that this configuration applies to. + // DestinationRef is the reference to an destination service that this configuration applies to. // This has to be pbcatalog.Service type. hashicorp.consul.resource.Reference destination_ref = 1; - // destination_port is the port name of the destination service. This should be the name + // DestinationPort is the port name of the destination service. This should be the name // of the service's target port. If not provided, this configuration will apply to all ports of an destination. string destination_port = 2; - // datacenter is the datacenter for where this destination service lives. + // Datacenter is the datacenter for where this destination service lives. string datacenter = 3; - // config is the configuration that should apply to this destination. + // Config is the configuration that should apply to this destination. DestinationConfiguration config = 4; } message DestinationConfiguration { - // protocol overrides destination's port protocol. If no port for an destination is specified + // Protocol overrides destination's port protocol. If no port for an destination is specified // or if used in the default configuration, this protocol will be used for all ports // or for all ports of all destinations respectively. hashicorp.consul.catalog.v2beta1.Protocol protocol = 1; - // connect_timeout is the timeout used when making a new + // ConnectTimeout is the timeout used when making a new // connection to this destination. Defaults to 5 seconds if not set. + // +kubebuilder:validation:Format=duration google.protobuf.Duration connect_timeout = 2; - // limits are the set of limits that are applied to the proxy for a specific destination. + // Limits are the set of limits that are applied to the proxy for a specific destination. DestinationLimits limits = 3; - // passive_health_check configuration determines how destination proxy instances will + // PassiveHealthCheck configuration determines how destination proxy instances will // be monitored for removal from the load balancing pool. PassiveHealthCheck passive_health_check = 4; - // balance_outbound_connections indicates how the proxy should attempt to distribute + // BalanceOutboundConnections indicates how the proxy should attempt to distribute // connections across worker threads. BalanceConnections balance_outbound_connections = 5; @@ -75,32 +76,33 @@ message DestinationConfiguration { // UpstreamLimits describes the limits that are associated with a specific // destination of a service instance. message DestinationLimits { - // max_connections is the maximum number of connections the local proxy can + // MaxConnections is the maximum number of connections the local proxy can // make to the destination service. google.protobuf.UInt32Value max_connections = 1; - // max_pending_requests is the maximum number of requests that will be queued + // MaxPendingRequests is the maximum number of requests that will be queued // waiting for an available connection. This is mostly applicable to HTTP/1.1 // clusters since all HTTP/2 requests are streamed over a single // connection. google.protobuf.UInt32Value max_pending_requests = 2; - // max_concurrent_requests is the maximum number of in-flight requests that will be allowed + // MaxConcurrentRequests is the maximum number of in-flight requests that will be allowed // to the destination cluster at a point in time. This is mostly applicable to HTTP/2 // clusters since all HTTP/1.1 requests are limited by MaxConnections. google.protobuf.UInt32Value max_concurrent_requests = 3; } message PassiveHealthCheck { - // interval between health check analysis sweeps. Each sweep may remove + // Interval between health check analysis sweeps. Each sweep may remove // hosts or return hosts to the pool. + // +kubebuilder:validation:Format=duration google.protobuf.Duration interval = 1; - // max_failures is the count of consecutive failures that results in a host + // MaxFailures is the count of consecutive failures that results in a host // being removed from the pool. uint32 max_failures = 2; - // enforcing_consecutive_5xx is the % chance that a host will be actually ejected + // EnforcingConsecutive5XX is the % chance that a host will be actually ejected // when an outlier status is detected through consecutive 5xx. // This setting can be used to disable ejection or to ramp it up slowly. Defaults to 100. uint32 enforcing_consecutive_5xx = 3; diff --git a/proto-public/pbmesh/v2beta1/destinations_configuration_deepcopy.gen.go b/proto-public/pbmesh/v2beta1/destinations_configuration_deepcopy.gen.go new file mode 100644 index 0000000000..d1413cc89d --- /dev/null +++ b/proto-public/pbmesh/v2beta1/destinations_configuration_deepcopy.gen.go @@ -0,0 +1,111 @@ +// Code generated by protoc-gen-deepcopy. DO NOT EDIT. +package meshv2beta1 + +import ( + proto "google.golang.org/protobuf/proto" +) + +// DeepCopyInto supports using DestinationsConfiguration within kubernetes types, where deepcopy-gen is used. +func (in *DestinationsConfiguration) DeepCopyInto(out *DestinationsConfiguration) { + p := proto.Clone(in).(*DestinationsConfiguration) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DestinationsConfiguration. Required by controller-gen. +func (in *DestinationsConfiguration) DeepCopy() *DestinationsConfiguration { + if in == nil { + return nil + } + out := new(DestinationsConfiguration) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new DestinationsConfiguration. Required by controller-gen. +func (in *DestinationsConfiguration) DeepCopyInterface() interface{} { + return in.DeepCopy() +} + +// DeepCopyInto supports using DestinationConfigOverrides within kubernetes types, where deepcopy-gen is used. +func (in *DestinationConfigOverrides) DeepCopyInto(out *DestinationConfigOverrides) { + p := proto.Clone(in).(*DestinationConfigOverrides) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DestinationConfigOverrides. Required by controller-gen. +func (in *DestinationConfigOverrides) DeepCopy() *DestinationConfigOverrides { + if in == nil { + return nil + } + out := new(DestinationConfigOverrides) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new DestinationConfigOverrides. Required by controller-gen. +func (in *DestinationConfigOverrides) DeepCopyInterface() interface{} { + return in.DeepCopy() +} + +// DeepCopyInto supports using DestinationConfiguration within kubernetes types, where deepcopy-gen is used. +func (in *DestinationConfiguration) DeepCopyInto(out *DestinationConfiguration) { + p := proto.Clone(in).(*DestinationConfiguration) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DestinationConfiguration. Required by controller-gen. +func (in *DestinationConfiguration) DeepCopy() *DestinationConfiguration { + if in == nil { + return nil + } + out := new(DestinationConfiguration) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new DestinationConfiguration. Required by controller-gen. +func (in *DestinationConfiguration) DeepCopyInterface() interface{} { + return in.DeepCopy() +} + +// DeepCopyInto supports using DestinationLimits within kubernetes types, where deepcopy-gen is used. +func (in *DestinationLimits) DeepCopyInto(out *DestinationLimits) { + p := proto.Clone(in).(*DestinationLimits) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DestinationLimits. Required by controller-gen. +func (in *DestinationLimits) DeepCopy() *DestinationLimits { + if in == nil { + return nil + } + out := new(DestinationLimits) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new DestinationLimits. Required by controller-gen. +func (in *DestinationLimits) DeepCopyInterface() interface{} { + return in.DeepCopy() +} + +// DeepCopyInto supports using PassiveHealthCheck within kubernetes types, where deepcopy-gen is used. +func (in *PassiveHealthCheck) DeepCopyInto(out *PassiveHealthCheck) { + p := proto.Clone(in).(*PassiveHealthCheck) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PassiveHealthCheck. Required by controller-gen. +func (in *PassiveHealthCheck) DeepCopy() *PassiveHealthCheck { + if in == nil { + return nil + } + out := new(PassiveHealthCheck) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new PassiveHealthCheck. Required by controller-gen. +func (in *PassiveHealthCheck) DeepCopyInterface() interface{} { + return in.DeepCopy() +} diff --git a/proto-public/pbmesh/v2beta1/destinations_configuration_json.gen.go b/proto-public/pbmesh/v2beta1/destinations_configuration_json.gen.go new file mode 100644 index 0000000000..f8daafdbeb --- /dev/null +++ b/proto-public/pbmesh/v2beta1/destinations_configuration_json.gen.go @@ -0,0 +1,66 @@ +// Code generated by protoc-json-shim. DO NOT EDIT. +package meshv2beta1 + +import ( + protojson "google.golang.org/protobuf/encoding/protojson" +) + +// MarshalJSON is a custom marshaler for DestinationsConfiguration +func (this *DestinationsConfiguration) MarshalJSON() ([]byte, error) { + str, err := DestinationsConfigurationMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for DestinationsConfiguration +func (this *DestinationsConfiguration) UnmarshalJSON(b []byte) error { + return DestinationsConfigurationUnmarshaler.Unmarshal(b, this) +} + +// MarshalJSON is a custom marshaler for DestinationConfigOverrides +func (this *DestinationConfigOverrides) MarshalJSON() ([]byte, error) { + str, err := DestinationsConfigurationMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for DestinationConfigOverrides +func (this *DestinationConfigOverrides) UnmarshalJSON(b []byte) error { + return DestinationsConfigurationUnmarshaler.Unmarshal(b, this) +} + +// MarshalJSON is a custom marshaler for DestinationConfiguration +func (this *DestinationConfiguration) MarshalJSON() ([]byte, error) { + str, err := DestinationsConfigurationMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for DestinationConfiguration +func (this *DestinationConfiguration) UnmarshalJSON(b []byte) error { + return DestinationsConfigurationUnmarshaler.Unmarshal(b, this) +} + +// MarshalJSON is a custom marshaler for DestinationLimits +func (this *DestinationLimits) MarshalJSON() ([]byte, error) { + str, err := DestinationsConfigurationMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for DestinationLimits +func (this *DestinationLimits) UnmarshalJSON(b []byte) error { + return DestinationsConfigurationUnmarshaler.Unmarshal(b, this) +} + +// MarshalJSON is a custom marshaler for PassiveHealthCheck +func (this *PassiveHealthCheck) MarshalJSON() ([]byte, error) { + str, err := DestinationsConfigurationMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for PassiveHealthCheck +func (this *PassiveHealthCheck) UnmarshalJSON(b []byte) error { + return DestinationsConfigurationUnmarshaler.Unmarshal(b, this) +} + +var ( + DestinationsConfigurationMarshaler = &protojson.MarshalOptions{} + DestinationsConfigurationUnmarshaler = &protojson.UnmarshalOptions{DiscardUnknown: false} +) diff --git a/proto-public/pbmesh/v2beta1/destinations_deepcopy.gen.go b/proto-public/pbmesh/v2beta1/destinations_deepcopy.gen.go new file mode 100644 index 0000000000..ff04bf3fcf --- /dev/null +++ b/proto-public/pbmesh/v2beta1/destinations_deepcopy.gen.go @@ -0,0 +1,111 @@ +// Code generated by protoc-gen-deepcopy. DO NOT EDIT. +package meshv2beta1 + +import ( + proto "google.golang.org/protobuf/proto" +) + +// DeepCopyInto supports using Destinations within kubernetes types, where deepcopy-gen is used. +func (in *Destinations) DeepCopyInto(out *Destinations) { + p := proto.Clone(in).(*Destinations) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Destinations. Required by controller-gen. +func (in *Destinations) DeepCopy() *Destinations { + if in == nil { + return nil + } + out := new(Destinations) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new Destinations. Required by controller-gen. +func (in *Destinations) DeepCopyInterface() interface{} { + return in.DeepCopy() +} + +// DeepCopyInto supports using Destination within kubernetes types, where deepcopy-gen is used. +func (in *Destination) DeepCopyInto(out *Destination) { + p := proto.Clone(in).(*Destination) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Destination. Required by controller-gen. +func (in *Destination) DeepCopy() *Destination { + if in == nil { + return nil + } + out := new(Destination) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new Destination. Required by controller-gen. +func (in *Destination) DeepCopyInterface() interface{} { + return in.DeepCopy() +} + +// DeepCopyInto supports using IPPortAddress within kubernetes types, where deepcopy-gen is used. +func (in *IPPortAddress) DeepCopyInto(out *IPPortAddress) { + p := proto.Clone(in).(*IPPortAddress) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IPPortAddress. Required by controller-gen. +func (in *IPPortAddress) DeepCopy() *IPPortAddress { + if in == nil { + return nil + } + out := new(IPPortAddress) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new IPPortAddress. Required by controller-gen. +func (in *IPPortAddress) DeepCopyInterface() interface{} { + return in.DeepCopy() +} + +// DeepCopyInto supports using UnixSocketAddress within kubernetes types, where deepcopy-gen is used. +func (in *UnixSocketAddress) DeepCopyInto(out *UnixSocketAddress) { + p := proto.Clone(in).(*UnixSocketAddress) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UnixSocketAddress. Required by controller-gen. +func (in *UnixSocketAddress) DeepCopy() *UnixSocketAddress { + if in == nil { + return nil + } + out := new(UnixSocketAddress) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new UnixSocketAddress. Required by controller-gen. +func (in *UnixSocketAddress) DeepCopyInterface() interface{} { + return in.DeepCopy() +} + +// DeepCopyInto supports using PreparedQueryDestination within kubernetes types, where deepcopy-gen is used. +func (in *PreparedQueryDestination) DeepCopyInto(out *PreparedQueryDestination) { + p := proto.Clone(in).(*PreparedQueryDestination) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PreparedQueryDestination. Required by controller-gen. +func (in *PreparedQueryDestination) DeepCopy() *PreparedQueryDestination { + if in == nil { + return nil + } + out := new(PreparedQueryDestination) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new PreparedQueryDestination. Required by controller-gen. +func (in *PreparedQueryDestination) DeepCopyInterface() interface{} { + return in.DeepCopy() +} diff --git a/proto-public/pbmesh/v2beta1/destinations_json.gen.go b/proto-public/pbmesh/v2beta1/destinations_json.gen.go new file mode 100644 index 0000000000..989540524e --- /dev/null +++ b/proto-public/pbmesh/v2beta1/destinations_json.gen.go @@ -0,0 +1,66 @@ +// Code generated by protoc-json-shim. DO NOT EDIT. +package meshv2beta1 + +import ( + protojson "google.golang.org/protobuf/encoding/protojson" +) + +// MarshalJSON is a custom marshaler for Destinations +func (this *Destinations) MarshalJSON() ([]byte, error) { + str, err := DestinationsMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for Destinations +func (this *Destinations) UnmarshalJSON(b []byte) error { + return DestinationsUnmarshaler.Unmarshal(b, this) +} + +// MarshalJSON is a custom marshaler for Destination +func (this *Destination) MarshalJSON() ([]byte, error) { + str, err := DestinationsMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for Destination +func (this *Destination) UnmarshalJSON(b []byte) error { + return DestinationsUnmarshaler.Unmarshal(b, this) +} + +// MarshalJSON is a custom marshaler for IPPortAddress +func (this *IPPortAddress) MarshalJSON() ([]byte, error) { + str, err := DestinationsMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for IPPortAddress +func (this *IPPortAddress) UnmarshalJSON(b []byte) error { + return DestinationsUnmarshaler.Unmarshal(b, this) +} + +// MarshalJSON is a custom marshaler for UnixSocketAddress +func (this *UnixSocketAddress) MarshalJSON() ([]byte, error) { + str, err := DestinationsMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for UnixSocketAddress +func (this *UnixSocketAddress) UnmarshalJSON(b []byte) error { + return DestinationsUnmarshaler.Unmarshal(b, this) +} + +// MarshalJSON is a custom marshaler for PreparedQueryDestination +func (this *PreparedQueryDestination) MarshalJSON() ([]byte, error) { + str, err := DestinationsMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for PreparedQueryDestination +func (this *PreparedQueryDestination) UnmarshalJSON(b []byte) error { + return DestinationsUnmarshaler.Unmarshal(b, this) +} + +var ( + DestinationsMarshaler = &protojson.MarshalOptions{} + DestinationsUnmarshaler = &protojson.UnmarshalOptions{DiscardUnknown: false} +) diff --git a/proto-public/pbmesh/v2beta1/expose.pb.go b/proto-public/pbmesh/v2beta1/expose.pb.go index 2413168436..63958a4b4f 100644 --- a/proto-public/pbmesh/v2beta1/expose.pb.go +++ b/proto-public/pbmesh/v2beta1/expose.pb.go @@ -23,6 +23,8 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) +// +kubebuilder:validation:Enum=EXPOSE_PATH_PROTOCOL_HTTP;EXPOSE_PATH_PROTOCOL_HTTP2 +// +kubebuilder:validation:Type=string type ExposePathProtocol int32 const ( diff --git a/proto-public/pbmesh/v2beta1/expose.proto b/proto-public/pbmesh/v2beta1/expose.proto index 03c84c9abc..cf5c67d370 100644 --- a/proto-public/pbmesh/v2beta1/expose.proto +++ b/proto-public/pbmesh/v2beta1/expose.proto @@ -16,6 +16,8 @@ message ExposePath { ExposePathProtocol protocol = 4; } +// +kubebuilder:validation:Enum=EXPOSE_PATH_PROTOCOL_HTTP;EXPOSE_PATH_PROTOCOL_HTTP2 +// +kubebuilder:validation:Type=string enum ExposePathProtocol { // buf:lint:ignore ENUM_ZERO_VALUE_SUFFIX EXPOSE_PATH_PROTOCOL_HTTP = 0; diff --git a/proto-public/pbmesh/v2beta1/expose_deepcopy.gen.go b/proto-public/pbmesh/v2beta1/expose_deepcopy.gen.go new file mode 100644 index 0000000000..e191d353bd --- /dev/null +++ b/proto-public/pbmesh/v2beta1/expose_deepcopy.gen.go @@ -0,0 +1,48 @@ +// Code generated by protoc-gen-deepcopy. DO NOT EDIT. +package meshv2beta1 + +import ( + proto "google.golang.org/protobuf/proto" +) + +// DeepCopyInto supports using ExposeConfig within kubernetes types, where deepcopy-gen is used. +func (in *ExposeConfig) DeepCopyInto(out *ExposeConfig) { + p := proto.Clone(in).(*ExposeConfig) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExposeConfig. Required by controller-gen. +func (in *ExposeConfig) DeepCopy() *ExposeConfig { + if in == nil { + return nil + } + out := new(ExposeConfig) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new ExposeConfig. Required by controller-gen. +func (in *ExposeConfig) DeepCopyInterface() interface{} { + return in.DeepCopy() +} + +// DeepCopyInto supports using ExposePath within kubernetes types, where deepcopy-gen is used. +func (in *ExposePath) DeepCopyInto(out *ExposePath) { + p := proto.Clone(in).(*ExposePath) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExposePath. Required by controller-gen. +func (in *ExposePath) DeepCopy() *ExposePath { + if in == nil { + return nil + } + out := new(ExposePath) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new ExposePath. Required by controller-gen. +func (in *ExposePath) DeepCopyInterface() interface{} { + return in.DeepCopy() +} diff --git a/proto-public/pbmesh/v2beta1/expose_json.gen.go b/proto-public/pbmesh/v2beta1/expose_json.gen.go new file mode 100644 index 0000000000..14f04649c1 --- /dev/null +++ b/proto-public/pbmesh/v2beta1/expose_json.gen.go @@ -0,0 +1,33 @@ +// Code generated by protoc-json-shim. DO NOT EDIT. +package meshv2beta1 + +import ( + protojson "google.golang.org/protobuf/encoding/protojson" +) + +// MarshalJSON is a custom marshaler for ExposeConfig +func (this *ExposeConfig) MarshalJSON() ([]byte, error) { + str, err := ExposeMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for ExposeConfig +func (this *ExposeConfig) UnmarshalJSON(b []byte) error { + return ExposeUnmarshaler.Unmarshal(b, this) +} + +// MarshalJSON is a custom marshaler for ExposePath +func (this *ExposePath) MarshalJSON() ([]byte, error) { + str, err := ExposeMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for ExposePath +func (this *ExposePath) UnmarshalJSON(b []byte) error { + return ExposeUnmarshaler.Unmarshal(b, this) +} + +var ( + ExposeMarshaler = &protojson.MarshalOptions{} + ExposeUnmarshaler = &protojson.UnmarshalOptions{DiscardUnknown: false} +) diff --git a/proto-public/pbmesh/v2beta1/grpc_route.pb.go b/proto-public/pbmesh/v2beta1/grpc_route.pb.go index 63c82f3641..e0b4f36481 100644 --- a/proto-public/pbmesh/v2beta1/grpc_route.pb.go +++ b/proto-public/pbmesh/v2beta1/grpc_route.pb.go @@ -24,6 +24,8 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) +// +kubebuilder:validation:Enum=GRPC_METHOD_MATCH_TYPE_UNSPECIFIED;GRPC_METHOD_MATCH_TYPE_EXACT;GRPC_METHOD_MATCH_TYPE_REGEX +// +kubebuilder:validation:Type=string type GRPCMethodMatchType int32 const ( @@ -159,7 +161,6 @@ type GRPCRouteRule struct { Matches []*GRPCRouteMatch `protobuf:"bytes,1,rep,name=matches,proto3" json:"matches,omitempty"` Filters []*GRPCRouteFilter `protobuf:"bytes,2,rep,name=filters,proto3" json:"filters,omitempty"` // BackendRefs defines the backend(s) where matching requests should be sent. - // // Failure behavior here depends on how many BackendRefs are specified and // how many are invalid. // diff --git a/proto-public/pbmesh/v2beta1/grpc_route.proto b/proto-public/pbmesh/v2beta1/grpc_route.proto index dabce90843..a971bb0610 100644 --- a/proto-public/pbmesh/v2beta1/grpc_route.proto +++ b/proto-public/pbmesh/v2beta1/grpc_route.proto @@ -41,7 +41,6 @@ message GRPCRouteRule { repeated GRPCRouteFilter filters = 2; // BackendRefs defines the backend(s) where matching requests should be sent. - // // Failure behavior here depends on how many BackendRefs are specified and // how many are invalid. // @@ -96,6 +95,8 @@ message GRPCMethodMatch { string method = 3; } +// +kubebuilder:validation:Enum=GRPC_METHOD_MATCH_TYPE_UNSPECIFIED;GRPC_METHOD_MATCH_TYPE_EXACT;GRPC_METHOD_MATCH_TYPE_REGEX +// +kubebuilder:validation:Type=string enum GRPCMethodMatchType { GRPC_METHOD_MATCH_TYPE_UNSPECIFIED = 0; GRPC_METHOD_MATCH_TYPE_EXACT = 1; diff --git a/proto-public/pbmesh/v2beta1/grpc_route_deepcopy.gen.go b/proto-public/pbmesh/v2beta1/grpc_route_deepcopy.gen.go new file mode 100644 index 0000000000..18574bb8cc --- /dev/null +++ b/proto-public/pbmesh/v2beta1/grpc_route_deepcopy.gen.go @@ -0,0 +1,153 @@ +// Code generated by protoc-gen-deepcopy. DO NOT EDIT. +package meshv2beta1 + +import ( + proto "google.golang.org/protobuf/proto" +) + +// DeepCopyInto supports using GRPCRoute within kubernetes types, where deepcopy-gen is used. +func (in *GRPCRoute) DeepCopyInto(out *GRPCRoute) { + p := proto.Clone(in).(*GRPCRoute) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GRPCRoute. Required by controller-gen. +func (in *GRPCRoute) DeepCopy() *GRPCRoute { + if in == nil { + return nil + } + out := new(GRPCRoute) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new GRPCRoute. Required by controller-gen. +func (in *GRPCRoute) DeepCopyInterface() interface{} { + return in.DeepCopy() +} + +// DeepCopyInto supports using GRPCRouteRule within kubernetes types, where deepcopy-gen is used. +func (in *GRPCRouteRule) DeepCopyInto(out *GRPCRouteRule) { + p := proto.Clone(in).(*GRPCRouteRule) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GRPCRouteRule. Required by controller-gen. +func (in *GRPCRouteRule) DeepCopy() *GRPCRouteRule { + if in == nil { + return nil + } + out := new(GRPCRouteRule) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new GRPCRouteRule. Required by controller-gen. +func (in *GRPCRouteRule) DeepCopyInterface() interface{} { + return in.DeepCopy() +} + +// DeepCopyInto supports using GRPCRouteMatch within kubernetes types, where deepcopy-gen is used. +func (in *GRPCRouteMatch) DeepCopyInto(out *GRPCRouteMatch) { + p := proto.Clone(in).(*GRPCRouteMatch) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GRPCRouteMatch. Required by controller-gen. +func (in *GRPCRouteMatch) DeepCopy() *GRPCRouteMatch { + if in == nil { + return nil + } + out := new(GRPCRouteMatch) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new GRPCRouteMatch. Required by controller-gen. +func (in *GRPCRouteMatch) DeepCopyInterface() interface{} { + return in.DeepCopy() +} + +// DeepCopyInto supports using GRPCMethodMatch within kubernetes types, where deepcopy-gen is used. +func (in *GRPCMethodMatch) DeepCopyInto(out *GRPCMethodMatch) { + p := proto.Clone(in).(*GRPCMethodMatch) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GRPCMethodMatch. Required by controller-gen. +func (in *GRPCMethodMatch) DeepCopy() *GRPCMethodMatch { + if in == nil { + return nil + } + out := new(GRPCMethodMatch) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new GRPCMethodMatch. Required by controller-gen. +func (in *GRPCMethodMatch) DeepCopyInterface() interface{} { + return in.DeepCopy() +} + +// DeepCopyInto supports using GRPCHeaderMatch within kubernetes types, where deepcopy-gen is used. +func (in *GRPCHeaderMatch) DeepCopyInto(out *GRPCHeaderMatch) { + p := proto.Clone(in).(*GRPCHeaderMatch) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GRPCHeaderMatch. Required by controller-gen. +func (in *GRPCHeaderMatch) DeepCopy() *GRPCHeaderMatch { + if in == nil { + return nil + } + out := new(GRPCHeaderMatch) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new GRPCHeaderMatch. Required by controller-gen. +func (in *GRPCHeaderMatch) DeepCopyInterface() interface{} { + return in.DeepCopy() +} + +// DeepCopyInto supports using GRPCRouteFilter within kubernetes types, where deepcopy-gen is used. +func (in *GRPCRouteFilter) DeepCopyInto(out *GRPCRouteFilter) { + p := proto.Clone(in).(*GRPCRouteFilter) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GRPCRouteFilter. Required by controller-gen. +func (in *GRPCRouteFilter) DeepCopy() *GRPCRouteFilter { + if in == nil { + return nil + } + out := new(GRPCRouteFilter) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new GRPCRouteFilter. Required by controller-gen. +func (in *GRPCRouteFilter) DeepCopyInterface() interface{} { + return in.DeepCopy() +} + +// DeepCopyInto supports using GRPCBackendRef within kubernetes types, where deepcopy-gen is used. +func (in *GRPCBackendRef) DeepCopyInto(out *GRPCBackendRef) { + p := proto.Clone(in).(*GRPCBackendRef) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GRPCBackendRef. Required by controller-gen. +func (in *GRPCBackendRef) DeepCopy() *GRPCBackendRef { + if in == nil { + return nil + } + out := new(GRPCBackendRef) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new GRPCBackendRef. Required by controller-gen. +func (in *GRPCBackendRef) DeepCopyInterface() interface{} { + return in.DeepCopy() +} diff --git a/proto-public/pbmesh/v2beta1/grpc_route_json.gen.go b/proto-public/pbmesh/v2beta1/grpc_route_json.gen.go new file mode 100644 index 0000000000..f995efcfa8 --- /dev/null +++ b/proto-public/pbmesh/v2beta1/grpc_route_json.gen.go @@ -0,0 +1,88 @@ +// Code generated by protoc-json-shim. DO NOT EDIT. +package meshv2beta1 + +import ( + protojson "google.golang.org/protobuf/encoding/protojson" +) + +// MarshalJSON is a custom marshaler for GRPCRoute +func (this *GRPCRoute) MarshalJSON() ([]byte, error) { + str, err := GrpcRouteMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for GRPCRoute +func (this *GRPCRoute) UnmarshalJSON(b []byte) error { + return GrpcRouteUnmarshaler.Unmarshal(b, this) +} + +// MarshalJSON is a custom marshaler for GRPCRouteRule +func (this *GRPCRouteRule) MarshalJSON() ([]byte, error) { + str, err := GrpcRouteMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for GRPCRouteRule +func (this *GRPCRouteRule) UnmarshalJSON(b []byte) error { + return GrpcRouteUnmarshaler.Unmarshal(b, this) +} + +// MarshalJSON is a custom marshaler for GRPCRouteMatch +func (this *GRPCRouteMatch) MarshalJSON() ([]byte, error) { + str, err := GrpcRouteMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for GRPCRouteMatch +func (this *GRPCRouteMatch) UnmarshalJSON(b []byte) error { + return GrpcRouteUnmarshaler.Unmarshal(b, this) +} + +// MarshalJSON is a custom marshaler for GRPCMethodMatch +func (this *GRPCMethodMatch) MarshalJSON() ([]byte, error) { + str, err := GrpcRouteMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for GRPCMethodMatch +func (this *GRPCMethodMatch) UnmarshalJSON(b []byte) error { + return GrpcRouteUnmarshaler.Unmarshal(b, this) +} + +// MarshalJSON is a custom marshaler for GRPCHeaderMatch +func (this *GRPCHeaderMatch) MarshalJSON() ([]byte, error) { + str, err := GrpcRouteMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for GRPCHeaderMatch +func (this *GRPCHeaderMatch) UnmarshalJSON(b []byte) error { + return GrpcRouteUnmarshaler.Unmarshal(b, this) +} + +// MarshalJSON is a custom marshaler for GRPCRouteFilter +func (this *GRPCRouteFilter) MarshalJSON() ([]byte, error) { + str, err := GrpcRouteMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for GRPCRouteFilter +func (this *GRPCRouteFilter) UnmarshalJSON(b []byte) error { + return GrpcRouteUnmarshaler.Unmarshal(b, this) +} + +// MarshalJSON is a custom marshaler for GRPCBackendRef +func (this *GRPCBackendRef) MarshalJSON() ([]byte, error) { + str, err := GrpcRouteMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for GRPCBackendRef +func (this *GRPCBackendRef) UnmarshalJSON(b []byte) error { + return GrpcRouteUnmarshaler.Unmarshal(b, this) +} + +var ( + GrpcRouteMarshaler = &protojson.MarshalOptions{} + GrpcRouteUnmarshaler = &protojson.UnmarshalOptions{DiscardUnknown: false} +) diff --git a/proto-public/pbmesh/v2beta1/http_route.pb.go b/proto-public/pbmesh/v2beta1/http_route.pb.go index 71a3f6b03f..383308f1ad 100644 --- a/proto-public/pbmesh/v2beta1/http_route.pb.go +++ b/proto-public/pbmesh/v2beta1/http_route.pb.go @@ -35,6 +35,9 @@ const ( // // Unknown values here must result in the implementation setting the Accepted // Condition for the Route to status: False, with a Reason of UnsupportedValue. +// +// +kubebuilder:validation:Enum=PATH_MATCH_TYPE_UNSPECIFIED;PATH_MATCH_TYPE_EXACT;PATH_MATCH_TYPE_PREFIX;PATH_MATCH_TYPE_REGEX +// +kubebuilder:validation:Type=string type PathMatchType int32 const ( @@ -96,6 +99,9 @@ func (PathMatchType) EnumDescriptor() ([]byte, []int) { // // Unknown values here must result in the implementation setting the Accepted // Condition for the Route to status: False, with a Reason of UnsupportedValue. +// +// +kubebuilder:validation:Enum=HEADER_MATCH_TYPE_UNSPECIFIED;HEADER_MATCH_TYPE_EXACT;HEADER_MATCH_TYPE_REGEX;HEADER_MATCH_TYPE_PRESENT;HEADER_MATCH_TYPE_PREFIX;HEADER_MATCH_TYPE_SUFFIX +// +kubebuilder:validation:Type=string type HeaderMatchType int32 const ( @@ -155,6 +161,8 @@ func (HeaderMatchType) EnumDescriptor() ([]byte, []int) { return file_pbmesh_v2beta1_http_route_proto_rawDescGZIP(), []int{1} } +// +kubebuilder:validation:Enum=QUERY_PARAM_MATCH_TYPE_UNSPECIFIED;QUERY_PARAM_MATCH_TYPE_EXACT;QUERY_PARAM_MATCH_TYPE_REGEX;QUERY_PARAM_MATCH_TYPE_PRESENT +// +kubebuilder:validation:Type=string type QueryParamMatchType int32 const ( diff --git a/proto-public/pbmesh/v2beta1/http_route.proto b/proto-public/pbmesh/v2beta1/http_route.proto index eaf7398a56..b651921c48 100644 --- a/proto-public/pbmesh/v2beta1/http_route.proto +++ b/proto-public/pbmesh/v2beta1/http_route.proto @@ -107,6 +107,9 @@ message HTTPPathMatch { // // Unknown values here must result in the implementation setting the Accepted // Condition for the Route to status: False, with a Reason of UnsupportedValue. +// +// +kubebuilder:validation:Enum=PATH_MATCH_TYPE_UNSPECIFIED;PATH_MATCH_TYPE_EXACT;PATH_MATCH_TYPE_PREFIX;PATH_MATCH_TYPE_REGEX +// +kubebuilder:validation:Type=string enum PathMatchType { PATH_MATCH_TYPE_UNSPECIFIED = 0; PATH_MATCH_TYPE_EXACT = 1; @@ -150,6 +153,9 @@ message HTTPHeaderMatch { // // Unknown values here must result in the implementation setting the Accepted // Condition for the Route to status: False, with a Reason of UnsupportedValue. +// +// +kubebuilder:validation:Enum=HEADER_MATCH_TYPE_UNSPECIFIED;HEADER_MATCH_TYPE_EXACT;HEADER_MATCH_TYPE_REGEX;HEADER_MATCH_TYPE_PRESENT;HEADER_MATCH_TYPE_PREFIX;HEADER_MATCH_TYPE_SUFFIX +// +kubebuilder:validation:Type=string enum HeaderMatchType { HEADER_MATCH_TYPE_UNSPECIFIED = 0; HEADER_MATCH_TYPE_EXACT = 1; @@ -186,6 +192,8 @@ message HTTPQueryParamMatch { string value = 3; } +// +kubebuilder:validation:Enum=QUERY_PARAM_MATCH_TYPE_UNSPECIFIED;QUERY_PARAM_MATCH_TYPE_EXACT;QUERY_PARAM_MATCH_TYPE_REGEX;QUERY_PARAM_MATCH_TYPE_PRESENT +// +kubebuilder:validation:Type=string enum QueryParamMatchType { QUERY_PARAM_MATCH_TYPE_UNSPECIFIED = 0; QUERY_PARAM_MATCH_TYPE_EXACT = 1; @@ -243,10 +251,10 @@ message HTTPBackendRef { // supports. Weight is not a percentage and the sum of weights does not need // to equal 100. // - //If only one backend is specified and it has a weight greater than 0, 100% - //of the traffic is forwarded to that backend. If weight is set to 0, no - //traffic should be forwarded for this entry. If unspecified, weight defaults - //to 1. + // If only one backend is specified and it has a weight greater than 0, 100% + // of the traffic is forwarded to that backend. If weight is set to 0, no + // traffic should be forwarded for this entry. If unspecified, weight defaults + // to 1. uint32 weight = 2; // Filters defined at this level should be executed if and only if the diff --git a/proto-public/pbmesh/v2beta1/http_route_deepcopy.gen.go b/proto-public/pbmesh/v2beta1/http_route_deepcopy.gen.go new file mode 100644 index 0000000000..222cb8361e --- /dev/null +++ b/proto-public/pbmesh/v2beta1/http_route_deepcopy.gen.go @@ -0,0 +1,237 @@ +// Code generated by protoc-gen-deepcopy. DO NOT EDIT. +package meshv2beta1 + +import ( + proto "google.golang.org/protobuf/proto" +) + +// DeepCopyInto supports using HTTPRoute within kubernetes types, where deepcopy-gen is used. +func (in *HTTPRoute) DeepCopyInto(out *HTTPRoute) { + p := proto.Clone(in).(*HTTPRoute) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HTTPRoute. Required by controller-gen. +func (in *HTTPRoute) DeepCopy() *HTTPRoute { + if in == nil { + return nil + } + out := new(HTTPRoute) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new HTTPRoute. Required by controller-gen. +func (in *HTTPRoute) DeepCopyInterface() interface{} { + return in.DeepCopy() +} + +// DeepCopyInto supports using HTTPRouteRule within kubernetes types, where deepcopy-gen is used. +func (in *HTTPRouteRule) DeepCopyInto(out *HTTPRouteRule) { + p := proto.Clone(in).(*HTTPRouteRule) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HTTPRouteRule. Required by controller-gen. +func (in *HTTPRouteRule) DeepCopy() *HTTPRouteRule { + if in == nil { + return nil + } + out := new(HTTPRouteRule) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new HTTPRouteRule. Required by controller-gen. +func (in *HTTPRouteRule) DeepCopyInterface() interface{} { + return in.DeepCopy() +} + +// DeepCopyInto supports using HTTPRouteMatch within kubernetes types, where deepcopy-gen is used. +func (in *HTTPRouteMatch) DeepCopyInto(out *HTTPRouteMatch) { + p := proto.Clone(in).(*HTTPRouteMatch) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HTTPRouteMatch. Required by controller-gen. +func (in *HTTPRouteMatch) DeepCopy() *HTTPRouteMatch { + if in == nil { + return nil + } + out := new(HTTPRouteMatch) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new HTTPRouteMatch. Required by controller-gen. +func (in *HTTPRouteMatch) DeepCopyInterface() interface{} { + return in.DeepCopy() +} + +// DeepCopyInto supports using HTTPPathMatch within kubernetes types, where deepcopy-gen is used. +func (in *HTTPPathMatch) DeepCopyInto(out *HTTPPathMatch) { + p := proto.Clone(in).(*HTTPPathMatch) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HTTPPathMatch. Required by controller-gen. +func (in *HTTPPathMatch) DeepCopy() *HTTPPathMatch { + if in == nil { + return nil + } + out := new(HTTPPathMatch) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new HTTPPathMatch. Required by controller-gen. +func (in *HTTPPathMatch) DeepCopyInterface() interface{} { + return in.DeepCopy() +} + +// DeepCopyInto supports using HTTPHeaderMatch within kubernetes types, where deepcopy-gen is used. +func (in *HTTPHeaderMatch) DeepCopyInto(out *HTTPHeaderMatch) { + p := proto.Clone(in).(*HTTPHeaderMatch) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HTTPHeaderMatch. Required by controller-gen. +func (in *HTTPHeaderMatch) DeepCopy() *HTTPHeaderMatch { + if in == nil { + return nil + } + out := new(HTTPHeaderMatch) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new HTTPHeaderMatch. Required by controller-gen. +func (in *HTTPHeaderMatch) DeepCopyInterface() interface{} { + return in.DeepCopy() +} + +// DeepCopyInto supports using HTTPQueryParamMatch within kubernetes types, where deepcopy-gen is used. +func (in *HTTPQueryParamMatch) DeepCopyInto(out *HTTPQueryParamMatch) { + p := proto.Clone(in).(*HTTPQueryParamMatch) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HTTPQueryParamMatch. Required by controller-gen. +func (in *HTTPQueryParamMatch) DeepCopy() *HTTPQueryParamMatch { + if in == nil { + return nil + } + out := new(HTTPQueryParamMatch) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new HTTPQueryParamMatch. Required by controller-gen. +func (in *HTTPQueryParamMatch) DeepCopyInterface() interface{} { + return in.DeepCopy() +} + +// DeepCopyInto supports using HTTPRouteFilter within kubernetes types, where deepcopy-gen is used. +func (in *HTTPRouteFilter) DeepCopyInto(out *HTTPRouteFilter) { + p := proto.Clone(in).(*HTTPRouteFilter) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HTTPRouteFilter. Required by controller-gen. +func (in *HTTPRouteFilter) DeepCopy() *HTTPRouteFilter { + if in == nil { + return nil + } + out := new(HTTPRouteFilter) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new HTTPRouteFilter. Required by controller-gen. +func (in *HTTPRouteFilter) DeepCopyInterface() interface{} { + return in.DeepCopy() +} + +// DeepCopyInto supports using HTTPHeaderFilter within kubernetes types, where deepcopy-gen is used. +func (in *HTTPHeaderFilter) DeepCopyInto(out *HTTPHeaderFilter) { + p := proto.Clone(in).(*HTTPHeaderFilter) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HTTPHeaderFilter. Required by controller-gen. +func (in *HTTPHeaderFilter) DeepCopy() *HTTPHeaderFilter { + if in == nil { + return nil + } + out := new(HTTPHeaderFilter) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new HTTPHeaderFilter. Required by controller-gen. +func (in *HTTPHeaderFilter) DeepCopyInterface() interface{} { + return in.DeepCopy() +} + +// DeepCopyInto supports using HTTPHeader within kubernetes types, where deepcopy-gen is used. +func (in *HTTPHeader) DeepCopyInto(out *HTTPHeader) { + p := proto.Clone(in).(*HTTPHeader) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HTTPHeader. Required by controller-gen. +func (in *HTTPHeader) DeepCopy() *HTTPHeader { + if in == nil { + return nil + } + out := new(HTTPHeader) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new HTTPHeader. Required by controller-gen. +func (in *HTTPHeader) DeepCopyInterface() interface{} { + return in.DeepCopy() +} + +// DeepCopyInto supports using HTTPURLRewriteFilter within kubernetes types, where deepcopy-gen is used. +func (in *HTTPURLRewriteFilter) DeepCopyInto(out *HTTPURLRewriteFilter) { + p := proto.Clone(in).(*HTTPURLRewriteFilter) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HTTPURLRewriteFilter. Required by controller-gen. +func (in *HTTPURLRewriteFilter) DeepCopy() *HTTPURLRewriteFilter { + if in == nil { + return nil + } + out := new(HTTPURLRewriteFilter) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new HTTPURLRewriteFilter. Required by controller-gen. +func (in *HTTPURLRewriteFilter) DeepCopyInterface() interface{} { + return in.DeepCopy() +} + +// DeepCopyInto supports using HTTPBackendRef within kubernetes types, where deepcopy-gen is used. +func (in *HTTPBackendRef) DeepCopyInto(out *HTTPBackendRef) { + p := proto.Clone(in).(*HTTPBackendRef) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HTTPBackendRef. Required by controller-gen. +func (in *HTTPBackendRef) DeepCopy() *HTTPBackendRef { + if in == nil { + return nil + } + out := new(HTTPBackendRef) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new HTTPBackendRef. Required by controller-gen. +func (in *HTTPBackendRef) DeepCopyInterface() interface{} { + return in.DeepCopy() +} diff --git a/proto-public/pbmesh/v2beta1/http_route_json.gen.go b/proto-public/pbmesh/v2beta1/http_route_json.gen.go new file mode 100644 index 0000000000..2860a5a356 --- /dev/null +++ b/proto-public/pbmesh/v2beta1/http_route_json.gen.go @@ -0,0 +1,132 @@ +// Code generated by protoc-json-shim. DO NOT EDIT. +package meshv2beta1 + +import ( + protojson "google.golang.org/protobuf/encoding/protojson" +) + +// MarshalJSON is a custom marshaler for HTTPRoute +func (this *HTTPRoute) MarshalJSON() ([]byte, error) { + str, err := HttpRouteMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for HTTPRoute +func (this *HTTPRoute) UnmarshalJSON(b []byte) error { + return HttpRouteUnmarshaler.Unmarshal(b, this) +} + +// MarshalJSON is a custom marshaler for HTTPRouteRule +func (this *HTTPRouteRule) MarshalJSON() ([]byte, error) { + str, err := HttpRouteMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for HTTPRouteRule +func (this *HTTPRouteRule) UnmarshalJSON(b []byte) error { + return HttpRouteUnmarshaler.Unmarshal(b, this) +} + +// MarshalJSON is a custom marshaler for HTTPRouteMatch +func (this *HTTPRouteMatch) MarshalJSON() ([]byte, error) { + str, err := HttpRouteMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for HTTPRouteMatch +func (this *HTTPRouteMatch) UnmarshalJSON(b []byte) error { + return HttpRouteUnmarshaler.Unmarshal(b, this) +} + +// MarshalJSON is a custom marshaler for HTTPPathMatch +func (this *HTTPPathMatch) MarshalJSON() ([]byte, error) { + str, err := HttpRouteMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for HTTPPathMatch +func (this *HTTPPathMatch) UnmarshalJSON(b []byte) error { + return HttpRouteUnmarshaler.Unmarshal(b, this) +} + +// MarshalJSON is a custom marshaler for HTTPHeaderMatch +func (this *HTTPHeaderMatch) MarshalJSON() ([]byte, error) { + str, err := HttpRouteMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for HTTPHeaderMatch +func (this *HTTPHeaderMatch) UnmarshalJSON(b []byte) error { + return HttpRouteUnmarshaler.Unmarshal(b, this) +} + +// MarshalJSON is a custom marshaler for HTTPQueryParamMatch +func (this *HTTPQueryParamMatch) MarshalJSON() ([]byte, error) { + str, err := HttpRouteMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for HTTPQueryParamMatch +func (this *HTTPQueryParamMatch) UnmarshalJSON(b []byte) error { + return HttpRouteUnmarshaler.Unmarshal(b, this) +} + +// MarshalJSON is a custom marshaler for HTTPRouteFilter +func (this *HTTPRouteFilter) MarshalJSON() ([]byte, error) { + str, err := HttpRouteMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for HTTPRouteFilter +func (this *HTTPRouteFilter) UnmarshalJSON(b []byte) error { + return HttpRouteUnmarshaler.Unmarshal(b, this) +} + +// MarshalJSON is a custom marshaler for HTTPHeaderFilter +func (this *HTTPHeaderFilter) MarshalJSON() ([]byte, error) { + str, err := HttpRouteMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for HTTPHeaderFilter +func (this *HTTPHeaderFilter) UnmarshalJSON(b []byte) error { + return HttpRouteUnmarshaler.Unmarshal(b, this) +} + +// MarshalJSON is a custom marshaler for HTTPHeader +func (this *HTTPHeader) MarshalJSON() ([]byte, error) { + str, err := HttpRouteMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for HTTPHeader +func (this *HTTPHeader) UnmarshalJSON(b []byte) error { + return HttpRouteUnmarshaler.Unmarshal(b, this) +} + +// MarshalJSON is a custom marshaler for HTTPURLRewriteFilter +func (this *HTTPURLRewriteFilter) MarshalJSON() ([]byte, error) { + str, err := HttpRouteMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for HTTPURLRewriteFilter +func (this *HTTPURLRewriteFilter) UnmarshalJSON(b []byte) error { + return HttpRouteUnmarshaler.Unmarshal(b, this) +} + +// MarshalJSON is a custom marshaler for HTTPBackendRef +func (this *HTTPBackendRef) MarshalJSON() ([]byte, error) { + str, err := HttpRouteMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for HTTPBackendRef +func (this *HTTPBackendRef) UnmarshalJSON(b []byte) error { + return HttpRouteUnmarshaler.Unmarshal(b, this) +} + +var ( + HttpRouteMarshaler = &protojson.MarshalOptions{} + HttpRouteUnmarshaler = &protojson.UnmarshalOptions{DiscardUnknown: false} +) diff --git a/proto-public/pbmesh/v2beta1/http_route_retries_deepcopy.gen.go b/proto-public/pbmesh/v2beta1/http_route_retries_deepcopy.gen.go new file mode 100644 index 0000000000..b523a58b77 --- /dev/null +++ b/proto-public/pbmesh/v2beta1/http_route_retries_deepcopy.gen.go @@ -0,0 +1,27 @@ +// Code generated by protoc-gen-deepcopy. DO NOT EDIT. +package meshv2beta1 + +import ( + proto "google.golang.org/protobuf/proto" +) + +// DeepCopyInto supports using HTTPRouteRetries within kubernetes types, where deepcopy-gen is used. +func (in *HTTPRouteRetries) DeepCopyInto(out *HTTPRouteRetries) { + p := proto.Clone(in).(*HTTPRouteRetries) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HTTPRouteRetries. Required by controller-gen. +func (in *HTTPRouteRetries) DeepCopy() *HTTPRouteRetries { + if in == nil { + return nil + } + out := new(HTTPRouteRetries) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new HTTPRouteRetries. Required by controller-gen. +func (in *HTTPRouteRetries) DeepCopyInterface() interface{} { + return in.DeepCopy() +} diff --git a/proto-public/pbmesh/v2beta1/http_route_retries_json.gen.go b/proto-public/pbmesh/v2beta1/http_route_retries_json.gen.go new file mode 100644 index 0000000000..5dfe2a5061 --- /dev/null +++ b/proto-public/pbmesh/v2beta1/http_route_retries_json.gen.go @@ -0,0 +1,22 @@ +// Code generated by protoc-json-shim. DO NOT EDIT. +package meshv2beta1 + +import ( + protojson "google.golang.org/protobuf/encoding/protojson" +) + +// MarshalJSON is a custom marshaler for HTTPRouteRetries +func (this *HTTPRouteRetries) MarshalJSON() ([]byte, error) { + str, err := HttpRouteRetriesMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for HTTPRouteRetries +func (this *HTTPRouteRetries) UnmarshalJSON(b []byte) error { + return HttpRouteRetriesUnmarshaler.Unmarshal(b, this) +} + +var ( + HttpRouteRetriesMarshaler = &protojson.MarshalOptions{} + HttpRouteRetriesUnmarshaler = &protojson.UnmarshalOptions{DiscardUnknown: false} +) diff --git a/proto-public/pbmesh/v2beta1/http_route_timeouts.pb.go b/proto-public/pbmesh/v2beta1/http_route_timeouts.pb.go index 85205f83e4..87e5ec3f57 100644 --- a/proto-public/pbmesh/v2beta1/http_route_timeouts.pb.go +++ b/proto-public/pbmesh/v2beta1/http_route_timeouts.pb.go @@ -33,8 +33,10 @@ type HTTPRouteTimeouts struct { // RequestTimeout is the total amount of time permitted for the entire // downstream request (and retries) to be processed. + // +kubebuilder:validation:Format=duration Request *durationpb.Duration `protobuf:"bytes,1,opt,name=request,proto3" json:"request,omitempty"` // Idle specifies the total amount of time permitted for the request stream to be idle. + // +kubebuilder:validation:Format=duration Idle *durationpb.Duration `protobuf:"bytes,2,opt,name=idle,proto3" json:"idle,omitempty"` } diff --git a/proto-public/pbmesh/v2beta1/http_route_timeouts.proto b/proto-public/pbmesh/v2beta1/http_route_timeouts.proto index b17a522bae..246971251d 100644 --- a/proto-public/pbmesh/v2beta1/http_route_timeouts.proto +++ b/proto-public/pbmesh/v2beta1/http_route_timeouts.proto @@ -12,8 +12,10 @@ import "google/protobuf/duration.proto"; message HTTPRouteTimeouts { // RequestTimeout is the total amount of time permitted for the entire // downstream request (and retries) to be processed. + // +kubebuilder:validation:Format=duration google.protobuf.Duration request = 1; // Idle specifies the total amount of time permitted for the request stream to be idle. + // +kubebuilder:validation:Format=duration google.protobuf.Duration idle = 2; } diff --git a/proto-public/pbmesh/v2beta1/http_route_timeouts_deepcopy.gen.go b/proto-public/pbmesh/v2beta1/http_route_timeouts_deepcopy.gen.go new file mode 100644 index 0000000000..ea92d9038d --- /dev/null +++ b/proto-public/pbmesh/v2beta1/http_route_timeouts_deepcopy.gen.go @@ -0,0 +1,27 @@ +// Code generated by protoc-gen-deepcopy. DO NOT EDIT. +package meshv2beta1 + +import ( + proto "google.golang.org/protobuf/proto" +) + +// DeepCopyInto supports using HTTPRouteTimeouts within kubernetes types, where deepcopy-gen is used. +func (in *HTTPRouteTimeouts) DeepCopyInto(out *HTTPRouteTimeouts) { + p := proto.Clone(in).(*HTTPRouteTimeouts) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HTTPRouteTimeouts. Required by controller-gen. +func (in *HTTPRouteTimeouts) DeepCopy() *HTTPRouteTimeouts { + if in == nil { + return nil + } + out := new(HTTPRouteTimeouts) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new HTTPRouteTimeouts. Required by controller-gen. +func (in *HTTPRouteTimeouts) DeepCopyInterface() interface{} { + return in.DeepCopy() +} diff --git a/proto-public/pbmesh/v2beta1/http_route_timeouts_json.gen.go b/proto-public/pbmesh/v2beta1/http_route_timeouts_json.gen.go new file mode 100644 index 0000000000..c81461d225 --- /dev/null +++ b/proto-public/pbmesh/v2beta1/http_route_timeouts_json.gen.go @@ -0,0 +1,22 @@ +// Code generated by protoc-json-shim. DO NOT EDIT. +package meshv2beta1 + +import ( + protojson "google.golang.org/protobuf/encoding/protojson" +) + +// MarshalJSON is a custom marshaler for HTTPRouteTimeouts +func (this *HTTPRouteTimeouts) MarshalJSON() ([]byte, error) { + str, err := HttpRouteTimeoutsMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for HTTPRouteTimeouts +func (this *HTTPRouteTimeouts) UnmarshalJSON(b []byte) error { + return HttpRouteTimeoutsUnmarshaler.Unmarshal(b, this) +} + +var ( + HttpRouteTimeoutsMarshaler = &protojson.MarshalOptions{} + HttpRouteTimeoutsUnmarshaler = &protojson.UnmarshalOptions{DiscardUnknown: false} +) diff --git a/proto-public/pbmesh/v2beta1/pbproxystate/access_logs.pb.go b/proto-public/pbmesh/v2beta1/pbproxystate/access_logs.pb.go index 62fdeab5d7..c1c30af893 100644 --- a/proto-public/pbmesh/v2beta1/pbproxystate/access_logs.pb.go +++ b/proto-public/pbmesh/v2beta1/pbproxystate/access_logs.pb.go @@ -23,6 +23,8 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) +// +kubebuilder:validation:Enum=LOG_SINK_TYPE_DEFAULT;LOG_SINK_TYPE_FILE;LOG_SINK_TYPE_STDERR;LOG_SINK_TYPE_STDOUT +// +kubebuilder:validation:Type=string type LogSinkType int32 const ( diff --git a/proto-public/pbmesh/v2beta1/pbproxystate/access_logs.proto b/proto-public/pbmesh/v2beta1/pbproxystate/access_logs.proto index cca82950ad..92249a80b2 100644 --- a/proto-public/pbmesh/v2beta1/pbproxystate/access_logs.proto +++ b/proto-public/pbmesh/v2beta1/pbproxystate/access_logs.proto @@ -23,6 +23,8 @@ message AccessLogs { } } +// +kubebuilder:validation:Enum=LOG_SINK_TYPE_DEFAULT;LOG_SINK_TYPE_FILE;LOG_SINK_TYPE_STDERR;LOG_SINK_TYPE_STDOUT +// +kubebuilder:validation:Type=string enum LogSinkType { // buf:lint:ignore ENUM_ZERO_VALUE_SUFFIX LOG_SINK_TYPE_DEFAULT = 0; diff --git a/proto-public/pbmesh/v2beta1/pbproxystate/access_logs_deepcopy.gen.go b/proto-public/pbmesh/v2beta1/pbproxystate/access_logs_deepcopy.gen.go new file mode 100644 index 0000000000..af2ac36c73 --- /dev/null +++ b/proto-public/pbmesh/v2beta1/pbproxystate/access_logs_deepcopy.gen.go @@ -0,0 +1,27 @@ +// Code generated by protoc-gen-deepcopy. DO NOT EDIT. +package pbproxystate + +import ( + proto "google.golang.org/protobuf/proto" +) + +// DeepCopyInto supports using AccessLogs within kubernetes types, where deepcopy-gen is used. +func (in *AccessLogs) DeepCopyInto(out *AccessLogs) { + p := proto.Clone(in).(*AccessLogs) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AccessLogs. Required by controller-gen. +func (in *AccessLogs) DeepCopy() *AccessLogs { + if in == nil { + return nil + } + out := new(AccessLogs) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new AccessLogs. Required by controller-gen. +func (in *AccessLogs) DeepCopyInterface() interface{} { + return in.DeepCopy() +} diff --git a/proto-public/pbmesh/v2beta1/pbproxystate/access_logs_json.gen.go b/proto-public/pbmesh/v2beta1/pbproxystate/access_logs_json.gen.go new file mode 100644 index 0000000000..09e5ffb284 --- /dev/null +++ b/proto-public/pbmesh/v2beta1/pbproxystate/access_logs_json.gen.go @@ -0,0 +1,22 @@ +// Code generated by protoc-json-shim. DO NOT EDIT. +package pbproxystate + +import ( + protojson "google.golang.org/protobuf/encoding/protojson" +) + +// MarshalJSON is a custom marshaler for AccessLogs +func (this *AccessLogs) MarshalJSON() ([]byte, error) { + str, err := AccessLogsMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for AccessLogs +func (this *AccessLogs) UnmarshalJSON(b []byte) error { + return AccessLogsUnmarshaler.Unmarshal(b, this) +} + +var ( + AccessLogsMarshaler = &protojson.MarshalOptions{} + AccessLogsUnmarshaler = &protojson.UnmarshalOptions{DiscardUnknown: false} +) diff --git a/proto-public/pbmesh/v2beta1/pbproxystate/address_deepcopy.gen.go b/proto-public/pbmesh/v2beta1/pbproxystate/address_deepcopy.gen.go new file mode 100644 index 0000000000..81cf39a459 --- /dev/null +++ b/proto-public/pbmesh/v2beta1/pbproxystate/address_deepcopy.gen.go @@ -0,0 +1,48 @@ +// Code generated by protoc-gen-deepcopy. DO NOT EDIT. +package pbproxystate + +import ( + proto "google.golang.org/protobuf/proto" +) + +// DeepCopyInto supports using HostPortAddress within kubernetes types, where deepcopy-gen is used. +func (in *HostPortAddress) DeepCopyInto(out *HostPortAddress) { + p := proto.Clone(in).(*HostPortAddress) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HostPortAddress. Required by controller-gen. +func (in *HostPortAddress) DeepCopy() *HostPortAddress { + if in == nil { + return nil + } + out := new(HostPortAddress) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new HostPortAddress. Required by controller-gen. +func (in *HostPortAddress) DeepCopyInterface() interface{} { + return in.DeepCopy() +} + +// DeepCopyInto supports using UnixSocketAddress within kubernetes types, where deepcopy-gen is used. +func (in *UnixSocketAddress) DeepCopyInto(out *UnixSocketAddress) { + p := proto.Clone(in).(*UnixSocketAddress) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UnixSocketAddress. Required by controller-gen. +func (in *UnixSocketAddress) DeepCopy() *UnixSocketAddress { + if in == nil { + return nil + } + out := new(UnixSocketAddress) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new UnixSocketAddress. Required by controller-gen. +func (in *UnixSocketAddress) DeepCopyInterface() interface{} { + return in.DeepCopy() +} diff --git a/proto-public/pbmesh/v2beta1/pbproxystate/address_json.gen.go b/proto-public/pbmesh/v2beta1/pbproxystate/address_json.gen.go new file mode 100644 index 0000000000..c4de5d5270 --- /dev/null +++ b/proto-public/pbmesh/v2beta1/pbproxystate/address_json.gen.go @@ -0,0 +1,33 @@ +// Code generated by protoc-json-shim. DO NOT EDIT. +package pbproxystate + +import ( + protojson "google.golang.org/protobuf/encoding/protojson" +) + +// MarshalJSON is a custom marshaler for HostPortAddress +func (this *HostPortAddress) MarshalJSON() ([]byte, error) { + str, err := AddressMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for HostPortAddress +func (this *HostPortAddress) UnmarshalJSON(b []byte) error { + return AddressUnmarshaler.Unmarshal(b, this) +} + +// MarshalJSON is a custom marshaler for UnixSocketAddress +func (this *UnixSocketAddress) MarshalJSON() ([]byte, error) { + str, err := AddressMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for UnixSocketAddress +func (this *UnixSocketAddress) UnmarshalJSON(b []byte) error { + return AddressUnmarshaler.Unmarshal(b, this) +} + +var ( + AddressMarshaler = &protojson.MarshalOptions{} + AddressUnmarshaler = &protojson.UnmarshalOptions{DiscardUnknown: false} +) diff --git a/proto-public/pbmesh/v2beta1/pbproxystate/cluster.pb.go b/proto-public/pbmesh/v2beta1/pbproxystate/cluster.pb.go index 5575ce6f92..81a0f3f97e 100644 --- a/proto-public/pbmesh/v2beta1/pbproxystate/cluster.pb.go +++ b/proto-public/pbmesh/v2beta1/pbproxystate/cluster.pb.go @@ -25,6 +25,8 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) +// +kubebuilder:validation:Enum=DISCOVERY_TYPE_LOGICAL;DISCOVERY_TYPE_STRICT +// +kubebuilder:validation:Type=string type DiscoveryType int32 const ( @@ -252,7 +254,8 @@ type FailoverGroupConfig struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - UseAltStatName bool `protobuf:"varint,1,opt,name=use_alt_stat_name,json=useAltStatName,proto3" json:"use_alt_stat_name,omitempty"` + UseAltStatName bool `protobuf:"varint,1,opt,name=use_alt_stat_name,json=useAltStatName,proto3" json:"use_alt_stat_name,omitempty"` + // +kubebuilder:validation:Type=string ConnectTimeout *durationpb.Duration `protobuf:"bytes,2,opt,name=connect_timeout,json=connectTimeout,proto3" json:"connect_timeout,omitempty"` } @@ -913,6 +916,7 @@ type DynamicEndpointGroupConfig struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + // +kubebuilder:validation:Format=duration ConnectTimeout *durationpb.Duration `protobuf:"bytes,1,opt,name=connect_timeout,json=connectTimeout,proto3" json:"connect_timeout,omitempty"` DisablePanicThreshold bool `protobuf:"varint,2,opt,name=disable_panic_threshold,json=disablePanicThreshold,proto3" json:"disable_panic_threshold,omitempty"` // Types that are assignable to LbPolicy: @@ -1410,11 +1414,13 @@ type OutlierDetection struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + // +kubebuilder:validation:Format=duration Interval *durationpb.Duration `protobuf:"bytes,1,opt,name=interval,proto3" json:"interval,omitempty"` Consecutive_5Xx *wrapperspb.UInt32Value `protobuf:"bytes,2,opt,name=consecutive_5xx,json=consecutive5xx,proto3" json:"consecutive_5xx,omitempty"` EnforcingConsecutive_5Xx *wrapperspb.UInt32Value `protobuf:"bytes,3,opt,name=enforcing_consecutive_5xx,json=enforcingConsecutive5xx,proto3" json:"enforcing_consecutive_5xx,omitempty"` MaxEjectionPercent *wrapperspb.UInt32Value `protobuf:"bytes,4,opt,name=max_ejection_percent,json=maxEjectionPercent,proto3" json:"max_ejection_percent,omitempty"` - BaseEjectionTime *durationpb.Duration `protobuf:"bytes,5,opt,name=base_ejection_time,json=baseEjectionTime,proto3" json:"base_ejection_time,omitempty"` + // +kubebuilder:validation:Format=duration + BaseEjectionTime *durationpb.Duration `protobuf:"bytes,5,opt,name=base_ejection_time,json=baseEjectionTime,proto3" json:"base_ejection_time,omitempty"` } func (x *OutlierDetection) Reset() { @@ -1552,6 +1558,7 @@ type PassthroughEndpointGroupConfig struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + // +kubebuilder:validation:Format=duration ConnectTimeout *durationpb.Duration `protobuf:"bytes,1,opt,name=connect_timeout,json=connectTimeout,proto3" json:"connect_timeout,omitempty"` } @@ -1599,6 +1606,7 @@ type DNSEndpointGroupConfig struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + // +kubebuilder:validation:Format=duration ConnectTimeout *durationpb.Duration `protobuf:"bytes,1,opt,name=connect_timeout,json=connectTimeout,proto3" json:"connect_timeout,omitempty"` DisablePanicThreshold bool `protobuf:"varint,2,opt,name=disable_panic_threshold,json=disablePanicThreshold,proto3" json:"disable_panic_threshold,omitempty"` DiscoveryType DiscoveryType `protobuf:"varint,3,opt,name=discovery_type,json=discoveryType,proto3,enum=hashicorp.consul.mesh.v2beta1.pbproxystate.DiscoveryType" json:"discovery_type,omitempty"` @@ -1694,6 +1702,7 @@ type StaticEndpointGroupConfig struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + // +kubebuilder:validation:Format=duration ConnectTimeout *durationpb.Duration `protobuf:"bytes,1,opt,name=connect_timeout,json=connectTimeout,proto3" json:"connect_timeout,omitempty"` CircuitBreakers *CircuitBreakers `protobuf:"bytes,2,opt,name=circuit_breakers,json=circuitBreakers,proto3" json:"circuit_breakers,omitempty"` } diff --git a/proto-public/pbmesh/v2beta1/pbproxystate/cluster.proto b/proto-public/pbmesh/v2beta1/pbproxystate/cluster.proto index af31e583e3..c72fccbb85 100644 --- a/proto-public/pbmesh/v2beta1/pbproxystate/cluster.proto +++ b/proto-public/pbmesh/v2beta1/pbproxystate/cluster.proto @@ -34,6 +34,7 @@ message FailoverGroup { message FailoverGroupConfig { bool use_alt_stat_name = 1; + // +kubebuilder:validation:Type=string google.protobuf.Duration connect_timeout = 2; } @@ -108,6 +109,7 @@ message L7WeightedDestinationCluster { } message DynamicEndpointGroupConfig { + // +kubebuilder:validation:Format=duration google.protobuf.Duration connect_timeout = 1; bool disable_panic_threshold = 2; oneof lb_policy { @@ -148,10 +150,12 @@ message UpstreamLimits { } message OutlierDetection { + // +kubebuilder:validation:Format=duration google.protobuf.Duration interval = 1; google.protobuf.UInt32Value consecutive_5xx = 2; google.protobuf.UInt32Value enforcing_consecutive_5xx = 3; google.protobuf.UInt32Value max_ejection_percent = 4; + // +kubebuilder:validation:Format=duration google.protobuf.Duration base_ejection_time = 5; } @@ -162,10 +166,12 @@ message UpstreamConnectionOptions { } message PassthroughEndpointGroupConfig { + // +kubebuilder:validation:Format=duration google.protobuf.Duration connect_timeout = 1; } message DNSEndpointGroupConfig { + // +kubebuilder:validation:Format=duration google.protobuf.Duration connect_timeout = 1; bool disable_panic_threshold = 2; DiscoveryType discovery_type = 3; @@ -175,6 +181,8 @@ message DNSEndpointGroupConfig { bool use_alt_stat_name = 7; } +// +kubebuilder:validation:Enum=DISCOVERY_TYPE_LOGICAL;DISCOVERY_TYPE_STRICT +// +kubebuilder:validation:Type=string enum DiscoveryType { // buf:lint:ignore ENUM_ZERO_VALUE_SUFFIX DISCOVERY_TYPE_LOGICAL = 0; @@ -182,6 +190,7 @@ enum DiscoveryType { } message StaticEndpointGroupConfig { + // +kubebuilder:validation:Format=duration google.protobuf.Duration connect_timeout = 1; CircuitBreakers circuit_breakers = 2; } diff --git a/proto-public/pbmesh/v2beta1/pbproxystate/cluster_deepcopy.gen.go b/proto-public/pbmesh/v2beta1/pbproxystate/cluster_deepcopy.gen.go new file mode 100644 index 0000000000..f06ac976e1 --- /dev/null +++ b/proto-public/pbmesh/v2beta1/pbproxystate/cluster_deepcopy.gen.go @@ -0,0 +1,552 @@ +// Code generated by protoc-gen-deepcopy. DO NOT EDIT. +package pbproxystate + +import ( + proto "google.golang.org/protobuf/proto" +) + +// DeepCopyInto supports using Cluster within kubernetes types, where deepcopy-gen is used. +func (in *Cluster) DeepCopyInto(out *Cluster) { + p := proto.Clone(in).(*Cluster) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Cluster. Required by controller-gen. +func (in *Cluster) DeepCopy() *Cluster { + if in == nil { + return nil + } + out := new(Cluster) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new Cluster. Required by controller-gen. +func (in *Cluster) DeepCopyInterface() interface{} { + return in.DeepCopy() +} + +// DeepCopyInto supports using FailoverGroup within kubernetes types, where deepcopy-gen is used. +func (in *FailoverGroup) DeepCopyInto(out *FailoverGroup) { + p := proto.Clone(in).(*FailoverGroup) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FailoverGroup. Required by controller-gen. +func (in *FailoverGroup) DeepCopy() *FailoverGroup { + if in == nil { + return nil + } + out := new(FailoverGroup) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new FailoverGroup. Required by controller-gen. +func (in *FailoverGroup) DeepCopyInterface() interface{} { + return in.DeepCopy() +} + +// DeepCopyInto supports using FailoverGroupConfig within kubernetes types, where deepcopy-gen is used. +func (in *FailoverGroupConfig) DeepCopyInto(out *FailoverGroupConfig) { + p := proto.Clone(in).(*FailoverGroupConfig) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FailoverGroupConfig. Required by controller-gen. +func (in *FailoverGroupConfig) DeepCopy() *FailoverGroupConfig { + if in == nil { + return nil + } + out := new(FailoverGroupConfig) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new FailoverGroupConfig. Required by controller-gen. +func (in *FailoverGroupConfig) DeepCopyInterface() interface{} { + return in.DeepCopy() +} + +// DeepCopyInto supports using EndpointGroup within kubernetes types, where deepcopy-gen is used. +func (in *EndpointGroup) DeepCopyInto(out *EndpointGroup) { + p := proto.Clone(in).(*EndpointGroup) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EndpointGroup. Required by controller-gen. +func (in *EndpointGroup) DeepCopy() *EndpointGroup { + if in == nil { + return nil + } + out := new(EndpointGroup) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new EndpointGroup. Required by controller-gen. +func (in *EndpointGroup) DeepCopyInterface() interface{} { + return in.DeepCopy() +} + +// DeepCopyInto supports using DynamicEndpointGroup within kubernetes types, where deepcopy-gen is used. +func (in *DynamicEndpointGroup) DeepCopyInto(out *DynamicEndpointGroup) { + p := proto.Clone(in).(*DynamicEndpointGroup) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DynamicEndpointGroup. Required by controller-gen. +func (in *DynamicEndpointGroup) DeepCopy() *DynamicEndpointGroup { + if in == nil { + return nil + } + out := new(DynamicEndpointGroup) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new DynamicEndpointGroup. Required by controller-gen. +func (in *DynamicEndpointGroup) DeepCopyInterface() interface{} { + return in.DeepCopy() +} + +// DeepCopyInto supports using PassthroughEndpointGroup within kubernetes types, where deepcopy-gen is used. +func (in *PassthroughEndpointGroup) DeepCopyInto(out *PassthroughEndpointGroup) { + p := proto.Clone(in).(*PassthroughEndpointGroup) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PassthroughEndpointGroup. Required by controller-gen. +func (in *PassthroughEndpointGroup) DeepCopy() *PassthroughEndpointGroup { + if in == nil { + return nil + } + out := new(PassthroughEndpointGroup) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new PassthroughEndpointGroup. Required by controller-gen. +func (in *PassthroughEndpointGroup) DeepCopyInterface() interface{} { + return in.DeepCopy() +} + +// DeepCopyInto supports using DNSEndpointGroup within kubernetes types, where deepcopy-gen is used. +func (in *DNSEndpointGroup) DeepCopyInto(out *DNSEndpointGroup) { + p := proto.Clone(in).(*DNSEndpointGroup) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DNSEndpointGroup. Required by controller-gen. +func (in *DNSEndpointGroup) DeepCopy() *DNSEndpointGroup { + if in == nil { + return nil + } + out := new(DNSEndpointGroup) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new DNSEndpointGroup. Required by controller-gen. +func (in *DNSEndpointGroup) DeepCopyInterface() interface{} { + return in.DeepCopy() +} + +// DeepCopyInto supports using StaticEndpointGroup within kubernetes types, where deepcopy-gen is used. +func (in *StaticEndpointGroup) DeepCopyInto(out *StaticEndpointGroup) { + p := proto.Clone(in).(*StaticEndpointGroup) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StaticEndpointGroup. Required by controller-gen. +func (in *StaticEndpointGroup) DeepCopy() *StaticEndpointGroup { + if in == nil { + return nil + } + out := new(StaticEndpointGroup) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new StaticEndpointGroup. Required by controller-gen. +func (in *StaticEndpointGroup) DeepCopyInterface() interface{} { + return in.DeepCopy() +} + +// DeepCopyInto supports using DestinationCluster within kubernetes types, where deepcopy-gen is used. +func (in *DestinationCluster) DeepCopyInto(out *DestinationCluster) { + p := proto.Clone(in).(*DestinationCluster) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DestinationCluster. Required by controller-gen. +func (in *DestinationCluster) DeepCopy() *DestinationCluster { + if in == nil { + return nil + } + out := new(DestinationCluster) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new DestinationCluster. Required by controller-gen. +func (in *DestinationCluster) DeepCopyInterface() interface{} { + return in.DeepCopy() +} + +// DeepCopyInto supports using L4WeightedClusterGroup within kubernetes types, where deepcopy-gen is used. +func (in *L4WeightedClusterGroup) DeepCopyInto(out *L4WeightedClusterGroup) { + p := proto.Clone(in).(*L4WeightedClusterGroup) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new L4WeightedClusterGroup. Required by controller-gen. +func (in *L4WeightedClusterGroup) DeepCopy() *L4WeightedClusterGroup { + if in == nil { + return nil + } + out := new(L4WeightedClusterGroup) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new L4WeightedClusterGroup. Required by controller-gen. +func (in *L4WeightedClusterGroup) DeepCopyInterface() interface{} { + return in.DeepCopy() +} + +// DeepCopyInto supports using L7WeightedClusterGroup within kubernetes types, where deepcopy-gen is used. +func (in *L7WeightedClusterGroup) DeepCopyInto(out *L7WeightedClusterGroup) { + p := proto.Clone(in).(*L7WeightedClusterGroup) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new L7WeightedClusterGroup. Required by controller-gen. +func (in *L7WeightedClusterGroup) DeepCopy() *L7WeightedClusterGroup { + if in == nil { + return nil + } + out := new(L7WeightedClusterGroup) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new L7WeightedClusterGroup. Required by controller-gen. +func (in *L7WeightedClusterGroup) DeepCopyInterface() interface{} { + return in.DeepCopy() +} + +// DeepCopyInto supports using L4WeightedDestinationCluster within kubernetes types, where deepcopy-gen is used. +func (in *L4WeightedDestinationCluster) DeepCopyInto(out *L4WeightedDestinationCluster) { + p := proto.Clone(in).(*L4WeightedDestinationCluster) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new L4WeightedDestinationCluster. Required by controller-gen. +func (in *L4WeightedDestinationCluster) DeepCopy() *L4WeightedDestinationCluster { + if in == nil { + return nil + } + out := new(L4WeightedDestinationCluster) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new L4WeightedDestinationCluster. Required by controller-gen. +func (in *L4WeightedDestinationCluster) DeepCopyInterface() interface{} { + return in.DeepCopy() +} + +// DeepCopyInto supports using L7WeightedDestinationCluster within kubernetes types, where deepcopy-gen is used. +func (in *L7WeightedDestinationCluster) DeepCopyInto(out *L7WeightedDestinationCluster) { + p := proto.Clone(in).(*L7WeightedDestinationCluster) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new L7WeightedDestinationCluster. Required by controller-gen. +func (in *L7WeightedDestinationCluster) DeepCopy() *L7WeightedDestinationCluster { + if in == nil { + return nil + } + out := new(L7WeightedDestinationCluster) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new L7WeightedDestinationCluster. Required by controller-gen. +func (in *L7WeightedDestinationCluster) DeepCopyInterface() interface{} { + return in.DeepCopy() +} + +// DeepCopyInto supports using DynamicEndpointGroupConfig within kubernetes types, where deepcopy-gen is used. +func (in *DynamicEndpointGroupConfig) DeepCopyInto(out *DynamicEndpointGroupConfig) { + p := proto.Clone(in).(*DynamicEndpointGroupConfig) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DynamicEndpointGroupConfig. Required by controller-gen. +func (in *DynamicEndpointGroupConfig) DeepCopy() *DynamicEndpointGroupConfig { + if in == nil { + return nil + } + out := new(DynamicEndpointGroupConfig) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new DynamicEndpointGroupConfig. Required by controller-gen. +func (in *DynamicEndpointGroupConfig) DeepCopyInterface() interface{} { + return in.DeepCopy() +} + +// DeepCopyInto supports using LBPolicyLeastRequest within kubernetes types, where deepcopy-gen is used. +func (in *LBPolicyLeastRequest) DeepCopyInto(out *LBPolicyLeastRequest) { + p := proto.Clone(in).(*LBPolicyLeastRequest) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LBPolicyLeastRequest. Required by controller-gen. +func (in *LBPolicyLeastRequest) DeepCopy() *LBPolicyLeastRequest { + if in == nil { + return nil + } + out := new(LBPolicyLeastRequest) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new LBPolicyLeastRequest. Required by controller-gen. +func (in *LBPolicyLeastRequest) DeepCopyInterface() interface{} { + return in.DeepCopy() +} + +// DeepCopyInto supports using LBPolicyRoundRobin within kubernetes types, where deepcopy-gen is used. +func (in *LBPolicyRoundRobin) DeepCopyInto(out *LBPolicyRoundRobin) { + p := proto.Clone(in).(*LBPolicyRoundRobin) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LBPolicyRoundRobin. Required by controller-gen. +func (in *LBPolicyRoundRobin) DeepCopy() *LBPolicyRoundRobin { + if in == nil { + return nil + } + out := new(LBPolicyRoundRobin) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new LBPolicyRoundRobin. Required by controller-gen. +func (in *LBPolicyRoundRobin) DeepCopyInterface() interface{} { + return in.DeepCopy() +} + +// DeepCopyInto supports using LBPolicyRandom within kubernetes types, where deepcopy-gen is used. +func (in *LBPolicyRandom) DeepCopyInto(out *LBPolicyRandom) { + p := proto.Clone(in).(*LBPolicyRandom) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LBPolicyRandom. Required by controller-gen. +func (in *LBPolicyRandom) DeepCopy() *LBPolicyRandom { + if in == nil { + return nil + } + out := new(LBPolicyRandom) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new LBPolicyRandom. Required by controller-gen. +func (in *LBPolicyRandom) DeepCopyInterface() interface{} { + return in.DeepCopy() +} + +// DeepCopyInto supports using LBPolicyRingHash within kubernetes types, where deepcopy-gen is used. +func (in *LBPolicyRingHash) DeepCopyInto(out *LBPolicyRingHash) { + p := proto.Clone(in).(*LBPolicyRingHash) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LBPolicyRingHash. Required by controller-gen. +func (in *LBPolicyRingHash) DeepCopy() *LBPolicyRingHash { + if in == nil { + return nil + } + out := new(LBPolicyRingHash) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new LBPolicyRingHash. Required by controller-gen. +func (in *LBPolicyRingHash) DeepCopyInterface() interface{} { + return in.DeepCopy() +} + +// DeepCopyInto supports using LBPolicyMaglev within kubernetes types, where deepcopy-gen is used. +func (in *LBPolicyMaglev) DeepCopyInto(out *LBPolicyMaglev) { + p := proto.Clone(in).(*LBPolicyMaglev) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LBPolicyMaglev. Required by controller-gen. +func (in *LBPolicyMaglev) DeepCopy() *LBPolicyMaglev { + if in == nil { + return nil + } + out := new(LBPolicyMaglev) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new LBPolicyMaglev. Required by controller-gen. +func (in *LBPolicyMaglev) DeepCopyInterface() interface{} { + return in.DeepCopy() +} + +// DeepCopyInto supports using CircuitBreakers within kubernetes types, where deepcopy-gen is used. +func (in *CircuitBreakers) DeepCopyInto(out *CircuitBreakers) { + p := proto.Clone(in).(*CircuitBreakers) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CircuitBreakers. Required by controller-gen. +func (in *CircuitBreakers) DeepCopy() *CircuitBreakers { + if in == nil { + return nil + } + out := new(CircuitBreakers) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new CircuitBreakers. Required by controller-gen. +func (in *CircuitBreakers) DeepCopyInterface() interface{} { + return in.DeepCopy() +} + +// DeepCopyInto supports using UpstreamLimits within kubernetes types, where deepcopy-gen is used. +func (in *UpstreamLimits) DeepCopyInto(out *UpstreamLimits) { + p := proto.Clone(in).(*UpstreamLimits) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UpstreamLimits. Required by controller-gen. +func (in *UpstreamLimits) DeepCopy() *UpstreamLimits { + if in == nil { + return nil + } + out := new(UpstreamLimits) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new UpstreamLimits. Required by controller-gen. +func (in *UpstreamLimits) DeepCopyInterface() interface{} { + return in.DeepCopy() +} + +// DeepCopyInto supports using OutlierDetection within kubernetes types, where deepcopy-gen is used. +func (in *OutlierDetection) DeepCopyInto(out *OutlierDetection) { + p := proto.Clone(in).(*OutlierDetection) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OutlierDetection. Required by controller-gen. +func (in *OutlierDetection) DeepCopy() *OutlierDetection { + if in == nil { + return nil + } + out := new(OutlierDetection) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new OutlierDetection. Required by controller-gen. +func (in *OutlierDetection) DeepCopyInterface() interface{} { + return in.DeepCopy() +} + +// DeepCopyInto supports using UpstreamConnectionOptions within kubernetes types, where deepcopy-gen is used. +func (in *UpstreamConnectionOptions) DeepCopyInto(out *UpstreamConnectionOptions) { + p := proto.Clone(in).(*UpstreamConnectionOptions) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UpstreamConnectionOptions. Required by controller-gen. +func (in *UpstreamConnectionOptions) DeepCopy() *UpstreamConnectionOptions { + if in == nil { + return nil + } + out := new(UpstreamConnectionOptions) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new UpstreamConnectionOptions. Required by controller-gen. +func (in *UpstreamConnectionOptions) DeepCopyInterface() interface{} { + return in.DeepCopy() +} + +// DeepCopyInto supports using PassthroughEndpointGroupConfig within kubernetes types, where deepcopy-gen is used. +func (in *PassthroughEndpointGroupConfig) DeepCopyInto(out *PassthroughEndpointGroupConfig) { + p := proto.Clone(in).(*PassthroughEndpointGroupConfig) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PassthroughEndpointGroupConfig. Required by controller-gen. +func (in *PassthroughEndpointGroupConfig) DeepCopy() *PassthroughEndpointGroupConfig { + if in == nil { + return nil + } + out := new(PassthroughEndpointGroupConfig) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new PassthroughEndpointGroupConfig. Required by controller-gen. +func (in *PassthroughEndpointGroupConfig) DeepCopyInterface() interface{} { + return in.DeepCopy() +} + +// DeepCopyInto supports using DNSEndpointGroupConfig within kubernetes types, where deepcopy-gen is used. +func (in *DNSEndpointGroupConfig) DeepCopyInto(out *DNSEndpointGroupConfig) { + p := proto.Clone(in).(*DNSEndpointGroupConfig) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DNSEndpointGroupConfig. Required by controller-gen. +func (in *DNSEndpointGroupConfig) DeepCopy() *DNSEndpointGroupConfig { + if in == nil { + return nil + } + out := new(DNSEndpointGroupConfig) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new DNSEndpointGroupConfig. Required by controller-gen. +func (in *DNSEndpointGroupConfig) DeepCopyInterface() interface{} { + return in.DeepCopy() +} + +// DeepCopyInto supports using StaticEndpointGroupConfig within kubernetes types, where deepcopy-gen is used. +func (in *StaticEndpointGroupConfig) DeepCopyInto(out *StaticEndpointGroupConfig) { + p := proto.Clone(in).(*StaticEndpointGroupConfig) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StaticEndpointGroupConfig. Required by controller-gen. +func (in *StaticEndpointGroupConfig) DeepCopy() *StaticEndpointGroupConfig { + if in == nil { + return nil + } + out := new(StaticEndpointGroupConfig) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new StaticEndpointGroupConfig. Required by controller-gen. +func (in *StaticEndpointGroupConfig) DeepCopyInterface() interface{} { + return in.DeepCopy() +} diff --git a/proto-public/pbmesh/v2beta1/pbproxystate/cluster_json.gen.go b/proto-public/pbmesh/v2beta1/pbproxystate/cluster_json.gen.go new file mode 100644 index 0000000000..570c801c00 --- /dev/null +++ b/proto-public/pbmesh/v2beta1/pbproxystate/cluster_json.gen.go @@ -0,0 +1,297 @@ +// Code generated by protoc-json-shim. DO NOT EDIT. +package pbproxystate + +import ( + protojson "google.golang.org/protobuf/encoding/protojson" +) + +// MarshalJSON is a custom marshaler for Cluster +func (this *Cluster) MarshalJSON() ([]byte, error) { + str, err := ClusterMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for Cluster +func (this *Cluster) UnmarshalJSON(b []byte) error { + return ClusterUnmarshaler.Unmarshal(b, this) +} + +// MarshalJSON is a custom marshaler for FailoverGroup +func (this *FailoverGroup) MarshalJSON() ([]byte, error) { + str, err := ClusterMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for FailoverGroup +func (this *FailoverGroup) UnmarshalJSON(b []byte) error { + return ClusterUnmarshaler.Unmarshal(b, this) +} + +// MarshalJSON is a custom marshaler for FailoverGroupConfig +func (this *FailoverGroupConfig) MarshalJSON() ([]byte, error) { + str, err := ClusterMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for FailoverGroupConfig +func (this *FailoverGroupConfig) UnmarshalJSON(b []byte) error { + return ClusterUnmarshaler.Unmarshal(b, this) +} + +// MarshalJSON is a custom marshaler for EndpointGroup +func (this *EndpointGroup) MarshalJSON() ([]byte, error) { + str, err := ClusterMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for EndpointGroup +func (this *EndpointGroup) UnmarshalJSON(b []byte) error { + return ClusterUnmarshaler.Unmarshal(b, this) +} + +// MarshalJSON is a custom marshaler for DynamicEndpointGroup +func (this *DynamicEndpointGroup) MarshalJSON() ([]byte, error) { + str, err := ClusterMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for DynamicEndpointGroup +func (this *DynamicEndpointGroup) UnmarshalJSON(b []byte) error { + return ClusterUnmarshaler.Unmarshal(b, this) +} + +// MarshalJSON is a custom marshaler for PassthroughEndpointGroup +func (this *PassthroughEndpointGroup) MarshalJSON() ([]byte, error) { + str, err := ClusterMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for PassthroughEndpointGroup +func (this *PassthroughEndpointGroup) UnmarshalJSON(b []byte) error { + return ClusterUnmarshaler.Unmarshal(b, this) +} + +// MarshalJSON is a custom marshaler for DNSEndpointGroup +func (this *DNSEndpointGroup) MarshalJSON() ([]byte, error) { + str, err := ClusterMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for DNSEndpointGroup +func (this *DNSEndpointGroup) UnmarshalJSON(b []byte) error { + return ClusterUnmarshaler.Unmarshal(b, this) +} + +// MarshalJSON is a custom marshaler for StaticEndpointGroup +func (this *StaticEndpointGroup) MarshalJSON() ([]byte, error) { + str, err := ClusterMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for StaticEndpointGroup +func (this *StaticEndpointGroup) UnmarshalJSON(b []byte) error { + return ClusterUnmarshaler.Unmarshal(b, this) +} + +// MarshalJSON is a custom marshaler for DestinationCluster +func (this *DestinationCluster) MarshalJSON() ([]byte, error) { + str, err := ClusterMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for DestinationCluster +func (this *DestinationCluster) UnmarshalJSON(b []byte) error { + return ClusterUnmarshaler.Unmarshal(b, this) +} + +// MarshalJSON is a custom marshaler for L4WeightedClusterGroup +func (this *L4WeightedClusterGroup) MarshalJSON() ([]byte, error) { + str, err := ClusterMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for L4WeightedClusterGroup +func (this *L4WeightedClusterGroup) UnmarshalJSON(b []byte) error { + return ClusterUnmarshaler.Unmarshal(b, this) +} + +// MarshalJSON is a custom marshaler for L7WeightedClusterGroup +func (this *L7WeightedClusterGroup) MarshalJSON() ([]byte, error) { + str, err := ClusterMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for L7WeightedClusterGroup +func (this *L7WeightedClusterGroup) UnmarshalJSON(b []byte) error { + return ClusterUnmarshaler.Unmarshal(b, this) +} + +// MarshalJSON is a custom marshaler for L4WeightedDestinationCluster +func (this *L4WeightedDestinationCluster) MarshalJSON() ([]byte, error) { + str, err := ClusterMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for L4WeightedDestinationCluster +func (this *L4WeightedDestinationCluster) UnmarshalJSON(b []byte) error { + return ClusterUnmarshaler.Unmarshal(b, this) +} + +// MarshalJSON is a custom marshaler for L7WeightedDestinationCluster +func (this *L7WeightedDestinationCluster) MarshalJSON() ([]byte, error) { + str, err := ClusterMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for L7WeightedDestinationCluster +func (this *L7WeightedDestinationCluster) UnmarshalJSON(b []byte) error { + return ClusterUnmarshaler.Unmarshal(b, this) +} + +// MarshalJSON is a custom marshaler for DynamicEndpointGroupConfig +func (this *DynamicEndpointGroupConfig) MarshalJSON() ([]byte, error) { + str, err := ClusterMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for DynamicEndpointGroupConfig +func (this *DynamicEndpointGroupConfig) UnmarshalJSON(b []byte) error { + return ClusterUnmarshaler.Unmarshal(b, this) +} + +// MarshalJSON is a custom marshaler for LBPolicyLeastRequest +func (this *LBPolicyLeastRequest) MarshalJSON() ([]byte, error) { + str, err := ClusterMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for LBPolicyLeastRequest +func (this *LBPolicyLeastRequest) UnmarshalJSON(b []byte) error { + return ClusterUnmarshaler.Unmarshal(b, this) +} + +// MarshalJSON is a custom marshaler for LBPolicyRoundRobin +func (this *LBPolicyRoundRobin) MarshalJSON() ([]byte, error) { + str, err := ClusterMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for LBPolicyRoundRobin +func (this *LBPolicyRoundRobin) UnmarshalJSON(b []byte) error { + return ClusterUnmarshaler.Unmarshal(b, this) +} + +// MarshalJSON is a custom marshaler for LBPolicyRandom +func (this *LBPolicyRandom) MarshalJSON() ([]byte, error) { + str, err := ClusterMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for LBPolicyRandom +func (this *LBPolicyRandom) UnmarshalJSON(b []byte) error { + return ClusterUnmarshaler.Unmarshal(b, this) +} + +// MarshalJSON is a custom marshaler for LBPolicyRingHash +func (this *LBPolicyRingHash) MarshalJSON() ([]byte, error) { + str, err := ClusterMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for LBPolicyRingHash +func (this *LBPolicyRingHash) UnmarshalJSON(b []byte) error { + return ClusterUnmarshaler.Unmarshal(b, this) +} + +// MarshalJSON is a custom marshaler for LBPolicyMaglev +func (this *LBPolicyMaglev) MarshalJSON() ([]byte, error) { + str, err := ClusterMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for LBPolicyMaglev +func (this *LBPolicyMaglev) UnmarshalJSON(b []byte) error { + return ClusterUnmarshaler.Unmarshal(b, this) +} + +// MarshalJSON is a custom marshaler for CircuitBreakers +func (this *CircuitBreakers) MarshalJSON() ([]byte, error) { + str, err := ClusterMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for CircuitBreakers +func (this *CircuitBreakers) UnmarshalJSON(b []byte) error { + return ClusterUnmarshaler.Unmarshal(b, this) +} + +// MarshalJSON is a custom marshaler for UpstreamLimits +func (this *UpstreamLimits) MarshalJSON() ([]byte, error) { + str, err := ClusterMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for UpstreamLimits +func (this *UpstreamLimits) UnmarshalJSON(b []byte) error { + return ClusterUnmarshaler.Unmarshal(b, this) +} + +// MarshalJSON is a custom marshaler for OutlierDetection +func (this *OutlierDetection) MarshalJSON() ([]byte, error) { + str, err := ClusterMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for OutlierDetection +func (this *OutlierDetection) UnmarshalJSON(b []byte) error { + return ClusterUnmarshaler.Unmarshal(b, this) +} + +// MarshalJSON is a custom marshaler for UpstreamConnectionOptions +func (this *UpstreamConnectionOptions) MarshalJSON() ([]byte, error) { + str, err := ClusterMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for UpstreamConnectionOptions +func (this *UpstreamConnectionOptions) UnmarshalJSON(b []byte) error { + return ClusterUnmarshaler.Unmarshal(b, this) +} + +// MarshalJSON is a custom marshaler for PassthroughEndpointGroupConfig +func (this *PassthroughEndpointGroupConfig) MarshalJSON() ([]byte, error) { + str, err := ClusterMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for PassthroughEndpointGroupConfig +func (this *PassthroughEndpointGroupConfig) UnmarshalJSON(b []byte) error { + return ClusterUnmarshaler.Unmarshal(b, this) +} + +// MarshalJSON is a custom marshaler for DNSEndpointGroupConfig +func (this *DNSEndpointGroupConfig) MarshalJSON() ([]byte, error) { + str, err := ClusterMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for DNSEndpointGroupConfig +func (this *DNSEndpointGroupConfig) UnmarshalJSON(b []byte) error { + return ClusterUnmarshaler.Unmarshal(b, this) +} + +// MarshalJSON is a custom marshaler for StaticEndpointGroupConfig +func (this *StaticEndpointGroupConfig) MarshalJSON() ([]byte, error) { + str, err := ClusterMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for StaticEndpointGroupConfig +func (this *StaticEndpointGroupConfig) UnmarshalJSON(b []byte) error { + return ClusterUnmarshaler.Unmarshal(b, this) +} + +var ( + ClusterMarshaler = &protojson.MarshalOptions{} + ClusterUnmarshaler = &protojson.UnmarshalOptions{DiscardUnknown: false} +) diff --git a/proto-public/pbmesh/v2beta1/pbproxystate/endpoints.pb.go b/proto-public/pbmesh/v2beta1/pbproxystate/endpoints.pb.go index 0f08be375f..5986ad83a1 100644 --- a/proto-public/pbmesh/v2beta1/pbproxystate/endpoints.pb.go +++ b/proto-public/pbmesh/v2beta1/pbproxystate/endpoints.pb.go @@ -24,6 +24,8 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) +// +kubebuilder:validation:Enum=HEALTH_STATUS_UNKNOWN;HEALTH_STATUS_HEALTHY;HEALTH_STATUS_UNHEALTHY +// +kubebuilder:validation:Type=string type HealthStatus int32 const ( diff --git a/proto-public/pbmesh/v2beta1/pbproxystate/endpoints.proto b/proto-public/pbmesh/v2beta1/pbproxystate/endpoints.proto index 44a68efed1..0612c4eb11 100644 --- a/proto-public/pbmesh/v2beta1/pbproxystate/endpoints.proto +++ b/proto-public/pbmesh/v2beta1/pbproxystate/endpoints.proto @@ -21,6 +21,8 @@ message Endpoint { google.protobuf.UInt32Value load_balancing_weight = 4; } +// +kubebuilder:validation:Enum=HEALTH_STATUS_UNKNOWN;HEALTH_STATUS_HEALTHY;HEALTH_STATUS_UNHEALTHY +// +kubebuilder:validation:Type=string enum HealthStatus { // buf:lint:ignore ENUM_ZERO_VALUE_SUFFIX HEALTH_STATUS_UNKNOWN = 0; diff --git a/proto-public/pbmesh/v2beta1/pbproxystate/endpoints_deepcopy.gen.go b/proto-public/pbmesh/v2beta1/pbproxystate/endpoints_deepcopy.gen.go new file mode 100644 index 0000000000..62efabc963 --- /dev/null +++ b/proto-public/pbmesh/v2beta1/pbproxystate/endpoints_deepcopy.gen.go @@ -0,0 +1,48 @@ +// Code generated by protoc-gen-deepcopy. DO NOT EDIT. +package pbproxystate + +import ( + proto "google.golang.org/protobuf/proto" +) + +// DeepCopyInto supports using Endpoints within kubernetes types, where deepcopy-gen is used. +func (in *Endpoints) DeepCopyInto(out *Endpoints) { + p := proto.Clone(in).(*Endpoints) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Endpoints. Required by controller-gen. +func (in *Endpoints) DeepCopy() *Endpoints { + if in == nil { + return nil + } + out := new(Endpoints) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new Endpoints. Required by controller-gen. +func (in *Endpoints) DeepCopyInterface() interface{} { + return in.DeepCopy() +} + +// DeepCopyInto supports using Endpoint within kubernetes types, where deepcopy-gen is used. +func (in *Endpoint) DeepCopyInto(out *Endpoint) { + p := proto.Clone(in).(*Endpoint) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Endpoint. Required by controller-gen. +func (in *Endpoint) DeepCopy() *Endpoint { + if in == nil { + return nil + } + out := new(Endpoint) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new Endpoint. Required by controller-gen. +func (in *Endpoint) DeepCopyInterface() interface{} { + return in.DeepCopy() +} diff --git a/proto-public/pbmesh/v2beta1/pbproxystate/endpoints_json.gen.go b/proto-public/pbmesh/v2beta1/pbproxystate/endpoints_json.gen.go new file mode 100644 index 0000000000..45b9fbf321 --- /dev/null +++ b/proto-public/pbmesh/v2beta1/pbproxystate/endpoints_json.gen.go @@ -0,0 +1,33 @@ +// Code generated by protoc-json-shim. DO NOT EDIT. +package pbproxystate + +import ( + protojson "google.golang.org/protobuf/encoding/protojson" +) + +// MarshalJSON is a custom marshaler for Endpoints +func (this *Endpoints) MarshalJSON() ([]byte, error) { + str, err := EndpointsMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for Endpoints +func (this *Endpoints) UnmarshalJSON(b []byte) error { + return EndpointsUnmarshaler.Unmarshal(b, this) +} + +// MarshalJSON is a custom marshaler for Endpoint +func (this *Endpoint) MarshalJSON() ([]byte, error) { + str, err := EndpointsMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for Endpoint +func (this *Endpoint) UnmarshalJSON(b []byte) error { + return EndpointsUnmarshaler.Unmarshal(b, this) +} + +var ( + EndpointsMarshaler = &protojson.MarshalOptions{} + EndpointsUnmarshaler = &protojson.UnmarshalOptions{DiscardUnknown: false} +) diff --git a/proto-public/pbmesh/v2beta1/pbproxystate/escape_hatches_deepcopy.gen.go b/proto-public/pbmesh/v2beta1/pbproxystate/escape_hatches_deepcopy.gen.go new file mode 100644 index 0000000000..fc5617f234 --- /dev/null +++ b/proto-public/pbmesh/v2beta1/pbproxystate/escape_hatches_deepcopy.gen.go @@ -0,0 +1,27 @@ +// Code generated by protoc-gen-deepcopy. DO NOT EDIT. +package pbproxystate + +import ( + proto "google.golang.org/protobuf/proto" +) + +// DeepCopyInto supports using EscapeHatches within kubernetes types, where deepcopy-gen is used. +func (in *EscapeHatches) DeepCopyInto(out *EscapeHatches) { + p := proto.Clone(in).(*EscapeHatches) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EscapeHatches. Required by controller-gen. +func (in *EscapeHatches) DeepCopy() *EscapeHatches { + if in == nil { + return nil + } + out := new(EscapeHatches) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new EscapeHatches. Required by controller-gen. +func (in *EscapeHatches) DeepCopyInterface() interface{} { + return in.DeepCopy() +} diff --git a/proto-public/pbmesh/v2beta1/pbproxystate/escape_hatches_json.gen.go b/proto-public/pbmesh/v2beta1/pbproxystate/escape_hatches_json.gen.go new file mode 100644 index 0000000000..ecda76eb22 --- /dev/null +++ b/proto-public/pbmesh/v2beta1/pbproxystate/escape_hatches_json.gen.go @@ -0,0 +1,22 @@ +// Code generated by protoc-json-shim. DO NOT EDIT. +package pbproxystate + +import ( + protojson "google.golang.org/protobuf/encoding/protojson" +) + +// MarshalJSON is a custom marshaler for EscapeHatches +func (this *EscapeHatches) MarshalJSON() ([]byte, error) { + str, err := EscapeHatchesMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for EscapeHatches +func (this *EscapeHatches) UnmarshalJSON(b []byte) error { + return EscapeHatchesUnmarshaler.Unmarshal(b, this) +} + +var ( + EscapeHatchesMarshaler = &protojson.MarshalOptions{} + EscapeHatchesUnmarshaler = &protojson.UnmarshalOptions{DiscardUnknown: false} +) diff --git a/proto-public/pbmesh/v2beta1/pbproxystate/header_mutations.pb.go b/proto-public/pbmesh/v2beta1/pbproxystate/header_mutations.pb.go index 440ea56472..54bc797892 100644 --- a/proto-public/pbmesh/v2beta1/pbproxystate/header_mutations.pb.go +++ b/proto-public/pbmesh/v2beta1/pbproxystate/header_mutations.pb.go @@ -23,6 +23,8 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) +// +kubebuilder:validation:Enum=APPEND_ACTION_APPEND_IF_EXISTS_OR_ADD;APPEND_ACTION_OVERWRITE_IF_EXISTS_OR_ADD +// +kubebuilder:validation:Type=string type AppendAction int32 const ( diff --git a/proto-public/pbmesh/v2beta1/pbproxystate/header_mutations.proto b/proto-public/pbmesh/v2beta1/pbproxystate/header_mutations.proto index 913198b254..63a4bf83f6 100644 --- a/proto-public/pbmesh/v2beta1/pbproxystate/header_mutations.proto +++ b/proto-public/pbmesh/v2beta1/pbproxystate/header_mutations.proto @@ -40,6 +40,8 @@ message Header { string value = 2; } +// +kubebuilder:validation:Enum=APPEND_ACTION_APPEND_IF_EXISTS_OR_ADD;APPEND_ACTION_OVERWRITE_IF_EXISTS_OR_ADD +// +kubebuilder:validation:Type=string enum AppendAction { // buf:lint:ignore ENUM_ZERO_VALUE_SUFFIX APPEND_ACTION_APPEND_IF_EXISTS_OR_ADD = 0; diff --git a/proto-public/pbmesh/v2beta1/pbproxystate/header_mutations_deepcopy.gen.go b/proto-public/pbmesh/v2beta1/pbproxystate/header_mutations_deepcopy.gen.go new file mode 100644 index 0000000000..2b09b27597 --- /dev/null +++ b/proto-public/pbmesh/v2beta1/pbproxystate/header_mutations_deepcopy.gen.go @@ -0,0 +1,132 @@ +// Code generated by protoc-gen-deepcopy. DO NOT EDIT. +package pbproxystate + +import ( + proto "google.golang.org/protobuf/proto" +) + +// DeepCopyInto supports using HeaderMutation within kubernetes types, where deepcopy-gen is used. +func (in *HeaderMutation) DeepCopyInto(out *HeaderMutation) { + p := proto.Clone(in).(*HeaderMutation) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HeaderMutation. Required by controller-gen. +func (in *HeaderMutation) DeepCopy() *HeaderMutation { + if in == nil { + return nil + } + out := new(HeaderMutation) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new HeaderMutation. Required by controller-gen. +func (in *HeaderMutation) DeepCopyInterface() interface{} { + return in.DeepCopy() +} + +// DeepCopyInto supports using RequestHeaderAdd within kubernetes types, where deepcopy-gen is used. +func (in *RequestHeaderAdd) DeepCopyInto(out *RequestHeaderAdd) { + p := proto.Clone(in).(*RequestHeaderAdd) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RequestHeaderAdd. Required by controller-gen. +func (in *RequestHeaderAdd) DeepCopy() *RequestHeaderAdd { + if in == nil { + return nil + } + out := new(RequestHeaderAdd) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new RequestHeaderAdd. Required by controller-gen. +func (in *RequestHeaderAdd) DeepCopyInterface() interface{} { + return in.DeepCopy() +} + +// DeepCopyInto supports using RequestHeaderRemove within kubernetes types, where deepcopy-gen is used. +func (in *RequestHeaderRemove) DeepCopyInto(out *RequestHeaderRemove) { + p := proto.Clone(in).(*RequestHeaderRemove) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RequestHeaderRemove. Required by controller-gen. +func (in *RequestHeaderRemove) DeepCopy() *RequestHeaderRemove { + if in == nil { + return nil + } + out := new(RequestHeaderRemove) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new RequestHeaderRemove. Required by controller-gen. +func (in *RequestHeaderRemove) DeepCopyInterface() interface{} { + return in.DeepCopy() +} + +// DeepCopyInto supports using ResponseHeaderAdd within kubernetes types, where deepcopy-gen is used. +func (in *ResponseHeaderAdd) DeepCopyInto(out *ResponseHeaderAdd) { + p := proto.Clone(in).(*ResponseHeaderAdd) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResponseHeaderAdd. Required by controller-gen. +func (in *ResponseHeaderAdd) DeepCopy() *ResponseHeaderAdd { + if in == nil { + return nil + } + out := new(ResponseHeaderAdd) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new ResponseHeaderAdd. Required by controller-gen. +func (in *ResponseHeaderAdd) DeepCopyInterface() interface{} { + return in.DeepCopy() +} + +// DeepCopyInto supports using ResponseHeaderRemove within kubernetes types, where deepcopy-gen is used. +func (in *ResponseHeaderRemove) DeepCopyInto(out *ResponseHeaderRemove) { + p := proto.Clone(in).(*ResponseHeaderRemove) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResponseHeaderRemove. Required by controller-gen. +func (in *ResponseHeaderRemove) DeepCopy() *ResponseHeaderRemove { + if in == nil { + return nil + } + out := new(ResponseHeaderRemove) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new ResponseHeaderRemove. Required by controller-gen. +func (in *ResponseHeaderRemove) DeepCopyInterface() interface{} { + return in.DeepCopy() +} + +// DeepCopyInto supports using Header within kubernetes types, where deepcopy-gen is used. +func (in *Header) DeepCopyInto(out *Header) { + p := proto.Clone(in).(*Header) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Header. Required by controller-gen. +func (in *Header) DeepCopy() *Header { + if in == nil { + return nil + } + out := new(Header) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new Header. Required by controller-gen. +func (in *Header) DeepCopyInterface() interface{} { + return in.DeepCopy() +} diff --git a/proto-public/pbmesh/v2beta1/pbproxystate/header_mutations_json.gen.go b/proto-public/pbmesh/v2beta1/pbproxystate/header_mutations_json.gen.go new file mode 100644 index 0000000000..53c422f752 --- /dev/null +++ b/proto-public/pbmesh/v2beta1/pbproxystate/header_mutations_json.gen.go @@ -0,0 +1,77 @@ +// Code generated by protoc-json-shim. DO NOT EDIT. +package pbproxystate + +import ( + protojson "google.golang.org/protobuf/encoding/protojson" +) + +// MarshalJSON is a custom marshaler for HeaderMutation +func (this *HeaderMutation) MarshalJSON() ([]byte, error) { + str, err := HeaderMutationsMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for HeaderMutation +func (this *HeaderMutation) UnmarshalJSON(b []byte) error { + return HeaderMutationsUnmarshaler.Unmarshal(b, this) +} + +// MarshalJSON is a custom marshaler for RequestHeaderAdd +func (this *RequestHeaderAdd) MarshalJSON() ([]byte, error) { + str, err := HeaderMutationsMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for RequestHeaderAdd +func (this *RequestHeaderAdd) UnmarshalJSON(b []byte) error { + return HeaderMutationsUnmarshaler.Unmarshal(b, this) +} + +// MarshalJSON is a custom marshaler for RequestHeaderRemove +func (this *RequestHeaderRemove) MarshalJSON() ([]byte, error) { + str, err := HeaderMutationsMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for RequestHeaderRemove +func (this *RequestHeaderRemove) UnmarshalJSON(b []byte) error { + return HeaderMutationsUnmarshaler.Unmarshal(b, this) +} + +// MarshalJSON is a custom marshaler for ResponseHeaderAdd +func (this *ResponseHeaderAdd) MarshalJSON() ([]byte, error) { + str, err := HeaderMutationsMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for ResponseHeaderAdd +func (this *ResponseHeaderAdd) UnmarshalJSON(b []byte) error { + return HeaderMutationsUnmarshaler.Unmarshal(b, this) +} + +// MarshalJSON is a custom marshaler for ResponseHeaderRemove +func (this *ResponseHeaderRemove) MarshalJSON() ([]byte, error) { + str, err := HeaderMutationsMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for ResponseHeaderRemove +func (this *ResponseHeaderRemove) UnmarshalJSON(b []byte) error { + return HeaderMutationsUnmarshaler.Unmarshal(b, this) +} + +// MarshalJSON is a custom marshaler for Header +func (this *Header) MarshalJSON() ([]byte, error) { + str, err := HeaderMutationsMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for Header +func (this *Header) UnmarshalJSON(b []byte) error { + return HeaderMutationsUnmarshaler.Unmarshal(b, this) +} + +var ( + HeaderMutationsMarshaler = &protojson.MarshalOptions{} + HeaderMutationsUnmarshaler = &protojson.UnmarshalOptions{DiscardUnknown: false} +) diff --git a/proto-public/pbmesh/v2beta1/pbproxystate/listener.pb.go b/proto-public/pbmesh/v2beta1/pbproxystate/listener.pb.go index 29d924f1a8..a7d7273163 100644 --- a/proto-public/pbmesh/v2beta1/pbproxystate/listener.pb.go +++ b/proto-public/pbmesh/v2beta1/pbproxystate/listener.pb.go @@ -24,6 +24,8 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) +// +kubebuilder:validation:Enum=DIRECTION_UNSPECIFIED;DIRECTION_INBOUND;DIRECTION_OUTBOUND +// +kubebuilder:validation:Type=string type Direction int32 const ( @@ -74,6 +76,8 @@ func (Direction) EnumDescriptor() ([]byte, []int) { return file_pbmesh_v2beta1_pbproxystate_listener_proto_rawDescGZIP(), []int{0} } +// +kubebuilder:validation:Enum=BALANCE_CONNECTIONS_DEFAULT;BALANCE_CONNECTIONS_EXACT +// +kubebuilder:validation:Type=string type BalanceConnections int32 const ( @@ -122,6 +126,9 @@ func (BalanceConnections) EnumDescriptor() ([]byte, []int) { } // Capabilities map to proxy functionality to enable. These enable tproxy, l7 protocol/alpn inspection, or l4 sni/alpn inspection. +// +// +kubebuilder:validation:Enum=CAPABILITY_TRANSPARENT;CAPABILITY_L7_PROTOCOL_INSPECTION;CAPABILITY_L4_TLS_INSPECTION +// +kubebuilder:validation:Type=string type Capability int32 const ( @@ -172,6 +179,8 @@ func (Capability) EnumDescriptor() ([]byte, []int) { return file_pbmesh_v2beta1_pbproxystate_listener_proto_rawDescGZIP(), []int{2} } +// +kubebuilder:validation:Enum=XFCC_POLICY_SANITIZE;XFCC_POLICY_FORWARD_ONLY;XFCC_POLICY_APPEND_FORWARD;XFCC_POLICY_SANITIZE_SET;XFCC_POLICY_ALWAYS_FORWARD_ONLY +// +kubebuilder:validation:Type=string type XFCCPolicy int32 const ( @@ -237,6 +246,8 @@ func (XFCCPolicy) EnumDescriptor() ([]byte, []int) { return file_pbmesh_v2beta1_pbproxystate_listener_proto_rawDescGZIP(), []int{3} } +// +kubebuilder:validation:Enum=L7_PROTOCOL_HTTP;L7_PROTOCOL_HTTP2;L7_PROTOCOL_GRPC +// +kubebuilder:validation:Type=string type L7Protocol int32 const ( diff --git a/proto-public/pbmesh/v2beta1/pbproxystate/listener.proto b/proto-public/pbmesh/v2beta1/pbproxystate/listener.proto index decfd073fb..95ba97556b 100644 --- a/proto-public/pbmesh/v2beta1/pbproxystate/listener.proto +++ b/proto-public/pbmesh/v2beta1/pbproxystate/listener.proto @@ -36,6 +36,8 @@ message Listener { bool use_escape_hatch_tracing = 10; } +// +kubebuilder:validation:Enum=DIRECTION_UNSPECIFIED;DIRECTION_INBOUND;DIRECTION_OUTBOUND +// +kubebuilder:validation:Type=string enum Direction { // DIRECTION_UNSPECIFIED is used by mesh gateway listeners. DIRECTION_UNSPECIFIED = 0; @@ -43,6 +45,8 @@ enum Direction { DIRECTION_OUTBOUND = 2; } +// +kubebuilder:validation:Enum=BALANCE_CONNECTIONS_DEFAULT;BALANCE_CONNECTIONS_EXACT +// +kubebuilder:validation:Type=string enum BalanceConnections { // buf:lint:ignore ENUM_ZERO_VALUE_SUFFIX BALANCE_CONNECTIONS_DEFAULT = 0; @@ -50,6 +54,9 @@ enum BalanceConnections { } // Capabilities map to proxy functionality to enable. These enable tproxy, l7 protocol/alpn inspection, or l4 sni/alpn inspection. +// +// +kubebuilder:validation:Enum=CAPABILITY_TRANSPARENT;CAPABILITY_L7_PROTOCOL_INSPECTION;CAPABILITY_L4_TLS_INSPECTION +// +kubebuilder:validation:Type=string enum Capability { // buf:lint:ignore ENUM_ZERO_VALUE_SUFFIX CAPABILITY_TRANSPARENT = 0; @@ -129,6 +136,8 @@ message L7Destination { uint64 max_inbound_connections = 9; } +// +kubebuilder:validation:Enum=XFCC_POLICY_SANITIZE;XFCC_POLICY_FORWARD_ONLY;XFCC_POLICY_APPEND_FORWARD;XFCC_POLICY_SANITIZE_SET;XFCC_POLICY_ALWAYS_FORWARD_ONLY +// +kubebuilder:validation:Type=string enum XFCCPolicy { // buf:lint:ignore ENUM_ZERO_VALUE_SUFFIX // Do not send the XFCC header to the next hop. This is the default value. @@ -147,6 +156,8 @@ enum XFCCPolicy { XFCC_POLICY_ALWAYS_FORWARD_ONLY = 4; } +// +kubebuilder:validation:Enum=L7_PROTOCOL_HTTP;L7_PROTOCOL_HTTP2;L7_PROTOCOL_GRPC +// +kubebuilder:validation:Type=string enum L7Protocol { // buf:lint:ignore ENUM_ZERO_VALUE_SUFFIX L7_PROTOCOL_HTTP = 0; diff --git a/proto-public/pbmesh/v2beta1/pbproxystate/listener_deepcopy.gen.go b/proto-public/pbmesh/v2beta1/pbproxystate/listener_deepcopy.gen.go new file mode 100644 index 0000000000..7208735dbd --- /dev/null +++ b/proto-public/pbmesh/v2beta1/pbproxystate/listener_deepcopy.gen.go @@ -0,0 +1,174 @@ +// Code generated by protoc-gen-deepcopy. DO NOT EDIT. +package pbproxystate + +import ( + proto "google.golang.org/protobuf/proto" +) + +// DeepCopyInto supports using Listener within kubernetes types, where deepcopy-gen is used. +func (in *Listener) DeepCopyInto(out *Listener) { + p := proto.Clone(in).(*Listener) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Listener. Required by controller-gen. +func (in *Listener) DeepCopy() *Listener { + if in == nil { + return nil + } + out := new(Listener) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new Listener. Required by controller-gen. +func (in *Listener) DeepCopyInterface() interface{} { + return in.DeepCopy() +} + +// DeepCopyInto supports using Router within kubernetes types, where deepcopy-gen is used. +func (in *Router) DeepCopyInto(out *Router) { + p := proto.Clone(in).(*Router) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Router. Required by controller-gen. +func (in *Router) DeepCopy() *Router { + if in == nil { + return nil + } + out := new(Router) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new Router. Required by controller-gen. +func (in *Router) DeepCopyInterface() interface{} { + return in.DeepCopy() +} + +// DeepCopyInto supports using Match within kubernetes types, where deepcopy-gen is used. +func (in *Match) DeepCopyInto(out *Match) { + p := proto.Clone(in).(*Match) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Match. Required by controller-gen. +func (in *Match) DeepCopy() *Match { + if in == nil { + return nil + } + out := new(Match) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new Match. Required by controller-gen. +func (in *Match) DeepCopyInterface() interface{} { + return in.DeepCopy() +} + +// DeepCopyInto supports using CidrRange within kubernetes types, where deepcopy-gen is used. +func (in *CidrRange) DeepCopyInto(out *CidrRange) { + p := proto.Clone(in).(*CidrRange) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CidrRange. Required by controller-gen. +func (in *CidrRange) DeepCopy() *CidrRange { + if in == nil { + return nil + } + out := new(CidrRange) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new CidrRange. Required by controller-gen. +func (in *CidrRange) DeepCopyInterface() interface{} { + return in.DeepCopy() +} + +// DeepCopyInto supports using L4Destination within kubernetes types, where deepcopy-gen is used. +func (in *L4Destination) DeepCopyInto(out *L4Destination) { + p := proto.Clone(in).(*L4Destination) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new L4Destination. Required by controller-gen. +func (in *L4Destination) DeepCopy() *L4Destination { + if in == nil { + return nil + } + out := new(L4Destination) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new L4Destination. Required by controller-gen. +func (in *L4Destination) DeepCopyInterface() interface{} { + return in.DeepCopy() +} + +// DeepCopyInto supports using L7DestinationRoute within kubernetes types, where deepcopy-gen is used. +func (in *L7DestinationRoute) DeepCopyInto(out *L7DestinationRoute) { + p := proto.Clone(in).(*L7DestinationRoute) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new L7DestinationRoute. Required by controller-gen. +func (in *L7DestinationRoute) DeepCopy() *L7DestinationRoute { + if in == nil { + return nil + } + out := new(L7DestinationRoute) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new L7DestinationRoute. Required by controller-gen. +func (in *L7DestinationRoute) DeepCopyInterface() interface{} { + return in.DeepCopy() +} + +// DeepCopyInto supports using L7Destination within kubernetes types, where deepcopy-gen is used. +func (in *L7Destination) DeepCopyInto(out *L7Destination) { + p := proto.Clone(in).(*L7Destination) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new L7Destination. Required by controller-gen. +func (in *L7Destination) DeepCopy() *L7Destination { + if in == nil { + return nil + } + out := new(L7Destination) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new L7Destination. Required by controller-gen. +func (in *L7Destination) DeepCopyInterface() interface{} { + return in.DeepCopy() +} + +// DeepCopyInto supports using SNIDestination within kubernetes types, where deepcopy-gen is used. +func (in *SNIDestination) DeepCopyInto(out *SNIDestination) { + p := proto.Clone(in).(*SNIDestination) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SNIDestination. Required by controller-gen. +func (in *SNIDestination) DeepCopy() *SNIDestination { + if in == nil { + return nil + } + out := new(SNIDestination) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new SNIDestination. Required by controller-gen. +func (in *SNIDestination) DeepCopyInterface() interface{} { + return in.DeepCopy() +} diff --git a/proto-public/pbmesh/v2beta1/pbproxystate/listener_json.gen.go b/proto-public/pbmesh/v2beta1/pbproxystate/listener_json.gen.go new file mode 100644 index 0000000000..fe77b7be1f --- /dev/null +++ b/proto-public/pbmesh/v2beta1/pbproxystate/listener_json.gen.go @@ -0,0 +1,99 @@ +// Code generated by protoc-json-shim. DO NOT EDIT. +package pbproxystate + +import ( + protojson "google.golang.org/protobuf/encoding/protojson" +) + +// MarshalJSON is a custom marshaler for Listener +func (this *Listener) MarshalJSON() ([]byte, error) { + str, err := ListenerMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for Listener +func (this *Listener) UnmarshalJSON(b []byte) error { + return ListenerUnmarshaler.Unmarshal(b, this) +} + +// MarshalJSON is a custom marshaler for Router +func (this *Router) MarshalJSON() ([]byte, error) { + str, err := ListenerMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for Router +func (this *Router) UnmarshalJSON(b []byte) error { + return ListenerUnmarshaler.Unmarshal(b, this) +} + +// MarshalJSON is a custom marshaler for Match +func (this *Match) MarshalJSON() ([]byte, error) { + str, err := ListenerMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for Match +func (this *Match) UnmarshalJSON(b []byte) error { + return ListenerUnmarshaler.Unmarshal(b, this) +} + +// MarshalJSON is a custom marshaler for CidrRange +func (this *CidrRange) MarshalJSON() ([]byte, error) { + str, err := ListenerMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for CidrRange +func (this *CidrRange) UnmarshalJSON(b []byte) error { + return ListenerUnmarshaler.Unmarshal(b, this) +} + +// MarshalJSON is a custom marshaler for L4Destination +func (this *L4Destination) MarshalJSON() ([]byte, error) { + str, err := ListenerMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for L4Destination +func (this *L4Destination) UnmarshalJSON(b []byte) error { + return ListenerUnmarshaler.Unmarshal(b, this) +} + +// MarshalJSON is a custom marshaler for L7DestinationRoute +func (this *L7DestinationRoute) MarshalJSON() ([]byte, error) { + str, err := ListenerMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for L7DestinationRoute +func (this *L7DestinationRoute) UnmarshalJSON(b []byte) error { + return ListenerUnmarshaler.Unmarshal(b, this) +} + +// MarshalJSON is a custom marshaler for L7Destination +func (this *L7Destination) MarshalJSON() ([]byte, error) { + str, err := ListenerMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for L7Destination +func (this *L7Destination) UnmarshalJSON(b []byte) error { + return ListenerUnmarshaler.Unmarshal(b, this) +} + +// MarshalJSON is a custom marshaler for SNIDestination +func (this *SNIDestination) MarshalJSON() ([]byte, error) { + str, err := ListenerMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for SNIDestination +func (this *SNIDestination) UnmarshalJSON(b []byte) error { + return ListenerUnmarshaler.Unmarshal(b, this) +} + +var ( + ListenerMarshaler = &protojson.MarshalOptions{} + ListenerUnmarshaler = &protojson.UnmarshalOptions{DiscardUnknown: false} +) diff --git a/proto-public/pbmesh/v2beta1/pbproxystate/references_deepcopy.gen.go b/proto-public/pbmesh/v2beta1/pbproxystate/references_deepcopy.gen.go new file mode 100644 index 0000000000..c52d23730c --- /dev/null +++ b/proto-public/pbmesh/v2beta1/pbproxystate/references_deepcopy.gen.go @@ -0,0 +1,69 @@ +// Code generated by protoc-gen-deepcopy. DO NOT EDIT. +package pbproxystate + +import ( + proto "google.golang.org/protobuf/proto" +) + +// DeepCopyInto supports using LeafCertificateRef within kubernetes types, where deepcopy-gen is used. +func (in *LeafCertificateRef) DeepCopyInto(out *LeafCertificateRef) { + p := proto.Clone(in).(*LeafCertificateRef) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LeafCertificateRef. Required by controller-gen. +func (in *LeafCertificateRef) DeepCopy() *LeafCertificateRef { + if in == nil { + return nil + } + out := new(LeafCertificateRef) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new LeafCertificateRef. Required by controller-gen. +func (in *LeafCertificateRef) DeepCopyInterface() interface{} { + return in.DeepCopy() +} + +// DeepCopyInto supports using TrustBundleRef within kubernetes types, where deepcopy-gen is used. +func (in *TrustBundleRef) DeepCopyInto(out *TrustBundleRef) { + p := proto.Clone(in).(*TrustBundleRef) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TrustBundleRef. Required by controller-gen. +func (in *TrustBundleRef) DeepCopy() *TrustBundleRef { + if in == nil { + return nil + } + out := new(TrustBundleRef) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new TrustBundleRef. Required by controller-gen. +func (in *TrustBundleRef) DeepCopyInterface() interface{} { + return in.DeepCopy() +} + +// DeepCopyInto supports using EndpointRef within kubernetes types, where deepcopy-gen is used. +func (in *EndpointRef) DeepCopyInto(out *EndpointRef) { + p := proto.Clone(in).(*EndpointRef) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EndpointRef. Required by controller-gen. +func (in *EndpointRef) DeepCopy() *EndpointRef { + if in == nil { + return nil + } + out := new(EndpointRef) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new EndpointRef. Required by controller-gen. +func (in *EndpointRef) DeepCopyInterface() interface{} { + return in.DeepCopy() +} diff --git a/proto-public/pbmesh/v2beta1/pbproxystate/references_json.gen.go b/proto-public/pbmesh/v2beta1/pbproxystate/references_json.gen.go new file mode 100644 index 0000000000..91a178b9b3 --- /dev/null +++ b/proto-public/pbmesh/v2beta1/pbproxystate/references_json.gen.go @@ -0,0 +1,44 @@ +// Code generated by protoc-json-shim. DO NOT EDIT. +package pbproxystate + +import ( + protojson "google.golang.org/protobuf/encoding/protojson" +) + +// MarshalJSON is a custom marshaler for LeafCertificateRef +func (this *LeafCertificateRef) MarshalJSON() ([]byte, error) { + str, err := ReferencesMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for LeafCertificateRef +func (this *LeafCertificateRef) UnmarshalJSON(b []byte) error { + return ReferencesUnmarshaler.Unmarshal(b, this) +} + +// MarshalJSON is a custom marshaler for TrustBundleRef +func (this *TrustBundleRef) MarshalJSON() ([]byte, error) { + str, err := ReferencesMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for TrustBundleRef +func (this *TrustBundleRef) UnmarshalJSON(b []byte) error { + return ReferencesUnmarshaler.Unmarshal(b, this) +} + +// MarshalJSON is a custom marshaler for EndpointRef +func (this *EndpointRef) MarshalJSON() ([]byte, error) { + str, err := ReferencesMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for EndpointRef +func (this *EndpointRef) UnmarshalJSON(b []byte) error { + return ReferencesUnmarshaler.Unmarshal(b, this) +} + +var ( + ReferencesMarshaler = &protojson.MarshalOptions{} + ReferencesUnmarshaler = &protojson.UnmarshalOptions{DiscardUnknown: false} +) diff --git a/proto-public/pbmesh/v2beta1/pbproxystate/route.pb.go b/proto-public/pbmesh/v2beta1/pbproxystate/route.pb.go index 2dc7aa44c1..0d88a016eb 100644 --- a/proto-public/pbmesh/v2beta1/pbproxystate/route.pb.go +++ b/proto-public/pbmesh/v2beta1/pbproxystate/route.pb.go @@ -863,7 +863,9 @@ type TimeoutConfig struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Timeout *durationpb.Duration `protobuf:"bytes,1,opt,name=timeout,proto3" json:"timeout,omitempty"` + // +kubebuilder:validation:Format=duration + Timeout *durationpb.Duration `protobuf:"bytes,1,opt,name=timeout,proto3" json:"timeout,omitempty"` + // +kubebuilder:validation:Format=duration IdleTimeout *durationpb.Duration `protobuf:"bytes,2,opt,name=idle_timeout,json=idleTimeout,proto3" json:"idle_timeout,omitempty"` } @@ -1027,7 +1029,8 @@ type CookiePolicy struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // +kubebuilder:validation:Format=duration Ttl *durationpb.Duration `protobuf:"bytes,2,opt,name=ttl,proto3" json:"ttl,omitempty"` Path string `protobuf:"bytes,3,opt,name=path,proto3" json:"path,omitempty"` Terminal bool `protobuf:"varint,4,opt,name=terminal,proto3" json:"terminal,omitempty"` diff --git a/proto-public/pbmesh/v2beta1/pbproxystate/route.proto b/proto-public/pbmesh/v2beta1/pbproxystate/route.proto index 37f43067be..d9b9c8dcd6 100644 --- a/proto-public/pbmesh/v2beta1/pbproxystate/route.proto +++ b/proto-public/pbmesh/v2beta1/pbproxystate/route.proto @@ -98,7 +98,9 @@ message RetryPolicy { } message TimeoutConfig { + // +kubebuilder:validation:Format=duration google.protobuf.Duration timeout = 1; + // +kubebuilder:validation:Format=duration google.protobuf.Duration idle_timeout = 2; } @@ -113,6 +115,7 @@ message LoadBalancerHashPolicy { message CookiePolicy { string name = 1; + // +kubebuilder:validation:Format=duration google.protobuf.Duration ttl = 2; string path = 3; bool terminal = 4; diff --git a/proto-public/pbmesh/v2beta1/pbproxystate/route_deepcopy.gen.go b/proto-public/pbmesh/v2beta1/pbproxystate/route_deepcopy.gen.go new file mode 100644 index 0000000000..2d2e710094 --- /dev/null +++ b/proto-public/pbmesh/v2beta1/pbproxystate/route_deepcopy.gen.go @@ -0,0 +1,342 @@ +// Code generated by protoc-gen-deepcopy. DO NOT EDIT. +package pbproxystate + +import ( + proto "google.golang.org/protobuf/proto" +) + +// DeepCopyInto supports using Route within kubernetes types, where deepcopy-gen is used. +func (in *Route) DeepCopyInto(out *Route) { + p := proto.Clone(in).(*Route) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Route. Required by controller-gen. +func (in *Route) DeepCopy() *Route { + if in == nil { + return nil + } + out := new(Route) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new Route. Required by controller-gen. +func (in *Route) DeepCopyInterface() interface{} { + return in.DeepCopy() +} + +// DeepCopyInto supports using VirtualHost within kubernetes types, where deepcopy-gen is used. +func (in *VirtualHost) DeepCopyInto(out *VirtualHost) { + p := proto.Clone(in).(*VirtualHost) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualHost. Required by controller-gen. +func (in *VirtualHost) DeepCopy() *VirtualHost { + if in == nil { + return nil + } + out := new(VirtualHost) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new VirtualHost. Required by controller-gen. +func (in *VirtualHost) DeepCopyInterface() interface{} { + return in.DeepCopy() +} + +// DeepCopyInto supports using RouteRule within kubernetes types, where deepcopy-gen is used. +func (in *RouteRule) DeepCopyInto(out *RouteRule) { + p := proto.Clone(in).(*RouteRule) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RouteRule. Required by controller-gen. +func (in *RouteRule) DeepCopy() *RouteRule { + if in == nil { + return nil + } + out := new(RouteRule) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new RouteRule. Required by controller-gen. +func (in *RouteRule) DeepCopyInterface() interface{} { + return in.DeepCopy() +} + +// DeepCopyInto supports using RouteMatch within kubernetes types, where deepcopy-gen is used. +func (in *RouteMatch) DeepCopyInto(out *RouteMatch) { + p := proto.Clone(in).(*RouteMatch) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RouteMatch. Required by controller-gen. +func (in *RouteMatch) DeepCopy() *RouteMatch { + if in == nil { + return nil + } + out := new(RouteMatch) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new RouteMatch. Required by controller-gen. +func (in *RouteMatch) DeepCopyInterface() interface{} { + return in.DeepCopy() +} + +// DeepCopyInto supports using PathMatch within kubernetes types, where deepcopy-gen is used. +func (in *PathMatch) DeepCopyInto(out *PathMatch) { + p := proto.Clone(in).(*PathMatch) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PathMatch. Required by controller-gen. +func (in *PathMatch) DeepCopy() *PathMatch { + if in == nil { + return nil + } + out := new(PathMatch) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new PathMatch. Required by controller-gen. +func (in *PathMatch) DeepCopyInterface() interface{} { + return in.DeepCopy() +} + +// DeepCopyInto supports using QueryParameterMatch within kubernetes types, where deepcopy-gen is used. +func (in *QueryParameterMatch) DeepCopyInto(out *QueryParameterMatch) { + p := proto.Clone(in).(*QueryParameterMatch) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new QueryParameterMatch. Required by controller-gen. +func (in *QueryParameterMatch) DeepCopy() *QueryParameterMatch { + if in == nil { + return nil + } + out := new(QueryParameterMatch) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new QueryParameterMatch. Required by controller-gen. +func (in *QueryParameterMatch) DeepCopyInterface() interface{} { + return in.DeepCopy() +} + +// DeepCopyInto supports using HeaderMatch within kubernetes types, where deepcopy-gen is used. +func (in *HeaderMatch) DeepCopyInto(out *HeaderMatch) { + p := proto.Clone(in).(*HeaderMatch) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HeaderMatch. Required by controller-gen. +func (in *HeaderMatch) DeepCopy() *HeaderMatch { + if in == nil { + return nil + } + out := new(HeaderMatch) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new HeaderMatch. Required by controller-gen. +func (in *HeaderMatch) DeepCopyInterface() interface{} { + return in.DeepCopy() +} + +// DeepCopyInto supports using RouteDestination within kubernetes types, where deepcopy-gen is used. +func (in *RouteDestination) DeepCopyInto(out *RouteDestination) { + p := proto.Clone(in).(*RouteDestination) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RouteDestination. Required by controller-gen. +func (in *RouteDestination) DeepCopy() *RouteDestination { + if in == nil { + return nil + } + out := new(RouteDestination) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new RouteDestination. Required by controller-gen. +func (in *RouteDestination) DeepCopyInterface() interface{} { + return in.DeepCopy() +} + +// DeepCopyInto supports using DestinationConfiguration within kubernetes types, where deepcopy-gen is used. +func (in *DestinationConfiguration) DeepCopyInto(out *DestinationConfiguration) { + p := proto.Clone(in).(*DestinationConfiguration) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DestinationConfiguration. Required by controller-gen. +func (in *DestinationConfiguration) DeepCopy() *DestinationConfiguration { + if in == nil { + return nil + } + out := new(DestinationConfiguration) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new DestinationConfiguration. Required by controller-gen. +func (in *DestinationConfiguration) DeepCopyInterface() interface{} { + return in.DeepCopy() +} + +// DeepCopyInto supports using RetryPolicy within kubernetes types, where deepcopy-gen is used. +func (in *RetryPolicy) DeepCopyInto(out *RetryPolicy) { + p := proto.Clone(in).(*RetryPolicy) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RetryPolicy. Required by controller-gen. +func (in *RetryPolicy) DeepCopy() *RetryPolicy { + if in == nil { + return nil + } + out := new(RetryPolicy) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new RetryPolicy. Required by controller-gen. +func (in *RetryPolicy) DeepCopyInterface() interface{} { + return in.DeepCopy() +} + +// DeepCopyInto supports using TimeoutConfig within kubernetes types, where deepcopy-gen is used. +func (in *TimeoutConfig) DeepCopyInto(out *TimeoutConfig) { + p := proto.Clone(in).(*TimeoutConfig) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TimeoutConfig. Required by controller-gen. +func (in *TimeoutConfig) DeepCopy() *TimeoutConfig { + if in == nil { + return nil + } + out := new(TimeoutConfig) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new TimeoutConfig. Required by controller-gen. +func (in *TimeoutConfig) DeepCopyInterface() interface{} { + return in.DeepCopy() +} + +// DeepCopyInto supports using LoadBalancerHashPolicy within kubernetes types, where deepcopy-gen is used. +func (in *LoadBalancerHashPolicy) DeepCopyInto(out *LoadBalancerHashPolicy) { + p := proto.Clone(in).(*LoadBalancerHashPolicy) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LoadBalancerHashPolicy. Required by controller-gen. +func (in *LoadBalancerHashPolicy) DeepCopy() *LoadBalancerHashPolicy { + if in == nil { + return nil + } + out := new(LoadBalancerHashPolicy) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new LoadBalancerHashPolicy. Required by controller-gen. +func (in *LoadBalancerHashPolicy) DeepCopyInterface() interface{} { + return in.DeepCopy() +} + +// DeepCopyInto supports using CookiePolicy within kubernetes types, where deepcopy-gen is used. +func (in *CookiePolicy) DeepCopyInto(out *CookiePolicy) { + p := proto.Clone(in).(*CookiePolicy) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CookiePolicy. Required by controller-gen. +func (in *CookiePolicy) DeepCopy() *CookiePolicy { + if in == nil { + return nil + } + out := new(CookiePolicy) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new CookiePolicy. Required by controller-gen. +func (in *CookiePolicy) DeepCopyInterface() interface{} { + return in.DeepCopy() +} + +// DeepCopyInto supports using HeaderPolicy within kubernetes types, where deepcopy-gen is used. +func (in *HeaderPolicy) DeepCopyInto(out *HeaderPolicy) { + p := proto.Clone(in).(*HeaderPolicy) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HeaderPolicy. Required by controller-gen. +func (in *HeaderPolicy) DeepCopy() *HeaderPolicy { + if in == nil { + return nil + } + out := new(HeaderPolicy) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new HeaderPolicy. Required by controller-gen. +func (in *HeaderPolicy) DeepCopyInterface() interface{} { + return in.DeepCopy() +} + +// DeepCopyInto supports using QueryParameterPolicy within kubernetes types, where deepcopy-gen is used. +func (in *QueryParameterPolicy) DeepCopyInto(out *QueryParameterPolicy) { + p := proto.Clone(in).(*QueryParameterPolicy) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new QueryParameterPolicy. Required by controller-gen. +func (in *QueryParameterPolicy) DeepCopy() *QueryParameterPolicy { + if in == nil { + return nil + } + out := new(QueryParameterPolicy) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new QueryParameterPolicy. Required by controller-gen. +func (in *QueryParameterPolicy) DeepCopyInterface() interface{} { + return in.DeepCopy() +} + +// DeepCopyInto supports using ConnectionPropertiesPolicy within kubernetes types, where deepcopy-gen is used. +func (in *ConnectionPropertiesPolicy) DeepCopyInto(out *ConnectionPropertiesPolicy) { + p := proto.Clone(in).(*ConnectionPropertiesPolicy) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConnectionPropertiesPolicy. Required by controller-gen. +func (in *ConnectionPropertiesPolicy) DeepCopy() *ConnectionPropertiesPolicy { + if in == nil { + return nil + } + out := new(ConnectionPropertiesPolicy) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new ConnectionPropertiesPolicy. Required by controller-gen. +func (in *ConnectionPropertiesPolicy) DeepCopyInterface() interface{} { + return in.DeepCopy() +} diff --git a/proto-public/pbmesh/v2beta1/pbproxystate/route_json.gen.go b/proto-public/pbmesh/v2beta1/pbproxystate/route_json.gen.go new file mode 100644 index 0000000000..23682dc572 --- /dev/null +++ b/proto-public/pbmesh/v2beta1/pbproxystate/route_json.gen.go @@ -0,0 +1,187 @@ +// Code generated by protoc-json-shim. DO NOT EDIT. +package pbproxystate + +import ( + protojson "google.golang.org/protobuf/encoding/protojson" +) + +// MarshalJSON is a custom marshaler for Route +func (this *Route) MarshalJSON() ([]byte, error) { + str, err := RouteMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for Route +func (this *Route) UnmarshalJSON(b []byte) error { + return RouteUnmarshaler.Unmarshal(b, this) +} + +// MarshalJSON is a custom marshaler for VirtualHost +func (this *VirtualHost) MarshalJSON() ([]byte, error) { + str, err := RouteMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for VirtualHost +func (this *VirtualHost) UnmarshalJSON(b []byte) error { + return RouteUnmarshaler.Unmarshal(b, this) +} + +// MarshalJSON is a custom marshaler for RouteRule +func (this *RouteRule) MarshalJSON() ([]byte, error) { + str, err := RouteMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for RouteRule +func (this *RouteRule) UnmarshalJSON(b []byte) error { + return RouteUnmarshaler.Unmarshal(b, this) +} + +// MarshalJSON is a custom marshaler for RouteMatch +func (this *RouteMatch) MarshalJSON() ([]byte, error) { + str, err := RouteMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for RouteMatch +func (this *RouteMatch) UnmarshalJSON(b []byte) error { + return RouteUnmarshaler.Unmarshal(b, this) +} + +// MarshalJSON is a custom marshaler for PathMatch +func (this *PathMatch) MarshalJSON() ([]byte, error) { + str, err := RouteMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for PathMatch +func (this *PathMatch) UnmarshalJSON(b []byte) error { + return RouteUnmarshaler.Unmarshal(b, this) +} + +// MarshalJSON is a custom marshaler for QueryParameterMatch +func (this *QueryParameterMatch) MarshalJSON() ([]byte, error) { + str, err := RouteMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for QueryParameterMatch +func (this *QueryParameterMatch) UnmarshalJSON(b []byte) error { + return RouteUnmarshaler.Unmarshal(b, this) +} + +// MarshalJSON is a custom marshaler for HeaderMatch +func (this *HeaderMatch) MarshalJSON() ([]byte, error) { + str, err := RouteMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for HeaderMatch +func (this *HeaderMatch) UnmarshalJSON(b []byte) error { + return RouteUnmarshaler.Unmarshal(b, this) +} + +// MarshalJSON is a custom marshaler for RouteDestination +func (this *RouteDestination) MarshalJSON() ([]byte, error) { + str, err := RouteMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for RouteDestination +func (this *RouteDestination) UnmarshalJSON(b []byte) error { + return RouteUnmarshaler.Unmarshal(b, this) +} + +// MarshalJSON is a custom marshaler for DestinationConfiguration +func (this *DestinationConfiguration) MarshalJSON() ([]byte, error) { + str, err := RouteMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for DestinationConfiguration +func (this *DestinationConfiguration) UnmarshalJSON(b []byte) error { + return RouteUnmarshaler.Unmarshal(b, this) +} + +// MarshalJSON is a custom marshaler for RetryPolicy +func (this *RetryPolicy) MarshalJSON() ([]byte, error) { + str, err := RouteMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for RetryPolicy +func (this *RetryPolicy) UnmarshalJSON(b []byte) error { + return RouteUnmarshaler.Unmarshal(b, this) +} + +// MarshalJSON is a custom marshaler for TimeoutConfig +func (this *TimeoutConfig) MarshalJSON() ([]byte, error) { + str, err := RouteMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for TimeoutConfig +func (this *TimeoutConfig) UnmarshalJSON(b []byte) error { + return RouteUnmarshaler.Unmarshal(b, this) +} + +// MarshalJSON is a custom marshaler for LoadBalancerHashPolicy +func (this *LoadBalancerHashPolicy) MarshalJSON() ([]byte, error) { + str, err := RouteMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for LoadBalancerHashPolicy +func (this *LoadBalancerHashPolicy) UnmarshalJSON(b []byte) error { + return RouteUnmarshaler.Unmarshal(b, this) +} + +// MarshalJSON is a custom marshaler for CookiePolicy +func (this *CookiePolicy) MarshalJSON() ([]byte, error) { + str, err := RouteMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for CookiePolicy +func (this *CookiePolicy) UnmarshalJSON(b []byte) error { + return RouteUnmarshaler.Unmarshal(b, this) +} + +// MarshalJSON is a custom marshaler for HeaderPolicy +func (this *HeaderPolicy) MarshalJSON() ([]byte, error) { + str, err := RouteMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for HeaderPolicy +func (this *HeaderPolicy) UnmarshalJSON(b []byte) error { + return RouteUnmarshaler.Unmarshal(b, this) +} + +// MarshalJSON is a custom marshaler for QueryParameterPolicy +func (this *QueryParameterPolicy) MarshalJSON() ([]byte, error) { + str, err := RouteMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for QueryParameterPolicy +func (this *QueryParameterPolicy) UnmarshalJSON(b []byte) error { + return RouteUnmarshaler.Unmarshal(b, this) +} + +// MarshalJSON is a custom marshaler for ConnectionPropertiesPolicy +func (this *ConnectionPropertiesPolicy) MarshalJSON() ([]byte, error) { + str, err := RouteMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for ConnectionPropertiesPolicy +func (this *ConnectionPropertiesPolicy) UnmarshalJSON(b []byte) error { + return RouteUnmarshaler.Unmarshal(b, this) +} + +var ( + RouteMarshaler = &protojson.MarshalOptions{} + RouteUnmarshaler = &protojson.UnmarshalOptions{DiscardUnknown: false} +) diff --git a/proto-public/pbmesh/v2beta1/pbproxystate/traffic_permissions_deepcopy.gen.go b/proto-public/pbmesh/v2beta1/pbproxystate/traffic_permissions_deepcopy.gen.go new file mode 100644 index 0000000000..316c185dfa --- /dev/null +++ b/proto-public/pbmesh/v2beta1/pbproxystate/traffic_permissions_deepcopy.gen.go @@ -0,0 +1,90 @@ +// Code generated by protoc-gen-deepcopy. DO NOT EDIT. +package pbproxystate + +import ( + proto "google.golang.org/protobuf/proto" +) + +// DeepCopyInto supports using TrafficPermissions within kubernetes types, where deepcopy-gen is used. +func (in *TrafficPermissions) DeepCopyInto(out *TrafficPermissions) { + p := proto.Clone(in).(*TrafficPermissions) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TrafficPermissions. Required by controller-gen. +func (in *TrafficPermissions) DeepCopy() *TrafficPermissions { + if in == nil { + return nil + } + out := new(TrafficPermissions) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new TrafficPermissions. Required by controller-gen. +func (in *TrafficPermissions) DeepCopyInterface() interface{} { + return in.DeepCopy() +} + +// DeepCopyInto supports using Permission within kubernetes types, where deepcopy-gen is used. +func (in *Permission) DeepCopyInto(out *Permission) { + p := proto.Clone(in).(*Permission) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Permission. Required by controller-gen. +func (in *Permission) DeepCopy() *Permission { + if in == nil { + return nil + } + out := new(Permission) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new Permission. Required by controller-gen. +func (in *Permission) DeepCopyInterface() interface{} { + return in.DeepCopy() +} + +// DeepCopyInto supports using Principal within kubernetes types, where deepcopy-gen is used. +func (in *Principal) DeepCopyInto(out *Principal) { + p := proto.Clone(in).(*Principal) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Principal. Required by controller-gen. +func (in *Principal) DeepCopy() *Principal { + if in == nil { + return nil + } + out := new(Principal) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new Principal. Required by controller-gen. +func (in *Principal) DeepCopyInterface() interface{} { + return in.DeepCopy() +} + +// DeepCopyInto supports using Spiffe within kubernetes types, where deepcopy-gen is used. +func (in *Spiffe) DeepCopyInto(out *Spiffe) { + p := proto.Clone(in).(*Spiffe) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Spiffe. Required by controller-gen. +func (in *Spiffe) DeepCopy() *Spiffe { + if in == nil { + return nil + } + out := new(Spiffe) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new Spiffe. Required by controller-gen. +func (in *Spiffe) DeepCopyInterface() interface{} { + return in.DeepCopy() +} diff --git a/proto-public/pbmesh/v2beta1/pbproxystate/traffic_permissions_json.gen.go b/proto-public/pbmesh/v2beta1/pbproxystate/traffic_permissions_json.gen.go new file mode 100644 index 0000000000..3651fcabca --- /dev/null +++ b/proto-public/pbmesh/v2beta1/pbproxystate/traffic_permissions_json.gen.go @@ -0,0 +1,55 @@ +// Code generated by protoc-json-shim. DO NOT EDIT. +package pbproxystate + +import ( + protojson "google.golang.org/protobuf/encoding/protojson" +) + +// MarshalJSON is a custom marshaler for TrafficPermissions +func (this *TrafficPermissions) MarshalJSON() ([]byte, error) { + str, err := TrafficPermissionsMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for TrafficPermissions +func (this *TrafficPermissions) UnmarshalJSON(b []byte) error { + return TrafficPermissionsUnmarshaler.Unmarshal(b, this) +} + +// MarshalJSON is a custom marshaler for Permission +func (this *Permission) MarshalJSON() ([]byte, error) { + str, err := TrafficPermissionsMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for Permission +func (this *Permission) UnmarshalJSON(b []byte) error { + return TrafficPermissionsUnmarshaler.Unmarshal(b, this) +} + +// MarshalJSON is a custom marshaler for Principal +func (this *Principal) MarshalJSON() ([]byte, error) { + str, err := TrafficPermissionsMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for Principal +func (this *Principal) UnmarshalJSON(b []byte) error { + return TrafficPermissionsUnmarshaler.Unmarshal(b, this) +} + +// MarshalJSON is a custom marshaler for Spiffe +func (this *Spiffe) MarshalJSON() ([]byte, error) { + str, err := TrafficPermissionsMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for Spiffe +func (this *Spiffe) UnmarshalJSON(b []byte) error { + return TrafficPermissionsUnmarshaler.Unmarshal(b, this) +} + +var ( + TrafficPermissionsMarshaler = &protojson.MarshalOptions{} + TrafficPermissionsUnmarshaler = &protojson.UnmarshalOptions{DiscardUnknown: false} +) diff --git a/proto-public/pbmesh/v2beta1/pbproxystate/transport_socket.pb.go b/proto-public/pbmesh/v2beta1/pbproxystate/transport_socket.pb.go index 5d926042f8..d3acedebd1 100644 --- a/proto-public/pbmesh/v2beta1/pbproxystate/transport_socket.pb.go +++ b/proto-public/pbmesh/v2beta1/pbproxystate/transport_socket.pb.go @@ -23,6 +23,8 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) +// +kubebuilder:validation:Enum=TLS_VERSION_AUTO;TLS_VERSION_1_0;TLS_VERSION_1_1;TLS_VERSION_1_2;TLS_VERSION_1_3;TLS_VERSION_INVALID;TLS_VERSION_UNSPECIFIED +// +kubebuilder:validation:Type=string type TLSVersion int32 const ( @@ -85,6 +87,8 @@ func (TLSVersion) EnumDescriptor() ([]byte, []int) { return file_pbmesh_v2beta1_pbproxystate_transport_socket_proto_rawDescGZIP(), []int{0} } +// +kubebuilder:validation:Enum=TLS_CIPHER_SUITE_ECDHE_ECDSA_AES128_GCM_SHA256;TLS_CIPHER_SUITE_AES256_SHA;TLS_CIPHER_SUITE_ECDHE_ECDSA_CHACHA20_POLY1305;TLS_CIPHER_SUITE_ECDHE_RSA_AES128_GCM_SHA256;TLS_CIPHER_SUITE_ECDHE_RSA_CHACHA20_POLY1305;TLS_CIPHER_SUITE_ECDHE_ECDSA_AES128_SHA;TLS_CIPHER_SUITE_ECDHE_RSA_AES128_SHA;TLS_CIPHER_SUITE_AES128_GCM_SHA256;TLS_CIPHER_SUITE_AES128_SHA;TLS_CIPHER_SUITE_ECDHE_ECDSA_AES256_GCM_SHA384;TLS_CIPHER_SUITE_ECDHE_RSA_AES256_GCM_SHA384;TLS_CIPHER_SUITE_ECDHE_ECDSA_AES256_SHA;TLS_CIPHER_SUITE_ECDHE_RSA_AES256_SHA;TLS_CIPHER_SUITE_AES256_GCM_SHA384 +// +kubebuilder:validation:Type=string type TLSCipherSuite int32 const ( diff --git a/proto-public/pbmesh/v2beta1/pbproxystate/transport_socket.proto b/proto-public/pbmesh/v2beta1/pbproxystate/transport_socket.proto index de1f6145be..9ff4f001de 100644 --- a/proto-public/pbmesh/v2beta1/pbproxystate/transport_socket.proto +++ b/proto-public/pbmesh/v2beta1/pbproxystate/transport_socket.proto @@ -107,6 +107,8 @@ message TrustBundle { repeated string roots = 2; } +// +kubebuilder:validation:Enum=TLS_VERSION_AUTO;TLS_VERSION_1_0;TLS_VERSION_1_1;TLS_VERSION_1_2;TLS_VERSION_1_3;TLS_VERSION_INVALID;TLS_VERSION_UNSPECIFIED +// +kubebuilder:validation:Type=string enum TLSVersion { // buf:lint:ignore ENUM_ZERO_VALUE_SUFFIX TLS_VERSION_AUTO = 0; @@ -118,6 +120,8 @@ enum TLSVersion { TLS_VERSION_UNSPECIFIED = 6; } +// +kubebuilder:validation:Enum=TLS_CIPHER_SUITE_ECDHE_ECDSA_AES128_GCM_SHA256;TLS_CIPHER_SUITE_AES256_SHA;TLS_CIPHER_SUITE_ECDHE_ECDSA_CHACHA20_POLY1305;TLS_CIPHER_SUITE_ECDHE_RSA_AES128_GCM_SHA256;TLS_CIPHER_SUITE_ECDHE_RSA_CHACHA20_POLY1305;TLS_CIPHER_SUITE_ECDHE_ECDSA_AES128_SHA;TLS_CIPHER_SUITE_ECDHE_RSA_AES128_SHA;TLS_CIPHER_SUITE_AES128_GCM_SHA256;TLS_CIPHER_SUITE_AES128_SHA;TLS_CIPHER_SUITE_ECDHE_ECDSA_AES256_GCM_SHA384;TLS_CIPHER_SUITE_ECDHE_RSA_AES256_GCM_SHA384;TLS_CIPHER_SUITE_ECDHE_ECDSA_AES256_SHA;TLS_CIPHER_SUITE_ECDHE_RSA_AES256_SHA;TLS_CIPHER_SUITE_AES256_GCM_SHA384 +// +kubebuilder:validation:Type=string enum TLSCipherSuite { // buf:lint:ignore ENUM_ZERO_VALUE_SUFFIX TLS_CIPHER_SUITE_ECDHE_ECDSA_AES128_GCM_SHA256 = 0; diff --git a/proto-public/pbmesh/v2beta1/pbproxystate/transport_socket_deepcopy.gen.go b/proto-public/pbmesh/v2beta1/pbproxystate/transport_socket_deepcopy.gen.go new file mode 100644 index 0000000000..f2ba600e77 --- /dev/null +++ b/proto-public/pbmesh/v2beta1/pbproxystate/transport_socket_deepcopy.gen.go @@ -0,0 +1,279 @@ +// Code generated by protoc-gen-deepcopy. DO NOT EDIT. +package pbproxystate + +import ( + proto "google.golang.org/protobuf/proto" +) + +// DeepCopyInto supports using TLS within kubernetes types, where deepcopy-gen is used. +func (in *TLS) DeepCopyInto(out *TLS) { + p := proto.Clone(in).(*TLS) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TLS. Required by controller-gen. +func (in *TLS) DeepCopy() *TLS { + if in == nil { + return nil + } + out := new(TLS) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new TLS. Required by controller-gen. +func (in *TLS) DeepCopyInterface() interface{} { + return in.DeepCopy() +} + +// DeepCopyInto supports using TransportSocket within kubernetes types, where deepcopy-gen is used. +func (in *TransportSocket) DeepCopyInto(out *TransportSocket) { + p := proto.Clone(in).(*TransportSocket) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TransportSocket. Required by controller-gen. +func (in *TransportSocket) DeepCopy() *TransportSocket { + if in == nil { + return nil + } + out := new(TransportSocket) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new TransportSocket. Required by controller-gen. +func (in *TransportSocket) DeepCopyInterface() interface{} { + return in.DeepCopy() +} + +// DeepCopyInto supports using InboundMeshMTLS within kubernetes types, where deepcopy-gen is used. +func (in *InboundMeshMTLS) DeepCopyInto(out *InboundMeshMTLS) { + p := proto.Clone(in).(*InboundMeshMTLS) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InboundMeshMTLS. Required by controller-gen. +func (in *InboundMeshMTLS) DeepCopy() *InboundMeshMTLS { + if in == nil { + return nil + } + out := new(InboundMeshMTLS) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new InboundMeshMTLS. Required by controller-gen. +func (in *InboundMeshMTLS) DeepCopyInterface() interface{} { + return in.DeepCopy() +} + +// DeepCopyInto supports using OutboundMeshMTLS within kubernetes types, where deepcopy-gen is used. +func (in *OutboundMeshMTLS) DeepCopyInto(out *OutboundMeshMTLS) { + p := proto.Clone(in).(*OutboundMeshMTLS) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OutboundMeshMTLS. Required by controller-gen. +func (in *OutboundMeshMTLS) DeepCopy() *OutboundMeshMTLS { + if in == nil { + return nil + } + out := new(OutboundMeshMTLS) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new OutboundMeshMTLS. Required by controller-gen. +func (in *OutboundMeshMTLS) DeepCopyInterface() interface{} { + return in.DeepCopy() +} + +// DeepCopyInto supports using InboundNonMeshTLS within kubernetes types, where deepcopy-gen is used. +func (in *InboundNonMeshTLS) DeepCopyInto(out *InboundNonMeshTLS) { + p := proto.Clone(in).(*InboundNonMeshTLS) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InboundNonMeshTLS. Required by controller-gen. +func (in *InboundNonMeshTLS) DeepCopy() *InboundNonMeshTLS { + if in == nil { + return nil + } + out := new(InboundNonMeshTLS) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new InboundNonMeshTLS. Required by controller-gen. +func (in *InboundNonMeshTLS) DeepCopyInterface() interface{} { + return in.DeepCopy() +} + +// DeepCopyInto supports using OutboundNonMeshTLS within kubernetes types, where deepcopy-gen is used. +func (in *OutboundNonMeshTLS) DeepCopyInto(out *OutboundNonMeshTLS) { + p := proto.Clone(in).(*OutboundNonMeshTLS) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OutboundNonMeshTLS. Required by controller-gen. +func (in *OutboundNonMeshTLS) DeepCopy() *OutboundNonMeshTLS { + if in == nil { + return nil + } + out := new(OutboundNonMeshTLS) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new OutboundNonMeshTLS. Required by controller-gen. +func (in *OutboundNonMeshTLS) DeepCopyInterface() interface{} { + return in.DeepCopy() +} + +// DeepCopyInto supports using MeshInboundValidationContext within kubernetes types, where deepcopy-gen is used. +func (in *MeshInboundValidationContext) DeepCopyInto(out *MeshInboundValidationContext) { + p := proto.Clone(in).(*MeshInboundValidationContext) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MeshInboundValidationContext. Required by controller-gen. +func (in *MeshInboundValidationContext) DeepCopy() *MeshInboundValidationContext { + if in == nil { + return nil + } + out := new(MeshInboundValidationContext) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new MeshInboundValidationContext. Required by controller-gen. +func (in *MeshInboundValidationContext) DeepCopyInterface() interface{} { + return in.DeepCopy() +} + +// DeepCopyInto supports using MeshOutboundValidationContext within kubernetes types, where deepcopy-gen is used. +func (in *MeshOutboundValidationContext) DeepCopyInto(out *MeshOutboundValidationContext) { + p := proto.Clone(in).(*MeshOutboundValidationContext) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MeshOutboundValidationContext. Required by controller-gen. +func (in *MeshOutboundValidationContext) DeepCopy() *MeshOutboundValidationContext { + if in == nil { + return nil + } + out := new(MeshOutboundValidationContext) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new MeshOutboundValidationContext. Required by controller-gen. +func (in *MeshOutboundValidationContext) DeepCopyInterface() interface{} { + return in.DeepCopy() +} + +// DeepCopyInto supports using NonMeshOutboundValidationContext within kubernetes types, where deepcopy-gen is used. +func (in *NonMeshOutboundValidationContext) DeepCopyInto(out *NonMeshOutboundValidationContext) { + p := proto.Clone(in).(*NonMeshOutboundValidationContext) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NonMeshOutboundValidationContext. Required by controller-gen. +func (in *NonMeshOutboundValidationContext) DeepCopy() *NonMeshOutboundValidationContext { + if in == nil { + return nil + } + out := new(NonMeshOutboundValidationContext) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new NonMeshOutboundValidationContext. Required by controller-gen. +func (in *NonMeshOutboundValidationContext) DeepCopyInterface() interface{} { + return in.DeepCopy() +} + +// DeepCopyInto supports using SDSCertificate within kubernetes types, where deepcopy-gen is used. +func (in *SDSCertificate) DeepCopyInto(out *SDSCertificate) { + p := proto.Clone(in).(*SDSCertificate) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SDSCertificate. Required by controller-gen. +func (in *SDSCertificate) DeepCopy() *SDSCertificate { + if in == nil { + return nil + } + out := new(SDSCertificate) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new SDSCertificate. Required by controller-gen. +func (in *SDSCertificate) DeepCopyInterface() interface{} { + return in.DeepCopy() +} + +// DeepCopyInto supports using TLSParameters within kubernetes types, where deepcopy-gen is used. +func (in *TLSParameters) DeepCopyInto(out *TLSParameters) { + p := proto.Clone(in).(*TLSParameters) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TLSParameters. Required by controller-gen. +func (in *TLSParameters) DeepCopy() *TLSParameters { + if in == nil { + return nil + } + out := new(TLSParameters) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new TLSParameters. Required by controller-gen. +func (in *TLSParameters) DeepCopyInterface() interface{} { + return in.DeepCopy() +} + +// DeepCopyInto supports using LeafCertificate within kubernetes types, where deepcopy-gen is used. +func (in *LeafCertificate) DeepCopyInto(out *LeafCertificate) { + p := proto.Clone(in).(*LeafCertificate) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LeafCertificate. Required by controller-gen. +func (in *LeafCertificate) DeepCopy() *LeafCertificate { + if in == nil { + return nil + } + out := new(LeafCertificate) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new LeafCertificate. Required by controller-gen. +func (in *LeafCertificate) DeepCopyInterface() interface{} { + return in.DeepCopy() +} + +// DeepCopyInto supports using TrustBundle within kubernetes types, where deepcopy-gen is used. +func (in *TrustBundle) DeepCopyInto(out *TrustBundle) { + p := proto.Clone(in).(*TrustBundle) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TrustBundle. Required by controller-gen. +func (in *TrustBundle) DeepCopy() *TrustBundle { + if in == nil { + return nil + } + out := new(TrustBundle) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new TrustBundle. Required by controller-gen. +func (in *TrustBundle) DeepCopyInterface() interface{} { + return in.DeepCopy() +} diff --git a/proto-public/pbmesh/v2beta1/pbproxystate/transport_socket_json.gen.go b/proto-public/pbmesh/v2beta1/pbproxystate/transport_socket_json.gen.go new file mode 100644 index 0000000000..4c83b4d87d --- /dev/null +++ b/proto-public/pbmesh/v2beta1/pbproxystate/transport_socket_json.gen.go @@ -0,0 +1,154 @@ +// Code generated by protoc-json-shim. DO NOT EDIT. +package pbproxystate + +import ( + protojson "google.golang.org/protobuf/encoding/protojson" +) + +// MarshalJSON is a custom marshaler for TLS +func (this *TLS) MarshalJSON() ([]byte, error) { + str, err := TransportSocketMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for TLS +func (this *TLS) UnmarshalJSON(b []byte) error { + return TransportSocketUnmarshaler.Unmarshal(b, this) +} + +// MarshalJSON is a custom marshaler for TransportSocket +func (this *TransportSocket) MarshalJSON() ([]byte, error) { + str, err := TransportSocketMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for TransportSocket +func (this *TransportSocket) UnmarshalJSON(b []byte) error { + return TransportSocketUnmarshaler.Unmarshal(b, this) +} + +// MarshalJSON is a custom marshaler for InboundMeshMTLS +func (this *InboundMeshMTLS) MarshalJSON() ([]byte, error) { + str, err := TransportSocketMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for InboundMeshMTLS +func (this *InboundMeshMTLS) UnmarshalJSON(b []byte) error { + return TransportSocketUnmarshaler.Unmarshal(b, this) +} + +// MarshalJSON is a custom marshaler for OutboundMeshMTLS +func (this *OutboundMeshMTLS) MarshalJSON() ([]byte, error) { + str, err := TransportSocketMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for OutboundMeshMTLS +func (this *OutboundMeshMTLS) UnmarshalJSON(b []byte) error { + return TransportSocketUnmarshaler.Unmarshal(b, this) +} + +// MarshalJSON is a custom marshaler for InboundNonMeshTLS +func (this *InboundNonMeshTLS) MarshalJSON() ([]byte, error) { + str, err := TransportSocketMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for InboundNonMeshTLS +func (this *InboundNonMeshTLS) UnmarshalJSON(b []byte) error { + return TransportSocketUnmarshaler.Unmarshal(b, this) +} + +// MarshalJSON is a custom marshaler for OutboundNonMeshTLS +func (this *OutboundNonMeshTLS) MarshalJSON() ([]byte, error) { + str, err := TransportSocketMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for OutboundNonMeshTLS +func (this *OutboundNonMeshTLS) UnmarshalJSON(b []byte) error { + return TransportSocketUnmarshaler.Unmarshal(b, this) +} + +// MarshalJSON is a custom marshaler for MeshInboundValidationContext +func (this *MeshInboundValidationContext) MarshalJSON() ([]byte, error) { + str, err := TransportSocketMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for MeshInboundValidationContext +func (this *MeshInboundValidationContext) UnmarshalJSON(b []byte) error { + return TransportSocketUnmarshaler.Unmarshal(b, this) +} + +// MarshalJSON is a custom marshaler for MeshOutboundValidationContext +func (this *MeshOutboundValidationContext) MarshalJSON() ([]byte, error) { + str, err := TransportSocketMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for MeshOutboundValidationContext +func (this *MeshOutboundValidationContext) UnmarshalJSON(b []byte) error { + return TransportSocketUnmarshaler.Unmarshal(b, this) +} + +// MarshalJSON is a custom marshaler for NonMeshOutboundValidationContext +func (this *NonMeshOutboundValidationContext) MarshalJSON() ([]byte, error) { + str, err := TransportSocketMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for NonMeshOutboundValidationContext +func (this *NonMeshOutboundValidationContext) UnmarshalJSON(b []byte) error { + return TransportSocketUnmarshaler.Unmarshal(b, this) +} + +// MarshalJSON is a custom marshaler for SDSCertificate +func (this *SDSCertificate) MarshalJSON() ([]byte, error) { + str, err := TransportSocketMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for SDSCertificate +func (this *SDSCertificate) UnmarshalJSON(b []byte) error { + return TransportSocketUnmarshaler.Unmarshal(b, this) +} + +// MarshalJSON is a custom marshaler for TLSParameters +func (this *TLSParameters) MarshalJSON() ([]byte, error) { + str, err := TransportSocketMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for TLSParameters +func (this *TLSParameters) UnmarshalJSON(b []byte) error { + return TransportSocketUnmarshaler.Unmarshal(b, this) +} + +// MarshalJSON is a custom marshaler for LeafCertificate +func (this *LeafCertificate) MarshalJSON() ([]byte, error) { + str, err := TransportSocketMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for LeafCertificate +func (this *LeafCertificate) UnmarshalJSON(b []byte) error { + return TransportSocketUnmarshaler.Unmarshal(b, this) +} + +// MarshalJSON is a custom marshaler for TrustBundle +func (this *TrustBundle) MarshalJSON() ([]byte, error) { + str, err := TransportSocketMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for TrustBundle +func (this *TrustBundle) UnmarshalJSON(b []byte) error { + return TransportSocketUnmarshaler.Unmarshal(b, this) +} + +var ( + TransportSocketMarshaler = &protojson.MarshalOptions{} + TransportSocketUnmarshaler = &protojson.UnmarshalOptions{DiscardUnknown: false} +) diff --git a/proto-public/pbmesh/v2beta1/proxy_configuration.pb.go b/proto-public/pbmesh/v2beta1/proxy_configuration.pb.go index 8ad5d7ccbd..1b09926b79 100644 --- a/proto-public/pbmesh/v2beta1/proxy_configuration.pb.go +++ b/proto-public/pbmesh/v2beta1/proxy_configuration.pb.go @@ -26,6 +26,8 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) +// +kubebuilder:validation:Enum=PROXY_MODE_DEFAULT;PROXY_MODE_TRANSPARENT;PROXY_MODE_DIRECT +// +kubebuilder:validation:Type=string type ProxyMode int32 const ( @@ -83,6 +85,8 @@ func (ProxyMode) EnumDescriptor() ([]byte, []int) { return file_pbmesh_v2beta1_proxy_configuration_proto_rawDescGZIP(), []int{0} } +// +kubebuilder:validation:Enum=LOG_SINK_TYPE_DEFAULT;LOG_SINK_TYPE_FILE;LOG_SINK_TYPE_STDERR;LOG_SINK_TYPE_STDOUT +// +kubebuilder:validation:Type=string type LogSinkType int32 const ( @@ -136,6 +140,8 @@ func (LogSinkType) EnumDescriptor() ([]byte, []int) { return file_pbmesh_v2beta1_proxy_configuration_proto_rawDescGZIP(), []int{1} } +// +kubebuilder:validation:Enum=MUTUAL_TLS_MODE_DEFAULT;MUTUAL_TLS_MODE_STRICT;MUTUAL_TLS_MODE_PERMISSIVE +// +kubebuilder:validation:Type=string type MutualTLSMode int32 const ( @@ -204,6 +210,10 @@ type ProxyConfiguration struct { // deprecated: prevent usage when using v2 APIs directly. // needed for backwards compatibility // + // +kubebuilder:validation:Type=object + // +kubebuilder:validation:Schemaless + // +kubebuilder:pruning:PreserveUnknownFields + // // Deprecated: Marked as deprecated in pbmesh/v2beta1/proxy_configuration.proto. OpaqueConfig *structpb.Struct `protobuf:"bytes,4,opt,name=opaque_config,json=opaqueConfig,proto3" json:"opaque_config,omitempty"` } @@ -673,7 +683,7 @@ type AccessLogsConfig struct { // Path is the output file to write logs Path string `protobuf:"bytes,4,opt,name=path,proto3" json:"path,omitempty"` // The presence of one format string or the other implies the access log string encoding. - // Defining Both is invalid. + // Defining both is invalid. JsonFormat string `protobuf:"bytes,5,opt,name=json_format,json=jsonFormat,proto3" json:"json_format,omitempty"` TextFormat string `protobuf:"bytes,6,opt,name=text_format,json=textFormat,proto3" json:"text_format,omitempty"` } @@ -758,8 +768,11 @@ type EnvoyExtension struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - Required bool `protobuf:"varint,2,opt,name=required,proto3" json:"required,omitempty"` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Required bool `protobuf:"varint,2,opt,name=required,proto3" json:"required,omitempty"` + // +kubebuilder:validation:Type=object + // +kubebuilder:validation:Schemaless + // +kubebuilder:pruning:PreserveUnknownFields Arguments *structpb.Struct `protobuf:"bytes,3,opt,name=arguments,proto3" json:"arguments,omitempty"` ConsulVersion string `protobuf:"bytes,4,opt,name=consul_version,json=consulVersion,proto3" json:"consul_version,omitempty"` EnvoyVersion string `protobuf:"bytes,5,opt,name=envoy_version,json=envoyVersion,proto3" json:"envoy_version,omitempty"` diff --git a/proto-public/pbmesh/v2beta1/proxy_configuration.proto b/proto-public/pbmesh/v2beta1/proxy_configuration.proto index 491a9e3313..eb47e16e22 100644 --- a/proto-public/pbmesh/v2beta1/proxy_configuration.proto +++ b/proto-public/pbmesh/v2beta1/proxy_configuration.proto @@ -30,6 +30,10 @@ message ProxyConfiguration { // deprecated: prevent usage when using v2 APIs directly. // needed for backwards compatibility + // + // +kubebuilder:validation:Type=object + // +kubebuilder:validation:Schemaless + // +kubebuilder:pruning:PreserveUnknownFields google.protobuf.Struct opaque_config = 4 [deprecated = true]; } @@ -99,6 +103,8 @@ message BootstrapConfig { string telemetry_collector_bind_socket_dir = 14; } +// +kubebuilder:validation:Enum=PROXY_MODE_DEFAULT;PROXY_MODE_TRANSPARENT;PROXY_MODE_DIRECT +// +kubebuilder:validation:Type=string enum ProxyMode { // ProxyModeDefault represents no specific mode and should // be used to indicate that a different layer of the configuration @@ -132,11 +138,13 @@ message AccessLogsConfig { string path = 4; // The presence of one format string or the other implies the access log string encoding. - // Defining Both is invalid. + // Defining both is invalid. string json_format = 5; string text_format = 6; } +// +kubebuilder:validation:Enum=LOG_SINK_TYPE_DEFAULT;LOG_SINK_TYPE_FILE;LOG_SINK_TYPE_STDERR;LOG_SINK_TYPE_STDOUT +// +kubebuilder:validation:Type=string enum LogSinkType { // buf:lint:ignore ENUM_ZERO_VALUE_SUFFIX LOG_SINK_TYPE_DEFAULT = 0; @@ -149,11 +157,16 @@ enum LogSinkType { message EnvoyExtension { string name = 1; bool required = 2; + // +kubebuilder:validation:Type=object + // +kubebuilder:validation:Schemaless + // +kubebuilder:pruning:PreserveUnknownFields google.protobuf.Struct arguments = 3; string consul_version = 4; string envoy_version = 5; } +// +kubebuilder:validation:Enum=MUTUAL_TLS_MODE_DEFAULT;MUTUAL_TLS_MODE_STRICT;MUTUAL_TLS_MODE_PERMISSIVE +// +kubebuilder:validation:Type=string enum MutualTLSMode { // buf:lint:ignore ENUM_ZERO_VALUE_SUFFIX MUTUAL_TLS_MODE_DEFAULT = 0; diff --git a/proto-public/pbmesh/v2beta1/proxy_configuration_deepcopy.gen.go b/proto-public/pbmesh/v2beta1/proxy_configuration_deepcopy.gen.go new file mode 100644 index 0000000000..8c185f8820 --- /dev/null +++ b/proto-public/pbmesh/v2beta1/proxy_configuration_deepcopy.gen.go @@ -0,0 +1,132 @@ +// Code generated by protoc-gen-deepcopy. DO NOT EDIT. +package meshv2beta1 + +import ( + proto "google.golang.org/protobuf/proto" +) + +// DeepCopyInto supports using ProxyConfiguration within kubernetes types, where deepcopy-gen is used. +func (in *ProxyConfiguration) DeepCopyInto(out *ProxyConfiguration) { + p := proto.Clone(in).(*ProxyConfiguration) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProxyConfiguration. Required by controller-gen. +func (in *ProxyConfiguration) DeepCopy() *ProxyConfiguration { + if in == nil { + return nil + } + out := new(ProxyConfiguration) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new ProxyConfiguration. Required by controller-gen. +func (in *ProxyConfiguration) DeepCopyInterface() interface{} { + return in.DeepCopy() +} + +// DeepCopyInto supports using DynamicConfig within kubernetes types, where deepcopy-gen is used. +func (in *DynamicConfig) DeepCopyInto(out *DynamicConfig) { + p := proto.Clone(in).(*DynamicConfig) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DynamicConfig. Required by controller-gen. +func (in *DynamicConfig) DeepCopy() *DynamicConfig { + if in == nil { + return nil + } + out := new(DynamicConfig) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new DynamicConfig. Required by controller-gen. +func (in *DynamicConfig) DeepCopyInterface() interface{} { + return in.DeepCopy() +} + +// DeepCopyInto supports using TransparentProxy within kubernetes types, where deepcopy-gen is used. +func (in *TransparentProxy) DeepCopyInto(out *TransparentProxy) { + p := proto.Clone(in).(*TransparentProxy) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TransparentProxy. Required by controller-gen. +func (in *TransparentProxy) DeepCopy() *TransparentProxy { + if in == nil { + return nil + } + out := new(TransparentProxy) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new TransparentProxy. Required by controller-gen. +func (in *TransparentProxy) DeepCopyInterface() interface{} { + return in.DeepCopy() +} + +// DeepCopyInto supports using BootstrapConfig within kubernetes types, where deepcopy-gen is used. +func (in *BootstrapConfig) DeepCopyInto(out *BootstrapConfig) { + p := proto.Clone(in).(*BootstrapConfig) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BootstrapConfig. Required by controller-gen. +func (in *BootstrapConfig) DeepCopy() *BootstrapConfig { + if in == nil { + return nil + } + out := new(BootstrapConfig) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new BootstrapConfig. Required by controller-gen. +func (in *BootstrapConfig) DeepCopyInterface() interface{} { + return in.DeepCopy() +} + +// DeepCopyInto supports using AccessLogsConfig within kubernetes types, where deepcopy-gen is used. +func (in *AccessLogsConfig) DeepCopyInto(out *AccessLogsConfig) { + p := proto.Clone(in).(*AccessLogsConfig) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AccessLogsConfig. Required by controller-gen. +func (in *AccessLogsConfig) DeepCopy() *AccessLogsConfig { + if in == nil { + return nil + } + out := new(AccessLogsConfig) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new AccessLogsConfig. Required by controller-gen. +func (in *AccessLogsConfig) DeepCopyInterface() interface{} { + return in.DeepCopy() +} + +// DeepCopyInto supports using EnvoyExtension within kubernetes types, where deepcopy-gen is used. +func (in *EnvoyExtension) DeepCopyInto(out *EnvoyExtension) { + p := proto.Clone(in).(*EnvoyExtension) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EnvoyExtension. Required by controller-gen. +func (in *EnvoyExtension) DeepCopy() *EnvoyExtension { + if in == nil { + return nil + } + out := new(EnvoyExtension) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new EnvoyExtension. Required by controller-gen. +func (in *EnvoyExtension) DeepCopyInterface() interface{} { + return in.DeepCopy() +} diff --git a/proto-public/pbmesh/v2beta1/proxy_configuration_json.gen.go b/proto-public/pbmesh/v2beta1/proxy_configuration_json.gen.go new file mode 100644 index 0000000000..41fcdd5ed2 --- /dev/null +++ b/proto-public/pbmesh/v2beta1/proxy_configuration_json.gen.go @@ -0,0 +1,77 @@ +// Code generated by protoc-json-shim. DO NOT EDIT. +package meshv2beta1 + +import ( + protojson "google.golang.org/protobuf/encoding/protojson" +) + +// MarshalJSON is a custom marshaler for ProxyConfiguration +func (this *ProxyConfiguration) MarshalJSON() ([]byte, error) { + str, err := ProxyConfigurationMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for ProxyConfiguration +func (this *ProxyConfiguration) UnmarshalJSON(b []byte) error { + return ProxyConfigurationUnmarshaler.Unmarshal(b, this) +} + +// MarshalJSON is a custom marshaler for DynamicConfig +func (this *DynamicConfig) MarshalJSON() ([]byte, error) { + str, err := ProxyConfigurationMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for DynamicConfig +func (this *DynamicConfig) UnmarshalJSON(b []byte) error { + return ProxyConfigurationUnmarshaler.Unmarshal(b, this) +} + +// MarshalJSON is a custom marshaler for TransparentProxy +func (this *TransparentProxy) MarshalJSON() ([]byte, error) { + str, err := ProxyConfigurationMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for TransparentProxy +func (this *TransparentProxy) UnmarshalJSON(b []byte) error { + return ProxyConfigurationUnmarshaler.Unmarshal(b, this) +} + +// MarshalJSON is a custom marshaler for BootstrapConfig +func (this *BootstrapConfig) MarshalJSON() ([]byte, error) { + str, err := ProxyConfigurationMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for BootstrapConfig +func (this *BootstrapConfig) UnmarshalJSON(b []byte) error { + return ProxyConfigurationUnmarshaler.Unmarshal(b, this) +} + +// MarshalJSON is a custom marshaler for AccessLogsConfig +func (this *AccessLogsConfig) MarshalJSON() ([]byte, error) { + str, err := ProxyConfigurationMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for AccessLogsConfig +func (this *AccessLogsConfig) UnmarshalJSON(b []byte) error { + return ProxyConfigurationUnmarshaler.Unmarshal(b, this) +} + +// MarshalJSON is a custom marshaler for EnvoyExtension +func (this *EnvoyExtension) MarshalJSON() ([]byte, error) { + str, err := ProxyConfigurationMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for EnvoyExtension +func (this *EnvoyExtension) UnmarshalJSON(b []byte) error { + return ProxyConfigurationUnmarshaler.Unmarshal(b, this) +} + +var ( + ProxyConfigurationMarshaler = &protojson.MarshalOptions{} + ProxyConfigurationUnmarshaler = &protojson.UnmarshalOptions{DiscardUnknown: false} +) diff --git a/proto-public/pbmesh/v2beta1/proxy_state.pb.go b/proto-public/pbmesh/v2beta1/proxy_state.pb.go index 4f19f7b6af..5f26294a5d 100644 --- a/proto-public/pbmesh/v2beta1/proxy_state.pb.go +++ b/proto-public/pbmesh/v2beta1/proxy_state.pb.go @@ -30,13 +30,13 @@ type ProxyStateTemplate struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // proxy_state is the partially filled out ProxyState resource. The Endpoints, LeafCertificates and TrustBundles fields will need filling in after the resource is stored. + // ProxyState is the partially filled out ProxyState resource. The Endpoints, LeafCertificates and TrustBundles fields will need filling in after the resource is stored. ProxyState *ProxyState `protobuf:"bytes,1,opt,name=proxy_state,json=proxyState,proto3" json:"proxy_state,omitempty"` - // required_endpoints is a map of arbitrary string names to endpoint refs that need fetching by the proxy state controller. + // RequiredEndpoints is a map of arbitrary string names to endpoint refs that need fetching by the proxy state controller. RequiredEndpoints map[string]*pbproxystate.EndpointRef `protobuf:"bytes,2,rep,name=required_endpoints,json=requiredEndpoints,proto3" json:"required_endpoints,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - // required_leaf_certificates is a map of arbitrary string names to leaf certificates that need fetching/generation by the proxy state controller. + // RequiredLeafCertificates is a map of arbitrary string names to leaf certificates that need fetching/generation by the proxy state controller. RequiredLeafCertificates map[string]*pbproxystate.LeafCertificateRef `protobuf:"bytes,3,rep,name=required_leaf_certificates,json=requiredLeafCertificates,proto3" json:"required_leaf_certificates,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - // required_trust_bundles is a map of arbitrary string names to trust bundle refs that need fetching by the proxy state controller. + // RequiredTrustBundles is a map of arbitrary string names to trust bundle refs that need fetching by the proxy state controller. RequiredTrustBundles map[string]*pbproxystate.TrustBundleRef `protobuf:"bytes,4,rep,name=required_trust_bundles,json=requiredTrustBundles,proto3" json:"required_trust_bundles,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` } @@ -105,25 +105,25 @@ type ProxyState struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // identity is a reference to the identity of the workload this proxy is for. + // Identity is a reference to the identity of the workload this proxy is for. Identity *pbresource.Reference `protobuf:"bytes,1,opt,name=identity,proto3" json:"identity,omitempty"` - // listeners is a list of listeners for this proxy. + // Listeners is a list of listeners for this proxy. Listeners []*pbproxystate.Listener `protobuf:"bytes,2,rep,name=listeners,proto3" json:"listeners,omitempty"` - // clusters is a map from cluster name to clusters. The keys are referenced from listeners or routes. + // Clusters is a map from cluster name to clusters. The keys are referenced from listeners or routes. Clusters map[string]*pbproxystate.Cluster `protobuf:"bytes,3,rep,name=clusters,proto3" json:"clusters,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - // routes is a map from route name to routes. The keys are referenced from listeners. + // Routes is a map from route name to routes. The keys are referenced from listeners. Routes map[string]*pbproxystate.Route `protobuf:"bytes,4,rep,name=routes,proto3" json:"routes,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - // endpoints is a map from cluster name to endpoints. + // Endpoints is a map from cluster name to endpoints. Endpoints map[string]*pbproxystate.Endpoints `protobuf:"bytes,5,rep,name=endpoints,proto3" json:"endpoints,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - // leaf certificates is a map from UUID to leaf certificates. + // LeafCertificates is a map from UUID to leaf certificates. LeafCertificates map[string]*pbproxystate.LeafCertificate `protobuf:"bytes,6,rep,name=leaf_certificates,json=leafCertificates,proto3" json:"leaf_certificates,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - // trust bundles is a map from peer name to trust bundles. + // TrustBundles is a map from peer name to trust bundles. TrustBundles map[string]*pbproxystate.TrustBundle `protobuf:"bytes,7,rep,name=trust_bundles,json=trustBundles,proto3" json:"trust_bundles,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - // tls has TLS configuration for this proxy. + // TLS has TLS configuration for this proxy. Tls *pbproxystate.TLS `protobuf:"bytes,8,opt,name=tls,proto3" json:"tls,omitempty"` - // escape defines top level escape hatches. These are user configured json strings that configure an entire piece of listener or cluster Envoy configuration. + // Escape defines top level escape hatches. These are user configured json strings that configure an entire piece of listener or cluster Envoy configuration. Escape *pbproxystate.EscapeHatches `protobuf:"bytes,9,opt,name=escape,proto3" json:"escape,omitempty"` - // access_logs configures access logging for this proxy. + // AccessLogs configures access logging for this proxy. AccessLogs *pbproxystate.AccessLogs `protobuf:"bytes,10,opt,name=access_logs,json=accessLogs,proto3" json:"access_logs,omitempty"` } diff --git a/proto-public/pbmesh/v2beta1/proxy_state.proto b/proto-public/pbmesh/v2beta1/proxy_state.proto index 38debef6f6..cd70dbbd5f 100644 --- a/proto-public/pbmesh/v2beta1/proxy_state.proto +++ b/proto-public/pbmesh/v2beta1/proxy_state.proto @@ -19,38 +19,38 @@ import "pbresource/resource.proto"; message ProxyStateTemplate { option (hashicorp.consul.resource.spec) = {scope: SCOPE_NAMESPACE}; - // proxy_state is the partially filled out ProxyState resource. The Endpoints, LeafCertificates and TrustBundles fields will need filling in after the resource is stored. + // ProxyState is the partially filled out ProxyState resource. The Endpoints, LeafCertificates and TrustBundles fields will need filling in after the resource is stored. ProxyState proxy_state = 1; - // required_endpoints is a map of arbitrary string names to endpoint refs that need fetching by the proxy state controller. + // RequiredEndpoints is a map of arbitrary string names to endpoint refs that need fetching by the proxy state controller. map required_endpoints = 2; - // required_leaf_certificates is a map of arbitrary string names to leaf certificates that need fetching/generation by the proxy state controller. + // RequiredLeafCertificates is a map of arbitrary string names to leaf certificates that need fetching/generation by the proxy state controller. map required_leaf_certificates = 3; - // required_trust_bundles is a map of arbitrary string names to trust bundle refs that need fetching by the proxy state controller. + // RequiredTrustBundles is a map of arbitrary string names to trust bundle refs that need fetching by the proxy state controller. map required_trust_bundles = 4; } message ProxyState { - // identity is a reference to the identity of the workload this proxy is for. + // Identity is a reference to the identity of the workload this proxy is for. hashicorp.consul.resource.Reference identity = 1; - // listeners is a list of listeners for this proxy. + // Listeners is a list of listeners for this proxy. repeated pbproxystate.Listener listeners = 2; - // clusters is a map from cluster name to clusters. The keys are referenced from listeners or routes. + // Clusters is a map from cluster name to clusters. The keys are referenced from listeners or routes. map clusters = 3; - // routes is a map from route name to routes. The keys are referenced from listeners. + // Routes is a map from route name to routes. The keys are referenced from listeners. map routes = 4; - // endpoints is a map from cluster name to endpoints. + // Endpoints is a map from cluster name to endpoints. map endpoints = 5; - // leaf certificates is a map from UUID to leaf certificates. + // LeafCertificates is a map from UUID to leaf certificates. map leaf_certificates = 6; - // trust bundles is a map from peer name to trust bundles. + // TrustBundles is a map from peer name to trust bundles. map trust_bundles = 7; - // tls has TLS configuration for this proxy. + // TLS has TLS configuration for this proxy. pbproxystate.TLS tls = 8; - // escape defines top level escape hatches. These are user configured json strings that configure an entire piece of listener or cluster Envoy configuration. + // Escape defines top level escape hatches. These are user configured json strings that configure an entire piece of listener or cluster Envoy configuration. pbproxystate.EscapeHatches escape = 9; - // access_logs configures access logging for this proxy. + // AccessLogs configures access logging for this proxy. pbproxystate.AccessLogs access_logs = 10; } diff --git a/proto-public/pbmesh/v2beta1/proxy_state_deepcopy.gen.go b/proto-public/pbmesh/v2beta1/proxy_state_deepcopy.gen.go new file mode 100644 index 0000000000..c6d34360e0 --- /dev/null +++ b/proto-public/pbmesh/v2beta1/proxy_state_deepcopy.gen.go @@ -0,0 +1,48 @@ +// Code generated by protoc-gen-deepcopy. DO NOT EDIT. +package meshv2beta1 + +import ( + proto "google.golang.org/protobuf/proto" +) + +// DeepCopyInto supports using ProxyStateTemplate within kubernetes types, where deepcopy-gen is used. +func (in *ProxyStateTemplate) DeepCopyInto(out *ProxyStateTemplate) { + p := proto.Clone(in).(*ProxyStateTemplate) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProxyStateTemplate. Required by controller-gen. +func (in *ProxyStateTemplate) DeepCopy() *ProxyStateTemplate { + if in == nil { + return nil + } + out := new(ProxyStateTemplate) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new ProxyStateTemplate. Required by controller-gen. +func (in *ProxyStateTemplate) DeepCopyInterface() interface{} { + return in.DeepCopy() +} + +// DeepCopyInto supports using ProxyState within kubernetes types, where deepcopy-gen is used. +func (in *ProxyState) DeepCopyInto(out *ProxyState) { + p := proto.Clone(in).(*ProxyState) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProxyState. Required by controller-gen. +func (in *ProxyState) DeepCopy() *ProxyState { + if in == nil { + return nil + } + out := new(ProxyState) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new ProxyState. Required by controller-gen. +func (in *ProxyState) DeepCopyInterface() interface{} { + return in.DeepCopy() +} diff --git a/proto-public/pbmesh/v2beta1/proxy_state_json.gen.go b/proto-public/pbmesh/v2beta1/proxy_state_json.gen.go new file mode 100644 index 0000000000..8449f8bbd8 --- /dev/null +++ b/proto-public/pbmesh/v2beta1/proxy_state_json.gen.go @@ -0,0 +1,33 @@ +// Code generated by protoc-json-shim. DO NOT EDIT. +package meshv2beta1 + +import ( + protojson "google.golang.org/protobuf/encoding/protojson" +) + +// MarshalJSON is a custom marshaler for ProxyStateTemplate +func (this *ProxyStateTemplate) MarshalJSON() ([]byte, error) { + str, err := ProxyStateMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for ProxyStateTemplate +func (this *ProxyStateTemplate) UnmarshalJSON(b []byte) error { + return ProxyStateUnmarshaler.Unmarshal(b, this) +} + +// MarshalJSON is a custom marshaler for ProxyState +func (this *ProxyState) MarshalJSON() ([]byte, error) { + str, err := ProxyStateMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for ProxyState +func (this *ProxyState) UnmarshalJSON(b []byte) error { + return ProxyStateUnmarshaler.Unmarshal(b, this) +} + +var ( + ProxyStateMarshaler = &protojson.MarshalOptions{} + ProxyStateUnmarshaler = &protojson.UnmarshalOptions{DiscardUnknown: false} +) diff --git a/proto-public/pbmesh/v2beta1/routing.pb.go b/proto-public/pbmesh/v2beta1/routing.pb.go index 465c515783..163632eb30 100644 --- a/proto-public/pbmesh/v2beta1/routing.pb.go +++ b/proto-public/pbmesh/v2beta1/routing.pb.go @@ -23,6 +23,8 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) +// +kubebuilder:validation:Enum=MESH_GATEWAY_MODE_UNSPECIFIED;MESH_GATEWAY_MODE_NONE;MESH_GATEWAY_MODE_LOCAL;MESH_GATEWAY_MODE_REMOTE +// +kubebuilder:validation:Type=string type MeshGatewayMode int32 const ( diff --git a/proto-public/pbmesh/v2beta1/routing.proto b/proto-public/pbmesh/v2beta1/routing.proto index 356a9a64c8..5c28840a72 100644 --- a/proto-public/pbmesh/v2beta1/routing.proto +++ b/proto-public/pbmesh/v2beta1/routing.proto @@ -5,6 +5,8 @@ syntax = "proto3"; package hashicorp.consul.mesh.v2beta1; +// +kubebuilder:validation:Enum=MESH_GATEWAY_MODE_UNSPECIFIED;MESH_GATEWAY_MODE_NONE;MESH_GATEWAY_MODE_LOCAL;MESH_GATEWAY_MODE_REMOTE +// +kubebuilder:validation:Type=string enum MeshGatewayMode { // MESH_GATEWAY_MODE_UNSPECIFIED represents no specific mode and should be // used to indicate that a the decision on the mode will be made by other diff --git a/proto-public/pbmesh/v2beta1/tcp_route.proto b/proto-public/pbmesh/v2beta1/tcp_route.proto index 1183a95db2..d3637febf6 100644 --- a/proto-public/pbmesh/v2beta1/tcp_route.proto +++ b/proto-public/pbmesh/v2beta1/tcp_route.proto @@ -48,9 +48,9 @@ message TCPBackendRef { // supports. Weight is not a percentage and the sum of weights does not need // to equal 100. // - //If only one backend is specified and it has a weight greater than 0, 100% - //of the traffic is forwarded to that backend. If weight is set to 0, no - //traffic should be forwarded for this entry. If unspecified, weight defaults - //to 1. + // If only one backend is specified and it has a weight greater than 0, 100% + // of the traffic is forwarded to that backend. If weight is set to 0, no + // traffic should be forwarded for this entry. If unspecified, weight defaults + // to 1. uint32 weight = 2; } diff --git a/proto-public/pbmesh/v2beta1/tcp_route_deepcopy.gen.go b/proto-public/pbmesh/v2beta1/tcp_route_deepcopy.gen.go new file mode 100644 index 0000000000..c2bd4afc57 --- /dev/null +++ b/proto-public/pbmesh/v2beta1/tcp_route_deepcopy.gen.go @@ -0,0 +1,69 @@ +// Code generated by protoc-gen-deepcopy. DO NOT EDIT. +package meshv2beta1 + +import ( + proto "google.golang.org/protobuf/proto" +) + +// DeepCopyInto supports using TCPRoute within kubernetes types, where deepcopy-gen is used. +func (in *TCPRoute) DeepCopyInto(out *TCPRoute) { + p := proto.Clone(in).(*TCPRoute) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TCPRoute. Required by controller-gen. +func (in *TCPRoute) DeepCopy() *TCPRoute { + if in == nil { + return nil + } + out := new(TCPRoute) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new TCPRoute. Required by controller-gen. +func (in *TCPRoute) DeepCopyInterface() interface{} { + return in.DeepCopy() +} + +// DeepCopyInto supports using TCPRouteRule within kubernetes types, where deepcopy-gen is used. +func (in *TCPRouteRule) DeepCopyInto(out *TCPRouteRule) { + p := proto.Clone(in).(*TCPRouteRule) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TCPRouteRule. Required by controller-gen. +func (in *TCPRouteRule) DeepCopy() *TCPRouteRule { + if in == nil { + return nil + } + out := new(TCPRouteRule) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new TCPRouteRule. Required by controller-gen. +func (in *TCPRouteRule) DeepCopyInterface() interface{} { + return in.DeepCopy() +} + +// DeepCopyInto supports using TCPBackendRef within kubernetes types, where deepcopy-gen is used. +func (in *TCPBackendRef) DeepCopyInto(out *TCPBackendRef) { + p := proto.Clone(in).(*TCPBackendRef) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TCPBackendRef. Required by controller-gen. +func (in *TCPBackendRef) DeepCopy() *TCPBackendRef { + if in == nil { + return nil + } + out := new(TCPBackendRef) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new TCPBackendRef. Required by controller-gen. +func (in *TCPBackendRef) DeepCopyInterface() interface{} { + return in.DeepCopy() +} diff --git a/proto-public/pbmesh/v2beta1/tcp_route_json.gen.go b/proto-public/pbmesh/v2beta1/tcp_route_json.gen.go new file mode 100644 index 0000000000..eef8800440 --- /dev/null +++ b/proto-public/pbmesh/v2beta1/tcp_route_json.gen.go @@ -0,0 +1,44 @@ +// Code generated by protoc-json-shim. DO NOT EDIT. +package meshv2beta1 + +import ( + protojson "google.golang.org/protobuf/encoding/protojson" +) + +// MarshalJSON is a custom marshaler for TCPRoute +func (this *TCPRoute) MarshalJSON() ([]byte, error) { + str, err := TcpRouteMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for TCPRoute +func (this *TCPRoute) UnmarshalJSON(b []byte) error { + return TcpRouteUnmarshaler.Unmarshal(b, this) +} + +// MarshalJSON is a custom marshaler for TCPRouteRule +func (this *TCPRouteRule) MarshalJSON() ([]byte, error) { + str, err := TcpRouteMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for TCPRouteRule +func (this *TCPRouteRule) UnmarshalJSON(b []byte) error { + return TcpRouteUnmarshaler.Unmarshal(b, this) +} + +// MarshalJSON is a custom marshaler for TCPBackendRef +func (this *TCPBackendRef) MarshalJSON() ([]byte, error) { + str, err := TcpRouteMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for TCPBackendRef +func (this *TCPBackendRef) UnmarshalJSON(b []byte) error { + return TcpRouteUnmarshaler.Unmarshal(b, this) +} + +var ( + TcpRouteMarshaler = &protojson.MarshalOptions{} + TcpRouteUnmarshaler = &protojson.UnmarshalOptions{DiscardUnknown: false} +) diff --git a/proto-public/pbresource/annotations_deepcopy.gen.go b/proto-public/pbresource/annotations_deepcopy.gen.go new file mode 100644 index 0000000000..a4265c3850 --- /dev/null +++ b/proto-public/pbresource/annotations_deepcopy.gen.go @@ -0,0 +1,27 @@ +// Code generated by protoc-gen-deepcopy. DO NOT EDIT. +package pbresource + +import ( + proto "google.golang.org/protobuf/proto" +) + +// DeepCopyInto supports using ResourceTypeSpec within kubernetes types, where deepcopy-gen is used. +func (in *ResourceTypeSpec) DeepCopyInto(out *ResourceTypeSpec) { + p := proto.Clone(in).(*ResourceTypeSpec) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceTypeSpec. Required by controller-gen. +func (in *ResourceTypeSpec) DeepCopy() *ResourceTypeSpec { + if in == nil { + return nil + } + out := new(ResourceTypeSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new ResourceTypeSpec. Required by controller-gen. +func (in *ResourceTypeSpec) DeepCopyInterface() interface{} { + return in.DeepCopy() +} diff --git a/proto-public/pbresource/annotations_json.gen.go b/proto-public/pbresource/annotations_json.gen.go new file mode 100644 index 0000000000..fbc414b1a9 --- /dev/null +++ b/proto-public/pbresource/annotations_json.gen.go @@ -0,0 +1,22 @@ +// Code generated by protoc-json-shim. DO NOT EDIT. +package pbresource + +import ( + protojson "google.golang.org/protobuf/encoding/protojson" +) + +// MarshalJSON is a custom marshaler for ResourceTypeSpec +func (this *ResourceTypeSpec) MarshalJSON() ([]byte, error) { + str, err := AnnotationsMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for ResourceTypeSpec +func (this *ResourceTypeSpec) UnmarshalJSON(b []byte) error { + return AnnotationsUnmarshaler.Unmarshal(b, this) +} + +var ( + AnnotationsMarshaler = &protojson.MarshalOptions{} + AnnotationsUnmarshaler = &protojson.UnmarshalOptions{DiscardUnknown: false} +) diff --git a/proto-public/pbresource/resource_deepcopy.gen.go b/proto-public/pbresource/resource_deepcopy.gen.go new file mode 100644 index 0000000000..92fdb8da2f --- /dev/null +++ b/proto-public/pbresource/resource_deepcopy.gen.go @@ -0,0 +1,468 @@ +// Code generated by protoc-gen-deepcopy. DO NOT EDIT. +package pbresource + +import ( + proto "google.golang.org/protobuf/proto" +) + +// DeepCopyInto supports using Type within kubernetes types, where deepcopy-gen is used. +func (in *Type) DeepCopyInto(out *Type) { + p := proto.Clone(in).(*Type) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Type. Required by controller-gen. +func (in *Type) DeepCopy() *Type { + if in == nil { + return nil + } + out := new(Type) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new Type. Required by controller-gen. +func (in *Type) DeepCopyInterface() interface{} { + return in.DeepCopy() +} + +// DeepCopyInto supports using Tenancy within kubernetes types, where deepcopy-gen is used. +func (in *Tenancy) DeepCopyInto(out *Tenancy) { + p := proto.Clone(in).(*Tenancy) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Tenancy. Required by controller-gen. +func (in *Tenancy) DeepCopy() *Tenancy { + if in == nil { + return nil + } + out := new(Tenancy) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new Tenancy. Required by controller-gen. +func (in *Tenancy) DeepCopyInterface() interface{} { + return in.DeepCopy() +} + +// DeepCopyInto supports using ID within kubernetes types, where deepcopy-gen is used. +func (in *ID) DeepCopyInto(out *ID) { + p := proto.Clone(in).(*ID) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ID. Required by controller-gen. +func (in *ID) DeepCopy() *ID { + if in == nil { + return nil + } + out := new(ID) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new ID. Required by controller-gen. +func (in *ID) DeepCopyInterface() interface{} { + return in.DeepCopy() +} + +// DeepCopyInto supports using Resource within kubernetes types, where deepcopy-gen is used. +func (in *Resource) DeepCopyInto(out *Resource) { + p := proto.Clone(in).(*Resource) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Resource. Required by controller-gen. +func (in *Resource) DeepCopy() *Resource { + if in == nil { + return nil + } + out := new(Resource) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new Resource. Required by controller-gen. +func (in *Resource) DeepCopyInterface() interface{} { + return in.DeepCopy() +} + +// DeepCopyInto supports using Status within kubernetes types, where deepcopy-gen is used. +func (in *Status) DeepCopyInto(out *Status) { + p := proto.Clone(in).(*Status) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Status. Required by controller-gen. +func (in *Status) DeepCopy() *Status { + if in == nil { + return nil + } + out := new(Status) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new Status. Required by controller-gen. +func (in *Status) DeepCopyInterface() interface{} { + return in.DeepCopy() +} + +// DeepCopyInto supports using Condition within kubernetes types, where deepcopy-gen is used. +func (in *Condition) DeepCopyInto(out *Condition) { + p := proto.Clone(in).(*Condition) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Condition. Required by controller-gen. +func (in *Condition) DeepCopy() *Condition { + if in == nil { + return nil + } + out := new(Condition) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new Condition. Required by controller-gen. +func (in *Condition) DeepCopyInterface() interface{} { + return in.DeepCopy() +} + +// DeepCopyInto supports using Reference within kubernetes types, where deepcopy-gen is used. +func (in *Reference) DeepCopyInto(out *Reference) { + p := proto.Clone(in).(*Reference) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Reference. Required by controller-gen. +func (in *Reference) DeepCopy() *Reference { + if in == nil { + return nil + } + out := new(Reference) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new Reference. Required by controller-gen. +func (in *Reference) DeepCopyInterface() interface{} { + return in.DeepCopy() +} + +// DeepCopyInto supports using Tombstone within kubernetes types, where deepcopy-gen is used. +func (in *Tombstone) DeepCopyInto(out *Tombstone) { + p := proto.Clone(in).(*Tombstone) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Tombstone. Required by controller-gen. +func (in *Tombstone) DeepCopy() *Tombstone { + if in == nil { + return nil + } + out := new(Tombstone) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new Tombstone. Required by controller-gen. +func (in *Tombstone) DeepCopyInterface() interface{} { + return in.DeepCopy() +} + +// DeepCopyInto supports using ReadRequest within kubernetes types, where deepcopy-gen is used. +func (in *ReadRequest) DeepCopyInto(out *ReadRequest) { + p := proto.Clone(in).(*ReadRequest) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ReadRequest. Required by controller-gen. +func (in *ReadRequest) DeepCopy() *ReadRequest { + if in == nil { + return nil + } + out := new(ReadRequest) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new ReadRequest. Required by controller-gen. +func (in *ReadRequest) DeepCopyInterface() interface{} { + return in.DeepCopy() +} + +// DeepCopyInto supports using ReadResponse within kubernetes types, where deepcopy-gen is used. +func (in *ReadResponse) DeepCopyInto(out *ReadResponse) { + p := proto.Clone(in).(*ReadResponse) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ReadResponse. Required by controller-gen. +func (in *ReadResponse) DeepCopy() *ReadResponse { + if in == nil { + return nil + } + out := new(ReadResponse) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new ReadResponse. Required by controller-gen. +func (in *ReadResponse) DeepCopyInterface() interface{} { + return in.DeepCopy() +} + +// DeepCopyInto supports using ListRequest within kubernetes types, where deepcopy-gen is used. +func (in *ListRequest) DeepCopyInto(out *ListRequest) { + p := proto.Clone(in).(*ListRequest) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ListRequest. Required by controller-gen. +func (in *ListRequest) DeepCopy() *ListRequest { + if in == nil { + return nil + } + out := new(ListRequest) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new ListRequest. Required by controller-gen. +func (in *ListRequest) DeepCopyInterface() interface{} { + return in.DeepCopy() +} + +// DeepCopyInto supports using ListResponse within kubernetes types, where deepcopy-gen is used. +func (in *ListResponse) DeepCopyInto(out *ListResponse) { + p := proto.Clone(in).(*ListResponse) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ListResponse. Required by controller-gen. +func (in *ListResponse) DeepCopy() *ListResponse { + if in == nil { + return nil + } + out := new(ListResponse) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new ListResponse. Required by controller-gen. +func (in *ListResponse) DeepCopyInterface() interface{} { + return in.DeepCopy() +} + +// DeepCopyInto supports using ListByOwnerRequest within kubernetes types, where deepcopy-gen is used. +func (in *ListByOwnerRequest) DeepCopyInto(out *ListByOwnerRequest) { + p := proto.Clone(in).(*ListByOwnerRequest) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ListByOwnerRequest. Required by controller-gen. +func (in *ListByOwnerRequest) DeepCopy() *ListByOwnerRequest { + if in == nil { + return nil + } + out := new(ListByOwnerRequest) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new ListByOwnerRequest. Required by controller-gen. +func (in *ListByOwnerRequest) DeepCopyInterface() interface{} { + return in.DeepCopy() +} + +// DeepCopyInto supports using ListByOwnerResponse within kubernetes types, where deepcopy-gen is used. +func (in *ListByOwnerResponse) DeepCopyInto(out *ListByOwnerResponse) { + p := proto.Clone(in).(*ListByOwnerResponse) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ListByOwnerResponse. Required by controller-gen. +func (in *ListByOwnerResponse) DeepCopy() *ListByOwnerResponse { + if in == nil { + return nil + } + out := new(ListByOwnerResponse) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new ListByOwnerResponse. Required by controller-gen. +func (in *ListByOwnerResponse) DeepCopyInterface() interface{} { + return in.DeepCopy() +} + +// DeepCopyInto supports using WriteRequest within kubernetes types, where deepcopy-gen is used. +func (in *WriteRequest) DeepCopyInto(out *WriteRequest) { + p := proto.Clone(in).(*WriteRequest) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WriteRequest. Required by controller-gen. +func (in *WriteRequest) DeepCopy() *WriteRequest { + if in == nil { + return nil + } + out := new(WriteRequest) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new WriteRequest. Required by controller-gen. +func (in *WriteRequest) DeepCopyInterface() interface{} { + return in.DeepCopy() +} + +// DeepCopyInto supports using WriteResponse within kubernetes types, where deepcopy-gen is used. +func (in *WriteResponse) DeepCopyInto(out *WriteResponse) { + p := proto.Clone(in).(*WriteResponse) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WriteResponse. Required by controller-gen. +func (in *WriteResponse) DeepCopy() *WriteResponse { + if in == nil { + return nil + } + out := new(WriteResponse) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new WriteResponse. Required by controller-gen. +func (in *WriteResponse) DeepCopyInterface() interface{} { + return in.DeepCopy() +} + +// DeepCopyInto supports using WriteStatusRequest within kubernetes types, where deepcopy-gen is used. +func (in *WriteStatusRequest) DeepCopyInto(out *WriteStatusRequest) { + p := proto.Clone(in).(*WriteStatusRequest) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WriteStatusRequest. Required by controller-gen. +func (in *WriteStatusRequest) DeepCopy() *WriteStatusRequest { + if in == nil { + return nil + } + out := new(WriteStatusRequest) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new WriteStatusRequest. Required by controller-gen. +func (in *WriteStatusRequest) DeepCopyInterface() interface{} { + return in.DeepCopy() +} + +// DeepCopyInto supports using WriteStatusResponse within kubernetes types, where deepcopy-gen is used. +func (in *WriteStatusResponse) DeepCopyInto(out *WriteStatusResponse) { + p := proto.Clone(in).(*WriteStatusResponse) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WriteStatusResponse. Required by controller-gen. +func (in *WriteStatusResponse) DeepCopy() *WriteStatusResponse { + if in == nil { + return nil + } + out := new(WriteStatusResponse) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new WriteStatusResponse. Required by controller-gen. +func (in *WriteStatusResponse) DeepCopyInterface() interface{} { + return in.DeepCopy() +} + +// DeepCopyInto supports using DeleteRequest within kubernetes types, where deepcopy-gen is used. +func (in *DeleteRequest) DeepCopyInto(out *DeleteRequest) { + p := proto.Clone(in).(*DeleteRequest) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeleteRequest. Required by controller-gen. +func (in *DeleteRequest) DeepCopy() *DeleteRequest { + if in == nil { + return nil + } + out := new(DeleteRequest) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new DeleteRequest. Required by controller-gen. +func (in *DeleteRequest) DeepCopyInterface() interface{} { + return in.DeepCopy() +} + +// DeepCopyInto supports using DeleteResponse within kubernetes types, where deepcopy-gen is used. +func (in *DeleteResponse) DeepCopyInto(out *DeleteResponse) { + p := proto.Clone(in).(*DeleteResponse) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeleteResponse. Required by controller-gen. +func (in *DeleteResponse) DeepCopy() *DeleteResponse { + if in == nil { + return nil + } + out := new(DeleteResponse) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new DeleteResponse. Required by controller-gen. +func (in *DeleteResponse) DeepCopyInterface() interface{} { + return in.DeepCopy() +} + +// DeepCopyInto supports using WatchListRequest within kubernetes types, where deepcopy-gen is used. +func (in *WatchListRequest) DeepCopyInto(out *WatchListRequest) { + p := proto.Clone(in).(*WatchListRequest) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WatchListRequest. Required by controller-gen. +func (in *WatchListRequest) DeepCopy() *WatchListRequest { + if in == nil { + return nil + } + out := new(WatchListRequest) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new WatchListRequest. Required by controller-gen. +func (in *WatchListRequest) DeepCopyInterface() interface{} { + return in.DeepCopy() +} + +// DeepCopyInto supports using WatchEvent within kubernetes types, where deepcopy-gen is used. +func (in *WatchEvent) DeepCopyInto(out *WatchEvent) { + p := proto.Clone(in).(*WatchEvent) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WatchEvent. Required by controller-gen. +func (in *WatchEvent) DeepCopy() *WatchEvent { + if in == nil { + return nil + } + out := new(WatchEvent) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new WatchEvent. Required by controller-gen. +func (in *WatchEvent) DeepCopyInterface() interface{} { + return in.DeepCopy() +} diff --git a/proto-public/pbresource/resource_json.gen.go b/proto-public/pbresource/resource_json.gen.go new file mode 100644 index 0000000000..80c62deba9 --- /dev/null +++ b/proto-public/pbresource/resource_json.gen.go @@ -0,0 +1,253 @@ +// Code generated by protoc-json-shim. DO NOT EDIT. +package pbresource + +import ( + protojson "google.golang.org/protobuf/encoding/protojson" +) + +// MarshalJSON is a custom marshaler for Type +func (this *Type) MarshalJSON() ([]byte, error) { + str, err := ResourceMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for Type +func (this *Type) UnmarshalJSON(b []byte) error { + return ResourceUnmarshaler.Unmarshal(b, this) +} + +// MarshalJSON is a custom marshaler for Tenancy +func (this *Tenancy) MarshalJSON() ([]byte, error) { + str, err := ResourceMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for Tenancy +func (this *Tenancy) UnmarshalJSON(b []byte) error { + return ResourceUnmarshaler.Unmarshal(b, this) +} + +// MarshalJSON is a custom marshaler for ID +func (this *ID) MarshalJSON() ([]byte, error) { + str, err := ResourceMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for ID +func (this *ID) UnmarshalJSON(b []byte) error { + return ResourceUnmarshaler.Unmarshal(b, this) +} + +// MarshalJSON is a custom marshaler for Resource +func (this *Resource) MarshalJSON() ([]byte, error) { + str, err := ResourceMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for Resource +func (this *Resource) UnmarshalJSON(b []byte) error { + return ResourceUnmarshaler.Unmarshal(b, this) +} + +// MarshalJSON is a custom marshaler for Status +func (this *Status) MarshalJSON() ([]byte, error) { + str, err := ResourceMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for Status +func (this *Status) UnmarshalJSON(b []byte) error { + return ResourceUnmarshaler.Unmarshal(b, this) +} + +// MarshalJSON is a custom marshaler for Condition +func (this *Condition) MarshalJSON() ([]byte, error) { + str, err := ResourceMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for Condition +func (this *Condition) UnmarshalJSON(b []byte) error { + return ResourceUnmarshaler.Unmarshal(b, this) +} + +// MarshalJSON is a custom marshaler for Reference +func (this *Reference) MarshalJSON() ([]byte, error) { + str, err := ResourceMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for Reference +func (this *Reference) UnmarshalJSON(b []byte) error { + return ResourceUnmarshaler.Unmarshal(b, this) +} + +// MarshalJSON is a custom marshaler for Tombstone +func (this *Tombstone) MarshalJSON() ([]byte, error) { + str, err := ResourceMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for Tombstone +func (this *Tombstone) UnmarshalJSON(b []byte) error { + return ResourceUnmarshaler.Unmarshal(b, this) +} + +// MarshalJSON is a custom marshaler for ReadRequest +func (this *ReadRequest) MarshalJSON() ([]byte, error) { + str, err := ResourceMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for ReadRequest +func (this *ReadRequest) UnmarshalJSON(b []byte) error { + return ResourceUnmarshaler.Unmarshal(b, this) +} + +// MarshalJSON is a custom marshaler for ReadResponse +func (this *ReadResponse) MarshalJSON() ([]byte, error) { + str, err := ResourceMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for ReadResponse +func (this *ReadResponse) UnmarshalJSON(b []byte) error { + return ResourceUnmarshaler.Unmarshal(b, this) +} + +// MarshalJSON is a custom marshaler for ListRequest +func (this *ListRequest) MarshalJSON() ([]byte, error) { + str, err := ResourceMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for ListRequest +func (this *ListRequest) UnmarshalJSON(b []byte) error { + return ResourceUnmarshaler.Unmarshal(b, this) +} + +// MarshalJSON is a custom marshaler for ListResponse +func (this *ListResponse) MarshalJSON() ([]byte, error) { + str, err := ResourceMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for ListResponse +func (this *ListResponse) UnmarshalJSON(b []byte) error { + return ResourceUnmarshaler.Unmarshal(b, this) +} + +// MarshalJSON is a custom marshaler for ListByOwnerRequest +func (this *ListByOwnerRequest) MarshalJSON() ([]byte, error) { + str, err := ResourceMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for ListByOwnerRequest +func (this *ListByOwnerRequest) UnmarshalJSON(b []byte) error { + return ResourceUnmarshaler.Unmarshal(b, this) +} + +// MarshalJSON is a custom marshaler for ListByOwnerResponse +func (this *ListByOwnerResponse) MarshalJSON() ([]byte, error) { + str, err := ResourceMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for ListByOwnerResponse +func (this *ListByOwnerResponse) UnmarshalJSON(b []byte) error { + return ResourceUnmarshaler.Unmarshal(b, this) +} + +// MarshalJSON is a custom marshaler for WriteRequest +func (this *WriteRequest) MarshalJSON() ([]byte, error) { + str, err := ResourceMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for WriteRequest +func (this *WriteRequest) UnmarshalJSON(b []byte) error { + return ResourceUnmarshaler.Unmarshal(b, this) +} + +// MarshalJSON is a custom marshaler for WriteResponse +func (this *WriteResponse) MarshalJSON() ([]byte, error) { + str, err := ResourceMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for WriteResponse +func (this *WriteResponse) UnmarshalJSON(b []byte) error { + return ResourceUnmarshaler.Unmarshal(b, this) +} + +// MarshalJSON is a custom marshaler for WriteStatusRequest +func (this *WriteStatusRequest) MarshalJSON() ([]byte, error) { + str, err := ResourceMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for WriteStatusRequest +func (this *WriteStatusRequest) UnmarshalJSON(b []byte) error { + return ResourceUnmarshaler.Unmarshal(b, this) +} + +// MarshalJSON is a custom marshaler for WriteStatusResponse +func (this *WriteStatusResponse) MarshalJSON() ([]byte, error) { + str, err := ResourceMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for WriteStatusResponse +func (this *WriteStatusResponse) UnmarshalJSON(b []byte) error { + return ResourceUnmarshaler.Unmarshal(b, this) +} + +// MarshalJSON is a custom marshaler for DeleteRequest +func (this *DeleteRequest) MarshalJSON() ([]byte, error) { + str, err := ResourceMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for DeleteRequest +func (this *DeleteRequest) UnmarshalJSON(b []byte) error { + return ResourceUnmarshaler.Unmarshal(b, this) +} + +// MarshalJSON is a custom marshaler for DeleteResponse +func (this *DeleteResponse) MarshalJSON() ([]byte, error) { + str, err := ResourceMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for DeleteResponse +func (this *DeleteResponse) UnmarshalJSON(b []byte) error { + return ResourceUnmarshaler.Unmarshal(b, this) +} + +// MarshalJSON is a custom marshaler for WatchListRequest +func (this *WatchListRequest) MarshalJSON() ([]byte, error) { + str, err := ResourceMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for WatchListRequest +func (this *WatchListRequest) UnmarshalJSON(b []byte) error { + return ResourceUnmarshaler.Unmarshal(b, this) +} + +// MarshalJSON is a custom marshaler for WatchEvent +func (this *WatchEvent) MarshalJSON() ([]byte, error) { + str, err := ResourceMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for WatchEvent +func (this *WatchEvent) UnmarshalJSON(b []byte) error { + return ResourceUnmarshaler.Unmarshal(b, this) +} + +var ( + ResourceMarshaler = &protojson.MarshalOptions{} + ResourceUnmarshaler = &protojson.UnmarshalOptions{DiscardUnknown: false} +) diff --git a/proto-public/pbserverdiscovery/serverdiscovery_deepcopy.gen.go b/proto-public/pbserverdiscovery/serverdiscovery_deepcopy.gen.go new file mode 100644 index 0000000000..6d50165614 --- /dev/null +++ b/proto-public/pbserverdiscovery/serverdiscovery_deepcopy.gen.go @@ -0,0 +1,69 @@ +// Code generated by protoc-gen-deepcopy. DO NOT EDIT. +package pbserverdiscovery + +import ( + proto "google.golang.org/protobuf/proto" +) + +// DeepCopyInto supports using WatchServersRequest within kubernetes types, where deepcopy-gen is used. +func (in *WatchServersRequest) DeepCopyInto(out *WatchServersRequest) { + p := proto.Clone(in).(*WatchServersRequest) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WatchServersRequest. Required by controller-gen. +func (in *WatchServersRequest) DeepCopy() *WatchServersRequest { + if in == nil { + return nil + } + out := new(WatchServersRequest) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new WatchServersRequest. Required by controller-gen. +func (in *WatchServersRequest) DeepCopyInterface() interface{} { + return in.DeepCopy() +} + +// DeepCopyInto supports using WatchServersResponse within kubernetes types, where deepcopy-gen is used. +func (in *WatchServersResponse) DeepCopyInto(out *WatchServersResponse) { + p := proto.Clone(in).(*WatchServersResponse) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WatchServersResponse. Required by controller-gen. +func (in *WatchServersResponse) DeepCopy() *WatchServersResponse { + if in == nil { + return nil + } + out := new(WatchServersResponse) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new WatchServersResponse. Required by controller-gen. +func (in *WatchServersResponse) DeepCopyInterface() interface{} { + return in.DeepCopy() +} + +// DeepCopyInto supports using Server within kubernetes types, where deepcopy-gen is used. +func (in *Server) DeepCopyInto(out *Server) { + p := proto.Clone(in).(*Server) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Server. Required by controller-gen. +func (in *Server) DeepCopy() *Server { + if in == nil { + return nil + } + out := new(Server) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new Server. Required by controller-gen. +func (in *Server) DeepCopyInterface() interface{} { + return in.DeepCopy() +} diff --git a/proto-public/pbserverdiscovery/serverdiscovery_json.gen.go b/proto-public/pbserverdiscovery/serverdiscovery_json.gen.go new file mode 100644 index 0000000000..f8803895f2 --- /dev/null +++ b/proto-public/pbserverdiscovery/serverdiscovery_json.gen.go @@ -0,0 +1,44 @@ +// Code generated by protoc-json-shim. DO NOT EDIT. +package pbserverdiscovery + +import ( + protojson "google.golang.org/protobuf/encoding/protojson" +) + +// MarshalJSON is a custom marshaler for WatchServersRequest +func (this *WatchServersRequest) MarshalJSON() ([]byte, error) { + str, err := ServerdiscoveryMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for WatchServersRequest +func (this *WatchServersRequest) UnmarshalJSON(b []byte) error { + return ServerdiscoveryUnmarshaler.Unmarshal(b, this) +} + +// MarshalJSON is a custom marshaler for WatchServersResponse +func (this *WatchServersResponse) MarshalJSON() ([]byte, error) { + str, err := ServerdiscoveryMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for WatchServersResponse +func (this *WatchServersResponse) UnmarshalJSON(b []byte) error { + return ServerdiscoveryUnmarshaler.Unmarshal(b, this) +} + +// MarshalJSON is a custom marshaler for Server +func (this *Server) MarshalJSON() ([]byte, error) { + str, err := ServerdiscoveryMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for Server +func (this *Server) UnmarshalJSON(b []byte) error { + return ServerdiscoveryUnmarshaler.Unmarshal(b, this) +} + +var ( + ServerdiscoveryMarshaler = &protojson.MarshalOptions{} + ServerdiscoveryUnmarshaler = &protojson.UnmarshalOptions{DiscardUnknown: false} +) diff --git a/proto-public/pbtenancy/v1alpha1/namespace_deepcopy.gen.go b/proto-public/pbtenancy/v1alpha1/namespace_deepcopy.gen.go new file mode 100644 index 0000000000..52ee3d7e7c --- /dev/null +++ b/proto-public/pbtenancy/v1alpha1/namespace_deepcopy.gen.go @@ -0,0 +1,27 @@ +// Code generated by protoc-gen-deepcopy. DO NOT EDIT. +package tenancyv1alpha1 + +import ( + proto "google.golang.org/protobuf/proto" +) + +// DeepCopyInto supports using Namespace within kubernetes types, where deepcopy-gen is used. +func (in *Namespace) DeepCopyInto(out *Namespace) { + p := proto.Clone(in).(*Namespace) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Namespace. Required by controller-gen. +func (in *Namespace) DeepCopy() *Namespace { + if in == nil { + return nil + } + out := new(Namespace) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new Namespace. Required by controller-gen. +func (in *Namespace) DeepCopyInterface() interface{} { + return in.DeepCopy() +} diff --git a/proto-public/pbtenancy/v1alpha1/namespace_json.gen.go b/proto-public/pbtenancy/v1alpha1/namespace_json.gen.go new file mode 100644 index 0000000000..9df4de9df7 --- /dev/null +++ b/proto-public/pbtenancy/v1alpha1/namespace_json.gen.go @@ -0,0 +1,22 @@ +// Code generated by protoc-json-shim. DO NOT EDIT. +package tenancyv1alpha1 + +import ( + protojson "google.golang.org/protobuf/encoding/protojson" +) + +// MarshalJSON is a custom marshaler for Namespace +func (this *Namespace) MarshalJSON() ([]byte, error) { + str, err := NamespaceMarshaler.Marshal(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for Namespace +func (this *Namespace) UnmarshalJSON(b []byte) error { + return NamespaceUnmarshaler.Unmarshal(b, this) +} + +var ( + NamespaceMarshaler = &protojson.MarshalOptions{} + NamespaceUnmarshaler = &protojson.UnmarshalOptions{DiscardUnknown: false} +)