mirror of https://github.com/kubernetes/kops.git
GH-4252 Better name for the config value and also add to v1alpha1 API
This commit is contained in:
parent
e307021a6c
commit
8ccf42f4a2
|
|
@ -443,7 +443,7 @@ func (b *KubeAPIServerBuilder) buildAnnotations() map[string]string {
|
|||
annotations := make(map[string]string)
|
||||
|
||||
if b.Cluster.Spec.API != nil {
|
||||
if b.Cluster.Spec.API.LoadBalancer == nil || b.Cluster.Spec.API.LoadBalancer.UseApiInternal != true {
|
||||
if b.Cluster.Spec.API.LoadBalancer == nil || b.Cluster.Spec.API.LoadBalancer.UseForInternalApi != true {
|
||||
annotations["dns.alpha.kubernetes.io/internal"] = b.Cluster.Spec.MasterInternalName
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -286,7 +286,7 @@ type LoadBalancerAccessSpec struct {
|
|||
Type LoadBalancerType `json:"type,omitempty"`
|
||||
IdleTimeoutSeconds *int64 `json:"idleTimeoutSeconds,omitempty"`
|
||||
AdditionalSecurityGroups []string `json:"additionalSecurityGroups,omitempty"`
|
||||
UseApiInternal bool `json:"useApiInternal,omitempty"`
|
||||
UseForInternalApi bool `json:"useForInternalApi,omitempty"`
|
||||
}
|
||||
|
||||
// KubeDNSConfig defines the kube dns configuration
|
||||
|
|
|
|||
|
|
@ -285,6 +285,7 @@ type LoadBalancerAccessSpec struct {
|
|||
Type LoadBalancerType `json:"type,omitempty"`
|
||||
IdleTimeoutSeconds *int64 `json:"idleTimeoutSeconds,omitempty"`
|
||||
AdditionalSecurityGroups []string `json:"additionalSecurityGroups,omitempty"`
|
||||
UseForInternalApi bool `json:"useForInternalApi,omitempty"`
|
||||
}
|
||||
|
||||
// KubeDNSConfig defines the kube dns configuration
|
||||
|
|
|
|||
|
|
@ -301,11 +301,3 @@ func Convert_kops_TopologySpec_To_v1alpha1_TopologySpec(in *kops.TopologySpec, o
|
|||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func Convert_kops_LoadBalancerAccessSpec_To_v1alpha1_LoadBalancerAccessSpec(in *kops.LoadBalancerAccessSpec, out *LoadBalancerAccessSpec, s conversion.Scope) error {
|
||||
out.Type = LoadBalancerType(in.Type)
|
||||
out.IdleTimeoutSeconds = in.IdleTimeoutSeconds
|
||||
out.AdditionalSecurityGroups = in.AdditionalSecurityGroups
|
||||
|
||||
return nil
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2650,6 +2650,7 @@ func autoConvert_v1alpha1_LoadBalancerAccessSpec_To_kops_LoadBalancerAccessSpec(
|
|||
out.Type = kops.LoadBalancerType(in.Type)
|
||||
out.IdleTimeoutSeconds = in.IdleTimeoutSeconds
|
||||
out.AdditionalSecurityGroups = in.AdditionalSecurityGroups
|
||||
out.UseForInternalApi = in.UseForInternalApi
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
@ -2662,10 +2663,15 @@ func autoConvert_kops_LoadBalancerAccessSpec_To_v1alpha1_LoadBalancerAccessSpec(
|
|||
out.Type = LoadBalancerType(in.Type)
|
||||
out.IdleTimeoutSeconds = in.IdleTimeoutSeconds
|
||||
out.AdditionalSecurityGroups = in.AdditionalSecurityGroups
|
||||
// WARNING: in.UseApiInternal requires manual conversion: does not exist in peer-type
|
||||
out.UseForInternalApi = in.UseForInternalApi
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_kops_LoadBalancerAccessSpec_To_v1alpha1_LoadBalancerAccessSpec is an autogenerated conversion function.
|
||||
func Convert_kops_LoadBalancerAccessSpec_To_v1alpha1_LoadBalancerAccessSpec(in *kops.LoadBalancerAccessSpec, out *LoadBalancerAccessSpec, s conversion.Scope) error {
|
||||
return autoConvert_kops_LoadBalancerAccessSpec_To_v1alpha1_LoadBalancerAccessSpec(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_v1alpha1_NetworkingSpec_To_kops_NetworkingSpec(in *NetworkingSpec, out *kops.NetworkingSpec, s conversion.Scope) error {
|
||||
if in.Classic != nil {
|
||||
in, out := &in.Classic, &out.Classic
|
||||
|
|
|
|||
|
|
@ -286,7 +286,7 @@ type LoadBalancerAccessSpec struct {
|
|||
Type LoadBalancerType `json:"type,omitempty"`
|
||||
IdleTimeoutSeconds *int64 `json:"idleTimeoutSeconds,omitempty"`
|
||||
AdditionalSecurityGroups []string `json:"additionalSecurityGroups,omitempty"`
|
||||
UseApiInternal bool `json:"useApiInternal,omitempty"`
|
||||
UseForInternalApi bool `json:"useForInternalApi,omitempty"`
|
||||
}
|
||||
|
||||
// KubeDNSConfig defines the kube dns configuration
|
||||
|
|
|
|||
|
|
@ -2914,7 +2914,7 @@ func autoConvert_v1alpha2_LoadBalancerAccessSpec_To_kops_LoadBalancerAccessSpec(
|
|||
out.Type = kops.LoadBalancerType(in.Type)
|
||||
out.IdleTimeoutSeconds = in.IdleTimeoutSeconds
|
||||
out.AdditionalSecurityGroups = in.AdditionalSecurityGroups
|
||||
out.UseApiInternal = in.UseApiInternal
|
||||
out.UseForInternalApi = in.UseForInternalApi
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
@ -2927,7 +2927,7 @@ func autoConvert_kops_LoadBalancerAccessSpec_To_v1alpha2_LoadBalancerAccessSpec(
|
|||
out.Type = LoadBalancerType(in.Type)
|
||||
out.IdleTimeoutSeconds = in.IdleTimeoutSeconds
|
||||
out.AdditionalSecurityGroups = in.AdditionalSecurityGroups
|
||||
out.UseApiInternal = in.UseApiInternal
|
||||
out.UseForInternalApi = in.UseForInternalApi
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -290,7 +290,7 @@ func (m *KopsModelContext) UseLoadBalancerForAPI() bool {
|
|||
// HA - see https://github.com/kubernetes/kops/issues/4252
|
||||
func (m *KopsModelContext) UseLoadBalancerForInternalAPI() bool {
|
||||
return m.UseLoadBalancerForAPI() &&
|
||||
m.Cluster.Spec.API.LoadBalancer.UseApiInternal == true
|
||||
m.Cluster.Spec.API.LoadBalancer.UseForInternalApi == true
|
||||
}
|
||||
|
||||
// UsePrivateDNS checks if we are using private DNS
|
||||
|
|
|
|||
Loading…
Reference in New Issue