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
a83c4dbd
Commit
a83c4dbd
authored
Aug 28, 2018
by
tanshanshan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix spelling mistakes
parent
459b5378
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
5 additions
and
5 deletions
+5
-5
validation.go
pkg/apis/core/validation/validation.go
+1
-1
pvlcontroller.go
pkg/controller/cloud/pvlcontroller.go
+1
-1
admission.go
...pkg/admission/storage/persistentvolume/label/admission.go
+1
-1
statefulset.go
test/e2e/apps/statefulset.go
+1
-1
init_container.go
test/e2e/common/init_container.go
+1
-1
No files found.
pkg/apis/core/validation/validation.go
View file @
a83c4dbd
...
@@ -4855,7 +4855,7 @@ func validateScopedResourceSelectorRequirement(resourceQuotaSpec *core.ResourceQ
...
@@ -4855,7 +4855,7 @@ func validateScopedResourceSelectorRequirement(resourceQuotaSpec *core.ResourceQ
case
core
.
ScopeSelectorOpIn
,
core
.
ScopeSelectorOpNotIn
:
case
core
.
ScopeSelectorOpIn
,
core
.
ScopeSelectorOpNotIn
:
if
len
(
req
.
Values
)
==
0
{
if
len
(
req
.
Values
)
==
0
{
allErrs
=
append
(
allErrs
,
field
.
Required
(
fldPath
.
Child
(
"values"
),
allErrs
=
append
(
allErrs
,
field
.
Required
(
fldPath
.
Child
(
"values"
),
"must be atleast one value when `operator` is 'In' or 'NotIn' for scope selector"
))
"must be at
least one value when `operator` is 'In' or 'NotIn' for scope selector"
))
}
}
case
core
.
ScopeSelectorOpExists
,
core
.
ScopeSelectorOpDoesNotExist
:
case
core
.
ScopeSelectorOpExists
,
core
.
ScopeSelectorOpDoesNotExist
:
if
len
(
req
.
Values
)
!=
0
{
if
len
(
req
.
Values
)
!=
0
{
...
...
pkg/controller/cloud/pvlcontroller.go
View file @
a83c4dbd
...
@@ -239,7 +239,7 @@ func (pvlc *PersistentVolumeLabelController) createPatch(vol *v1.PersistentVolum
...
@@ -239,7 +239,7 @@ func (pvlc *PersistentVolumeLabelController) createPatch(vol *v1.PersistentVolum
newVolume
.
Spec
.
NodeAffinity
.
Required
=
new
(
v1
.
NodeSelector
)
newVolume
.
Spec
.
NodeAffinity
.
Required
=
new
(
v1
.
NodeSelector
)
}
}
if
len
(
newVolume
.
Spec
.
NodeAffinity
.
Required
.
NodeSelectorTerms
)
==
0
{
if
len
(
newVolume
.
Spec
.
NodeAffinity
.
Required
.
NodeSelectorTerms
)
==
0
{
// Need atleast one term pre-allocated whose MatchExpressions can be appended to
// Need at
least one term pre-allocated whose MatchExpressions can be appended to
newVolume
.
Spec
.
NodeAffinity
.
Required
.
NodeSelectorTerms
=
make
([]
v1
.
NodeSelectorTerm
,
1
)
newVolume
.
Spec
.
NodeAffinity
.
Required
.
NodeSelectorTerms
=
make
([]
v1
.
NodeSelectorTerm
,
1
)
}
}
// Populate NodeAffinity with requirements if there are no conflicting keys found
// Populate NodeAffinity with requirements if there are no conflicting keys found
...
...
plugin/pkg/admission/storage/persistentvolume/label/admission.go
View file @
a83c4dbd
...
@@ -166,7 +166,7 @@ func (l *persistentVolumeLabel) Admit(a admission.Attributes) (err error) {
...
@@ -166,7 +166,7 @@ func (l *persistentVolumeLabel) Admit(a admission.Attributes) (err error) {
volume
.
Spec
.
NodeAffinity
.
Required
=
new
(
api
.
NodeSelector
)
volume
.
Spec
.
NodeAffinity
.
Required
=
new
(
api
.
NodeSelector
)
}
}
if
len
(
volume
.
Spec
.
NodeAffinity
.
Required
.
NodeSelectorTerms
)
==
0
{
if
len
(
volume
.
Spec
.
NodeAffinity
.
Required
.
NodeSelectorTerms
)
==
0
{
// Need atleast one term pre-allocated whose MatchExpressions can be appended to
// Need at
least one term pre-allocated whose MatchExpressions can be appended to
volume
.
Spec
.
NodeAffinity
.
Required
.
NodeSelectorTerms
=
make
([]
api
.
NodeSelectorTerm
,
1
)
volume
.
Spec
.
NodeAffinity
.
Required
.
NodeSelectorTerms
=
make
([]
api
.
NodeSelectorTerm
,
1
)
}
}
if
nodeSelectorRequirementKeysExistInNodeSelectorTerms
(
requirements
,
volume
.
Spec
.
NodeAffinity
.
Required
.
NodeSelectorTerms
)
{
if
nodeSelectorRequirementKeysExistInNodeSelectorTerms
(
requirements
,
volume
.
Spec
.
NodeAffinity
.
Required
.
NodeSelectorTerms
)
{
...
...
test/e2e/apps/statefulset.go
View file @
a83c4dbd
...
@@ -744,7 +744,7 @@ var _ = SIGDescribe("StatefulSet", func() {
...
@@ -744,7 +744,7 @@ var _ = SIGDescribe("StatefulSet", func() {
framework
.
ExpectNoError
(
err
)
framework
.
ExpectNoError
(
err
)
ctx
,
cancel
:=
watchtools
.
ContextWithOptionalTimeout
(
context
.
Background
(),
framework
.
StatefulPodTimeout
)
ctx
,
cancel
:=
watchtools
.
ContextWithOptionalTimeout
(
context
.
Background
(),
framework
.
StatefulPodTimeout
)
defer
cancel
()
defer
cancel
()
// we need to get UID from pod in any state and wait until stateful set controller will remove pod atleast once
// we need to get UID from pod in any state and wait until stateful set controller will remove pod at
least once
_
,
err
=
watchtools
.
UntilWithoutRetry
(
ctx
,
w
,
func
(
event
watch
.
Event
)
(
bool
,
error
)
{
_
,
err
=
watchtools
.
UntilWithoutRetry
(
ctx
,
w
,
func
(
event
watch
.
Event
)
(
bool
,
error
)
{
pod
:=
event
.
Object
.
(
*
v1
.
Pod
)
pod
:=
event
.
Object
.
(
*
v1
.
Pod
)
switch
event
.
Type
{
switch
event
.
Type
{
...
...
test/e2e/common/init_container.go
View file @
a83c4dbd
...
@@ -304,7 +304,7 @@ var _ = framework.KubeDescribe("InitContainer [NodeConformance]", func() {
...
@@ -304,7 +304,7 @@ var _ = framework.KubeDescribe("InitContainer [NodeConformance]", func() {
Release: v1.12
Release: v1.12
Testname: init-container-fails-stops-app-restartnever-pod
Testname: init-container-fails-stops-app-restartnever-pod
Description: Ensure that app container is not started
Description: Ensure that app container is not started
when atleast one InitContainer fails to start and Pod has restart policy as RestartNever.
when at
least one InitContainer fails to start and Pod has restart policy as RestartNever.
*/
*/
framework
.
ConformanceIt
(
"should not start app containers and fail the pod if init containers fail on a RestartNever pod"
,
func
()
{
framework
.
ConformanceIt
(
"should not start app containers and fail the pod if init containers fail on a RestartNever pod"
,
func
()
{
By
(
"creating the pod"
)
By
(
"creating the pod"
)
...
...
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