Skip to content

Commit

Permalink
AddToScheme from SchemeBuilder (#293)
Browse files Browse the repository at this point in the history
* AddToScheme from SchemeBuilder
* changelog
* codegen
  • Loading branch information
jahvon authored Sep 10, 2021
1 parent 2c57f51 commit 0e3000f
Show file tree
Hide file tree
Showing 9 changed files with 11 additions and 8 deletions.
3 changes: 3 additions & 0 deletions changelog/v0.19.8/add-to-scheme-change.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
changelog:
- type: NON_USER_FACING
description: Update clients go template so that we use AddToScheme from the SchemeBuilder
2 changes: 1 addition & 1 deletion codegen/templates/code/types/clients.gotmpl
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ type clientSet struct {

func NewClientsetFromConfig(cfg *rest.Config) (Clientset, error) {
scheme := scheme.Scheme
if err := {{ $import_prefix }}AddToScheme(scheme); err != nil{
if err := {{ $import_prefix }}SchemeBuilder.AddToScheme(scheme); err != nil{
return nil, err
}
client, err := client.New(cfg, client.Options{
Expand Down
2 changes: 1 addition & 1 deletion codegen/test/api/things.test.io/v1/clients.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pkg/api/multicluster.solo.io/v1alpha1/clients.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pkg/multicluster/internal/k8s/core/v1/clients.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 0e3000f

Please sign in to comment.