mirror of https://github.com/kubernetes/kops.git
Add env API field to amazonvpc
This commit is contained in:
parent
f400f74a3e
commit
79424e8562
|
@ -2407,6 +2407,31 @@ spec:
|
|||
description: AmazonVPCNetworkingSpec declares that we want Amazon
|
||||
VPC CNI networking
|
||||
properties:
|
||||
env:
|
||||
description: Env is a list of environment variables to set in
|
||||
the container.
|
||||
items:
|
||||
description: EnvVar represents an environment variable present
|
||||
in a Container.
|
||||
properties:
|
||||
name:
|
||||
description: Name of the environment variable. Must be
|
||||
a C_IDENTIFIER.
|
||||
type: string
|
||||
value:
|
||||
description: 'Variable references $(VAR_NAME) are expanded
|
||||
using the previous 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. The $(VAR_NAME) syntax
|
||||
can be escaped with a double $$, ie: $$(VAR_NAME). Escaped
|
||||
references will never be expanded, regardless of whether
|
||||
the variable exists or not. Defaults to "".'
|
||||
type: string
|
||||
required:
|
||||
- name
|
||||
type: object
|
||||
type: array
|
||||
imageName:
|
||||
description: 'The container image name to use, which by default
|
||||
is: 602401143452.dkr.ecr.us-west-2.amazonaws.com/amazon-k8s-cni:v1.5.5'
|
||||
|
|
|
@ -190,6 +190,8 @@ type AmazonVPCNetworkingSpec struct {
|
|||
// The container image name to use, which by default is:
|
||||
// 602401143452.dkr.ecr.us-west-2.amazonaws.com/amazon-k8s-cni:v1.5.5
|
||||
ImageName string `json:"imageName,omitempty"`
|
||||
// Env is a list of environment variables to set in the container.
|
||||
Env []EnvVar `json:"env,omitempty"`
|
||||
}
|
||||
|
||||
const CiliumDefaultVersion = "v1.6.6"
|
||||
|
|
|
@ -190,6 +190,8 @@ type AmazonVPCNetworkingSpec struct {
|
|||
// The container image name to use, which by default is:
|
||||
// 602401143452.dkr.ecr.us-west-2.amazonaws.com/amazon-k8s-cni:v1.5.5
|
||||
ImageName string `json:"imageName,omitempty"`
|
||||
// Env is a list of environment variables to set in the container.
|
||||
Env []EnvVar `json:"env,omitempty"`
|
||||
}
|
||||
|
||||
type CiliumNetworkingSpec struct {
|
||||
|
|
|
@ -960,6 +960,17 @@ func Convert_kops_AlwaysAllowAuthorizationSpec_To_v1alpha1_AlwaysAllowAuthorizat
|
|||
|
||||
func autoConvert_v1alpha1_AmazonVPCNetworkingSpec_To_kops_AmazonVPCNetworkingSpec(in *AmazonVPCNetworkingSpec, out *kops.AmazonVPCNetworkingSpec, s conversion.Scope) error {
|
||||
out.ImageName = in.ImageName
|
||||
if in.Env != nil {
|
||||
in, out := &in.Env, &out.Env
|
||||
*out = make([]kops.EnvVar, len(*in))
|
||||
for i := range *in {
|
||||
if err := Convert_v1alpha1_EnvVar_To_kops_EnvVar(&(*in)[i], &(*out)[i], s); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
} else {
|
||||
out.Env = nil
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
|
@ -970,6 +981,17 @@ func Convert_v1alpha1_AmazonVPCNetworkingSpec_To_kops_AmazonVPCNetworkingSpec(in
|
|||
|
||||
func autoConvert_kops_AmazonVPCNetworkingSpec_To_v1alpha1_AmazonVPCNetworkingSpec(in *kops.AmazonVPCNetworkingSpec, out *AmazonVPCNetworkingSpec, s conversion.Scope) error {
|
||||
out.ImageName = in.ImageName
|
||||
if in.Env != nil {
|
||||
in, out := &in.Env, &out.Env
|
||||
*out = make([]EnvVar, len(*in))
|
||||
for i := range *in {
|
||||
if err := Convert_kops_EnvVar_To_v1alpha1_EnvVar(&(*in)[i], &(*out)[i], s); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
} else {
|
||||
out.Env = nil
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
|
@ -87,6 +87,11 @@ func (in *AlwaysAllowAuthorizationSpec) DeepCopy() *AlwaysAllowAuthorizationSpec
|
|||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *AmazonVPCNetworkingSpec) DeepCopyInto(out *AmazonVPCNetworkingSpec) {
|
||||
*out = *in
|
||||
if in.Env != nil {
|
||||
in, out := &in.Env, &out.Env
|
||||
*out = make([]EnvVar, len(*in))
|
||||
copy(*out, *in)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
|
@ -2969,7 +2974,7 @@ func (in *NetworkingSpec) DeepCopyInto(out *NetworkingSpec) {
|
|||
if in.AmazonVPC != nil {
|
||||
in, out := &in.AmazonVPC, &out.AmazonVPC
|
||||
*out = new(AmazonVPCNetworkingSpec)
|
||||
**out = **in
|
||||
(*in).DeepCopyInto(*out)
|
||||
}
|
||||
if in.Cilium != nil {
|
||||
in, out := &in.Cilium, &out.Cilium
|
||||
|
|
|
@ -190,6 +190,8 @@ type AmazonVPCNetworkingSpec struct {
|
|||
// The container image name to use, which by default is:
|
||||
// 602401143452.dkr.ecr.us-west-2.amazonaws.com/amazon-k8s-cni:v1.5.5
|
||||
ImageName string `json:"imageName,omitempty"`
|
||||
// Env is a list of environment variables to set in the container.
|
||||
Env []EnvVar `json:"env,omitempty"`
|
||||
}
|
||||
|
||||
// CiliumNetworkingSpec declares that we want Cilium networking
|
||||
|
|
|
@ -980,6 +980,17 @@ func Convert_kops_AlwaysAllowAuthorizationSpec_To_v1alpha2_AlwaysAllowAuthorizat
|
|||
|
||||
func autoConvert_v1alpha2_AmazonVPCNetworkingSpec_To_kops_AmazonVPCNetworkingSpec(in *AmazonVPCNetworkingSpec, out *kops.AmazonVPCNetworkingSpec, s conversion.Scope) error {
|
||||
out.ImageName = in.ImageName
|
||||
if in.Env != nil {
|
||||
in, out := &in.Env, &out.Env
|
||||
*out = make([]kops.EnvVar, len(*in))
|
||||
for i := range *in {
|
||||
if err := Convert_v1alpha2_EnvVar_To_kops_EnvVar(&(*in)[i], &(*out)[i], s); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
} else {
|
||||
out.Env = nil
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
|
@ -990,6 +1001,17 @@ func Convert_v1alpha2_AmazonVPCNetworkingSpec_To_kops_AmazonVPCNetworkingSpec(in
|
|||
|
||||
func autoConvert_kops_AmazonVPCNetworkingSpec_To_v1alpha2_AmazonVPCNetworkingSpec(in *kops.AmazonVPCNetworkingSpec, out *AmazonVPCNetworkingSpec, s conversion.Scope) error {
|
||||
out.ImageName = in.ImageName
|
||||
if in.Env != nil {
|
||||
in, out := &in.Env, &out.Env
|
||||
*out = make([]EnvVar, len(*in))
|
||||
for i := range *in {
|
||||
if err := Convert_kops_EnvVar_To_v1alpha2_EnvVar(&(*in)[i], &(*out)[i], s); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
} else {
|
||||
out.Env = nil
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
|
@ -87,6 +87,11 @@ func (in *AlwaysAllowAuthorizationSpec) DeepCopy() *AlwaysAllowAuthorizationSpec
|
|||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *AmazonVPCNetworkingSpec) DeepCopyInto(out *AmazonVPCNetworkingSpec) {
|
||||
*out = *in
|
||||
if in.Env != nil {
|
||||
in, out := &in.Env, &out.Env
|
||||
*out = make([]EnvVar, len(*in))
|
||||
copy(*out, *in)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
|
@ -3040,7 +3045,7 @@ func (in *NetworkingSpec) DeepCopyInto(out *NetworkingSpec) {
|
|||
if in.AmazonVPC != nil {
|
||||
in, out := &in.AmazonVPC, &out.AmazonVPC
|
||||
*out = new(AmazonVPCNetworkingSpec)
|
||||
**out = **in
|
||||
(*in).DeepCopyInto(*out)
|
||||
}
|
||||
if in.Cilium != nil {
|
||||
in, out := &in.Cilium, &out.Cilium
|
||||
|
|
|
@ -87,6 +87,11 @@ func (in *AlwaysAllowAuthorizationSpec) DeepCopy() *AlwaysAllowAuthorizationSpec
|
|||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *AmazonVPCNetworkingSpec) DeepCopyInto(out *AmazonVPCNetworkingSpec) {
|
||||
*out = *in
|
||||
if in.Env != nil {
|
||||
in, out := &in.Env, &out.Env
|
||||
*out = make([]EnvVar, len(*in))
|
||||
copy(*out, *in)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
|
@ -3238,7 +3243,7 @@ func (in *NetworkingSpec) DeepCopyInto(out *NetworkingSpec) {
|
|||
if in.AmazonVPC != nil {
|
||||
in, out := &in.AmazonVPC, &out.AmazonVPC
|
||||
*out = new(AmazonVPCNetworkingSpec)
|
||||
**out = **in
|
||||
(*in).DeepCopyInto(*out)
|
||||
}
|
||||
if in.Cilium != nil {
|
||||
in, out := &in.Cilium, &out.Cilium
|
||||
|
|
Loading…
Reference in New Issue