Skip to content

Commit

Permalink
demonstrate adding generated conversions for other types
Browse files Browse the repository at this point in the history
  • Loading branch information
deads2k committed Feb 5, 2018
1 parent 23cd1ee commit 5553624
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions hack/update-generated-conversions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ function codegen::join() { local IFS="$1"; shift; echo "$*"; }

# enumerate group versions
ALL_FQ_APIS=(
github.com/openshift/origin/pkg/build/controller/build/apis/defaults/v1
github.com/openshift/origin/pkg/apps/apis/apps/v1
github.com/openshift/origin/pkg/authorization/apis/authorization/v1
github.com/openshift/origin/pkg/build/apis/build/v1
Expand Down
2 changes: 2 additions & 0 deletions pkg/build/controller/build/apis/defaults/v1/doc.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// +k8s:conversion-gen=github.com/openshift/origin/pkg/build/controller/build/apis/defaults
// +k8s:conversion-gen-external-types=github.com/openshift/origin/pkg/build/controller/build/apis/defaults/v1
// +k8s:deepcopy-gen=package,register

// Package v1 is the v1 version of the API.
Expand Down
4 changes: 2 additions & 2 deletions pkg/build/controller/build/apis/defaults/v1/register.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import (
var SchemeGroupVersion = schema.GroupVersion{Group: "", Version: "v1"}

var (
SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
AddToScheme = SchemeBuilder.AddToScheme
localSchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
AddToScheme = localSchemeBuilder.AddToScheme
)

// Adds the list of known types to api.Scheme.
Expand Down

0 comments on commit 5553624

Please sign in to comment.