Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
D
dex
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
go
dex
Commits
505aac75
Unverified
Commit
505aac75
authored
Nov 06, 2018
by
Eric Chiang
Committed by
GitHub
Nov 06, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1333 from SongGithub/master
allow it to disable CRD creation
parents
65b0c919
5f0a03a0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
0 deletions
+8
-0
storage.go
storage/kubernetes/storage.go
+8
-0
No files found.
storage/kubernetes/storage.go
View file @
505aac75
...
...
@@ -148,6 +148,14 @@ func (cli *client) registerCustomResources(useTPR bool) (ok bool) {
resourceName
=
r
.
ObjectMeta
.
Name
}
else
{
r
:=
customResourceDefinitions
[
i
]
var
i
interface
{}
cli
.
logger
.
Infof
(
"checking if custom resource %s has been created already..."
,
r
.
ObjectMeta
.
Name
)
if
err
:=
cli
.
list
(
r
.
Spec
.
Names
.
Plural
,
&
i
);
err
==
nil
{
cli
.
logger
.
Infof
(
"The custom resource %s already available, skipping create"
,
r
.
ObjectMeta
.
Name
)
continue
}
else
{
cli
.
logger
.
Infof
(
"failed to list custom resource %s, attempting to create: %v"
,
r
.
ObjectMeta
.
Name
,
err
)
}
err
=
cli
.
postResource
(
"apiextensions.k8s.io/v1beta1"
,
""
,
"customresourcedefinitions"
,
r
)
resourceName
=
r
.
ObjectMeta
.
Name
}
...
...
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