mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-30 15:05:27 +00:00
Merge pull request #76546 from HotelsDotCom/kep/VolumeSubpathEnvExpansion-Beta
Beta upgrade for feature gate VolumeSubpathEnvExpansion
This commit is contained in:
commit
f3ec8f0d99
2
api/openapi-spec/swagger.json
generated
2
api/openapi-spec/swagger.json
generated
@ -11122,7 +11122,7 @@
|
|||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
"subPathExpr": {
|
"subPathExpr": {
|
||||||
"description": "Expanded path within the volume from which the container's volume should be mounted. Behaves similarly to SubPath but environment variable references $(VAR_NAME) are expanded using the container's environment. Defaults to \"\" (volume's root). SubPathExpr and SubPath are mutually exclusive. This field is alpha in 1.14.",
|
"description": "Expanded path within the volume from which the container's volume should be mounted. Behaves similarly to SubPath but environment variable references $(VAR_NAME) are expanded using the container's environment. Defaults to \"\" (volume's root). SubPathExpr and SubPath are mutually exclusive. This field is beta in 1.15.",
|
||||||
"type": "string"
|
"type": "string"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -1683,7 +1683,7 @@ type VolumeMount struct {
|
|||||||
// Behaves similarly to SubPath but environment variable references $(VAR_NAME) are expanded using the container's environment.
|
// Behaves similarly to SubPath but environment variable references $(VAR_NAME) are expanded using the container's environment.
|
||||||
// Defaults to "" (volume's root).
|
// Defaults to "" (volume's root).
|
||||||
// SubPathExpr and SubPath are mutually exclusive.
|
// SubPathExpr and SubPath are mutually exclusive.
|
||||||
// This field is alpha in 1.14.
|
// This field is beta in 1.15.
|
||||||
// +optional
|
// +optional
|
||||||
SubPathExpr string
|
SubPathExpr string
|
||||||
}
|
}
|
||||||
|
@ -322,7 +322,7 @@ const (
|
|||||||
PodReadinessGates utilfeature.Feature = "PodReadinessGates"
|
PodReadinessGates utilfeature.Feature = "PodReadinessGates"
|
||||||
|
|
||||||
// owner: @kevtaylor
|
// owner: @kevtaylor
|
||||||
// alpha: v1.11
|
// beta: v1.15
|
||||||
//
|
//
|
||||||
// Allow subpath environment variable substitution
|
// Allow subpath environment variable substitution
|
||||||
// Only applicable if the VolumeSubpath feature is also enabled
|
// Only applicable if the VolumeSubpath feature is also enabled
|
||||||
@ -495,7 +495,7 @@ var defaultKubernetesFeatureGates = map[utilfeature.Feature]utilfeature.FeatureS
|
|||||||
VolumeSubpath: {Default: true, PreRelease: utilfeature.GA},
|
VolumeSubpath: {Default: true, PreRelease: utilfeature.GA},
|
||||||
BalanceAttachedNodeVolumes: {Default: false, PreRelease: utilfeature.Alpha},
|
BalanceAttachedNodeVolumes: {Default: false, PreRelease: utilfeature.Alpha},
|
||||||
PodReadinessGates: {Default: true, PreRelease: utilfeature.GA, LockToDefault: true}, // remove in 1.16
|
PodReadinessGates: {Default: true, PreRelease: utilfeature.GA, LockToDefault: true}, // remove in 1.16
|
||||||
VolumeSubpathEnvExpansion: {Default: false, PreRelease: utilfeature.Alpha},
|
VolumeSubpathEnvExpansion: {Default: true, PreRelease: utilfeature.Beta},
|
||||||
KubeletPluginsWatcher: {Default: true, PreRelease: utilfeature.GA, LockToDefault: true}, // remove in 1.16
|
KubeletPluginsWatcher: {Default: true, PreRelease: utilfeature.GA, LockToDefault: true}, // remove in 1.16
|
||||||
ResourceQuotaScopeSelectors: {Default: true, PreRelease: utilfeature.Beta},
|
ResourceQuotaScopeSelectors: {Default: true, PreRelease: utilfeature.Beta},
|
||||||
CSIBlockVolume: {Default: true, PreRelease: utilfeature.Beta},
|
CSIBlockVolume: {Default: true, PreRelease: utilfeature.Beta},
|
||||||
|
@ -4644,7 +4644,7 @@ message VolumeMount {
|
|||||||
// Behaves similarly to SubPath but environment variable references $(VAR_NAME) are expanded using the container's environment.
|
// Behaves similarly to SubPath but environment variable references $(VAR_NAME) are expanded using the container's environment.
|
||||||
// Defaults to "" (volume's root).
|
// Defaults to "" (volume's root).
|
||||||
// SubPathExpr and SubPath are mutually exclusive.
|
// SubPathExpr and SubPath are mutually exclusive.
|
||||||
// This field is alpha in 1.14.
|
// This field is beta in 1.15.
|
||||||
// +optional
|
// +optional
|
||||||
optional string subPathExpr = 6;
|
optional string subPathExpr = 6;
|
||||||
}
|
}
|
||||||
|
@ -1775,7 +1775,7 @@ type VolumeMount struct {
|
|||||||
// Behaves similarly to SubPath but environment variable references $(VAR_NAME) are expanded using the container's environment.
|
// Behaves similarly to SubPath but environment variable references $(VAR_NAME) are expanded using the container's environment.
|
||||||
// Defaults to "" (volume's root).
|
// Defaults to "" (volume's root).
|
||||||
// SubPathExpr and SubPath are mutually exclusive.
|
// SubPathExpr and SubPath are mutually exclusive.
|
||||||
// This field is alpha in 1.14.
|
// This field is beta in 1.15.
|
||||||
// +optional
|
// +optional
|
||||||
SubPathExpr string `json:"subPathExpr,omitempty" protobuf:"bytes,6,opt,name=subPathExpr"`
|
SubPathExpr string `json:"subPathExpr,omitempty" protobuf:"bytes,6,opt,name=subPathExpr"`
|
||||||
}
|
}
|
||||||
|
@ -2273,7 +2273,7 @@ var map_VolumeMount = map[string]string{
|
|||||||
"mountPath": "Path within the container at which the volume should be mounted. Must not contain ':'.",
|
"mountPath": "Path within the container at which the volume should be mounted. Must not contain ':'.",
|
||||||
"subPath": "Path within the volume from which the container's volume should be mounted. Defaults to \"\" (volume's root).",
|
"subPath": "Path within the volume from which the container's volume should be mounted. Defaults to \"\" (volume's root).",
|
||||||
"mountPropagation": "mountPropagation determines how mounts are propagated from the host to container and the other way around. When not set, MountPropagationNone is used. This field is beta in 1.10.",
|
"mountPropagation": "mountPropagation determines how mounts are propagated from the host to container and the other way around. When not set, MountPropagationNone is used. This field is beta in 1.10.",
|
||||||
"subPathExpr": "Expanded path within the volume from which the container's volume should be mounted. Behaves similarly to SubPath but environment variable references $(VAR_NAME) are expanded using the container's environment. Defaults to \"\" (volume's root). SubPathExpr and SubPath are mutually exclusive. This field is alpha in 1.14.",
|
"subPathExpr": "Expanded path within the volume from which the container's volume should be mounted. Behaves similarly to SubPath but environment variable references $(VAR_NAME) are expanded using the container's environment. Defaults to \"\" (volume's root). SubPathExpr and SubPath are mutually exclusive. This field is beta in 1.15.",
|
||||||
}
|
}
|
||||||
|
|
||||||
func (VolumeMount) SwaggerDoc() map[string]string {
|
func (VolumeMount) SwaggerDoc() map[string]string {
|
||||||
|
@ -157,7 +157,7 @@ var _ = framework.KubeDescribe("Variable Expansion", func() {
|
|||||||
Description: Make sure a container's subpath can be set using an
|
Description: Make sure a container's subpath can be set using an
|
||||||
expansion of environment variables.
|
expansion of environment variables.
|
||||||
*/
|
*/
|
||||||
It("should allow substituting values in a volume subpath [Feature:VolumeSubpathEnvExpansion][NodeAlphaFeature:VolumeSubpathEnvExpansion]", func() {
|
It("should allow substituting values in a volume subpath [sig-storage][NodeFeature:VolumeSubpathEnvExpansion]", func() {
|
||||||
podName := "var-expansion-" + string(uuid.NewUUID())
|
podName := "var-expansion-" + string(uuid.NewUUID())
|
||||||
pod := &v1.Pod{
|
pod := &v1.Pod{
|
||||||
ObjectMeta: metav1.ObjectMeta{
|
ObjectMeta: metav1.ObjectMeta{
|
||||||
@ -217,7 +217,7 @@ var _ = framework.KubeDescribe("Variable Expansion", func() {
|
|||||||
Description: Make sure a container's subpath can not be set using an
|
Description: Make sure a container's subpath can not be set using an
|
||||||
expansion of environment variables when backticks are supplied.
|
expansion of environment variables when backticks are supplied.
|
||||||
*/
|
*/
|
||||||
It("should fail substituting values in a volume subpath with backticks [Feature:VolumeSubpathEnvExpansion][NodeAlphaFeature:VolumeSubpathEnvExpansion][Slow]", func() {
|
It("should fail substituting values in a volume subpath with backticks [sig-storage][NodeFeature:VolumeSubpathEnvExpansion][Slow]", func() {
|
||||||
|
|
||||||
podName := "var-expansion-" + string(uuid.NewUUID())
|
podName := "var-expansion-" + string(uuid.NewUUID())
|
||||||
pod := &v1.Pod{
|
pod := &v1.Pod{
|
||||||
@ -266,7 +266,7 @@ var _ = framework.KubeDescribe("Variable Expansion", func() {
|
|||||||
Description: Make sure a container's subpath can not be set using an
|
Description: Make sure a container's subpath can not be set using an
|
||||||
expansion of environment variables when absolute path is supplied.
|
expansion of environment variables when absolute path is supplied.
|
||||||
*/
|
*/
|
||||||
It("should fail substituting values in a volume subpath with absolute path [Feature:VolumeSubpathEnvExpansion][NodeAlphaFeature:VolumeSubpathEnvExpansion][Slow]", func() {
|
It("should fail substituting values in a volume subpath with absolute path [sig-storage][NodeFeature:VolumeSubpathEnvExpansion][Slow]", func() {
|
||||||
|
|
||||||
podName := "var-expansion-" + string(uuid.NewUUID())
|
podName := "var-expansion-" + string(uuid.NewUUID())
|
||||||
pod := &v1.Pod{
|
pod := &v1.Pod{
|
||||||
@ -314,7 +314,7 @@ var _ = framework.KubeDescribe("Variable Expansion", func() {
|
|||||||
Testname: var-expansion-subpath-ready-from-failed-state
|
Testname: var-expansion-subpath-ready-from-failed-state
|
||||||
Description: Verify that a failing subpath expansion can be modified during the lifecycle of a container.
|
Description: Verify that a failing subpath expansion can be modified during the lifecycle of a container.
|
||||||
*/
|
*/
|
||||||
It("should verify that a failing subpath expansion can be modified during the lifecycle of a container [Feature:VolumeSubpathEnvExpansion][NodeAlphaFeature:VolumeSubpathEnvExpansion][Slow]", func() {
|
It("should verify that a failing subpath expansion can be modified during the lifecycle of a container [sig-storage][NodeFeature:VolumeSubpathEnvExpansion][Slow]", func() {
|
||||||
|
|
||||||
podName := "var-expansion-" + string(uuid.NewUUID())
|
podName := "var-expansion-" + string(uuid.NewUUID())
|
||||||
containerName := "dapi-container"
|
containerName := "dapi-container"
|
||||||
@ -405,7 +405,7 @@ var _ = framework.KubeDescribe("Variable Expansion", func() {
|
|||||||
3. successful expansion of the subpathexpr isn't required for volume cleanup
|
3. successful expansion of the subpathexpr isn't required for volume cleanup
|
||||||
|
|
||||||
*/
|
*/
|
||||||
It("should succeed in writing subpaths in container [Feature:VolumeSubpathEnvExpansion][NodeAlphaFeature:VolumeSubpathEnvExpansion][Slow]", func() {
|
It("should succeed in writing subpaths in container [sig-storage][NodeFeature:VolumeSubpathEnvExpansion][Slow]", func() {
|
||||||
|
|
||||||
podName := "var-expansion-" + string(uuid.NewUUID())
|
podName := "var-expansion-" + string(uuid.NewUUID())
|
||||||
containerName := "dapi-container"
|
containerName := "dapi-container"
|
||||||
@ -514,7 +514,7 @@ var _ = framework.KubeDescribe("Variable Expansion", func() {
|
|||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
It("should not change the subpath mount on a container restart if the environment variable changes [Feature:VolumeSubpathEnvExpansion][NodeAlphaFeature:VolumeSubpathEnvExpansion][Slow]", func() {
|
It("should not change the subpath mount on a container restart if the environment variable changes [sig-storage][NodeFeature:VolumeSubpathEnvExpansion][Slow]", func() {
|
||||||
|
|
||||||
suffix := string(uuid.NewUUID())
|
suffix := string(uuid.NewUUID())
|
||||||
podName := fmt.Sprintf("var-expansion-%s", suffix)
|
podName := fmt.Sprintf("var-expansion-%s", suffix)
|
||||||
|
Loading…
Reference in New Issue
Block a user