Merge pull request #35663 from janetkuo/statefulset

Automatic merge from submit-queue

Rename PetSet to StatefulSet

<!--  Thanks for sending a pull request!  Here are some tips for you:
1. If this is your first time, read our contributor guidelines https://github.com/kubernetes/kubernetes/blob/master/CONTRIBUTING.md and developer guide https://github.com/kubernetes/kubernetes/blob/master/docs/devel/development.md
2. If you want *faster* PR reviews, read how: https://github.com/kubernetes/kubernetes/blob/master/docs/devel/faster_reviews.md
3. Follow the instructions for writing a release note: https://github.com/kubernetes/kubernetes/blob/master/docs/devel/pull-requests.md#release-notes
-->

**What this PR does / why we need it**: #35534

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, #<issue_number>, ...)` format, will close that issue when PR gets merged)*: 

**Special notes for your reviewer**: cc @erictune @foxish @kubernetes/sig-apps @ymqytw 

**Release note**:
<!--  Steps to write your release note:
1. Use the release-note-* labels to set the release note state (if you have access) 
2. Enter your extended release note in the below block; leaving it blank means using the PR title as the release note. If no release note is required, just write `NONE`. 
-->
```release-note
```
This commit is contained in:
Kubernetes Submit Queue
2016-10-27 20:16:50 -07:00
committed by GitHub
91 changed files with 2233 additions and 2535 deletions

View File

@@ -29,10 +29,10 @@ import (
)
var OpenAPIDefinitions *common.OpenAPIDefinitions = &common.OpenAPIDefinitions{
"apps.PetSet": {
"apps.StatefulSet": {
Schema: spec.Schema{
SchemaProps: spec.SchemaProps{
Description: "PetSet represents a set of pods with consistent identities. Identities are defined as:\n - Network: A single stable DNS and hostname.\n - Storage: As many VolumeClaims as requested.\nThe PetSet guarantees that a given network identity will always map to the same storage identity. PetSet is currently in alpha and and subject to change without notice.",
Description: "StatefulSet represents a set of pods with consistent identities. Identities are defined as:\n - Network: A single stable DNS and hostname.\n - Storage: As many VolumeClaims as requested.\nThe StatefulSet guarantees that a given network identity will always map to the same storage identity. StatefulSet is currently in alpha and and subject to change without notice.",
Properties: map[string]spec.Schema{
"metadata": {
SchemaProps: spec.SchemaProps{
@@ -41,26 +41,26 @@ var OpenAPIDefinitions *common.OpenAPIDefinitions = &common.OpenAPIDefinitions{
},
"spec": {
SchemaProps: spec.SchemaProps{
Description: "Spec defines the desired identities of pets in this set.",
Ref: spec.MustCreateRef("#/definitions/apps.PetSetSpec"),
Description: "Spec defines the desired identities of pods in this set.",
Ref: spec.MustCreateRef("#/definitions/apps.StatefulSetSpec"),
},
},
"status": {
SchemaProps: spec.SchemaProps{
Description: "Status is the current status of Pets in this PetSet. This data may be out of date by some window of time.",
Ref: spec.MustCreateRef("#/definitions/apps.PetSetStatus"),
Description: "Status is the current status of Pods in this StatefulSet. This data may be out of date by some window of time.",
Ref: spec.MustCreateRef("#/definitions/apps.StatefulSetStatus"),
},
},
},
},
},
Dependencies: []string{
"api.ObjectMeta", "apps.PetSetSpec", "apps.PetSetStatus"},
"api.ObjectMeta", "apps.StatefulSetSpec", "apps.StatefulSetStatus"},
},
"apps.PetSetList": {
"apps.StatefulSetList": {
Schema: spec.Schema{
SchemaProps: spec.SchemaProps{
Description: "PetSetList is a collection of PetSets.",
Description: "StatefulSetList is a collection of StatefulSets.",
Properties: map[string]spec.Schema{
"metadata": {
SchemaProps: spec.SchemaProps{
@@ -73,7 +73,7 @@ var OpenAPIDefinitions *common.OpenAPIDefinitions = &common.OpenAPIDefinitions{
Items: &spec.SchemaOrArray{
Schema: &spec.Schema{
SchemaProps: spec.SchemaProps{
Ref: spec.MustCreateRef("#/definitions/apps.PetSet"),
Ref: spec.MustCreateRef("#/definitions/apps.StatefulSet"),
},
},
},
@@ -84,12 +84,12 @@ var OpenAPIDefinitions *common.OpenAPIDefinitions = &common.OpenAPIDefinitions{
},
},
Dependencies: []string{
"apps.PetSet", "unversioned.ListMeta"},
"apps.StatefulSet", "unversioned.ListMeta"},
},
"apps.PetSetSpec": {
"apps.StatefulSetSpec": {
Schema: spec.Schema{
SchemaProps: spec.SchemaProps{
Description: "A PetSetSpec is the specification of a PetSet.",
Description: "A StatefulSetSpec is the specification of a StatefulSet.",
Properties: map[string]spec.Schema{
"replicas": {
SchemaProps: spec.SchemaProps{
@@ -106,13 +106,13 @@ var OpenAPIDefinitions *common.OpenAPIDefinitions = &common.OpenAPIDefinitions{
},
"template": {
SchemaProps: spec.SchemaProps{
Description: "Template is the object that describes the pod that will be created if insufficient replicas are detected. Each pod stamped out by the PetSet will fulfill this Template, but have a unique identity from the rest of the PetSet.",
Description: "Template is the object that describes the pod that will be created if insufficient replicas are detected. Each pod stamped out by the StatefulSet will fulfill this Template, but have a unique identity from the rest of the StatefulSet.",
Ref: spec.MustCreateRef("#/definitions/api.PodTemplateSpec"),
},
},
"volumeClaimTemplates": {
SchemaProps: spec.SchemaProps{
Description: "VolumeClaimTemplates is a list of claims that pets are allowed to reference. The PetSet controller is responsible for mapping network identities to claims in a way that maintains the identity of a pet. Every claim in this list must have at least one matching (by name) volumeMount in one container in the template. A claim in this list takes precedence over any volumes in the template, with the same name.",
Description: "VolumeClaimTemplates is a list of claims that pods are allowed to reference. The StatefulSet controller is responsible for mapping network identities to claims in a way that maintains the identity of a pod. Every claim in this list must have at least one matching (by name) volumeMount in one container in the template. A claim in this list takes precedence over any volumes in the template, with the same name.",
Type: []string{"array"},
Items: &spec.SchemaOrArray{
Schema: &spec.Schema{
@@ -125,7 +125,7 @@ var OpenAPIDefinitions *common.OpenAPIDefinitions = &common.OpenAPIDefinitions{
},
"serviceName": {
SchemaProps: spec.SchemaProps{
Description: "ServiceName is the name of the service that governs this PetSet. This service must exist before the PetSet, and is responsible for the network identity of the set. Pets get DNS/hostnames that follow the pattern: pet-specific-string.serviceName.default.svc.cluster.local where \"pet-specific-string\" is managed by the PetSet controller.",
Description: "ServiceName is the name of the service that governs this StatefulSet. This service must exist before the StatefulSet, and is responsible for the network identity of the set. Pods get DNS/hostnames that follow the pattern: pod-specific-string.serviceName.default.svc.cluster.local where \"pod-specific-string\" is managed by the StatefulSet controller.",
Type: []string{"string"},
Format: "",
},
@@ -137,10 +137,10 @@ var OpenAPIDefinitions *common.OpenAPIDefinitions = &common.OpenAPIDefinitions{
Dependencies: []string{
"api.PersistentVolumeClaim", "api.PodTemplateSpec", "unversioned.LabelSelector"},
},
"apps.PetSetStatus": {
"apps.StatefulSetStatus": {
Schema: spec.Schema{
SchemaProps: spec.SchemaProps{
Description: "PetSetStatus represents the current state of a PetSet.",
Description: "StatefulSetStatus represents the current state of a StatefulSet.",
Properties: map[string]spec.Schema{
"observedGeneration": {
SchemaProps: spec.SchemaProps{
@@ -14829,139 +14829,6 @@ var OpenAPIDefinitions *common.OpenAPIDefinitions = &common.OpenAPIDefinitions{
Dependencies: []string{
"unversioned.Duration"},
},
"v1alpha1.PetSet": {
Schema: spec.Schema{
SchemaProps: spec.SchemaProps{
Description: "PetSet represents a set of pods with consistent identities. Identities are defined as:\n - Network: A single stable DNS and hostname.\n - Storage: As many VolumeClaims as requested.\nThe PetSet guarantees that a given network identity will always map to the same storage identity. PetSet is currently in alpha and subject to change without notice.",
Properties: map[string]spec.Schema{
"metadata": {
SchemaProps: spec.SchemaProps{
Ref: spec.MustCreateRef("#/definitions/v1.ObjectMeta"),
},
},
"spec": {
SchemaProps: spec.SchemaProps{
Description: "Spec defines the desired identities of pets in this set.",
Ref: spec.MustCreateRef("#/definitions/v1alpha1.PetSetSpec"),
},
},
"status": {
SchemaProps: spec.SchemaProps{
Description: "Status is the current status of Pets in this PetSet. This data may be out of date by some window of time.",
Ref: spec.MustCreateRef("#/definitions/v1alpha1.PetSetStatus"),
},
},
},
},
},
Dependencies: []string{
"v1.ObjectMeta", "v1alpha1.PetSetSpec", "v1alpha1.PetSetStatus"},
},
"v1alpha1.PetSetList": {
Schema: spec.Schema{
SchemaProps: spec.SchemaProps{
Description: "PetSetList is a collection of PetSets.",
Properties: map[string]spec.Schema{
"metadata": {
SchemaProps: spec.SchemaProps{
Ref: spec.MustCreateRef("#/definitions/unversioned.ListMeta"),
},
},
"items": {
SchemaProps: spec.SchemaProps{
Type: []string{"array"},
Items: &spec.SchemaOrArray{
Schema: &spec.Schema{
SchemaProps: spec.SchemaProps{
Ref: spec.MustCreateRef("#/definitions/v1alpha1.PetSet"),
},
},
},
},
},
},
Required: []string{"items"},
},
},
Dependencies: []string{
"unversioned.ListMeta", "v1alpha1.PetSet"},
},
"v1alpha1.PetSetSpec": {
Schema: spec.Schema{
SchemaProps: spec.SchemaProps{
Description: "A PetSetSpec is the specification of a PetSet.",
Properties: map[string]spec.Schema{
"replicas": {
SchemaProps: spec.SchemaProps{
Description: "Replicas is the desired number of replicas of the given Template. These are replicas in the sense that they are instantiations of the same Template, but individual replicas also have a consistent identity. If unspecified, defaults to 1.",
Type: []string{"integer"},
Format: "int32",
},
},
"selector": {
SchemaProps: spec.SchemaProps{
Description: "Selector is a label query over pods that should match the replica count. If empty, defaulted to labels on the pod template. More info: http://kubernetes.io/docs/user-guide/labels#label-selectors",
Ref: spec.MustCreateRef("#/definitions/unversioned.LabelSelector"),
},
},
"template": {
SchemaProps: spec.SchemaProps{
Description: "Template is the object that describes the pod that will be created if insufficient replicas are detected. Each pod stamped out by the PetSet will fulfill this Template, but have a unique identity from the rest of the PetSet.",
Ref: spec.MustCreateRef("#/definitions/v1.PodTemplateSpec"),
},
},
"volumeClaimTemplates": {
SchemaProps: spec.SchemaProps{
Description: "VolumeClaimTemplates is a list of claims that pets are allowed to reference. The PetSet controller is responsible for mapping network identities to claims in a way that maintains the identity of a pet. Every claim in this list must have at least one matching (by name) volumeMount in one container in the template. A claim in this list takes precedence over any volumes in the template, with the same name.",
Type: []string{"array"},
Items: &spec.SchemaOrArray{
Schema: &spec.Schema{
SchemaProps: spec.SchemaProps{
Ref: spec.MustCreateRef("#/definitions/v1.PersistentVolumeClaim"),
},
},
},
},
},
"serviceName": {
SchemaProps: spec.SchemaProps{
Description: "ServiceName is the name of the service that governs this PetSet. This service must exist before the PetSet, and is responsible for the network identity of the set. Pets get DNS/hostnames that follow the pattern: pet-specific-string.serviceName.default.svc.cluster.local where \"pet-specific-string\" is managed by the PetSet controller.",
Type: []string{"string"},
Format: "",
},
},
},
Required: []string{"template", "serviceName"},
},
},
Dependencies: []string{
"unversioned.LabelSelector", "v1.PersistentVolumeClaim", "v1.PodTemplateSpec"},
},
"v1alpha1.PetSetStatus": {
Schema: spec.Schema{
SchemaProps: spec.SchemaProps{
Description: "PetSetStatus represents the current state of a PetSet.",
Properties: map[string]spec.Schema{
"observedGeneration": {
SchemaProps: spec.SchemaProps{
Description: "most recent generation observed by this autoscaler.",
Type: []string{"integer"},
Format: "int64",
},
},
"replicas": {
SchemaProps: spec.SchemaProps{
Description: "Replicas is the number of actual replicas.",
Type: []string{"integer"},
Format: "int32",
},
},
},
Required: []string{"replicas"},
},
},
Dependencies: []string{},
},
"v1alpha1.PodDisruptionBudget": {
Schema: spec.Schema{
SchemaProps: spec.SchemaProps{
@@ -15331,6 +15198,139 @@ var OpenAPIDefinitions *common.OpenAPIDefinitions = &common.OpenAPIDefinitions{
},
Dependencies: []string{},
},
"v1alpha1.StatefulSet": {
Schema: spec.Schema{
SchemaProps: spec.SchemaProps{
Description: "StatefulSet represents a set of pods with consistent identities. Identities are defined as:\n - Network: A single stable DNS and hostname.\n - Storage: As many VolumeClaims as requested.\nThe StatefulSet guarantees that a given network identity will always map to the same storage identity. StatefulSet is currently in alpha and subject to change without notice.",
Properties: map[string]spec.Schema{
"metadata": {
SchemaProps: spec.SchemaProps{
Ref: spec.MustCreateRef("#/definitions/v1.ObjectMeta"),
},
},
"spec": {
SchemaProps: spec.SchemaProps{
Description: "Spec defines the desired identities of pods in this set.",
Ref: spec.MustCreateRef("#/definitions/v1alpha1.StatefulSetSpec"),
},
},
"status": {
SchemaProps: spec.SchemaProps{
Description: "Status is the current status of Pods in this StatefulSet. This data may be out of date by some window of time.",
Ref: spec.MustCreateRef("#/definitions/v1alpha1.StatefulSetStatus"),
},
},
},
},
},
Dependencies: []string{
"v1.ObjectMeta", "v1alpha1.StatefulSetSpec", "v1alpha1.StatefulSetStatus"},
},
"v1alpha1.StatefulSetList": {
Schema: spec.Schema{
SchemaProps: spec.SchemaProps{
Description: "StatefulSetList is a collection of StatefulSets.",
Properties: map[string]spec.Schema{
"metadata": {
SchemaProps: spec.SchemaProps{
Ref: spec.MustCreateRef("#/definitions/unversioned.ListMeta"),
},
},
"items": {
SchemaProps: spec.SchemaProps{
Type: []string{"array"},
Items: &spec.SchemaOrArray{
Schema: &spec.Schema{
SchemaProps: spec.SchemaProps{
Ref: spec.MustCreateRef("#/definitions/v1alpha1.StatefulSet"),
},
},
},
},
},
},
Required: []string{"items"},
},
},
Dependencies: []string{
"unversioned.ListMeta", "v1alpha1.StatefulSet"},
},
"v1alpha1.StatefulSetSpec": {
Schema: spec.Schema{
SchemaProps: spec.SchemaProps{
Description: "A StatefulSetSpec is the specification of a StatefulSet.",
Properties: map[string]spec.Schema{
"replicas": {
SchemaProps: spec.SchemaProps{
Description: "Replicas is the desired number of replicas of the given Template. These are replicas in the sense that they are instantiations of the same Template, but individual replicas also have a consistent identity. If unspecified, defaults to 1.",
Type: []string{"integer"},
Format: "int32",
},
},
"selector": {
SchemaProps: spec.SchemaProps{
Description: "Selector is a label query over pods that should match the replica count. If empty, defaulted to labels on the pod template. More info: http://kubernetes.io/docs/user-guide/labels#label-selectors",
Ref: spec.MustCreateRef("#/definitions/unversioned.LabelSelector"),
},
},
"template": {
SchemaProps: spec.SchemaProps{
Description: "Template is the object that describes the pod that will be created if insufficient replicas are detected. Each pod stamped out by the StatefulSet will fulfill this Template, but have a unique identity from the rest of the StatefulSet.",
Ref: spec.MustCreateRef("#/definitions/v1.PodTemplateSpec"),
},
},
"volumeClaimTemplates": {
SchemaProps: spec.SchemaProps{
Description: "VolumeClaimTemplates is a list of claims that pods are allowed to reference. The StatefulSet controller is responsible for mapping network identities to claims in a way that maintains the identity of a pod. Every claim in this list must have at least one matching (by name) volumeMount in one container in the template. A claim in this list takes precedence over any volumes in the template, with the same name.",
Type: []string{"array"},
Items: &spec.SchemaOrArray{
Schema: &spec.Schema{
SchemaProps: spec.SchemaProps{
Ref: spec.MustCreateRef("#/definitions/v1.PersistentVolumeClaim"),
},
},
},
},
},
"serviceName": {
SchemaProps: spec.SchemaProps{
Description: "ServiceName is the name of the service that governs this StatefulSet. This service must exist before the StatefulSet, and is responsible for the network identity of the set. Pods get DNS/hostnames that follow the pattern: pod-specific-string.serviceName.default.svc.cluster.local where \"pod-specific-string\" is managed by the StatefulSet controller.",
Type: []string{"string"},
Format: "",
},
},
},
Required: []string{"template", "serviceName"},
},
},
Dependencies: []string{
"unversioned.LabelSelector", "v1.PersistentVolumeClaim", "v1.PodTemplateSpec"},
},
"v1alpha1.StatefulSetStatus": {
Schema: spec.Schema{
SchemaProps: spec.SchemaProps{
Description: "StatefulSetStatus represents the current state of a StatefulSet.",
Properties: map[string]spec.Schema{
"observedGeneration": {
SchemaProps: spec.SchemaProps{
Description: "most recent generation observed by this autoscaler.",
Type: []string{"integer"},
Format: "int64",
},
},
"replicas": {
SchemaProps: spec.SchemaProps{
Description: "Replicas is the number of actual replicas.",
Type: []string{"integer"},
Format: "int32",
},
},
},
Required: []string{"replicas"},
},
},
Dependencies: []string{},
},
"v1alpha1.Subject": {
Schema: spec.Schema{
SchemaProps: spec.SchemaProps{