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
7e62297b
Commit
7e62297b
authored
Oct 10, 2017
by
Dr. Stefan Schimanski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pkg/apis/core: fix code generation
parent
33b20f22
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
7 additions
and
9 deletions
+7
-9
Makefile.generated_files
build/root/Makefile.generated_files
+1
-1
util.sh
hack/lib/util.sh
+1
-1
update-codegen.sh
hack/update-codegen.sh
+0
-2
gvpackages.go
...c/k8s.io/code-generator/cmd/client-gen/args/gvpackages.go
+1
-1
gvpackages_test.go
....io/code-generator/cmd/client-gen/args/gvpackages_test.go
+2
-2
types.go
...8s.io/code-generator/cmd/informer-gen/generators/types.go
+2
-2
No files found.
build/root/Makefile.generated_files
View file @
7e62297b
...
...
@@ -628,7 +628,7 @@ CONVERSION_DIRS := $(shell \
)
CONVERSION_FILES
:=
$
(
addsuffix /
$(CONVERSION_FILENAME)
,
$(CONVERSION_DIRS)
)
CONVERSION_EXTRA_PEER_DIRS
:=
k8s.io/kubernetes/pkg/api
,k8s.io/kubernetes/pkg/api
/v1,k8s.io/api/core/v1
CONVERSION_EXTRA_PEER_DIRS
:=
k8s.io/kubernetes/pkg/api
s/core,k8s.io/kubernetes/pkg/apis/core
/v1,k8s.io/api/core/v1
# Shell function for reuse in rules.
RUN_GEN_CONVERSION
=
\
...
...
hack/lib/util.sh
View file @
7e62297b
...
...
@@ -268,7 +268,7 @@ kube::util::group-version-to-pkg-path() {
case
"
${
group_version
}
"
in
# both group and version are "", this occurs when we generate deep copies for internal objects of the legacy v1 API.
__internal
)
echo
"pkg/api"
echo
"pkg/api
s/core
"
;;
meta/v1
)
echo
"vendor/k8s.io/apimachinery/pkg/apis/meta/v1"
...
...
hack/update-codegen.sh
View file @
7e62297b
...
...
@@ -63,7 +63,6 @@ ${clientgen} "$@"
${
clientgen
}
--output-base
"
${
KUBE_ROOT
}
/vendor"
--clientset-path
=
"k8s.io/client-go"
--clientset-name
=
"kubernetes"
--input-base
=
"k8s.io/kubernetes/vendor/k8s.io/api"
--input
=
"
${
GV_DIRS_CSV
}
"
"
$@
"
listergen_internal_apis
=(
pkg/api
$(
cd
${
KUBE_ROOT
}
find pkg/apis
-maxdepth
2
-name
types.go | xargs
-n1
dirname
|
sort
...
...
@@ -84,7 +83,6 @@ listergen_external_apis_csv=$(IFS=,; echo "${listergen_external_apis[*]}")
${
listergen
}
--output-base
"
${
KUBE_ROOT
}
/vendor"
--output-package
"k8s.io/client-go/listers"
--input-dirs
"
${
listergen_external_apis_csv
}
"
"
$@
"
informergen_internal_apis
=(
pkg/api
$(
cd
${
KUBE_ROOT
}
find pkg/apis
-maxdepth
2
-name
types.go | xargs
-n1
dirname
|
sort
...
...
staging/src/k8s.io/code-generator/cmd/client-gen/args/gvpackages.go
View file @
7e62297b
...
...
@@ -152,7 +152,7 @@ func parsePathGroupVersion(pgvString string) (gvPath string, gvString string) {
func
groupVersionPath
(
gvPath
string
,
group
string
,
version
string
)
(
path
string
)
{
// special case for the core group
if
group
==
"api"
{
path
=
filepath
.
Join
(
"
../api
"
,
version
)
path
=
filepath
.
Join
(
"
core
"
,
version
)
}
else
{
path
=
filepath
.
Join
(
gvPath
,
group
,
version
)
}
...
...
staging/src/k8s.io/code-generator/cmd/client-gen/args/gvpackages_test.go
View file @
7e62297b
...
...
@@ -70,8 +70,8 @@ func TestGVPackageFlag(t *testing.T) {
{
args
:
[]
string
{
"api/v1"
,
"api"
},
expected
:
map
[
types
.
GroupVersion
]
string
{
{
Group
:
"api"
,
Version
:
"v1"
}
:
"
../api
/v1"
,
{
Group
:
"api"
,
Version
:
""
}
:
"
../api
"
,
{
Group
:
"api"
,
Version
:
"v1"
}
:
"
core
/v1"
,
{
Group
:
"api"
,
Version
:
""
}
:
"
core
"
,
},
expectedGroups
:
[]
types
.
GroupVersions
{
{
PackageName
:
"core"
,
Group
:
types
.
Group
(
"api"
),
Versions
:
[]
types
.
Version
{
types
.
Version
(
"v1"
),
types
.
Version
(
""
)}},
...
...
staging/src/k8s.io/code-generator/cmd/informer-gen/generators/types.go
View file @
7e62297b
...
...
@@ -19,7 +19,7 @@ package generators
import
"k8s.io/gengo/types"
var
(
apiScheme
=
types
.
Name
{
Package
:
"k8s.io/kubernetes/pkg/api"
,
Name
:
"Scheme"
}
apiScheme
=
types
.
Name
{
Package
:
"k8s.io/kubernetes/pkg/api
/legacyscheme
"
,
Name
:
"Scheme"
}
cacheGenericLister
=
types
.
Name
{
Package
:
"k8s.io/client-go/tools/cache"
,
Name
:
"GenericLister"
}
cacheIndexers
=
types
.
Name
{
Package
:
"k8s.io/client-go/tools/cache"
,
Name
:
"Indexers"
}
cacheListWatch
=
types
.
Name
{
Package
:
"k8s.io/client-go/tools/cache"
,
Name
:
"ListWatch"
}
...
...
@@ -28,7 +28,7 @@ var (
cacheNewGenericLister
=
types
.
Name
{
Package
:
"k8s.io/client-go/tools/cache"
,
Name
:
"NewGenericLister"
}
cacheNewSharedIndexInformer
=
types
.
Name
{
Package
:
"k8s.io/client-go/tools/cache"
,
Name
:
"NewSharedIndexInformer"
}
cacheSharedIndexInformer
=
types
.
Name
{
Package
:
"k8s.io/client-go/tools/cache"
,
Name
:
"SharedIndexInformer"
}
listOptions
=
types
.
Name
{
Package
:
"k8s.io/kubernetes/pkg/api"
,
Name
:
"ListOptions"
}
listOptions
=
types
.
Name
{
Package
:
"k8s.io/kubernetes/pkg/api
s/core
"
,
Name
:
"ListOptions"
}
reflectType
=
types
.
Name
{
Package
:
"reflect"
,
Name
:
"Type"
}
runtimeObject
=
types
.
Name
{
Package
:
"k8s.io/apimachinery/pkg/runtime"
,
Name
:
"Object"
}
schemaGroupResource
=
types
.
Name
{
Package
:
"k8s.io/apimachinery/pkg/runtime/schema"
,
Name
:
"GroupResource"
}
...
...
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