mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-28 05:57:25 +00:00
Merge pull request #64288 from gnufied/take-volume-resize-beta
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>. Move volume resize feature to beta Move volume resizing feature to beta. xref https://github.com/kubernetes/features/issues/284 ```release-note Move Volume expansion to Beta ```
This commit is contained in:
commit
9872a0502b
@ -95,7 +95,7 @@ const (
|
|||||||
LocalStorageCapacityIsolation utilfeature.Feature = "LocalStorageCapacityIsolation"
|
LocalStorageCapacityIsolation utilfeature.Feature = "LocalStorageCapacityIsolation"
|
||||||
|
|
||||||
// owner: @gnufied
|
// owner: @gnufied
|
||||||
// alpha: v1.8
|
// beta: v1.11
|
||||||
// Ability to Expand persistent volumes
|
// Ability to Expand persistent volumes
|
||||||
ExpandPersistentVolumes utilfeature.Feature = "ExpandPersistentVolumes"
|
ExpandPersistentVolumes utilfeature.Feature = "ExpandPersistentVolumes"
|
||||||
|
|
||||||
@ -314,7 +314,7 @@ var defaultKubernetesFeatureGates = map[utilfeature.Feature]utilfeature.FeatureS
|
|||||||
TaintNodesByCondition: {Default: false, PreRelease: utilfeature.Alpha},
|
TaintNodesByCondition: {Default: false, PreRelease: utilfeature.Alpha},
|
||||||
MountPropagation: {Default: true, PreRelease: utilfeature.Beta},
|
MountPropagation: {Default: true, PreRelease: utilfeature.Beta},
|
||||||
QOSReserved: {Default: false, PreRelease: utilfeature.Alpha},
|
QOSReserved: {Default: false, PreRelease: utilfeature.Alpha},
|
||||||
ExpandPersistentVolumes: {Default: false, PreRelease: utilfeature.Alpha},
|
ExpandPersistentVolumes: {Default: true, PreRelease: utilfeature.Beta},
|
||||||
CPUManager: {Default: true, PreRelease: utilfeature.Beta},
|
CPUManager: {Default: true, PreRelease: utilfeature.Beta},
|
||||||
ServiceNodeExclusion: {Default: false, PreRelease: utilfeature.Alpha},
|
ServiceNodeExclusion: {Default: false, PreRelease: utilfeature.Alpha},
|
||||||
MountContainers: {Default: false, PreRelease: utilfeature.Alpha},
|
MountContainers: {Default: false, PreRelease: utilfeature.Alpha},
|
||||||
|
@ -133,6 +133,7 @@ func DefaultOffAdmissionPlugins() sets.String {
|
|||||||
serviceaccount.PluginName, //ServiceAccount
|
serviceaccount.PluginName, //ServiceAccount
|
||||||
label.PluginName, //PersistentVolumeLabel
|
label.PluginName, //PersistentVolumeLabel
|
||||||
setdefault.PluginName, //DefaultStorageClass
|
setdefault.PluginName, //DefaultStorageClass
|
||||||
|
resize.PluginName, //PersistentVolumeClaimResize
|
||||||
defaulttolerationseconds.PluginName, //DefaultTolerationSeconds
|
defaulttolerationseconds.PluginName, //DefaultTolerationSeconds
|
||||||
mutatingwebhook.PluginName, //MutatingAdmissionWebhook
|
mutatingwebhook.PluginName, //MutatingAdmissionWebhook
|
||||||
validatingwebhook.PluginName, //ValidatingAdmissionWebhook
|
validatingwebhook.PluginName, //ValidatingAdmissionWebhook
|
||||||
|
@ -1136,6 +1136,14 @@ items:
|
|||||||
- get
|
- get
|
||||||
- list
|
- list
|
||||||
- watch
|
- watch
|
||||||
|
- apiGroups:
|
||||||
|
- ""
|
||||||
|
resources:
|
||||||
|
- persistentvolumeclaims/status
|
||||||
|
verbs:
|
||||||
|
- get
|
||||||
|
- patch
|
||||||
|
- update
|
||||||
- apiGroups:
|
- apiGroups:
|
||||||
- storage.k8s.io
|
- storage.k8s.io
|
||||||
resources:
|
resources:
|
||||||
|
@ -136,6 +136,23 @@ items:
|
|||||||
- kind: ServiceAccount
|
- kind: ServiceAccount
|
||||||
name: endpoint-controller
|
name: endpoint-controller
|
||||||
namespace: kube-system
|
namespace: kube-system
|
||||||
|
- apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
kind: ClusterRoleBinding
|
||||||
|
metadata:
|
||||||
|
annotations:
|
||||||
|
rbac.authorization.kubernetes.io/autoupdate: "true"
|
||||||
|
creationTimestamp: null
|
||||||
|
labels:
|
||||||
|
kubernetes.io/bootstrapping: rbac-defaults
|
||||||
|
name: system:controller:expand-controller
|
||||||
|
roleRef:
|
||||||
|
apiGroup: rbac.authorization.k8s.io
|
||||||
|
kind: ClusterRole
|
||||||
|
name: system:controller:expand-controller
|
||||||
|
subjects:
|
||||||
|
- kind: ServiceAccount
|
||||||
|
name: expand-controller
|
||||||
|
namespace: kube-system
|
||||||
- apiVersion: rbac.authorization.k8s.io/v1
|
- apiVersion: rbac.authorization.k8s.io/v1
|
||||||
kind: ClusterRoleBinding
|
kind: ClusterRoleBinding
|
||||||
metadata:
|
metadata:
|
||||||
|
@ -425,6 +425,70 @@ items:
|
|||||||
- create
|
- create
|
||||||
- patch
|
- patch
|
||||||
- update
|
- update
|
||||||
|
- apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
kind: ClusterRole
|
||||||
|
metadata:
|
||||||
|
annotations:
|
||||||
|
rbac.authorization.kubernetes.io/autoupdate: "true"
|
||||||
|
creationTimestamp: null
|
||||||
|
labels:
|
||||||
|
kubernetes.io/bootstrapping: rbac-defaults
|
||||||
|
name: system:controller:expand-controller
|
||||||
|
rules:
|
||||||
|
- apiGroups:
|
||||||
|
- ""
|
||||||
|
resources:
|
||||||
|
- persistentvolumes
|
||||||
|
verbs:
|
||||||
|
- get
|
||||||
|
- list
|
||||||
|
- patch
|
||||||
|
- update
|
||||||
|
- watch
|
||||||
|
- apiGroups:
|
||||||
|
- ""
|
||||||
|
resources:
|
||||||
|
- persistentvolumeclaims/status
|
||||||
|
verbs:
|
||||||
|
- patch
|
||||||
|
- update
|
||||||
|
- apiGroups:
|
||||||
|
- ""
|
||||||
|
resources:
|
||||||
|
- persistentvolumeclaims
|
||||||
|
verbs:
|
||||||
|
- get
|
||||||
|
- list
|
||||||
|
- watch
|
||||||
|
- apiGroups:
|
||||||
|
- storage.k8s.io
|
||||||
|
resources:
|
||||||
|
- storageclasses
|
||||||
|
verbs:
|
||||||
|
- get
|
||||||
|
- list
|
||||||
|
- watch
|
||||||
|
- apiGroups:
|
||||||
|
- ""
|
||||||
|
resources:
|
||||||
|
- endpoints
|
||||||
|
- services
|
||||||
|
verbs:
|
||||||
|
- get
|
||||||
|
- apiGroups:
|
||||||
|
- ""
|
||||||
|
resources:
|
||||||
|
- secrets
|
||||||
|
verbs:
|
||||||
|
- get
|
||||||
|
- apiGroups:
|
||||||
|
- ""
|
||||||
|
resources:
|
||||||
|
- events
|
||||||
|
verbs:
|
||||||
|
- create
|
||||||
|
- patch
|
||||||
|
- update
|
||||||
- apiVersion: rbac.authorization.k8s.io/v1
|
- apiVersion: rbac.authorization.k8s.io/v1
|
||||||
kind: ClusterRole
|
kind: ClusterRole
|
||||||
metadata:
|
metadata:
|
||||||
|
@ -243,6 +243,9 @@ func MakeDeployment(replicas int32, podLabels map[string]string, nodeSelector ma
|
|||||||
},
|
},
|
||||||
Spec: apps.DeploymentSpec{
|
Spec: apps.DeploymentSpec{
|
||||||
Replicas: &replicas,
|
Replicas: &replicas,
|
||||||
|
Selector: &metav1.LabelSelector{
|
||||||
|
MatchLabels: podLabels,
|
||||||
|
},
|
||||||
Template: v1.PodTemplateSpec{
|
Template: v1.PodTemplateSpec{
|
||||||
ObjectMeta: metav1.ObjectMeta{
|
ObjectMeta: metav1.ObjectMeta{
|
||||||
Labels: podLabels,
|
Labels: podLabels,
|
||||||
|
@ -34,7 +34,7 @@ import (
|
|||||||
"k8s.io/kubernetes/test/e2e/storage/utils"
|
"k8s.io/kubernetes/test/e2e/storage/utils"
|
||||||
)
|
)
|
||||||
|
|
||||||
var _ = utils.SIGDescribe("Mounted volume expand [Feature:ExpandPersistentVolumes] [Slow]", func() {
|
var _ = utils.SIGDescribe("Mounted volume expand[Slow]", func() {
|
||||||
var (
|
var (
|
||||||
c clientset.Interface
|
c clientset.Interface
|
||||||
ns string
|
ns string
|
||||||
@ -113,6 +113,7 @@ var _ = utils.SIGDescribe("Mounted volume expand [Feature:ExpandPersistentVolume
|
|||||||
|
|
||||||
By("Creating a deployment with the provisioned volume")
|
By("Creating a deployment with the provisioned volume")
|
||||||
deployment, err := framework.CreateDeployment(c, int32(1), map[string]string{"test": "app"}, nodeKeyValueLabel, ns, pvcClaims, "")
|
deployment, err := framework.CreateDeployment(c, int32(1), map[string]string{"test": "app"}, nodeKeyValueLabel, ns, pvcClaims, "")
|
||||||
|
Expect(err).NotTo(HaveOccurred(), "Failed creating deployment %v", err)
|
||||||
defer c.AppsV1().Deployments(ns).Delete(deployment.Name, &metav1.DeleteOptions{})
|
defer c.AppsV1().Deployments(ns).Delete(deployment.Name, &metav1.DeleteOptions{})
|
||||||
|
|
||||||
By("Expanding current pvc")
|
By("Expanding current pvc")
|
||||||
|
@ -39,7 +39,7 @@ const (
|
|||||||
totalResizeWaitPeriod = 20 * time.Minute
|
totalResizeWaitPeriod = 20 * time.Minute
|
||||||
)
|
)
|
||||||
|
|
||||||
var _ = utils.SIGDescribe("Volume expand [Feature:ExpandPersistentVolumes] [Slow]", func() {
|
var _ = utils.SIGDescribe("Volume expand [Slow]", func() {
|
||||||
var (
|
var (
|
||||||
c clientset.Interface
|
c clientset.Interface
|
||||||
ns string
|
ns string
|
||||||
|
Loading…
Reference in New Issue
Block a user