version

package
v0.32.0-rc.0 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Package version contains common functions to get versions

Package version contains version cmd

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FetchCrossplaneVersion

func FetchCrossplaneVersion(ctx context.Context, clientset kubernetes.Clientset) (string, error)

FetchCrossplaneVersion initializes a Kubernetes client and fetches and returns the version of the Crossplane deployment. If the version does not have a leading 'v', it prepends it.

func FetchSpacesVersion

func FetchSpacesVersion(ctx context.Context, context *clientcmdapi.Context, clientset kubernetes.Clientset) (string, error)

FetchSpacesVersion initializes a Kubernetes client and fetches and returns the version of the spaces-controller deployment.

Types

type Cmd

type Cmd struct {
	Client bool `env:"" help:"If true, shows client version only (no server required)." json:"client,omitempty"`

	// Common Upbound API configuration
	Flags upbound.Flags `embed:""`
}

func (*Cmd) AfterApply added in v0.30.0

func (c *Cmd) AfterApply(kongCtx *kong.Context) error

func (*Cmd) BeforeApply

func (c *Cmd) BeforeApply() error

BeforeApply sets default values and parses flags

func (*Cmd) BuildVersionInfo added in v0.30.0

func (c *Cmd) BuildVersionInfo(ctx context.Context, kongCtx *kong.Context, upCtx *upbound.Context) (v versionInfo)

func (*Cmd) Help

func (c *Cmd) Help() string

func (*Cmd) Run

func (c *Cmd) Run(ctx context.Context, kongCtx *kong.Context, upCtx *upbound.Context, printer upterm.Printer) error

Jump to

Keyboard shortcuts

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