kyma-project / cli

Simple set of commands to manage a Kyma installation
Apache License 2.0
111 stars 118 forks source link

Organize new kyma CLI commands around provisioning domain #2029

Closed kwiatekus closed 1 week ago

kwiatekus commented 3 months ago

Description

Design command tree structure for the new cli commands used to provision kyma, provision service instances (i.e any, or more specialised hana and reference) Include possibility for more generic commands

Reason Organize an untangle current puzzles:

halamix2 commented 3 months ago

for reading data from ENVs (e.g. KUBECONFIG) we have a working code snippet that uses VIper, we could use

Working Viper snippet for working with ENVs ```go package 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) } } ```
kwiatekus commented 3 months ago

Assume the following usage scenario

  • create kyma instance
  • create hana instance & bind hana instance
  • create any service instance (i.e object store) & bind object store instance
  • push images & deploy application
  • deprovision hana
  • deprovision objectstore
  • deprovision kyma
kwiatekus commented 2 months ago
github-actions[bot] commented 2 weeks ago

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. Thank you for your contributions.

github-actions[bot] commented 1 week ago

This issue has been automatically closed due to the lack of recent activity. /lifecycle rotten