-
Notifications
You must be signed in to change notification settings - Fork 88
/
grpcproxy.go
88 lines (77 loc) · 4.04 KB
/
grpcproxy.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
/*
* Copyright Kungfusoftware.es. All Rights Reserved.
*
* SPDX-License-Identifier: Apache-2.0
*/
// Code generated by applyconfiguration-gen. DO NOT EDIT.
package v1alpha1
import (
v1 "k8s.io/api/core/v1"
)
// GRPCProxyApplyConfiguration represents an declarative configuration of the GRPCProxy type for use
// with apply.
type GRPCProxyApplyConfiguration struct {
Enabled *bool `json:"enabled,omitempty"`
Image *string `json:"image,omitempty"`
Tag *string `json:"tag,omitempty"`
Istio *FabricIstioApplyConfiguration `json:"istio,omitempty"`
ImagePullPolicy *v1.PullPolicy `json:"imagePullPolicy,omitempty"`
Resources *v1.ResourceRequirements `json:"resources,omitempty"`
ImagePullSecrets []v1.LocalObjectReference `json:"imagePullSecrets,omitempty"`
}
// GRPCProxyApplyConfiguration constructs an declarative configuration of the GRPCProxy type for use with
// apply.
func GRPCProxy() *GRPCProxyApplyConfiguration {
return &GRPCProxyApplyConfiguration{}
}
// WithEnabled sets the Enabled field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the Enabled field is set to the value of the last call.
func (b *GRPCProxyApplyConfiguration) WithEnabled(value bool) *GRPCProxyApplyConfiguration {
b.Enabled = &value
return b
}
// WithImage sets the Image field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the Image field is set to the value of the last call.
func (b *GRPCProxyApplyConfiguration) WithImage(value string) *GRPCProxyApplyConfiguration {
b.Image = &value
return b
}
// WithTag sets the Tag field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the Tag field is set to the value of the last call.
func (b *GRPCProxyApplyConfiguration) WithTag(value string) *GRPCProxyApplyConfiguration {
b.Tag = &value
return b
}
// WithIstio sets the Istio field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the Istio field is set to the value of the last call.
func (b *GRPCProxyApplyConfiguration) WithIstio(value *FabricIstioApplyConfiguration) *GRPCProxyApplyConfiguration {
b.Istio = value
return b
}
// WithImagePullPolicy sets the ImagePullPolicy field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the ImagePullPolicy field is set to the value of the last call.
func (b *GRPCProxyApplyConfiguration) WithImagePullPolicy(value v1.PullPolicy) *GRPCProxyApplyConfiguration {
b.ImagePullPolicy = &value
return b
}
// WithResources sets the Resources field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the Resources field is set to the value of the last call.
func (b *GRPCProxyApplyConfiguration) WithResources(value v1.ResourceRequirements) *GRPCProxyApplyConfiguration {
b.Resources = &value
return b
}
// WithImagePullSecrets adds the given value to the ImagePullSecrets field in the declarative configuration
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
// If called multiple times, values provided by each call will be appended to the ImagePullSecrets field.
func (b *GRPCProxyApplyConfiguration) WithImagePullSecrets(values ...v1.LocalObjectReference) *GRPCProxyApplyConfiguration {
for i := range values {
b.ImagePullSecrets = append(b.ImagePullSecrets, values[i])
}
return b
}