Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use Statefulset instead in e2e and controller #39939

Merged
merged 3 commits into from
Jan 17, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion cmd/kube-controller-manager/app/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ go_library(
"//pkg/controller/job:go_default_library",
"//pkg/controller/namespace:go_default_library",
"//pkg/controller/node:go_default_library",
"//pkg/controller/petset:go_default_library",
"//pkg/controller/podautoscaler:go_default_library",
"//pkg/controller/podautoscaler/metrics:go_default_library",
"//pkg/controller/podgc:go_default_library",
Expand All @@ -69,6 +68,7 @@ go_library(
"//pkg/controller/route:go_default_library",
"//pkg/controller/service:go_default_library",
"//pkg/controller/serviceaccount:go_default_library",
"//pkg/controller/statefulset:go_default_library",
"//pkg/controller/volume/attachdetach:go_default_library",
"//pkg/controller/volume/persistentvolume:go_default_library",
"//pkg/quota/install:go_default_library",
Expand Down
4 changes: 2 additions & 2 deletions cmd/kube-controller-manager/app/apps.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,15 @@ package app

import (
"k8s.io/apimachinery/pkg/runtime/schema"
petset "k8s.io/kubernetes/pkg/controller/petset"
"k8s.io/kubernetes/pkg/controller/statefulset"
)

func startStatefulSetController(ctx ControllerContext) (bool, error) {
if !ctx.AvailableResources[schema.GroupVersionResource{Group: "apps", Version: "v1beta1", Resource: "statefulsets"}] {
return false, nil
}
resyncPeriod := ResyncPeriod(&ctx.Options)()
go petset.NewStatefulSetController(
go statefulset.NewStatefulSetController(
ctx.InformerFactory.Pods().Informer(),
ctx.ClientBuilder.ClientOrDie("statefulset-controller"),
resyncPeriod,
Expand Down
2 changes: 1 addition & 1 deletion pkg/controller/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,6 @@ filegroup(
"//pkg/controller/job:all-srcs",
"//pkg/controller/namespace:all-srcs",
"//pkg/controller/node:all-srcs",
"//pkg/controller/petset:all-srcs",
"//pkg/controller/podautoscaler:all-srcs",
"//pkg/controller/podgc:all-srcs",
"//pkg/controller/replicaset:all-srcs",
Expand All @@ -101,6 +100,7 @@ filegroup(
"//pkg/controller/route:all-srcs",
"//pkg/controller/service:all-srcs",
"//pkg/controller/serviceaccount:all-srcs",
"//pkg/controller/statefulset:all-srcs",
"//pkg/controller/volume/attachdetach:all-srcs",
"//pkg/controller/volume/persistentvolume:all-srcs",
],
Expand Down
10 changes: 5 additions & 5 deletions pkg/controller/petset/BUILD → pkg/controller/statefulset/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ go_library(
"fakes.go",
"identity_mappers.go",
"iterator.go",
"pet.go",
"pet_set.go",
"pet_set_utils.go",
"stateful_set.go",
"stateful_set_utils.go",
"statefulpod.go",
],
tags = ["automanaged"],
deps = [
Expand Down Expand Up @@ -50,8 +50,8 @@ go_test(
srcs = [
"identity_mappers_test.go",
"iterator_test.go",
"pet_set_test.go",
"pet_test.go",
"stateful_set_test.go",
"statefulpod_test.go",
],
library = ":go_default_library",
tags = ["automanaged"],
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/

package petset
package statefulset

import (
"fmt"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/

package petset
package statefulset

import (
"crypto/md5"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/

package petset
package statefulset

import (
"fmt"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/

package petset
package statefulset

import (
"fmt"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/

package petset
package statefulset

import (
"fmt"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/

package petset
package statefulset

import (
"fmt"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/

package petset
package statefulset

import (
"fmt"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/

package petset
package statefulset

import (
"fmt"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/

package petset
package statefulset

import (
"fmt"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/

package petset
package statefulset

import (
"fmt"
Expand Down
4 changes: 2 additions & 2 deletions test/e2e/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ go_library(
"pd.go",
"persistent_volumes.go",
"persistent_volumes-disruptive.go",
"petset.go",
"pod_gc.go",
"pods.go",
"portforward.go",
Expand All @@ -100,6 +99,7 @@ go_library(
"service_latency.go",
"serviceloadbalancers.go",
"ssh.go",
"statefulset.go",
"third-party.go",
"ubernetes_lite.go",
"util_iperf.go",
Expand Down Expand Up @@ -145,9 +145,9 @@ go_library(
"//pkg/controller/deployment/util:go_default_library",
"//pkg/controller/endpoint:go_default_library",
"//pkg/controller/job:go_default_library",
"//pkg/controller/petset:go_default_library",
"//pkg/controller/replicaset:go_default_library",
"//pkg/controller/replication:go_default_library",
"//pkg/controller/statefulset:go_default_library",
"//pkg/fields:go_default_library",
"//pkg/kubectl:go_default_library",
"//pkg/kubectl/cmd/util:go_default_library",
Expand Down