INNER CODE UNIT · Go

func

operator-framework/operator-lifecycle-manager · cmd/catalog/main.go:54

func (o *options) run(ctx context.Context, logger *logrus.Logger) error {
	// If the catalogNamespaceEnvVarName environment variable is set, then  update the value of catalogNamespace.
	if catalogNamespaceEnvVarValue := os.Getenv(catalogNamespaceEnvVarName); catalogNamespaceEnvVarValue != "" {
		logger.Infof("%s environment variable is set. Updating Global Catalog Namespace to %s", catalogNamespaceEnvVarName, catalogNamespaceEnvVarValue)
		o.catalogNamespace = catalogNamespaceEnvVarValue
	}

	// create a config client for operator status
	config, err := clientcmd.BuildConfigFromFlags("", o.kubeconfig)
	if err != nil {
		return fmt.Errorf("error configuring client: %s", err.Error())
	}

	configClient, err := configv1client.NewForConfig(config)
	if err != nil {
		return fmt.Errorf("error configuring client: %s", err.Error())
	}
	opClient := operatorclient.NewClientFromConfig(o.kubeconfig, logger)

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…