-
Notifications
You must be signed in to change notification settings - Fork 88
/
fabricoperatorapispec.go
170 lines (151 loc) · 8.91 KB
/
fabricoperatorapispec.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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
/*
* 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"
)
// FabricOperatorAPISpecApplyConfiguration represents an declarative configuration of the FabricOperatorAPISpec type for use
// with apply.
type FabricOperatorAPISpecApplyConfiguration struct {
Image *string `json:"image,omitempty"`
Tag *string `json:"tag,omitempty"`
ImagePullPolicy *v1.PullPolicy `json:"imagePullPolicy,omitempty"`
Istio *FabricIstioApplyConfiguration `json:"istio,omitempty"`
Ingress *IngressApplyConfiguration `json:"ingress,omitempty"`
Replicas *int `json:"replicas,omitempty"`
PodLabels map[string]string `json:"podLabels,omitempty"`
Auth *FabricOperatorAPIAuthApplyConfiguration `json:"auth,omitempty"`
LogoURL *string `json:"logoUrl,omitempty"`
HLFConfig *FabricOperatorAPIHLFConfigApplyConfiguration `json:"hlfConfig,omitempty"`
Tolerations []v1.Toleration `json:"tolerations,omitempty"`
ImagePullSecrets []v1.LocalObjectReference `json:"imagePullSecrets,omitempty"`
Env []v1.EnvVar `json:"env,omitempty"`
Affinity *v1.Affinity `json:"affinity,omitempty"`
Resources *v1.ResourceRequirements `json:"resources,omitempty"`
}
// FabricOperatorAPISpecApplyConfiguration constructs an declarative configuration of the FabricOperatorAPISpec type for use with
// apply.
func FabricOperatorAPISpec() *FabricOperatorAPISpecApplyConfiguration {
return &FabricOperatorAPISpecApplyConfiguration{}
}
// 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 *FabricOperatorAPISpecApplyConfiguration) WithImage(value string) *FabricOperatorAPISpecApplyConfiguration {
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 *FabricOperatorAPISpecApplyConfiguration) WithTag(value string) *FabricOperatorAPISpecApplyConfiguration {
b.Tag = &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 *FabricOperatorAPISpecApplyConfiguration) WithImagePullPolicy(value v1.PullPolicy) *FabricOperatorAPISpecApplyConfiguration {
b.ImagePullPolicy = &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 *FabricOperatorAPISpecApplyConfiguration) WithIstio(value *FabricIstioApplyConfiguration) *FabricOperatorAPISpecApplyConfiguration {
b.Istio = value
return b
}
// WithIngress sets the Ingress 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 Ingress field is set to the value of the last call.
func (b *FabricOperatorAPISpecApplyConfiguration) WithIngress(value *IngressApplyConfiguration) *FabricOperatorAPISpecApplyConfiguration {
b.Ingress = value
return b
}
// WithReplicas sets the Replicas 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 Replicas field is set to the value of the last call.
func (b *FabricOperatorAPISpecApplyConfiguration) WithReplicas(value int) *FabricOperatorAPISpecApplyConfiguration {
b.Replicas = &value
return b
}
// WithPodLabels puts the entries into the PodLabels field in the declarative configuration
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
// If called multiple times, the entries provided by each call will be put on the PodLabels field,
// overwriting an existing map entries in PodLabels field with the same key.
func (b *FabricOperatorAPISpecApplyConfiguration) WithPodLabels(entries map[string]string) *FabricOperatorAPISpecApplyConfiguration {
if b.PodLabels == nil && len(entries) > 0 {
b.PodLabels = make(map[string]string, len(entries))
}
for k, v := range entries {
b.PodLabels[k] = v
}
return b
}
// WithAuth sets the Auth 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 Auth field is set to the value of the last call.
func (b *FabricOperatorAPISpecApplyConfiguration) WithAuth(value *FabricOperatorAPIAuthApplyConfiguration) *FabricOperatorAPISpecApplyConfiguration {
b.Auth = value
return b
}
// WithLogoURL sets the LogoURL 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 LogoURL field is set to the value of the last call.
func (b *FabricOperatorAPISpecApplyConfiguration) WithLogoURL(value string) *FabricOperatorAPISpecApplyConfiguration {
b.LogoURL = &value
return b
}
// WithHLFConfig sets the HLFConfig 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 HLFConfig field is set to the value of the last call.
func (b *FabricOperatorAPISpecApplyConfiguration) WithHLFConfig(value *FabricOperatorAPIHLFConfigApplyConfiguration) *FabricOperatorAPISpecApplyConfiguration {
b.HLFConfig = value
return b
}
// WithTolerations adds the given value to the Tolerations 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 Tolerations field.
func (b *FabricOperatorAPISpecApplyConfiguration) WithTolerations(values ...v1.Toleration) *FabricOperatorAPISpecApplyConfiguration {
for i := range values {
b.Tolerations = append(b.Tolerations, values[i])
}
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 *FabricOperatorAPISpecApplyConfiguration) WithImagePullSecrets(values ...v1.LocalObjectReference) *FabricOperatorAPISpecApplyConfiguration {
for i := range values {
b.ImagePullSecrets = append(b.ImagePullSecrets, values[i])
}
return b
}
// WithEnv adds the given value to the Env 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 Env field.
func (b *FabricOperatorAPISpecApplyConfiguration) WithEnv(values ...v1.EnvVar) *FabricOperatorAPISpecApplyConfiguration {
for i := range values {
b.Env = append(b.Env, values[i])
}
return b
}
// WithAffinity sets the Affinity 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 Affinity field is set to the value of the last call.
func (b *FabricOperatorAPISpecApplyConfiguration) WithAffinity(value v1.Affinity) *FabricOperatorAPISpecApplyConfiguration {
b.Affinity = &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 *FabricOperatorAPISpecApplyConfiguration) WithResources(value v1.ResourceRequirements) *FabricOperatorAPISpecApplyConfiguration {
b.Resources = &value
return b
}