getServerConfig

package
v0.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 8, 2018 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var GetServerConfigCmd = &cobra.Command{
	Use:   "get-server-config",
	Short: "Print the current configuration of the controller",
	Long:  ``,
	Run: func(cmd *cobra.Command, args []string) {
		cli := utils.GetClientOutOfCluster()
		controllerNamespace := os.Getenv("KUBELESS_NAMESPACE")
		kubelessConfig := os.Getenv("KUBELESS_CONFIG")

		if len(controllerNamespace) == 0 {
			controllerNamespace = "kubeless"
		}

		if len(kubelessConfig) == 0 {
			kubelessConfig = "kubeless-config"
		}
		config, err := cli.CoreV1().ConfigMaps(controllerNamespace).Get(kubelessConfig, metav1.GetOptions{})
		if err != nil {
			logrus.Fatalf("Unable to read the configmap: %v", err)
		}

		var lr = langruntime.New(config)
		lr.ReadConfigMap()

		logrus.Info("Current Server Config:")
		logrus.Infof("Supported Runtimes are: %s",
			strings.Join(lr.GetRuntimes(), ", "))
	},
}

GetServerConfigCmd contains first-class command for displaying the current server config

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL