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
889b100e
Commit
889b100e
authored
Aug 25, 2016
by
Chao Xu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update readme
parent
bf578f1b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
6 deletions
+10
-6
generating-clientset.md
docs/devel/generating-clientset.md
+10
-6
No files found.
docs/devel/generating-clientset.md
View file @
889b100e
...
@@ -62,12 +62,16 @@ will generate a clientset named "my_release" which includes clients for api/v1
...
@@ -62,12 +62,16 @@ will generate a clientset named "my_release" which includes clients for api/v1
objects and extensions/v1beta1 objects. You can run
`$ client-gen --help`
to see
objects and extensions/v1beta1 objects. You can run
`$ client-gen --help`
to see
other command line arguments.
other command line arguments.
-
Adding expansion methods: client-gen only generates the common methods, such
-
***Adding expansion methods**
*
: client-gen only generates the common methods,
as
`Create()`
and
`Delete()`
. You can manually add additional methods through
such as
`Create()`
and
`Delete()`
. You can manually add additional methods
the expansion interface. For example, this
through the expansion interface. For example, this
[
file
](
../../pkg/client/clientset_generated/release_1_2/typed/core/v1/pod_expansion.go
)
[
file
](
../../pkg/client/clientset_generated/release_1_4/typed/core/v1/pod_expansion.go
)
adds additional methods to Pod's client. As a convention, we put the expansion
adds additional methods to Pod's client. As a convention, we put the expansion
interface and its methods in file ${TYPE}_expansion.go.
interface and its methods in file ${TYPE}_expansion.go. In most cases, you
don't want to remove existing expansion files. So to make life easier,
instead of creating a new clientset from scratch,
**
*
you can copy and rename an
existing clientset (so that all the expansion files are copied)
**
*
, and then run
client-gen.
-
Generating fake clients for testing purposes: client-gen will generate a fake
-
Generating fake clients for testing purposes: client-gen will generate a fake
clientset if the command line argument
`--fake-clientset`
is set. The fake
clientset if the command line argument
`--fake-clientset`
is set. The fake
...
...
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