...
1
16
17
18
19 package v1
20
21 import (
22 corev1 "k8s.io/api/core/v1"
23 )
24
25
26
27 type EphemeralContainerCommonApplyConfiguration struct {
28 Name *string `json:"name,omitempty"`
29 Image *string `json:"image,omitempty"`
30 Command []string `json:"command,omitempty"`
31 Args []string `json:"args,omitempty"`
32 WorkingDir *string `json:"workingDir,omitempty"`
33 Ports []ContainerPortApplyConfiguration `json:"ports,omitempty"`
34 EnvFrom []EnvFromSourceApplyConfiguration `json:"envFrom,omitempty"`
35 Env []EnvVarApplyConfiguration `json:"env,omitempty"`
36 Resources *ResourceRequirementsApplyConfiguration `json:"resources,omitempty"`
37 ResizePolicy []ContainerResizePolicyApplyConfiguration `json:"resizePolicy,omitempty"`
38 RestartPolicy *corev1.ContainerRestartPolicy `json:"restartPolicy,omitempty"`
39 VolumeMounts []VolumeMountApplyConfiguration `json:"volumeMounts,omitempty"`
40 VolumeDevices []VolumeDeviceApplyConfiguration `json:"volumeDevices,omitempty"`
41 LivenessProbe *ProbeApplyConfiguration `json:"livenessProbe,omitempty"`
42 ReadinessProbe *ProbeApplyConfiguration `json:"readinessProbe,omitempty"`
43 StartupProbe *ProbeApplyConfiguration `json:"startupProbe,omitempty"`
44 Lifecycle *LifecycleApplyConfiguration `json:"lifecycle,omitempty"`
45 TerminationMessagePath *string `json:"terminationMessagePath,omitempty"`
46 TerminationMessagePolicy *corev1.TerminationMessagePolicy `json:"terminationMessagePolicy,omitempty"`
47 ImagePullPolicy *corev1.PullPolicy `json:"imagePullPolicy,omitempty"`
48 SecurityContext *SecurityContextApplyConfiguration `json:"securityContext,omitempty"`
49 Stdin *bool `json:"stdin,omitempty"`
50 StdinOnce *bool `json:"stdinOnce,omitempty"`
51 TTY *bool `json:"tty,omitempty"`
52 }
53
54
55
56 func EphemeralContainerCommon() *EphemeralContainerCommonApplyConfiguration {
57 return &EphemeralContainerCommonApplyConfiguration{}
58 }
59
60
61
62
63 func (b *EphemeralContainerCommonApplyConfiguration) WithName(value string) *EphemeralContainerCommonApplyConfiguration {
64 b.Name = &value
65 return b
66 }
67
68
69
70
71 func (b *EphemeralContainerCommonApplyConfiguration) WithImage(value string) *EphemeralContainerCommonApplyConfiguration {
72 b.Image = &value
73 return b
74 }
75
76
77
78
79 func (b *EphemeralContainerCommonApplyConfiguration) WithCommand(values ...string) *EphemeralContainerCommonApplyConfiguration {
80 for i := range values {
81 b.Command = append(b.Command, values[i])
82 }
83 return b
84 }
85
86
87
88
89 func (b *EphemeralContainerCommonApplyConfiguration) WithArgs(values ...string) *EphemeralContainerCommonApplyConfiguration {
90 for i := range values {
91 b.Args = append(b.Args, values[i])
92 }
93 return b
94 }
95
96
97
98
99 func (b *EphemeralContainerCommonApplyConfiguration) WithWorkingDir(value string) *EphemeralContainerCommonApplyConfiguration {
100 b.WorkingDir = &value
101 return b
102 }
103
104
105
106
107 func (b *EphemeralContainerCommonApplyConfiguration) WithPorts(values ...*ContainerPortApplyConfiguration) *EphemeralContainerCommonApplyConfiguration {
108 for i := range values {
109 if values[i] == nil {
110 panic("nil value passed to WithPorts")
111 }
112 b.Ports = append(b.Ports, *values[i])
113 }
114 return b
115 }
116
117
118
119
120 func (b *EphemeralContainerCommonApplyConfiguration) WithEnvFrom(values ...*EnvFromSourceApplyConfiguration) *EphemeralContainerCommonApplyConfiguration {
121 for i := range values {
122 if values[i] == nil {
123 panic("nil value passed to WithEnvFrom")
124 }
125 b.EnvFrom = append(b.EnvFrom, *values[i])
126 }
127 return b
128 }
129
130
131
132
133 func (b *EphemeralContainerCommonApplyConfiguration) WithEnv(values ...*EnvVarApplyConfiguration) *EphemeralContainerCommonApplyConfiguration {
134 for i := range values {
135 if values[i] == nil {
136 panic("nil value passed to WithEnv")
137 }
138 b.Env = append(b.Env, *values[i])
139 }
140 return b
141 }
142
143
144
145
146 func (b *EphemeralContainerCommonApplyConfiguration) WithResources(value *ResourceRequirementsApplyConfiguration) *EphemeralContainerCommonApplyConfiguration {
147 b.Resources = value
148 return b
149 }
150
151
152
153
154 func (b *EphemeralContainerCommonApplyConfiguration) WithResizePolicy(values ...*ContainerResizePolicyApplyConfiguration) *EphemeralContainerCommonApplyConfiguration {
155 for i := range values {
156 if values[i] == nil {
157 panic("nil value passed to WithResizePolicy")
158 }
159 b.ResizePolicy = append(b.ResizePolicy, *values[i])
160 }
161 return b
162 }
163
164
165
166
167 func (b *EphemeralContainerCommonApplyConfiguration) WithRestartPolicy(value corev1.ContainerRestartPolicy) *EphemeralContainerCommonApplyConfiguration {
168 b.RestartPolicy = &value
169 return b
170 }
171
172
173
174
175 func (b *EphemeralContainerCommonApplyConfiguration) WithVolumeMounts(values ...*VolumeMountApplyConfiguration) *EphemeralContainerCommonApplyConfiguration {
176 for i := range values {
177 if values[i] == nil {
178 panic("nil value passed to WithVolumeMounts")
179 }
180 b.VolumeMounts = append(b.VolumeMounts, *values[i])
181 }
182 return b
183 }
184
185
186
187
188 func (b *EphemeralContainerCommonApplyConfiguration) WithVolumeDevices(values ...*VolumeDeviceApplyConfiguration) *EphemeralContainerCommonApplyConfiguration {
189 for i := range values {
190 if values[i] == nil {
191 panic("nil value passed to WithVolumeDevices")
192 }
193 b.VolumeDevices = append(b.VolumeDevices, *values[i])
194 }
195 return b
196 }
197
198
199
200
201 func (b *EphemeralContainerCommonApplyConfiguration) WithLivenessProbe(value *ProbeApplyConfiguration) *EphemeralContainerCommonApplyConfiguration {
202 b.LivenessProbe = value
203 return b
204 }
205
206
207
208
209 func (b *EphemeralContainerCommonApplyConfiguration) WithReadinessProbe(value *ProbeApplyConfiguration) *EphemeralContainerCommonApplyConfiguration {
210 b.ReadinessProbe = value
211 return b
212 }
213
214
215
216
217 func (b *EphemeralContainerCommonApplyConfiguration) WithStartupProbe(value *ProbeApplyConfiguration) *EphemeralContainerCommonApplyConfiguration {
218 b.StartupProbe = value
219 return b
220 }
221
222
223
224
225 func (b *EphemeralContainerCommonApplyConfiguration) WithLifecycle(value *LifecycleApplyConfiguration) *EphemeralContainerCommonApplyConfiguration {
226 b.Lifecycle = value
227 return b
228 }
229
230
231
232
233 func (b *EphemeralContainerCommonApplyConfiguration) WithTerminationMessagePath(value string) *EphemeralContainerCommonApplyConfiguration {
234 b.TerminationMessagePath = &value
235 return b
236 }
237
238
239
240
241 func (b *EphemeralContainerCommonApplyConfiguration) WithTerminationMessagePolicy(value corev1.TerminationMessagePolicy) *EphemeralContainerCommonApplyConfiguration {
242 b.TerminationMessagePolicy = &value
243 return b
244 }
245
246
247
248
249 func (b *EphemeralContainerCommonApplyConfiguration) WithImagePullPolicy(value corev1.PullPolicy) *EphemeralContainerCommonApplyConfiguration {
250 b.ImagePullPolicy = &value
251 return b
252 }
253
254
255
256
257 func (b *EphemeralContainerCommonApplyConfiguration) WithSecurityContext(value *SecurityContextApplyConfiguration) *EphemeralContainerCommonApplyConfiguration {
258 b.SecurityContext = value
259 return b
260 }
261
262
263
264
265 func (b *EphemeralContainerCommonApplyConfiguration) WithStdin(value bool) *EphemeralContainerCommonApplyConfiguration {
266 b.Stdin = &value
267 return b
268 }
269
270
271
272
273 func (b *EphemeralContainerCommonApplyConfiguration) WithStdinOnce(value bool) *EphemeralContainerCommonApplyConfiguration {
274 b.StdinOnce = &value
275 return b
276 }
277
278
279
280
281 func (b *EphemeralContainerCommonApplyConfiguration) WithTTY(value bool) *EphemeralContainerCommonApplyConfiguration {
282 b.TTY = &value
283 return b
284 }
285
View as plain text