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
ed53e8a2
Unverified
Commit
ed53e8a2
authored
Jan 18, 2018
by
Jordan Liggitt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Surface error loading admission plugin config
parent
b7100f1e
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
0 deletions
+12
-0
config.go
staging/src/k8s.io/apiserver/pkg/admission/config.go
+12
-0
No files found.
staging/src/k8s.io/apiserver/pkg/admission/config.go
View file @
ed53e8a2
...
@@ -95,6 +95,18 @@ func ReadAdmissionConfiguration(pluginNames []string, configFilePath string, con
...
@@ -95,6 +95,18 @@ func ReadAdmissionConfiguration(pluginNames []string, configFilePath string, con
if
!
(
runtime
.
IsMissingVersion
(
err
)
||
runtime
.
IsMissingKind
(
err
)
||
runtime
.
IsNotRegisteredError
(
err
))
{
if
!
(
runtime
.
IsMissingVersion
(
err
)
||
runtime
.
IsMissingKind
(
err
)
||
runtime
.
IsNotRegisteredError
(
err
))
{
return
nil
,
err
return
nil
,
err
}
}
// Only tolerate load errors if the file appears to be one of the two legacy plugin configs
unstructuredData
:=
map
[
string
]
interface
{}{}
if
err2
:=
yaml
.
Unmarshal
(
data
,
&
unstructuredData
);
err2
!=
nil
{
return
nil
,
err
}
_
,
isLegacyImagePolicy
:=
unstructuredData
[
"imagePolicy"
]
_
,
isLegacyPodNodeSelector
:=
unstructuredData
[
"podNodeSelectorPluginConfig"
]
if
!
isLegacyImagePolicy
&&
!
isLegacyPodNodeSelector
{
return
nil
,
err
}
// convert the legacy format to the new admission control format
// convert the legacy format to the new admission control format
// in order to preserve backwards compatibility, we set plugins that
// in order to preserve backwards compatibility, we set plugins that
// previously read input from a non-versioned file configuration to the
// previously read input from a non-versioned file configuration to the
...
...
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