-
Notifications
You must be signed in to change notification settings - Fork 90
SDK bump from v0.0.7 => v0.7.0 #122
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
openshift-merge-robot
merged 1 commit into
openshift:master-post-release
from
ewolinetz:sdk_bump
May 3, 2019
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
The diff you're trying to view is too large. We only load the first 3000 changed files.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,40 +1,75 @@ | ||
|
|
||
| # Force dep to vendor the code generators, which aren't imported just used at dev time. | ||
| # Picking a subpackage with Go code won't be necessary once https://github.com/golang/dep/pull/1545 is merged. | ||
| required = [ | ||
| "k8s.io/code-generator/cmd/defaulter-gen", | ||
| "k8s.io/code-generator/cmd/deepcopy-gen", | ||
| "k8s.io/code-generator/cmd/conversion-gen", | ||
| "k8s.io/code-generator/cmd/client-gen", | ||
| "k8s.io/code-generator/cmd/lister-gen", | ||
| "k8s.io/code-generator/cmd/informer-gen", | ||
| "k8s.io/code-generator/cmd/openapi-gen", | ||
| "k8s.io/kube-openapi/cmd/openapi-gen", | ||
| "k8s.io/gengo/args", | ||
| "sigs.k8s.io/controller-tools/pkg/crd/generator", | ||
| ] | ||
|
|
||
| [[override]] | ||
| name = "k8s.io/code-generator" | ||
| version = "kubernetes-1.11.0" | ||
| # revision for tag "kubernetes-1.13.1" | ||
| revision = "c2090bec4d9b1fb25de3812f868accc2bc9ecbae" | ||
|
|
||
| [[override]] | ||
| name = "k8s.io/api" | ||
| version = "kubernetes-1.11.0" | ||
| name = "k8s.io/kube-openapi" | ||
| revision = "0cf8f7e6ed1d2e3d47d02e3b6e559369af24d803" | ||
|
|
||
| [[override]] | ||
| name = "k8s.io/apimachinery" | ||
| version = "kubernetes-1.11.0" | ||
| name = "github.com/go-openapi/spec" | ||
| branch = "master" | ||
|
|
||
| [[override]] | ||
| name = "sigs.k8s.io/controller-tools" | ||
| version = "=v0.1.8" | ||
|
|
||
| [[override]] | ||
| name = "k8s.io/api" | ||
| # revision for tag "kubernetes-1.13.1" | ||
| revision = "05914d821849570fba9eacfb29466f2d8d3cd229" | ||
|
|
||
| [[override]] | ||
| name = "k8s.io/apiextensions-apiserver" | ||
| version = "kubernetes-1.11.0" | ||
| # revision for tag "kubernetes-1.13.1" | ||
| revision = "0fe22c71c47604641d9aa352c785b7912c200562" | ||
|
|
||
| [[override]] | ||
| name = "k8s.io/apimachinery" | ||
| # revision for tag "kubernetes-1.13.1" | ||
| revision = "2b1284ed4c93a43499e781493253e2ac5959c4fd" | ||
|
|
||
| [[override]] | ||
| name = "k8s.io/client-go" | ||
| version = "kubernetes-1.11.0" | ||
| # revision for tag "kubernetes-1.13.1" | ||
| revision = "8d9ed539ba3134352c586810e749e58df4e94e4f" | ||
|
|
||
| [[override]] | ||
| name = "github.com/coreos/prometheus-operator" | ||
| version = "=v0.29.0" | ||
|
|
||
| [[override]] | ||
| name = "sigs.k8s.io/controller-runtime" | ||
| version = "=v0.1.10" | ||
|
|
||
| [[constraint]] | ||
| name = "github.com/operator-framework/operator-sdk" | ||
| # The version rule is used for a specific release and the master branch for in between releases. | ||
| #revision = "1a3f18b6b1006076ad29386083c576ca4ac59686" | ||
| branch = "v0.0.7" | ||
| # version = "=v0.0.5" | ||
| # branch = "master" #osdk_branch_annotation | ||
| version = "=v0.7.0" #osdk_version_annotation | ||
|
|
||
| [prune] | ||
| go-tests = true | ||
| non-go = true | ||
|
|
||
| [[prune.project]] | ||
| name = "k8s.io/code-generator" | ||
| non-go = false | ||
|
|
||
| [[prune.project]] | ||
| name = "k8s.io/gengo" | ||
| non-go = false |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,129 @@ | ||
| package main | ||
|
|
||
| import ( | ||
| "context" | ||
| "flag" | ||
| "fmt" | ||
| "os" | ||
| "runtime" | ||
|
|
||
| // Import all Kubernetes client auth plugins (e.g. Azure, GCP, OIDC, etc.) | ||
| _ "k8s.io/client-go/plugin/pkg/client/auth" | ||
|
|
||
| "github.com/openshift/elasticsearch-operator/pkg/apis" | ||
| "github.com/openshift/elasticsearch-operator/pkg/controller" | ||
|
|
||
| "github.com/operator-framework/operator-sdk/pkg/k8sutil" | ||
| "github.com/operator-framework/operator-sdk/pkg/leader" | ||
| "github.com/operator-framework/operator-sdk/pkg/log/zap" | ||
| "github.com/operator-framework/operator-sdk/pkg/metrics" | ||
| sdkVersion "github.com/operator-framework/operator-sdk/version" | ||
| "github.com/spf13/pflag" | ||
| "sigs.k8s.io/controller-runtime/pkg/client/config" | ||
| "sigs.k8s.io/controller-runtime/pkg/manager" | ||
| logf "sigs.k8s.io/controller-runtime/pkg/runtime/log" | ||
| "sigs.k8s.io/controller-runtime/pkg/runtime/signals" | ||
| monitoringv1 "github.com/coreos/prometheus-operator/pkg/apis/monitoring/v1" | ||
| ) | ||
|
|
||
| // Change below variables to serve metrics on different host or port. | ||
| var ( | ||
| metricsHost = "0.0.0.0" | ||
| metricsPort int32 = 8383 | ||
| ) | ||
| var log = logf.Log.WithName("cmd") | ||
|
|
||
| func printVersion() { | ||
| log.Info(fmt.Sprintf("Go Version: %s", runtime.Version())) | ||
| log.Info(fmt.Sprintf("Go OS/Arch: %s/%s", runtime.GOOS, runtime.GOARCH)) | ||
| log.Info(fmt.Sprintf("Version of operator-sdk: %v", sdkVersion.Version)) | ||
| } | ||
|
|
||
| func main() { | ||
| // Add the zap logger flag set to the CLI. The flag set must | ||
| // be added before calling pflag.Parse(). | ||
| pflag.CommandLine.AddFlagSet(zap.FlagSet()) | ||
|
|
||
| // Add flags registered by imported packages (e.g. glog and | ||
| // controller-runtime) | ||
| pflag.CommandLine.AddGoFlagSet(flag.CommandLine) | ||
|
|
||
| pflag.Parse() | ||
|
|
||
| // Use a zap logr.Logger implementation. If none of the zap | ||
| // flags are configured (or if the zap flag set is not being | ||
| // used), this defaults to a production zap logger. | ||
| // | ||
| // The logger instantiated here can be changed to any logger | ||
| // implementing the logr.Logger interface. This logger will | ||
| // be propagated through the whole operator, generating | ||
| // uniform and structured logs. | ||
| logf.SetLogger(zap.Logger()) | ||
|
|
||
| printVersion() | ||
|
|
||
| namespace, err := k8sutil.GetWatchNamespace() | ||
| if err != nil { | ||
| log.Error(err, "Failed to get watch namespace") | ||
| os.Exit(1) | ||
| } | ||
|
|
||
| // Get a config to talk to the apiserver | ||
| cfg, err := config.GetConfig() | ||
| if err != nil { | ||
| log.Error(err, "") | ||
| os.Exit(1) | ||
| } | ||
|
|
||
| ctx := context.TODO() | ||
|
|
||
| // Become the leader before proceeding | ||
| err = leader.Become(ctx, "elasticsearch-operator-lock") | ||
| if err != nil { | ||
| log.Error(err, "") | ||
| os.Exit(1) | ||
| } | ||
|
|
||
| // Create a new Cmd to provide shared dependencies and start components | ||
| mgr, err := manager.New(cfg, manager.Options{ | ||
| Namespace: namespace, | ||
| MetricsBindAddress: fmt.Sprintf("%s:%d", metricsHost, metricsPort), | ||
| }) | ||
| if err != nil { | ||
| log.Error(err, "") | ||
| os.Exit(1) | ||
| } | ||
|
|
||
| log.Info("Registering Components.") | ||
|
|
||
| // Setup Scheme for all resources | ||
| if err := apis.AddToScheme(mgr.GetScheme()); err != nil { | ||
| log.Error(err, "") | ||
| os.Exit(1) | ||
| } | ||
|
|
||
| if err := monitoringv1.AddToScheme(mgr.GetScheme()); err != nil { | ||
| log.Error(err, "") | ||
| os.Exit(1) | ||
| } | ||
|
|
||
| // Setup all Controllers | ||
| if err := controller.AddToManager(mgr); err != nil { | ||
| log.Error(err, "") | ||
| os.Exit(1) | ||
| } | ||
|
|
||
| // Create Service object to expose the metrics port. | ||
| _, err = metrics.ExposeMetricsPort(ctx, metricsPort) | ||
| if err != nil { | ||
| log.Info(err.Error()) | ||
| } | ||
|
|
||
| log.Info("Starting the Cmd.") | ||
|
|
||
| // Start the Cmd | ||
| if err := mgr.Start(signals.SetupSignalHandler()); err != nil { | ||
| log.Error(err, "Manager exited non-zero") | ||
| os.Exit(1) | ||
| } | ||
| } | ||
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Artifact from stubbing the code? Do we need to act upon this?
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.
that is from the code generation. i don't think we need to act upon it unless we want to use a different port