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.
This commit is contained in:
Ashwin Venkatesh 2023-10-13 10:55:58 -04:00 committed by GitHub
parent a50a9e984a
commit c2a0d4f9ca
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
149 changed files with 8960 additions and 156 deletions

View File

@ -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
}

View File

@ -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
}

View File

@ -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)
})
}

View File

@ -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()
}

View File

@ -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)
})
}

View File

@ -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()
}

View File

@ -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}
)

View File

@ -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

View File

@ -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()
}

View File

@ -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}
)

View File

@ -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()
}

View File

@ -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}
)

View File

@ -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"`
}

View File

@ -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;
}

View File

@ -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()
}

View File

@ -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}
)

View File

@ -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()
}

View File

@ -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}
)

View File

@ -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()
}

View File

@ -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}
)

View File

@ -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()
}

View File

@ -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}
)

View File

@ -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() {

View File

@ -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;
}

View File

@ -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()
}

View File

@ -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}
)

View File

@ -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()
}

View File

@ -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}
)

View File

@ -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 (

View File

@ -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;

View File

@ -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()
}

View File

@ -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}
)

View File

@ -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()
}

View File

@ -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()
}

View File

@ -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}
)

View File

@ -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}
)

View File

@ -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()
}

View File

@ -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}
)

View File

@ -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()
}

View File

@ -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}
)

View File

@ -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()
}

View File

@ -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}
)

View File

@ -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()
}

View File

@ -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}
)

View File

@ -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()
}

View File

@ -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}
)

View File

@ -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.

View File

@ -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

View File

@ -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()
}

View File

@ -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}
)

View File

@ -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()
}

View File

@ -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}
)

View File

@ -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()
}

View File

@ -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}
)

View File

@ -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"`
}

View File

@ -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;
}

View File

@ -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()
}

View File

@ -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}
)

View File

@ -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"`
}

View File

@ -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;

View File

@ -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()
}

View File

@ -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}
)

View File

@ -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"`

View File

@ -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

View File

@ -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()
}

View File

@ -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}
)

View File

@ -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:

View File

@ -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;

View File

@ -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"`

View File

@ -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;

View File

@ -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()
}

View File

@ -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}
)

View File

@ -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()
}

View File

@ -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}
)

View File

@ -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 (

View File

@ -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;

View File

@ -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()
}

View File

@ -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}
)

View File

@ -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.
//

View File

@ -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;

View File

@ -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()
}

View File

@ -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}
)

View File

@ -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 (

View File

@ -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

View File

@ -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()
}

View File

@ -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}
)

View File

@ -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()
}

View File

@ -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}
)

View File

@ -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"`
}

View File

@ -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;
}

View File

@ -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()
}

View File

@ -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}
)

View File

@ -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 (

View File

@ -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;

View File

@ -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()
}

View File

@ -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}
)

View File

@ -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()
}

View File

@ -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}
)

View File

@ -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"`
}

View File

@ -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;
}

Some files were not shown because too many files have changed in this diff Show More