mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-28 14:07:14 +00:00
Merge pull request #32020 from euank/version-twiddling
Automatic merge from submit-queue rkt: Update kube-up rkt version to v1.14.0 cc @kubernetes/sig-rktnetes This should have been included in #31286 (whoops). This is a bugfix that I propose for v1.4 inclusion.
This commit is contained in:
commit
243959ce5a
@ -151,7 +151,7 @@ NODE_OS_DISTRIBUTION="${KUBE_OS_DISTRIBUTION}"
|
|||||||
KUBE_NODE_IMAGE="${KUBE_NODE_IMAGE:-}"
|
KUBE_NODE_IMAGE="${KUBE_NODE_IMAGE:-}"
|
||||||
COREOS_CHANNEL="${COREOS_CHANNEL:-alpha}"
|
COREOS_CHANNEL="${COREOS_CHANNEL:-alpha}"
|
||||||
CONTAINER_RUNTIME="${KUBE_CONTAINER_RUNTIME:-docker}"
|
CONTAINER_RUNTIME="${KUBE_CONTAINER_RUNTIME:-docker}"
|
||||||
RKT_VERSION="${KUBE_RKT_VERSION:-0.5.5}"
|
RKT_VERSION="${KUBE_RKT_VERSION:-1.14.0}"
|
||||||
|
|
||||||
# OpenContrail networking plugin specific settings
|
# OpenContrail networking plugin specific settings
|
||||||
NETWORK_PROVIDER="${NETWORK_PROVIDER:-none}" # opencontrail
|
NETWORK_PROVIDER="${NETWORK_PROVIDER:-none}" # opencontrail
|
||||||
|
@ -137,7 +137,7 @@ NODE_OS_DISTRIBUTION="${KUBE_OS_DISTRIBUTION}"
|
|||||||
KUBE_NODE_IMAGE="${KUBE_NODE_IMAGE:-}"
|
KUBE_NODE_IMAGE="${KUBE_NODE_IMAGE:-}"
|
||||||
COREOS_CHANNEL="${COREOS_CHANNEL:-alpha}"
|
COREOS_CHANNEL="${COREOS_CHANNEL:-alpha}"
|
||||||
CONTAINER_RUNTIME="${KUBE_CONTAINER_RUNTIME:-docker}"
|
CONTAINER_RUNTIME="${KUBE_CONTAINER_RUNTIME:-docker}"
|
||||||
RKT_VERSION="${KUBE_RKT_VERSION:-0.5.5}"
|
RKT_VERSION="${KUBE_RKT_VERSION:-1.14.0}"
|
||||||
|
|
||||||
# Optional: if set to true, kube-up will configure the cluster to run e2e tests.
|
# Optional: if set to true, kube-up will configure the cluster to run e2e tests.
|
||||||
E2E_STORAGE_TEST_ENVIRONMENT=${KUBE_E2E_STORAGE_TEST_ENVIRONMENT:-false}
|
E2E_STORAGE_TEST_ENVIRONMENT=${KUBE_E2E_STORAGE_TEST_ENVIRONMENT:-false}
|
||||||
|
@ -47,7 +47,7 @@ MASTER_IMAGE_PROJECT=${KUBE_GCE_MASTER_PROJECT:-google-containers}
|
|||||||
NODE_IMAGE=${KUBE_GCE_NODE_IMAGE:-${CVM_VERSION}}
|
NODE_IMAGE=${KUBE_GCE_NODE_IMAGE:-${CVM_VERSION}}
|
||||||
NODE_IMAGE_PROJECT=${KUBE_GCE_NODE_PROJECT:-google-containers}
|
NODE_IMAGE_PROJECT=${KUBE_GCE_NODE_PROJECT:-google-containers}
|
||||||
CONTAINER_RUNTIME=${KUBE_CONTAINER_RUNTIME:-docker}
|
CONTAINER_RUNTIME=${KUBE_CONTAINER_RUNTIME:-docker}
|
||||||
RKT_VERSION=${KUBE_RKT_VERSION:-1.9.1}
|
RKT_VERSION=${KUBE_RKT_VERSION:-1.14.0}
|
||||||
RKT_STAGE1_IMAGE=${KUBE_RKT_STAGE1_IMAGE:-coreos.com/rkt/stage1-coreos}
|
RKT_STAGE1_IMAGE=${KUBE_RKT_STAGE1_IMAGE:-coreos.com/rkt/stage1-coreos}
|
||||||
|
|
||||||
NETWORK=${KUBE_GCE_NETWORK:-default}
|
NETWORK=${KUBE_GCE_NETWORK:-default}
|
||||||
|
@ -49,7 +49,7 @@ NODE_IMAGE=${KUBE_GCE_NODE_IMAGE:-${CVM_VERSION}}
|
|||||||
NODE_IMAGE_PROJECT=${KUBE_GCE_NODE_PROJECT:-google-containers}
|
NODE_IMAGE_PROJECT=${KUBE_GCE_NODE_PROJECT:-google-containers}
|
||||||
CONTAINER_RUNTIME=${KUBE_CONTAINER_RUNTIME:-docker}
|
CONTAINER_RUNTIME=${KUBE_CONTAINER_RUNTIME:-docker}
|
||||||
GCI_DOCKER_VERSION=${KUBE_GCI_DOCKER_VERSION:-}
|
GCI_DOCKER_VERSION=${KUBE_GCI_DOCKER_VERSION:-}
|
||||||
RKT_VERSION=${KUBE_RKT_VERSION:-1.9.1}
|
RKT_VERSION=${KUBE_RKT_VERSION:-1.14.0}
|
||||||
RKT_STAGE1_IMAGE=${KUBE_RKT_STAGE1_IMAGE:-coreos.com/rkt/stage1-coreos}
|
RKT_STAGE1_IMAGE=${KUBE_RKT_STAGE1_IMAGE:-coreos.com/rkt/stage1-coreos}
|
||||||
|
|
||||||
NETWORK=${KUBE_GCE_NETWORK:-e2e}
|
NETWORK=${KUBE_GCE_NETWORK:-e2e}
|
||||||
|
@ -71,7 +71,6 @@ const (
|
|||||||
DefaultRktAPIServiceEndpoint = "localhost:15441"
|
DefaultRktAPIServiceEndpoint = "localhost:15441"
|
||||||
|
|
||||||
minimumRktBinVersion = "1.13.0"
|
minimumRktBinVersion = "1.13.0"
|
||||||
recommendedRktBinVersion = "1.13.0"
|
|
||||||
|
|
||||||
minimumRktApiVersion = "1.0.0-alpha"
|
minimumRktApiVersion = "1.0.0-alpha"
|
||||||
minimumSystemdVersion = "219"
|
minimumSystemdVersion = "219"
|
||||||
@ -1679,7 +1678,7 @@ func (r *Runtime) APIVersion() (kubecontainer.Version, error) {
|
|||||||
|
|
||||||
// Status returns error if rkt is unhealthy, nil otherwise.
|
// Status returns error if rkt is unhealthy, nil otherwise.
|
||||||
func (r *Runtime) Status() error {
|
func (r *Runtime) Status() error {
|
||||||
return r.checkVersion(minimumRktBinVersion, recommendedRktBinVersion, minimumRktApiVersion, minimumSystemdVersion)
|
return r.checkVersion(minimumRktBinVersion, minimumRktApiVersion, minimumSystemdVersion)
|
||||||
}
|
}
|
||||||
|
|
||||||
// SyncPod syncs the running pod to match the specified desired pod.
|
// SyncPod syncs the running pod to match the specified desired pod.
|
||||||
|
@ -179,7 +179,6 @@ func TestCheckVersion(t *testing.T) {
|
|||||||
fs.version = "100"
|
fs.version = "100"
|
||||||
tests := []struct {
|
tests := []struct {
|
||||||
minimumRktBinVersion string
|
minimumRktBinVersion string
|
||||||
recommendedRktBinVersion string
|
|
||||||
minimumRktApiVersion string
|
minimumRktApiVersion string
|
||||||
minimumSystemdVersion string
|
minimumSystemdVersion string
|
||||||
err error
|
err error
|
||||||
@ -188,7 +187,6 @@ func TestCheckVersion(t *testing.T) {
|
|||||||
}{
|
}{
|
||||||
// Good versions.
|
// Good versions.
|
||||||
{
|
{
|
||||||
"1.2.3",
|
|
||||||
"1.2.3",
|
"1.2.3",
|
||||||
"1.2.5",
|
"1.2.5",
|
||||||
"99",
|
"99",
|
||||||
@ -198,7 +196,6 @@ func TestCheckVersion(t *testing.T) {
|
|||||||
},
|
},
|
||||||
// Good versions.
|
// Good versions.
|
||||||
{
|
{
|
||||||
"1.2.3+git",
|
|
||||||
"1.2.3+git",
|
"1.2.3+git",
|
||||||
"1.2.6-alpha",
|
"1.2.6-alpha",
|
||||||
"100",
|
"100",
|
||||||
@ -208,7 +205,6 @@ func TestCheckVersion(t *testing.T) {
|
|||||||
},
|
},
|
||||||
// Requires greater binary version.
|
// Requires greater binary version.
|
||||||
{
|
{
|
||||||
"1.2.4",
|
|
||||||
"1.2.4",
|
"1.2.4",
|
||||||
"1.2.6-alpha",
|
"1.2.6-alpha",
|
||||||
"100",
|
"100",
|
||||||
@ -218,7 +214,6 @@ func TestCheckVersion(t *testing.T) {
|
|||||||
},
|
},
|
||||||
// Requires greater API version.
|
// Requires greater API version.
|
||||||
{
|
{
|
||||||
"1.2.3",
|
|
||||||
"1.2.3",
|
"1.2.3",
|
||||||
"1.2.6",
|
"1.2.6",
|
||||||
"100",
|
"100",
|
||||||
@ -228,7 +223,6 @@ func TestCheckVersion(t *testing.T) {
|
|||||||
},
|
},
|
||||||
// Requires greater API version.
|
// Requires greater API version.
|
||||||
{
|
{
|
||||||
"1.2.3",
|
|
||||||
"1.2.3",
|
"1.2.3",
|
||||||
"1.2.7",
|
"1.2.7",
|
||||||
"100",
|
"100",
|
||||||
@ -238,7 +232,6 @@ func TestCheckVersion(t *testing.T) {
|
|||||||
},
|
},
|
||||||
// Requires greater systemd version.
|
// Requires greater systemd version.
|
||||||
{
|
{
|
||||||
"1.2.3",
|
|
||||||
"1.2.3",
|
"1.2.3",
|
||||||
"1.2.7",
|
"1.2.7",
|
||||||
"101",
|
"101",
|
||||||
@ -250,7 +243,7 @@ func TestCheckVersion(t *testing.T) {
|
|||||||
|
|
||||||
for i, tt := range tests {
|
for i, tt := range tests {
|
||||||
testCaseHint := fmt.Sprintf("test case #%d", i)
|
testCaseHint := fmt.Sprintf("test case #%d", i)
|
||||||
err := r.checkVersion(tt.minimumRktBinVersion, tt.recommendedRktBinVersion, tt.minimumRktApiVersion, tt.minimumSystemdVersion)
|
err := r.checkVersion(tt.minimumRktBinVersion, tt.minimumRktApiVersion, tt.minimumSystemdVersion)
|
||||||
assert.Equal(t, tt.err, err, testCaseHint)
|
assert.Equal(t, tt.err, err, testCaseHint)
|
||||||
|
|
||||||
if tt.calledGetInfo {
|
if tt.calledGetInfo {
|
||||||
|
@ -22,7 +22,6 @@ import (
|
|||||||
|
|
||||||
"github.com/coreos/go-semver/semver"
|
"github.com/coreos/go-semver/semver"
|
||||||
rktapi "github.com/coreos/rkt/api/v1alpha"
|
rktapi "github.com/coreos/rkt/api/v1alpha"
|
||||||
"github.com/golang/glog"
|
|
||||||
"golang.org/x/net/context"
|
"golang.org/x/net/context"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -98,7 +97,7 @@ func (r *Runtime) getVersions() error {
|
|||||||
|
|
||||||
// checkVersion tests whether the rkt/systemd/rkt-api-service that meet the version requirement.
|
// checkVersion tests whether the rkt/systemd/rkt-api-service that meet the version requirement.
|
||||||
// If all version requirements are met, it returns nil.
|
// If all version requirements are met, it returns nil.
|
||||||
func (r *Runtime) checkVersion(minimumRktBinVersion, recommendedRktBinVersion, minimumRktApiVersion, minimumSystemdVersion string) error {
|
func (r *Runtime) checkVersion(minimumRktBinVersion, minimumRktApiVersion, minimumSystemdVersion string) error {
|
||||||
if err := r.getVersions(); err != nil {
|
if err := r.getVersions(); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
@ -123,14 +122,6 @@ func (r *Runtime) checkVersion(minimumRktBinVersion, recommendedRktBinVersion, m
|
|||||||
if result < 0 {
|
if result < 0 {
|
||||||
return fmt.Errorf("rkt: binary version is too old(%v), requires at least %v", r.versions.binVersion, minimumRktBinVersion)
|
return fmt.Errorf("rkt: binary version is too old(%v), requires at least %v", r.versions.binVersion, minimumRktBinVersion)
|
||||||
}
|
}
|
||||||
result, err = r.versions.binVersion.Compare(recommendedRktBinVersion)
|
|
||||||
if err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
if result != 0 {
|
|
||||||
// TODO(yifan): Record an event to expose the information.
|
|
||||||
glog.Warningf("rkt: current binary version %q is not recommended (recommended version %q)", r.versions.binVersion, recommendedRktBinVersion)
|
|
||||||
}
|
|
||||||
|
|
||||||
// Check rkt API version.
|
// Check rkt API version.
|
||||||
result, err = r.versions.apiVersion.Compare(minimumRktApiVersion)
|
result, err = r.versions.apiVersion.Compare(minimumRktApiVersion)
|
||||||
|
Loading…
Reference in New Issue
Block a user