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
7ab0a9f6
Commit
7ab0a9f6
authored
Apr 19, 2016
by
k8s-merge-robot
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #23424 from ddysher/update-api-changes
Automatic merge from submit-queue Update API change for internal types
parents
84892993
998559a9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
19 deletions
+6
-19
api_changes.md
docs/devel/api_changes.md
+6
-19
No files found.
docs/devel/api_changes.md
View file @
7ab0a9f6
...
@@ -51,7 +51,6 @@ found at [API Conventions](api-conventions.md).
...
@@ -51,7 +51,6 @@ found at [API Conventions](api-conventions.md).
-
[
Edit types.go
](
#edit-typesgo
)
-
[
Edit types.go
](
#edit-typesgo
)
-
[
Edit validation.go
](
#edit-validationgo
)
-
[
Edit validation.go
](
#edit-validationgo
)
-
[
Edit version conversions
](
#edit-version-conversions
)
-
[
Edit version conversions
](
#edit-version-conversions
)
-
[
Edit deep copy files
](
#edit-deep-copy-files
)
-
[
Edit json (un)marshaling code
](
#edit-json-unmarshaling-code
)
-
[
Edit json (un)marshaling code
](
#edit-json-unmarshaling-code
)
-
[
Making a new API Group
](
#making-a-new-api-group
)
-
[
Making a new API Group
](
#making-a-new-api-group
)
-
[
Update the fuzzer
](
#update-the-fuzzer
)
-
[
Update the fuzzer
](
#update-the-fuzzer
)
...
@@ -456,9 +455,14 @@ regenerate auto-generated ones. To regenerate them:
...
@@ -456,9 +455,14 @@ regenerate auto-generated ones. To regenerate them:
-
run
-
run
```
sh
```
sh
hack/update-
generated-conversions
.sh
hack/update-
codegen
.sh
```
```
update-codegen will also generate code to handle deep copy of your versioned
api objects. The deep copy code resides with each versioned API:
-
`pkg/api/<version>/deep_copy_generated.go`
containing auto-generated copy functions
-
`pkg/apis/extensions/<version>/deep_copy_generated.go`
containing auto-generated copy functions
If running the above script is impossible due to compile errors, the easiest
If running the above script is impossible due to compile errors, the easiest
workaround is to comment out the code causing errors and let the script to
workaround is to comment out the code causing errors and let the script to
regenerate it. If the auto-generated conversion methods are not used by the
regenerate it. If the auto-generated conversion methods are not used by the
...
@@ -468,23 +472,6 @@ generator to create it from scratch.
...
@@ -468,23 +472,6 @@ generator to create it from scratch.
Unsurprisingly, adding manually written conversion also requires you to add tests to
Unsurprisingly, adding manually written conversion also requires you to add tests to
`pkg/api/<version>/conversion_test.go`
.
`pkg/api/<version>/conversion_test.go`
.
## Edit deep copy files
At this point you have both the versioned API changes and the internal
structure changes done. You now need to generate code to handle deep copy
of your versioned api objects.
The deep copy code resides with each versioned API:
-
`pkg/api/<version>/deep_copy_generated.go`
containing auto-generated copy functions
-
`pkg/apis/extensions/<version>/deep_copy_generated.go`
containing auto-generated copy functions
To regenerate them:
-
run
```
sh
hack/update-generated-deep-copies.sh
```
## Edit json (un)marshaling code
## Edit json (un)marshaling code
We are auto-generating code for marshaling and unmarshaling json representation
We are auto-generating code for marshaling and unmarshaling json representation
...
...
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