Skip to content

Commit

Permalink
Merge pull request #45867 from kow3ns/controller-history
Browse files Browse the repository at this point in the history
Automatic merge from submit-queue (batch tested with PRs 46429, 46308, 46395, 45867, 45492)

Controller history

**What this PR does / why we need it**:
Implements the ControllerRevision API object and clientset to allow for the implementation of StatefulSet update and DaemonSet history

```release-note
ControllerRevision type added for StatefulSet and DaemonSet history.
```
  • Loading branch information
Kubernetes Submit Queue authored May 26, 2017
2 parents 07038c9 + ba128e6 commit 7d37a26
Show file tree
Hide file tree
Showing 83 changed files with 10,123 additions and 1,052 deletions.
1,114 changes: 1,014 additions & 100 deletions api/openapi-spec/swagger.json

Large diffs are not rendered by default.

1,089 changes: 1,004 additions & 85 deletions api/swagger-spec/apps_v1beta1.json

Large diffs are not rendered by default.

243 changes: 183 additions & 60 deletions docs/api-reference/apps/v1beta1/definitions.html

Large diffs are not rendered by default.

2,575 changes: 2,108 additions & 467 deletions docs/api-reference/apps/v1beta1/operations.html

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions hack/.linted_packages
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,7 @@ pkg/proxy/healthcheck
pkg/quota
pkg/quota/install
pkg/registry
pkg/registry/apps/controllerrevision/storage
pkg/registry/authorization/util
pkg/registry/core/configmap/storage
pkg/registry/core/endpoint
Expand Down
2 changes: 2 additions & 0 deletions pkg/apis/apps/register.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ func addKnownTypes(scheme *runtime.Scheme) error {
&extensions.Scale{},
&StatefulSet{},
&StatefulSetList{},
&ControllerRevision{},
&ControllerRevisionList{},
)
return nil
}
33 changes: 33 additions & 0 deletions pkg/apis/apps/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ package apps

import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/kubernetes/pkg/api"
)

Expand Down Expand Up @@ -127,3 +128,35 @@ type StatefulSetList struct {
metav1.ListMeta
Items []StatefulSet
}

// +genclient=true

// ControllerRevision implements an immutable snapshot of state data. Clients
// are responsible for serializing and deserializing the objects that contain
// their internal state.
// Once a ControllerRevision has been successfully created, it can not be updated.
// The API Server will fail validation of all requests that attempt to mutate
// the Data field. ControllerRevisions may, however, be deleted.
type ControllerRevision struct {
metav1.TypeMeta
// Standard object's metadata.
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
// +optional
metav1.ObjectMeta

// Data is the Object representing the state.
Data runtime.Object

// Revision indicates the revision of the state represented by Data.
Revision int64
}

// ControllerRevisionList is a resource containing a list of ControllerRevision objects.
type ControllerRevisionList struct {
metav1.TypeMeta
// +optional
metav1.ListMeta

// Items is the list of ControllerRevision objects.
Items []ControllerRevision
}
Loading

0 comments on commit 7d37a26

Please sign in to comment.