Documentation ¶
Index ¶
- Constants
- Variables
- func AddManifestsFlags(cmd *cobra.Command)
- func ApplyPlatformOperatorYaml(cmd *cobra.Command, client clipkg.Client, vzHelper helpers.VZHelper, ...) error
- func ConfirmWithUser(vzHelper helpers.VZHelper, questionText string, skipQuestion bool) (bool, error)
- func FakeDeleteFunc(_ clipkg.Client) error
- func GenerateYAMLForSetFlags(pvs map[string]string) (string, error)
- func GetExistingVPODeployment(client clipkg.Client) (*appsv1.Deployment, error)
- func GetExistingVPOWebhookDeployment(client clipkg.Client) (*appsv1.Deployment, error)
- func GetSetArguments(cmd *cobra.Command, vzHelper helpers.VZHelper) (map[string]string, error)
- func GetVerrazzanoPlatformOperatorPodName(client clipkg.Client) (string, error)
- func GetVersion(cmd *cobra.Command, vzHelper helpers.VZHelper) (string, error)
- func GetVpoLogStream(kubeClient kubernetes.Interface, vpoPodName string) (io.ReadCloser, error)
- func GetWaitTimeout(cmd *cobra.Command, timeoutFlag string) (time.Duration, error)
- func ManifestsFlagChanged(cmd *cobra.Command) bool
- func MergeSetFlags(gv schema.GroupVersion, vz clipkg.Object, overlayYAML string) (clipkg.Object, *unstructured.Unstructured, error)
- func MergeSetFlagsUpgrade(gv schema.GroupVersion, vz *v1beta1.Verrazzano, overlayYAML string) (clipkg.Object, *unstructured.Unstructured, error)
- func MergeYAMLFiles(filenames []string, stdinReader io.Reader) (*unstructured.Unstructured, error)
- func NewCommand(vzHelper helpers.VZHelper, use string, short string, long string) *cobra.Command
- func PrintSimpleLogFormat(sc *bufio.Scanner, outputStream io.Writer, regexp *regexp.Regexp)
- func SetApplyYAMLFunc(f applyYAMLSig)
- func SetDefaultApplyYAMLFunc()
- func SetDefaultDeleteFunc()
- func SetDefaultVPOIsReadyFunc()
- func SetDeleteFunc(f deleteLeftoverPlatformOperatorSig)
- func SetVPOIsReadyFunc(f vpoIsReadySig)
- func UsePlatformOperatorUninstallJob(client clipkg.Client) (bool, error)
- func ValidatePrivateRegistry(cmd *cobra.Command, client clipkg.Client) error
- func WaitForOperationToComplete(client clipkg.Client, kubeClient kubernetes.Interface, ...) error
- func WaitForPlatformOperator(client clipkg.Client, vzHelper helpers.VZHelper, ...) (string, error)
- type LogFormat
- type RootCmdContext
- func (rc *RootCmdContext) GetClient(cmd *cobra.Command) (client.Client, error)
- func (rc *RootCmdContext) GetDiscoveryClient(cmd *cobra.Command) (discovery.DiscoveryInterface, error)
- func (rc *RootCmdContext) GetDynamicClient(cmd *cobra.Command) (dynamic.Interface, error)
- func (rc *RootCmdContext) GetErrorStream() io.Writer
- func (rc *RootCmdContext) GetHTTPClient() *http.Client
- func (rc *RootCmdContext) GetInputStream() io.Reader
- func (rc *RootCmdContext) GetKubeClient(cmd *cobra.Command) (kubernetes.Interface, error)
- func (rc *RootCmdContext) GetOutputStream() io.Writer
- func (rc *RootCmdContext) VerifyCLIArgsNil(cmd *cobra.Command) error
Constants ¶
const VpoSimpleLogFormatRegexp = `"level":"(.*?)","@timestamp":"(.*?)",(.*?)"message":"(.*?)",`
Variables ¶
var DeleteFunc deleteLeftoverPlatformOperatorSig = deleteLeftoverPlatformOperator
DeleteFunc is the default deleteLeftoverPlatformOperator function
Functions ¶
func AddManifestsFlags ¶ added in v1.5.4
AddManifestsFlags adds flags related to providing manifests (including the deprecated operator-file flag as an alias for the manifests flag)
func ApplyPlatformOperatorYaml ¶
func ApplyPlatformOperatorYaml(cmd *cobra.Command, client clipkg.Client, vzHelper helpers.VZHelper, version string) error
ApplyPlatformOperatorYaml applies a given version of the platform operator yaml file
func ConfirmWithUser ¶ added in v1.5.4
func ConfirmWithUser(vzHelper helpers.VZHelper, questionText string, skipQuestion bool) (bool, error)
ConfirmWithUser asks the user a yes/no question and returns true if the user answered yes, false otherwise.
func FakeDeleteFunc ¶
func GenerateYAMLForSetFlags ¶ added in v1.7.0
GenerateYAMLForSetFlags creates a YAML string from a map of property value pairs representing --set flags specified on the install command
func GetExistingVPODeployment ¶ added in v1.5.4
func GetExistingVPODeployment(client clipkg.Client) (*appsv1.Deployment, error)
GetExistingVPODeployment - get existing Verrazzano Platform operator Deployment from the cluster
func GetExistingVPOWebhookDeployment ¶ added in v1.5.4
func GetExistingVPOWebhookDeployment(client clipkg.Client) (*appsv1.Deployment, error)
GetExistingVPOWebhookDeployment - get existing Verrazzano Platform operator webhook deployment from the cluster
func GetSetArguments ¶ added in v1.7.0
GetSetArguments gets all the set arguments and returns a map of property/value
func GetVerrazzanoPlatformOperatorPodName ¶
GetVerrazzanoPlatformOperatorPodName returns the VPO pod name
func GetVersion ¶
GetVersion returns the version of Verrazzano to install/upgrade
func GetVpoLogStream ¶
func GetVpoLogStream(kubeClient kubernetes.Interface, vpoPodName string) (io.ReadCloser, error)
GetVpoLogStream returns the stream to the verrazzano-platform-operator log file
func GetWaitTimeout ¶
GetWaitTimeout returns the time to wait for a command to complete
func ManifestsFlagChanged ¶ added in v1.5.4
ManifestsFlagChanged returns whether the manifests flag (or deprecated operator-file flag) is specified.
func MergeSetFlags ¶
func MergeSetFlags(gv schema.GroupVersion, vz clipkg.Object, overlayYAML string) (clipkg.Object, *unstructured.Unstructured, error)
MergeSetFlags merges yaml representing a set flag passed on the command line with a verrazano install resource. A merged verrazzano install resource is returned.
func MergeSetFlagsUpgrade ¶ added in v1.7.0
func MergeSetFlagsUpgrade(gv schema.GroupVersion, vz *v1beta1.Verrazzano, overlayYAML string) (clipkg.Object, *unstructured.Unstructured, error)
MergeSetFlagsUpgrade takes the existing Verrazzano resource and merges yaml representing a set flag passed on the command line with a A merged verrazzano install resource is returned.
func MergeYAMLFiles ¶
func MergeYAMLFiles(filenames []string, stdinReader io.Reader) (*unstructured.Unstructured, error)
MergeYAMLFiles parses the given slice of filenames containing yaml and merges them into a single verrazzano yaml and then returned as a vz resource.
func NewCommand ¶
NewCommand - utility method to create cobra commands
func PrintSimpleLogFormat ¶
PrintSimpleLogFormat display a VPO log message with the simple log format
func SetApplyYAMLFunc ¶ added in v1.7.0
func SetApplyYAMLFunc(f applyYAMLSig)
func SetDefaultApplyYAMLFunc ¶ added in v1.7.0
func SetDefaultApplyYAMLFunc()
func SetDefaultDeleteFunc ¶
func SetDefaultDeleteFunc()
func SetDefaultVPOIsReadyFunc ¶ added in v1.5.4
func SetDefaultVPOIsReadyFunc()
func SetDeleteFunc ¶
func SetDeleteFunc(f deleteLeftoverPlatformOperatorSig)
func SetVPOIsReadyFunc ¶ added in v1.5.4
func SetVPOIsReadyFunc(f vpoIsReadySig)
func UsePlatformOperatorUninstallJob ¶
UsePlatformOperatorUninstallJob determines whether the version of the platform operator is using an uninstall job. The uninstall job was removed with Verrazzano 1.4.0.
func ValidatePrivateRegistry ¶ added in v1.5.4
ValidatePrivateRegistry - Validate private registry settings in command against those in existing VPO deployment, if any
func WaitForOperationToComplete ¶
func WaitForOperationToComplete(client clipkg.Client, kubeClient kubernetes.Interface, vzHelper helpers.VZHelper, namespacedName types.NamespacedName, timeout time.Duration, vpoTimeout time.Duration, logFormat LogFormat, condType v1beta1.ConditionType) error
WaitForOperationToComplete waits for the Verrazzano install/upgrade to complete and shows the logs of the ongoing Verrazzano install/upgrade.
Types ¶
type LogFormat ¶
type LogFormat string
func GetLogFormat ¶
GetLogFormat returns the format type for streaming log output
type RootCmdContext ¶
type RootCmdContext struct {
genericclioptions.IOStreams
}
func NewRootCmdContext ¶
func NewRootCmdContext(streams genericclioptions.IOStreams) *RootCmdContext
NewRootCmdContext - create the root command context object
func (*RootCmdContext) GetClient ¶
GetClient - return a Kubernetes controller runtime client that supports the schemes used by the CLI
func (*RootCmdContext) GetDiscoveryClient ¶ added in v1.5.6
func (rc *RootCmdContext) GetDiscoveryClient(cmd *cobra.Command) (discovery.DiscoveryInterface, error)
func (*RootCmdContext) GetDynamicClient ¶
GetDynamicClient - return a dynamic clientset for use with the go-client
func (*RootCmdContext) GetErrorStream ¶
func (rc *RootCmdContext) GetErrorStream() io.Writer
GetErrorStream - return the error stream
func (*RootCmdContext) GetHTTPClient ¶
func (rc *RootCmdContext) GetHTTPClient() *http.Client
GetHTTPClient - return an HTTP client
func (*RootCmdContext) GetInputStream ¶
func (rc *RootCmdContext) GetInputStream() io.Reader
GetInputStream - return the input stream
func (*RootCmdContext) GetKubeClient ¶
func (rc *RootCmdContext) GetKubeClient(cmd *cobra.Command) (kubernetes.Interface, error)
GetKubeClient - return a Kubernetes clientset for use with the go-client
func (*RootCmdContext) GetOutputStream ¶
func (rc *RootCmdContext) GetOutputStream() io.Writer
GetOutputStream - return the output stream
func (*RootCmdContext) VerifyCLIArgsNil ¶ added in v1.6.11
func (rc *RootCmdContext) VerifyCLIArgsNil(cmd *cobra.Command) error
VerifyCLIArgsNil checks that command args are not set at the creation of the command