Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
59d2f138
Unverified
Commit
59d2f138
authored
Jan 08, 2019
by
Yago Nobre
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bump minimum kubeadm supported version to v1.12
parent
257205d6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
19 additions
and
31 deletions
+19
-31
config_test.go
cmd/kubeadm/app/cmd/config_test.go
+4
-4
config_test.go
cmd/kubeadm/app/componentconfigs/config_test.go
+1
-1
constants.go
cmd/kubeadm/app/constants/constants.go
+3
-5
constants_test.go
cmd/kubeadm/app/constants/constants_test.go
+0
-10
compute_test.go
cmd/kubeadm/app/phases/upgrade/compute_test.go
+0
-0
policy_test.go
cmd/kubeadm/app/phases/upgrade/policy_test.go
+10
-10
uploadconfig_test.go
cmd/kubeadm/app/phases/uploadconfig/uploadconfig_test.go
+1
-1
No files found.
cmd/kubeadm/app/cmd/config_test.go
View file @
59d2f138
...
...
@@ -71,13 +71,13 @@ func TestImagesListRunWithCustomConfigPath(t *testing.T) {
name
:
"set k8s version"
,
expectedImageCount
:
defaultNumberOfImages
,
expectedImageSubstrings
:
[]
string
{
":v1.12.1"
,
constants
.
CurrentKubernetesVersion
.
String
()
,
},
configContents
:
[]
byte
(
dedent
.
Dedent
(
`
configContents
:
[]
byte
(
dedent
.
Dedent
(
fmt
.
Sprintf
(
`
apiVersion: kubeadm.k8s.io/v1beta1
kind: ClusterConfiguration
kubernetesVersion:
v1.12.1
`
)),
kubernetesVersion:
%s
`
,
constants
.
CurrentKubernetesVersion
)
)),
},
{
name
:
"use coredns"
,
...
...
cmd/kubeadm/app/componentconfigs/config_test.go
View file @
59d2f138
...
...
@@ -40,7 +40,7 @@ kind: KubeletConfiguration
}
func
TestGetFromConfigMap
(
t
*
testing
.
T
)
{
k8sVersion
:=
version
.
MustParseGeneric
(
"v1.12.0"
)
k8sVersion
:=
version
.
MustParseGeneric
(
kubeadmconstants
.
CurrentKubernetesVersion
.
String
()
)
var
tests
=
[]
struct
{
name
string
...
...
cmd/kubeadm/app/constants/constants.go
View file @
59d2f138
...
...
@@ -387,18 +387,16 @@ var (
ControlPlaneComponents
=
[]
string
{
KubeAPIServer
,
KubeControllerManager
,
KubeScheduler
}
// MinimumControlPlaneVersion specifies the minimum control plane version kubeadm can deploy
MinimumControlPlaneVersion
=
version
.
MustParseSemantic
(
"v1.1
2
.0"
)
MinimumControlPlaneVersion
=
version
.
MustParseSemantic
(
"v1.1
3
.0"
)
// MinimumKubeletVersion specifies the minimum version of kubelet which kubeadm supports
MinimumKubeletVersion
=
version
.
MustParseSemantic
(
"v1.1
2
.0"
)
MinimumKubeletVersion
=
version
.
MustParseSemantic
(
"v1.1
3
.0"
)
// CurrentKubernetesVersion specifies current Kubernetes version supported by kubeadm
CurrentKubernetesVersion
=
version
.
MustParseSemantic
(
"v1.1
3
.0"
)
CurrentKubernetesVersion
=
version
.
MustParseSemantic
(
"v1.1
4
.0"
)
// SupportedEtcdVersion lists officially supported etcd versions with corresponding Kubernetes releases
SupportedEtcdVersion
=
map
[
uint8
]
string
{
10
:
"3.1.12"
,
11
:
"3.2.18"
,
12
:
"3.2.24"
,
13
:
"3.2.24"
,
14
:
"3.3.10"
,
...
...
cmd/kubeadm/app/constants/constants_test.go
View file @
59d2f138
...
...
@@ -160,16 +160,6 @@ func TestEtcdSupportedVersion(t *testing.T) {
expectedError
:
errors
.
New
(
"Unsupported or unknown Kubernetes version(1.99.0)"
),
},
{
kubernetesVersion
:
"1.10.2"
,
expectedVersion
:
version
.
MustParseSemantic
(
"3.1.12"
),
expectedError
:
nil
,
},
{
kubernetesVersion
:
"1.11.0"
,
expectedVersion
:
version
.
MustParseSemantic
(
"3.2.18"
),
expectedError
:
nil
,
},
{
kubernetesVersion
:
"1.12.1"
,
expectedVersion
:
version
.
MustParseSemantic
(
"3.2.24"
),
expectedError
:
nil
,
...
...
cmd/kubeadm/app/phases/upgrade/compute_test.go
View file @
59d2f138
This diff is collapsed.
Click to expand it.
cmd/kubeadm/app/phases/upgrade/policy_test.go
View file @
59d2f138
...
...
@@ -69,14 +69,14 @@ func TestEnforceVersionPolicies(t *testing.T) {
newK8sVersion
:
constants
.
MinimumControlPlaneVersion
.
WithPatch
(
3
)
.
String
(),
},
{
name
:
"new version must be higher than v1.1
0
.0"
,
name
:
"new version must be higher than v1.1
2
.0"
,
vg
:
&
fakeVersionGetter
{
clusterVersion
:
"v1.1
0
.3"
,
kubeletVersion
:
"v1.1
0
.3"
,
kubeadmVersion
:
"v1.1
0
.3"
,
clusterVersion
:
"v1.1
2
.3"
,
kubeletVersion
:
"v1.1
2
.3"
,
kubeadmVersion
:
"v1.1
2
.3"
,
},
newK8sVersion
:
"v1.
9
.10"
,
expectedMandatoryErrs
:
1
,
// version must be higher than v1.1
0
.0
newK8sVersion
:
"v1.
11
.10"
,
expectedMandatoryErrs
:
1
,
// version must be higher than v1.1
2
.0
expectedSkippableErrs
:
1
,
// can't upgrade old k8s with newer kubeadm
},
{
...
...
@@ -93,9 +93,9 @@ func TestEnforceVersionPolicies(t *testing.T) {
{
name
:
"downgrading two minor versions in one go is not supported"
,
vg
:
&
fakeVersionGetter
{
clusterVersion
:
"v1.1
4
.3"
,
kubeletVersion
:
"v1.1
4
.3"
,
kubeadmVersion
:
"v1.1
4
.0"
,
clusterVersion
:
"v1.1
5
.3"
,
kubeletVersion
:
"v1.1
5
.3"
,
kubeadmVersion
:
"v1.1
5
.0"
,
},
newK8sVersion
:
constants
.
MinimumControlPlaneVersion
.
WithPatch
(
3
)
.
String
(),
expectedMandatoryErrs
:
1
,
// can't downgrade two minor versions
...
...
@@ -125,7 +125,7 @@ func TestEnforceVersionPolicies(t *testing.T) {
name
:
"the maximum skew between the cluster version and the kubelet versions should be one minor version. This may be forced through though."
,
vg
:
&
fakeVersionGetter
{
clusterVersion
:
constants
.
MinimumControlPlaneVersion
.
WithPatch
(
3
)
.
String
(),
kubeletVersion
:
"v1.1
1
.8"
,
kubeletVersion
:
"v1.1
2
.8"
,
kubeadmVersion
:
constants
.
CurrentKubernetesVersion
.
String
(),
},
newK8sVersion
:
constants
.
CurrentKubernetesVersion
.
String
(),
...
...
cmd/kubeadm/app/phases/uploadconfig/uploadconfig_test.go
View file @
59d2f138
...
...
@@ -69,7 +69,7 @@ func TestUploadConfiguration(t *testing.T) {
AdvertiseAddress
:
"1.2.3.4"
,
},
ClusterConfiguration
:
kubeadmapiv1beta1
.
ClusterConfiguration
{
KubernetesVersion
:
"v1.12.10"
,
KubernetesVersion
:
kubeadmconstants
.
MinimumControlPlaneVersion
.
WithPatch
(
10
)
.
String
()
,
},
BootstrapTokens
:
[]
kubeadmapiv1beta1
.
BootstrapToken
{
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment