build: update min version to k8s 1.17

Support is removed for k8s for various limitations such as
priority classes not working and csi driver feature
incompleteness and missing snapshots. Documentation is updated
with the new min version of k8s 1.17 and also the tests are
updated to run on the min version of 1.17.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
(cherry picked from commit d26b6cf403)
This commit is contained in:
Travis Nielsen committed 2022-04-26 13:02:34 -06:00
1 parent ebf2b6b250
commit e4cc14f70d
19 files changed
+16 -83

No files matched your search

@@ -17,7 +17,7 @@ jobs:
strategy:
fail-fast: false
matrix:
kubernetes-versions : ['v1.16.15', 'v1.23.0']
kubernetes-versions : ['v1.17.17', 'v1.23.0']
steps:
- name: checkout
uses: actions/checkout@v2
@@ -17,7 +17,7 @@ jobs:
strategy:
fail-fast: false
matrix:
kubernetes-versions : ['v1.16.15', 'v1.23.0']
kubernetes-versions : ['v1.17.17', 'v1.23.0']
steps:
- name: checkout
uses: actions/checkout@v2
@@ -17,7 +17,7 @@ jobs:
strategy:
fail-fast: false
matrix:
kubernetes-versions : ['v1.16.15', 'v1.23.0']
kubernetes-versions : ['v1.17.17', 'v1.23.0']
steps:
- name: checkout
uses: actions/checkout@v2
@@ -17,7 +17,7 @@ jobs:
strategy:
fail-fast: false
matrix:
kubernetes-versions : ['v1.16.15', 'v1.23.0']
kubernetes-versions : ['v1.17.17', 'v1.23.0']
steps:
- name: checkout
uses: actions/checkout@v2
@@ -18,7 +18,7 @@ jobs:
strategy:
fail-fast: false
matrix:
kubernetes-versions : ['v1.16.15','v1.18.20','v1.21.7','v1.23.0']
kubernetes-versions : ['v1.17.17','v1.19.16','v1.21.7','v1.23.0']
steps:
- name: checkout
uses: actions/checkout@v2
@@ -59,7 +59,7 @@ jobs:
strategy:
fail-fast: false
matrix:
kubernetes-versions : ['v1.16.15','v1.18.20','v1.21.7','v1.23.0']
kubernetes-versions : ['v1.17.17','v1.19.16','v1.21.7','v1.23.0']
steps:
- name: checkout
uses: actions/checkout@v2
@@ -99,7 +99,7 @@ jobs:
strategy:
fail-fast: false
matrix:
kubernetes-versions : ['v1.16.15','v1.18.20','v1.21.7','v1.23.0']
kubernetes-versions : ['v1.17.17','v1.19.16','v1.21.7','v1.23.0']
steps:
- name: checkout
uses: actions/checkout@v2
@@ -138,7 +138,7 @@ jobs:
strategy:
fail-fast: false
matrix:
kubernetes-versions : ['v1.16.15','v1.18.20','v1.21.7','v1.23.0']
kubernetes-versions : ['v1.17.17','v1.19.16','v1.21.7','v1.23.0']
steps:
- name: checkout
uses: actions/checkout@v2
@@ -220,7 +220,7 @@ jobs:
strategy:
fail-fast: false
matrix:
kubernetes-versions : ['v1.16.15', 'v1.23.0']
kubernetes-versions : ['v1.17.17', 'v1.23.0']
steps:
- name: checkout
uses: actions/checkout@v2
+1 -1
View File
@@ -82,7 +82,7 @@ parameters:
# Delete the rbd volume when a PVC is deleted
reclaimPolicy: Delete
# Optional, if you want to add dynamic resize for PVC. Works for Kubernetes 1.14+
# Optional, if you want to add dynamic resize for PVC.
# For now only ext3, ext4, xfs resize support provided, like in Kubernetes itself.
allowVolumeExpansion: true
```
-4
View File
@@ -49,8 +49,6 @@ In a "PVC-based cluster", the Ceph persistent data is stored on volumes requeste
This type of cluster is recommended in a cloud environment where volumes can be dynamically created and also
in clusters where a local PV provisioner is available.
> **NOTE**: Kubernetes version 1.13.0 or greater is required to provision OSDs on PVCs.
```yaml
apiVersion: ceph.rook.io/v1
kind: CephCluster
@@ -961,8 +959,6 @@ kubectl label node mynode topology.kubernetes.io/zone=zone1
kubectl label node mynode topology.rook.io/rack=zone1-rack1
```
> For versions previous to K8s 1.17, use the topology key: failure-domain.beta.kubernetes.io/zone or region
These labels would result in the following hierarchy for OSDs on that node (this command can be run in the Rook toolbox):
```console
+1 -1
View File
@@ -10,7 +10,7 @@ don't hesitate to reach out to us on our [Slack](https://Rook-io.slack.com) dev
## Prerequisites
1. [GO 1.13](https://golang.org/dl/) or greater installed
1. [GO 1.17](https://golang.org/dl/) or greater installed
2. Git client installed
3. GitHub account
+1 -1
View File
@@ -17,7 +17,7 @@ This chart is a simple packaging of templates that will optionally create Rook r
## Prerequisites
* Kubernetes 1.13+
* Kubernetes 1.17+
* Helm 3.x
* Install the [Rook Operator chart](helm-operator.md)
+1 -1
View File
@@ -16,7 +16,7 @@ This chart bootstraps a [rook-ceph-operator](https://github.com/rook/rook) deplo
## Prerequisites
* Kubernetes 1.13+
* Kubernetes 1.17+
* Helm 3.x
See the [Helm support matrix](https://helm.sh/docs/topics/version_skew/) for more details.
+1 -1
View File
@@ -18,7 +18,7 @@ from other pods running in your cluster.
## Minimum Version
Kubernetes **v1.16** or higher is supported by Rook.
Kubernetes **v1.17** or higher is supported by Rook.
## Prerequisites
@@ -16,9 +16,7 @@ Return the target Kubernetes version.
Return the appropriate apiVersion for ingress.
*/}}
{{- define "capabilities.ingress.apiVersion" -}}
{{- if semverCompare "<1.14-0" (include "capabilities.kubeVersion" .) -}}
{{- print "extensions/v1beta1" -}}
{{- else if semverCompare "<1.19-0" (include "capabilities.kubeVersion" .) -}}
{{- if semverCompare "<1.19-0" (include "capabilities.kubeVersion" .) -}}
{{- print "networking.k8s.io/v1beta1" -}}
{{- else -}}
{{- print "networking.k8s.io/v1" -}}
-12
View File
@@ -27,7 +27,6 @@ import (
"github.com/rook/rook/pkg/operator/k8sutil"
v1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/util/sets"
"k8s.io/apimachinery/pkg/util/version"
)
type createConfig struct {
@@ -133,17 +132,6 @@ func (c *Cluster) startProvisioningOverPVCs(config *provisionConfig, errs *provi
return sets.NewString(), nil
}
// Check k8s version
k8sVersion, err := k8sutil.GetK8SVersion(c.context.Clientset)
if err != nil {
errs.addError("failed to provision OSDs on PVCs. user has specified storageClassDeviceSets, but the Kubernetes version could not be determined. minimum Kubernetes version required: 1.13.0. %v", err)
return sets.NewString(), nil
}
if !k8sVersion.AtLeast(version.MustParseSemantic("v1.13.0")) {
errs.addError("failed to provision OSDs on PVCs. user has specified storageClassDeviceSets, but the Kubernetes version is not supported. user must update Kubernetes version. minimum Kubernetes version required: 1.13.0. version detected: %s", k8sVersion.String())
return sets.NewString(), nil
}
existingDeployments, err := c.getExistingOSDDeploymentsOnPVCs()
if err != nil {
errs.addError("failed to provision OSDs on PVCs. failed to query existing OSD deployments on PVCs. %v", err)
@@ -317,7 +317,6 @@ func Test_startProvisioningOverPVCs(t *testing.T) {
clusterInfo.Context = context.TODO()
spec := cephv1.ClusterSpec{}
fakeK8sVersion := "v1.13.0"
var errs *provisionErrors
var c *Cluster
@@ -325,7 +324,6 @@ func Test_startProvisioningOverPVCs(t *testing.T) {
var awaitingStatusConfigMaps sets.String
var err error
doSetup := func() {
test.SetFakeKubernetesVersion(clientset, fakeK8sVersion) // PVCs require k8s version v1.13+
errs = newProvisionErrors()
ctx := &clusterd.Context{
Clientset: clientset,
@@ -408,21 +406,6 @@ func Test_startProvisioningOverPVCs(t *testing.T) {
assert.Len(t, cms.Items, 2) // still just 2 configmaps should exist (the same 2 from before)
})
t.Run("error if k8s version not high enough", func(t *testing.T) {
// spec = <working spec from prior test>
clientset = test.NewComplexClientset(t) // reset to empty fake k8s environment
fakeK8sVersion = "v1.12.7"
doSetup()
awaitingStatusConfigMaps, err = c.startProvisioningOverPVCs(config, errs)
assert.NoError(t, err)
assert.Equal(t, 0, awaitingStatusConfigMaps.Len())
assert.Equal(t, 1, errs.len())
cms, err := clientset.CoreV1().ConfigMaps(namespace).List(context.TODO(), metav1.ListOptions{})
assert.NoError(t, err)
assert.Len(t, cms.Items, 0)
fakeK8sVersion = "v1.13.0"
})
t.Run("error if no volume claim template", func(t *testing.T) {
spec = cephv1.ClusterSpec{
Storage: cephv1.StorageScopeSpec{
@@ -59,18 +59,12 @@ func (h *CephInstaller) configureRookOperatorViaHelm(upgrade bool) error {
"image": map[string]interface{}{"tag": h.settings.RookVersion},
"monitoring": map[string]interface{}{"enabled": true},
}
csiValues := map[string]interface{}{
values["csi"] = map[string]interface{}{
"csiRBDProvisionerResource": nil,
"csiRBDPluginResource": nil,
"csiCephFSProvisionerResource": nil,
"csiCephFSPluginResource": nil,
}
if !utils.VersionAtLeast(h.settings.KubernetesVersion, "v1.17.0") {
// Older than K8s 1.17 cannot apply priority classes
csiValues["pluginPriorityClassName"] = ""
csiValues["provisionerPriorityClassName"] = ""
}
values["csi"] = csiValues
// create the operator namespace before the admission controller is created
if err := h.k8shelper.CreateNamespace(h.settings.OperatorNamespace); err != nil {
@@ -152,10 +152,6 @@ func (h *CephInstaller) CreateVolumeReplicationCRDs() (err error) {
logger.Info("volume replication CRDs skipped")
return nil
}
if !h.k8shelper.VersionAtLeast("v1.16.0") {
logger.Info("volume replication CRDs skipped on older than k8s 1.16")
return nil
}
logger.Info("Creating volume replication CRDs")
if _, err := h.k8shelper.KubectlWithStdin(readManifestFromURL(volumeReplicationCRDURL), createFromStdinArgs...); err != nil {
@@ -22,7 +22,6 @@ import (
"strings"
cephv1 "github.com/rook/rook/pkg/apis/ceph.rook.io/v1"
"github.com/rook/rook/tests/framework/utils"
)
// TestCephSettings struct for handling panic and test suite tear down
@@ -88,11 +87,6 @@ func (s *TestCephSettings) replaceOperatorSettings(manifest string) string {
manifest = strings.ReplaceAll(manifest, `# CSI_LOG_LEVEL: "0"`, `CSI_LOG_LEVEL: "5"`)
manifest = strings.ReplaceAll(manifest, `ROOK_ENABLE_DISCOVERY_DAEMON: "false"`, fmt.Sprintf(`ROOK_ENABLE_DISCOVERY_DAEMON: "%t"`, s.EnableDiscovery))
manifest = strings.ReplaceAll(manifest, `CSI_ENABLE_VOLUME_REPLICATION: "false"`, fmt.Sprintf(`CSI_ENABLE_VOLUME_REPLICATION: "%t"`, s.EnableVolumeReplication))
if !utils.VersionAtLeast(s.KubernetesVersion, "v1.17.0") {
// Older than K8s 1.17 does not support priority classes
manifest = strings.ReplaceAll(manifest, `CSI_PLUGIN_PRIORITY_CLASSNAME: "system-node-critical"`, `CSI_PLUGIN_PRIORITY_CLASSNAME: ""`)
manifest = strings.ReplaceAll(manifest, `CSI_PROVISIONER_PRIORITY_CLASSNAME: "system-cluster-critical"`, `CSI_PROVISIONER_PRIORITY_CLASSNAME: ""`)
}
return manifest
}
@@ -24,7 +24,6 @@ import (
"github.com/rook/rook/tests/framework/clients"
"github.com/rook/rook/tests/framework/installer"
"github.com/rook/rook/tests/framework/utils"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"github.com/stretchr/testify/suite"
)
@@ -96,12 +95,6 @@ func (s *MultiClusterDeploySuite) SetupSuite() {
externalSettings.ApplyEnvVars()
s.externalManifests = installer.NewCephManifests(externalSettings)
k8sh, err := utils.CreateK8sHelper(s.T)
assert.NoError(s.T(), err)
if !k8sh.VersionAtLeast("v1.16.0") {
s.T().Skip("requires at least k8s 1.16, no need to run on older versions")
}
// Start the core storage cluster
s.setupMultiClusterCore()
s.createPools()
-9
View File
@@ -17,15 +17,6 @@ function error_log() {
trap error_log ERR
# Minimum 1.16.0 kubernetes version is required to start the admission controller
SERVER_VERSION=$(kubectl version --short | awk -F "." '/Server Version/ {print $2}')
MINIMUM_VERSION=16
if [ "${SERVER_VERSION}" -lt ${MINIMUM_VERSION} ]; then
echo "required minimum kubernetes version 1.$MINIMUM_VERSION.0"
exit
fi
# Set our known directories and parameters.
BASE_DIR=$(cd "$(dirname "$0")"; pwd)
CERT_VERSION="v1.3.1"