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

Clean up petset #45445

Merged
merged 1 commit into from
May 8, 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 examples/storage/minio/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ spec:
ports:
- containerPort: 9000
hostPort: 9000
# These volume mounts are persistent. Each pod in the PetSet
# These volume mounts are persistent. Each pod in the Statefulset
# gets a volume mounted based on this field.
volumeMounts:
- name: data
Expand Down
2 changes: 1 addition & 1 deletion examples/storage/minio/minio-distributed-statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ spec:
ports:
- containerPort: 9000
hostPort: 9000
# These volume mounts are persistent. Each pod in the PetSet
# These volume mounts are persistent. Each pod in the StatefulSet
# gets a volume mounted based on this field.
volumeMounts:
- name: data
Expand Down
2 changes: 1 addition & 1 deletion pkg/registry/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ filegroup(
name = "all-srcs",
srcs = [
":package-srcs",
"//pkg/registry/apps/petset:all-srcs",
"//pkg/registry/apps/rest:all-srcs",
"//pkg/registry/apps/statefulset:all-srcs",
"//pkg/registry/authentication/rest:all-srcs",
"//pkg/registry/authentication/tokenreview:all-srcs",
"//pkg/registry/authorization/localsubjectaccessreview:all-srcs",
Expand Down
2 changes: 1 addition & 1 deletion pkg/registry/apps/rest/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ go_library(
"//pkg/api:go_default_library",
"//pkg/apis/apps:go_default_library",
"//pkg/apis/apps/v1beta1:go_default_library",
"//pkg/registry/apps/petset/storage:go_default_library",
"//pkg/registry/apps/statefulset/storage:go_default_library",
"//pkg/registry/extensions/deployment/storage:go_default_library",
"//vendor/k8s.io/apiserver/pkg/registry/generic:go_default_library",
"//vendor/k8s.io/apiserver/pkg/registry/rest:go_default_library",
Expand Down
2 changes: 1 addition & 1 deletion pkg/registry/apps/rest/storage_apps.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (
"k8s.io/kubernetes/pkg/api"
"k8s.io/kubernetes/pkg/apis/apps"
appsapiv1beta1 "k8s.io/kubernetes/pkg/apis/apps/v1beta1"
statefulsetstore "k8s.io/kubernetes/pkg/registry/apps/petset/storage"
statefulsetstore "k8s.io/kubernetes/pkg/registry/apps/statefulset/storage"
deploymentstore "k8s.io/kubernetes/pkg/registry/extensions/deployment/storage"
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ filegroup(
name = "all-srcs",
srcs = [
":package-srcs",
"//pkg/registry/apps/petset/storage:all-srcs",
"//pkg/registry/apps/statefulset/storage:all-srcs",
],
tags = ["automanaged"],
)
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ See the License for the specific language governing permissions and
limitations under the License.
*/

package petset // import "k8s.io/kubernetes/pkg/registry/apps/petset"
package statefulset // import "k8s.io/kubernetes/pkg/registry/apps/statefulset"
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ go_library(
deps = [
"//pkg/api:go_default_library",
"//pkg/apis/apps:go_default_library",
"//pkg/registry/apps/petset:go_default_library",
"//pkg/registry/apps/statefulset:go_default_library",
"//pkg/registry/cachesize:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import (
"k8s.io/apiserver/pkg/registry/rest"
"k8s.io/kubernetes/pkg/api"
appsapi "k8s.io/kubernetes/pkg/apis/apps"
"k8s.io/kubernetes/pkg/registry/apps/petset"
"k8s.io/kubernetes/pkg/registry/apps/statefulset"
"k8s.io/kubernetes/pkg/registry/cachesize"
)

Expand All @@ -40,21 +40,21 @@ func NewREST(optsGetter generic.RESTOptionsGetter) (*REST, *StatusREST) {
Copier: api.Scheme,
NewFunc: func() runtime.Object { return &appsapi.StatefulSet{} },
NewListFunc: func() runtime.Object { return &appsapi.StatefulSetList{} },
PredicateFunc: petset.MatchStatefulSet,
PredicateFunc: statefulset.MatchStatefulSet,
QualifiedResource: appsapi.Resource("statefulsets"),
WatchCacheSize: cachesize.GetWatchCacheSizeByResource("statefulsets"),

CreateStrategy: petset.Strategy,
UpdateStrategy: petset.Strategy,
DeleteStrategy: petset.Strategy,
CreateStrategy: statefulset.Strategy,
UpdateStrategy: statefulset.Strategy,
DeleteStrategy: statefulset.Strategy,
}
options := &generic.StoreOptions{RESTOptions: optsGetter, AttrFunc: petset.GetAttrs}
options := &generic.StoreOptions{RESTOptions: optsGetter, AttrFunc: statefulset.GetAttrs}
if err := store.CompleteWithOptions(options); err != nil {
panic(err) // TODO: Propagate error up
}

statusStore := *store
statusStore.UpdateStrategy = petset.StatusStrategy
statusStore.UpdateStrategy = statefulset.StatusStrategy
return &REST{store}, &StatusREST{store: &statusStore}
}

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 (
"testing"
Expand Down
2 changes: 1 addition & 1 deletion test/images/pets/redis/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Redis petset e2e tester
# Redis statefulset e2e tester

The image in this directory is the init container for contrib/pets/redis but for one difference, it bakes a specific version of redis into the base image so we get deterministic test results without having to depend on a redis download server. Discussing the tradeoffs to either approach (download the version at runtime, or maintain an image per version) are outside the scope of this document.

Expand Down
2 changes: 1 addition & 1 deletion test/images/pets/zookeeper/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Zookeeper petset e2e tester
# Zookeeper statefulset e2e tester

The image in this directory is the init container for contrib/pets/zookeeper but for one difference, it bakes a specific version of zookeeper into the base image so we get deterministic test results without having to depend on a zookeeper download server. Discussing the tradeoffs to either approach (download the version at runtime, or maintain an image per version) are outside the scope of this document.

Expand Down
4 changes: 2 additions & 2 deletions test/test_owners.csv
Original file line number Diff line number Diff line change
Expand Up @@ -769,8 +769,8 @@ k8s.io/kubernetes/pkg/proxy/util,knobunc,0,
k8s.io/kubernetes/pkg/proxy/winuserspace,jbhurat,0,
k8s.io/kubernetes/pkg/quota,sttts,1,
k8s.io/kubernetes/pkg/quota/evaluator/core,yifan-gu,1,
k8s.io/kubernetes/pkg/registry/apps/petset,kevin-wangzefeng,1,
k8s.io/kubernetes/pkg/registry/apps/petset/storage,jlowdermilk,1,
k8s.io/kubernetes/pkg/registry/apps/statefulset,kevin-wangzefeng,1,
k8s.io/kubernetes/pkg/registry/apps/statefulset/storage,jlowdermilk,1,
k8s.io/kubernetes/pkg/registry/authorization/subjectaccessreview,liggitt,1,
k8s.io/kubernetes/pkg/registry/authorization/util,liggitt,1,
k8s.io/kubernetes/pkg/registry/autoscaling/horizontalpodautoscaler,bgrant0607,1,
Expand Down