mirror of
https://github.com/outbackdingo/kamaji.git
synced 2026-01-27 18:19:25 +00:00
* chore(go): bumping up to go1.23 Signed-off-by: Dario Tranchitella <dario@tranchitella.eu> * chore(golangci-lint): bumping up to v1.62.2 Signed-off-by: Dario Tranchitella <dario@tranchitella.eu> --------- Signed-off-by: Dario Tranchitella <dario@tranchitella.eu>
28 lines
878 B
Go
28 lines
878 B
Go
// Copyright 2022 Clastix Labs
|
|
// SPDX-License-Identifier: Apache-2.0
|
|
|
|
package cmd
|
|
|
|
import (
|
|
"github.com/spf13/cobra"
|
|
_ "go.uber.org/automaxprocs" // Automatically set `GOMAXPROCS` to match Linux container CPU quota.
|
|
"k8s.io/apimachinery/pkg/runtime"
|
|
utilruntime "k8s.io/apimachinery/pkg/util/runtime"
|
|
clientgoscheme "k8s.io/client-go/kubernetes/scheme"
|
|
appsv1 "k8s.io/kubernetes/pkg/apis/apps/v1"
|
|
|
|
kamajiv1alpha1 "github.com/clastix/kamaji/api/v1alpha1"
|
|
)
|
|
|
|
func NewCmd(scheme *runtime.Scheme) *cobra.Command {
|
|
return &cobra.Command{
|
|
Use: "kamaji",
|
|
Short: "Build and operate Kubernetes at scale with a fraction of operational burden.",
|
|
PersistentPreRun: func(*cobra.Command, []string) {
|
|
utilruntime.Must(clientgoscheme.AddToScheme(scheme))
|
|
utilruntime.Must(kamajiv1alpha1.AddToScheme(scheme))
|
|
utilruntime.Must(appsv1.RegisterDefaults(scheme))
|
|
},
|
|
}
|
|
}
|