-
Notifications
You must be signed in to change notification settings - Fork 31
Update Kubernetes deps to use release-1.8 branches #47
Changes from all commits
f336cac
e0d659f
1fe4629
d37bc4e
70d8400
c6c352a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,26 +29,22 @@ required = [ | |
"k8s.io/code-generator/cmd/lister-gen", | ||
] | ||
|
||
[[constraint]] | ||
name = "github.com/Sirupsen/logrus" | ||
revision = "v0.6.2-10-g51fe59a" | ||
|
||
[[constraint]] | ||
name = "k8s.io/client-go" | ||
branch = "master" | ||
branch = "release-5.0" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ❓ Is there any advantage to using a There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, the release branches are updated. We'll need to run |
||
|
||
[[constraint]] | ||
name = "k8s.io/apimachinery" | ||
branch = "master" | ||
branch = "release-1.8" | ||
|
||
[[constraint]] | ||
name = "k8s.io/api" | ||
branch = "master" | ||
branch = "release-1.8" | ||
|
||
[[constraint]] | ||
name = "k8s.io/apiserver" | ||
branch = "master" | ||
branch = "release-1.8" | ||
|
||
[[override]] | ||
name = "google.golang.org/grpc" | ||
version = "=1.2.1" | ||
[[constraint]] | ||
name = "k8s.io/code-generator" | ||
branch = "release-1.8" |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -44,7 +44,7 @@ generate: .generate_files | |
|
||
verify: .hack_verify go_verify | ||
|
||
.hack_verify: .generate_exes | ||
.hack_verify: | ||
@echo Running repo-infra verify scripts | ||
@echo Running href checker: | ||
@${HACK_DIR}/verify-links.sh | ||
|
@@ -94,43 +94,7 @@ go_fmt: | |
|
||
# This section contains the code generation stuff | ||
################################################# | ||
.generate_exes: \ | ||
$(BINDIR)/defaulter-gen \ | ||
$(BINDIR)/deepcopy-gen \ | ||
$(BINDIR)/conversion-gen \ | ||
$(BINDIR)/client-gen \ | ||
$(BINDIR)/lister-gen \ | ||
$(BINDIR)/informer-gen | ||
touch $@ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ❓ So we no longer have to compile these binaries? Where do they get compiled now? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. They now get compiled as part of the new script in code-generator. See: kubernetes/kubernetes#52186 |
||
|
||
$(BINDIR)/%: | ||
go build -o $@ ./vendor/k8s.io/code-generator/cmd/$* | ||
|
||
# Regenerate all files if the gen exes changed or any "types.go" files changed | ||
.generate_files: .generate_exes $(TYPES_FILES) | ||
# Generate defaults | ||
$(BINDIR)/defaulter-gen \ | ||
--v 1 --logtostderr \ | ||
--go-header-file "$(HACK_DIR)/boilerplate.go.txt" \ | ||
--input-dirs "$(NAVIGATOR_PKG)/pkg/apis/navigator" \ | ||
--input-dirs "$(NAVIGATOR_PKG)/pkg/apis/navigator/v1alpha1" \ | ||
--extra-peer-dirs "$(NAVIGATOR_PKG)/pkg/apis/navigator" \ | ||
--extra-peer-dirs "$(NAVIGATOR_PKG)/pkg/apis/navigator/v1alpha1" \ | ||
--output-file-base "zz_generated.defaults" | ||
# Generate deep copies | ||
$(BINDIR)/deepcopy-gen \ | ||
--v 1 --logtostderr \ | ||
--go-header-file "$(HACK_DIR)/boilerplate.go.txt" \ | ||
--input-dirs "$(NAVIGATOR_PKG)/pkg/apis/navigator" \ | ||
--input-dirs "$(NAVIGATOR_PKG)/pkg/apis/navigator/v1alpha1" \ | ||
--bounding-dirs "github.com/openshift/open-service-broker-sdk" \ | ||
--output-file-base zz_generated.deepcopy | ||
# Generate conversions | ||
$(BINDIR)/conversion-gen \ | ||
--v 1 --logtostderr \ | ||
--go-header-file "$(HACK_DIR)/boilerplate.go.txt" \ | ||
--input-dirs "$(NAVIGATOR_PKG)/pkg/apis/navigator" \ | ||
--input-dirs "$(NAVIGATOR_PKG)/pkg/apis/navigator/v1alpha1" \ | ||
--output-file-base zz_generated.conversion | ||
# Regenerate all files if any "types.go" files changed | ||
.generate_files: $(TYPES_FILES) | ||
# generate all pkg/client contents | ||
$(HACK_DIR)/update-client-gen.sh |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,8 +30,8 @@ import ( | |
|
||
"github.com/jetstack-experimental/navigator/pkg/apis/navigator/v1alpha1" | ||
"github.com/jetstack-experimental/navigator/pkg/apiserver" | ||
clientset "github.com/jetstack-experimental/navigator/pkg/client/clientset_generated/internalclientset" | ||
informers "github.com/jetstack-experimental/navigator/pkg/client/informers_generated/internalversion" | ||
clientset "github.com/jetstack-experimental/navigator/pkg/client/clientset/internalversion" | ||
informers "github.com/jetstack-experimental/navigator/pkg/client/informers/internalversion" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ❓ So how do we decide whether to use the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Internal types should only be used within the API machinery for the apiserver, or if for some reason you need to convert between two external versions. That said, our controller should be built against one and only one version of the API, so there should basically never be a requirement to convert locally. The controller shouldn't use the internal types for a number of reasons:
There are a number of other potential complexities in doing this, and @dippynark and I did discuss it recently. I've managed to forget most of our thoughts on it though now! I will update here if they come back to me 😄 |
||
) | ||
|
||
const defaultEtcdPathPrefix = "/registry/navigator.jetstack.io" | ||
|
@@ -104,7 +104,7 @@ func (o NavigatorServerOptions) Config() (*apiserver.Config, error) { | |
return nil, fmt.Errorf("error creating self-signed certificates: %v", err) | ||
} | ||
|
||
serverConfig := genericapiserver.NewConfig(apiserver.Codecs) | ||
serverConfig := genericapiserver.NewRecommendedConfig(apiserver.Codecs) | ||
if err := o.RecommendedOptions.ApplyTo(serverConfig); err != nil { | ||
return nil, err | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❓ I guess this is because we've switched to
glog
in navigator.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep - this was just a constraint since we removed use of logrus (the package itself wasn't actually depended upon since before this PR)