installation

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: May 2, 2023 License: Apache-2.0 Imports: 38 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var InstallCmd = &cobra.Command{
	Use:   "install",
	Short: "Install Aperture components",
	Long: `
Use this command to install Aperture Controller and Agent on your Kubernetes cluster.`,
	SilenceErrors: true,
	PersistentPreRunE: func(cmd *cobra.Command, args []string) error {
		var err error

		kubeRestConfig, err = utils.GetKubeConfig(kubeConfig)
		if err != nil {
			return err
		}

		err = api.SchemeBuilder.AddToScheme(scheme.Scheme)
		if err != nil {
			return fmt.Errorf("failed to create Kubernetes client: %w", err)
		}
		kubeClient, err = client.New(kubeRestConfig, client.Options{
			Scheme: scheme.Scheme,
		})
		if err != nil {
			return fmt.Errorf("failed to create Kubernetes client: %w", err)
		}

		if err = manageNamespace(); err != nil {
			return err
		}

		latestVersion, err = utils.ResolveLatestVersion()
		if err != nil {
			return err
		}

		if version == "" || version == apertureLatestVersion {
			version = latestVersion
		}
		return nil
	},
}

InstallCmd is the command to install Aperture Controller and Aperture Agent on Kubernetes.

View Source
var UnInstallCmd = &cobra.Command{
	Use:   "uninstall",
	Short: "Uninstall Aperture components",
	Long: `
Use this command to uninstall Aperture Controller and Agent from your Kubernetes cluster.`,
	SilenceErrors: true,
	PersistentPreRunE: func(cmd *cobra.Command, args []string) error {
		var err error

		kubeRestConfig, err = utils.GetKubeConfig(kubeConfig)
		if err != nil {
			return err
		}

		err = api.SchemeBuilder.AddToScheme(scheme.Scheme)
		if err != nil {
			return fmt.Errorf("failed to create Kubernetes client: %w", err)
		}
		kubeClient, err = client.New(kubeRestConfig, client.Options{
			Scheme: scheme.Scheme,
		})
		if err != nil {
			return fmt.Errorf("failed to create Kubernetes client: %w", err)
		}

		latestVersion, err = utils.ResolveLatestVersion()
		if err != nil {
			return err
		}

		if version == "" || version == apertureLatestVersion {
			version = latestVersion
		}
		return nil
	},
}

UnInstallCmd is the command to uninstall Aperture Controller and Aperture Agent from Kubernetes.

Functions

func CheckCertificate added in v1.5.0

func CheckCertificate(secret *corev1.Secret, cm *corev1.ConfigMap, certFileName, keyFileName string) (bool, error)

CheckCertificate checks if the certificate in the secret is valid.

Types

This section is empty.

Jump to

Keyboard shortcuts

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