Skip to content

Commit 8ccf42f

Browse files
committedJul 23, 2018
kubernetesGH-4252 Better name for the config value and also add to v1alpha1 API
1 parent e307021 commit 8ccf42f

File tree

8 files changed

+14
-15
lines changed

8 files changed

+14
-15
lines changed
 

‎nodeup/pkg/model/kube_apiserver.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -443,7 +443,7 @@ func (b *KubeAPIServerBuilder) buildAnnotations() map[string]string {
443443
annotations := make(map[string]string)
444444

445445
if b.Cluster.Spec.API != nil {
446-
if b.Cluster.Spec.API.LoadBalancer == nil || b.Cluster.Spec.API.LoadBalancer.UseApiInternal != true {
446+
if b.Cluster.Spec.API.LoadBalancer == nil || b.Cluster.Spec.API.LoadBalancer.UseForInternalApi != true {
447447
annotations["dns.alpha.kubernetes.io/internal"] = b.Cluster.Spec.MasterInternalName
448448
}
449449

‎pkg/apis/kops/cluster.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@ type LoadBalancerAccessSpec struct {
286286
Type LoadBalancerType `json:"type,omitempty"`
287287
IdleTimeoutSeconds *int64 `json:"idleTimeoutSeconds,omitempty"`
288288
AdditionalSecurityGroups []string `json:"additionalSecurityGroups,omitempty"`
289-
UseApiInternal bool `json:"useApiInternal,omitempty"`
289+
UseForInternalApi bool `json:"useForInternalApi,omitempty"`
290290
}
291291

292292
// KubeDNSConfig defines the kube dns configuration

‎pkg/apis/kops/v1alpha1/cluster.go

+1
Original file line numberDiff line numberDiff line change
@@ -285,6 +285,7 @@ type LoadBalancerAccessSpec struct {
285285
Type LoadBalancerType `json:"type,omitempty"`
286286
IdleTimeoutSeconds *int64 `json:"idleTimeoutSeconds,omitempty"`
287287
AdditionalSecurityGroups []string `json:"additionalSecurityGroups,omitempty"`
288+
UseForInternalApi bool `json:"useForInternalApi,omitempty"`
288289
}
289290

290291
// KubeDNSConfig defines the kube dns configuration

‎pkg/apis/kops/v1alpha1/conversion.go

-8
Original file line numberDiff line numberDiff line change
@@ -301,11 +301,3 @@ func Convert_kops_TopologySpec_To_v1alpha1_TopologySpec(in *kops.TopologySpec, o
301301
}
302302
return nil
303303
}
304-
305-
func Convert_kops_LoadBalancerAccessSpec_To_v1alpha1_LoadBalancerAccessSpec(in *kops.LoadBalancerAccessSpec, out *LoadBalancerAccessSpec, s conversion.Scope) error {
306-
out.Type = LoadBalancerType(in.Type)
307-
out.IdleTimeoutSeconds = in.IdleTimeoutSeconds
308-
out.AdditionalSecurityGroups = in.AdditionalSecurityGroups
309-
310-
return nil
311-
}

‎pkg/apis/kops/v1alpha1/zz_generated.conversion.go

+7-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎pkg/apis/kops/v1alpha2/cluster.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@ type LoadBalancerAccessSpec struct {
286286
Type LoadBalancerType `json:"type,omitempty"`
287287
IdleTimeoutSeconds *int64 `json:"idleTimeoutSeconds,omitempty"`
288288
AdditionalSecurityGroups []string `json:"additionalSecurityGroups,omitempty"`
289-
UseApiInternal bool `json:"useApiInternal,omitempty"`
289+
UseForInternalApi bool `json:"useForInternalApi,omitempty"`
290290
}
291291

292292
// KubeDNSConfig defines the kube dns configuration

‎pkg/apis/kops/v1alpha2/zz_generated.conversion.go

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎pkg/model/context.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ func (m *KopsModelContext) UseLoadBalancerForAPI() bool {
290290
// HA - see https://github.com/kubernetes/kops/issues/4252
291291
func (m *KopsModelContext) UseLoadBalancerForInternalAPI() bool {
292292
return m.UseLoadBalancerForAPI() &&
293-
m.Cluster.Spec.API.LoadBalancer.UseApiInternal == true
293+
m.Cluster.Spec.API.LoadBalancer.UseForInternalApi == true
294294
}
295295

296296
// UsePrivateDNS checks if we are using private DNS

0 commit comments

Comments
 (0)
Please sign in to comment.