Skip to content

Commit

Permalink
updates using a pointer now
Browse files Browse the repository at this point in the history
  • Loading branch information
chrislovecnm committed Jan 16, 2017
1 parent 693e9e0 commit 60bd9e7
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 7 deletions.
2 changes: 2 additions & 0 deletions pkg/apis/kops/v1alpha1/zz_generated.conversion.go
Original file line number Diff line number Diff line change
Expand Up @@ -1013,6 +1013,7 @@ func autoConvert_v1alpha1_KubeControllerManagerConfig_To_kops_KubeControllerMana
} else {
out.LeaderElection = nil
}
out.AttachDetachReconcileSyncPeriod = in.AttachDetachReconcileSyncPeriod
return nil
}

Expand Down Expand Up @@ -1041,6 +1042,7 @@ func autoConvert_kops_KubeControllerManagerConfig_To_v1alpha1_KubeControllerMana
} else {
out.LeaderElection = nil
}
out.AttachDetachReconcileSyncPeriod = in.AttachDetachReconcileSyncPeriod
return nil
}

Expand Down
16 changes: 16 additions & 0 deletions pkg/model/components/kubecontrollermanager.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
/*
Copyright 2017 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.
*/

package components

import (
Expand Down
27 changes: 20 additions & 7 deletions pkg/model/components/kubecontrollermanager_test.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,27 @@
/*
Copyright 2017 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.
*/

package components

import (
api "k8s.io/kops/pkg/apis/kops"
"k8s.io/kops/upup/pkg/fi"
"testing"
"time"

api "k8s.io/kops/pkg/apis/kops"
"k8s.io/kops/upup/pkg/fi"
)

type ClusterParams struct {
Expand Down Expand Up @@ -69,9 +86,8 @@ func Test_Build_KCM_Builder_Lower_Version(t *testing.T) {

}


func Test_Build_KCM_Builder_High_Enough_Version(t *testing.T) {
c := buildCluster(ClusterParams{KubernetesVersion:"1.4.8"})
c := buildCluster(ClusterParams{KubernetesVersion: "1.4.8"})

kcm := &KubeControllerManagerOptionsBuilder{
Context: &OptionsContext{
Expand All @@ -90,7 +106,4 @@ func Test_Build_KCM_Builder_High_Enough_Version(t *testing.T) {
t.Fatalf("k-c-m builder should be set to 1m - %s", spec.KubeControllerManager.AttachDetachReconcileSyncPeriod.Duration.String())
}



}

0 comments on commit 60bd9e7

Please sign in to comment.