github.com/mkimuram/operator-sdk@v0.7.1-0.20190410172100-52ad33a4bda0/cmd/operator-sdk/main.go (about) 1 // Copyright 2019 The Operator-SDK Authors 2 // 3 // Licensed under the Apache License, Version 2.0 (the "License"); 4 // you may not use this file except in compliance with the License. 5 // You may obtain a copy of the License at 6 // 7 // http://www.apache.org/licenses/LICENSE-2.0 8 // 9 // Unless required by applicable law or agreed to in writing, software 10 // distributed under the License is distributed on an "AS IS" BASIS, 11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 // See the License for the specific language governing permissions and 13 // limitations under the License. 14 15 package main 16 17 import ( 18 "os" 19 20 // Import all Kubernetes client auth plugins (e.g. Azure, GCP, OIDC, etc.) 21 // to ensure that `run` and `up local` can make use of them. 22 "github.com/operator-framework/operator-sdk/cmd/operator-sdk/add" 23 "github.com/operator-framework/operator-sdk/cmd/operator-sdk/build" 24 "github.com/operator-framework/operator-sdk/cmd/operator-sdk/completion" 25 "github.com/operator-framework/operator-sdk/cmd/operator-sdk/generate" 26 "github.com/operator-framework/operator-sdk/cmd/operator-sdk/migrate" 27 "github.com/operator-framework/operator-sdk/cmd/operator-sdk/new" 28 "github.com/operator-framework/operator-sdk/cmd/operator-sdk/olmcatalog" 29 "github.com/operator-framework/operator-sdk/cmd/operator-sdk/printdeps" 30 "github.com/operator-framework/operator-sdk/cmd/operator-sdk/run" 31 "github.com/operator-framework/operator-sdk/cmd/operator-sdk/scorecard" 32 "github.com/operator-framework/operator-sdk/cmd/operator-sdk/test" 33 "github.com/operator-framework/operator-sdk/cmd/operator-sdk/up" 34 "github.com/operator-framework/operator-sdk/cmd/operator-sdk/version" 35 osdkversion "github.com/operator-framework/operator-sdk/version" 36 "github.com/spf13/cobra" 37 _ "k8s.io/client-go/plugin/pkg/client/auth" 38 ) 39 40 func main() { 41 root := &cobra.Command{ 42 Use: "operator-sdk", 43 Short: "An SDK for building operators with ease", 44 Version: osdkversion.Version, 45 } 46 47 root.AddCommand(new.NewCmd()) 48 root.AddCommand(add.NewCmd()) 49 root.AddCommand(build.NewCmd()) 50 root.AddCommand(generate.NewCmd()) 51 root.AddCommand(up.NewCmd()) 52 root.AddCommand(completion.NewCmd()) 53 root.AddCommand(test.NewCmd()) 54 root.AddCommand(scorecard.NewCmd()) 55 root.AddCommand(printdeps.NewCmd()) 56 root.AddCommand(migrate.NewCmd()) 57 root.AddCommand(run.NewCmd()) 58 root.AddCommand(olmcatalog.NewCmd()) 59 root.AddCommand(version.NewCmd()) 60 61 if err := root.Execute(); err != nil { 62 os.Exit(1) 63 } 64 }