mirror of
https://github.com/kubernetes/client-go.git
synced 2026-02-21 23:53:16 +00:00
72 lines
3.0 KiB
Go
72 lines
3.0 KiB
Go
/*
|
|
Copyright The Kubernetes Authors.
|
|
|
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
you may not use this file except in compliance with the License.
|
|
You may obtain a copy of the License at
|
|
|
|
http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
Unless required by applicable law or agreed to in writing, software
|
|
distributed under the License is distributed on an "AS IS" BASIS,
|
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
See the License for the specific language governing permissions and
|
|
limitations under the License.
|
|
*/
|
|
|
|
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
|
|
|
package v1
|
|
|
|
// EnvVarApplyConfiguration represents a declarative configuration of the EnvVar type for use
|
|
// with apply.
|
|
//
|
|
// EnvVar represents an environment variable present in a Container.
|
|
type EnvVarApplyConfiguration struct {
|
|
// Name of the environment variable.
|
|
// May consist of any printable ASCII characters except '='.
|
|
Name *string `json:"name,omitempty"`
|
|
// Variable references $(VAR_NAME) are expanded
|
|
// using the previously defined environment variables in the container and
|
|
// any service environment variables. If a variable cannot be resolved,
|
|
// the reference in the input string will be unchanged. Double $$ are reduced
|
|
// to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e.
|
|
// "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)".
|
|
// Escaped references will never be expanded, regardless of whether the variable
|
|
// exists or not.
|
|
// Defaults to "".
|
|
Value *string `json:"value,omitempty"`
|
|
// Source for the environment variable's value. Cannot be used if value is not empty.
|
|
ValueFrom *EnvVarSourceApplyConfiguration `json:"valueFrom,omitempty"`
|
|
}
|
|
|
|
// EnvVarApplyConfiguration constructs a declarative configuration of the EnvVar type for use with
|
|
// apply.
|
|
func EnvVar() *EnvVarApplyConfiguration {
|
|
return &EnvVarApplyConfiguration{}
|
|
}
|
|
|
|
// WithName sets the Name 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 Name field is set to the value of the last call.
|
|
func (b *EnvVarApplyConfiguration) WithName(value string) *EnvVarApplyConfiguration {
|
|
b.Name = &value
|
|
return b
|
|
}
|
|
|
|
// WithValue sets the Value 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 Value field is set to the value of the last call.
|
|
func (b *EnvVarApplyConfiguration) WithValue(value string) *EnvVarApplyConfiguration {
|
|
b.Value = &value
|
|
return b
|
|
}
|
|
|
|
// WithValueFrom sets the ValueFrom 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 ValueFrom field is set to the value of the last call.
|
|
func (b *EnvVarApplyConfiguration) WithValueFrom(value *EnvVarSourceApplyConfiguration) *EnvVarApplyConfiguration {
|
|
b.ValueFrom = value
|
|
return b
|
|
}
|