-
Notifications
You must be signed in to change notification settings - Fork 119
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
Organize new kyma CLI commands around provisioning domain #2029
Comments
for reading data from ENVs (e.g. Working Viper snippet for working with ENVspackage main
import (
"fmt"
"os"
"github.com/spf13/cobra"
"github.com/spf13/viper"
)
type Config struct {
Kubeconfig string `mapstructure:"kubeconfig"`
}
func main() {
config := Config{}
cmd := cobra.Command{
Use: "kyma",
PreRun: func(_ *cobra.Command, _ []string) {
err := viper.Unmarshal(&config)
if err != nil {
fmt.Println(err.Error())
os.Exit(3)
}
},
Run: func(_ *cobra.Command, _ []string) {
fmt.Println(config.Kubeconfig)
},
}
viper.AutomaticEnv()
cmd.Flags().StringVar(&config.Kubeconfig, "kubeconfig", "", "Path to the Kyma kubeconfig file.")
_ = viper.BindPFlag("kubeconfig", cmd.Flags().Lookup("kubeconfig"))
if err := cmd.Execute(); err != nil {
fmt.Println(err.Error())
os.Exit(1)
}
} |
Assume the following usage scenario
|
This issue has been automatically marked as stale due to the lack of recent activity. It will soon be closed if no further activity occurs. |
This issue has been automatically closed due to the lack of recent activity. |
Description
Design command tree structure for the new cli commands used to provision kyma, provision service instances (i.e
any
, or more specialisedhana
andreference
)Include possibility for more generic commands
Reason
Organize an untangle current puzzles:
./kyma-cli hana provision
does create binding but./kyma-cli reference-instance
doesntThe text was updated successfully, but these errors were encountered: