Documentation ¶
Index ¶
- Constants
- Variables
- func CLICredentialManager(logger logger.Logger) credential.Manager
- func New() *cobra.Command
- func NewCompletionCommand() *cobra.Command
- func NewDeprovisionCmd() *cobra.Command
- func NewKubeconfigCmd() *cobra.Command
- func NewLoginCmd() *cobra.Command
- func NewOperationCmd() *cobra.Command
- func NewOperationDebugLogsCmd() *cobra.Command
- func NewOperationStopCmd() *cobra.Command
- func NewOrchestrationCmd() *cobra.Command
- func NewReconciliationCmd() *cobra.Command
- func NewReconciliationDebugLogsCmd() *cobra.Command
- func NewReconciliationDisableCmd() *cobra.Command
- func NewReconciliationEnableCmd() *cobra.Command
- func NewReconciliationOperationInfoCmd() *cobra.Command
- func NewReconciliationPurgeCmd() *cobra.Command
- func NewReconciliationStateCommand() *cobra.Command
- func NewRuntimeCmd() *cobra.Command
- func NewTaskRunCmd() *cobra.Command
- func NewUpgradeClusterCommand() *cobra.Command
- func NewUpgradeCmd() *cobra.Command
- func NewUpgradeKymaCmd() *cobra.Command
- func PromptUser(msg string) bool
- func SendSlackNotification(title string, cobraCmd *cobra.Command, output string, mgr credential.Manager) error
- func SetGlobalOpts(cmd *cobra.Command)
- func SetOutputOpt(cmd *cobra.Command, opt *string)
- func SetRuntimeTargetOpts(cmd *cobra.Command, targetInputs *[]string, targetExcludeInputs *[]string)
- func ValidateGlobalOpts() error
- func ValidateOutputOpt(opt string) error
- func ValidateTransformRuntimeTargetOpts(targetInputs []string, targetExcludeInputs []string, ...) error
- func ValidateUpgradeKymaVersionFmt(version string) error
- type Attachment
- type CompletionCommand
- type DeprovisionCommand
- type Display
- type GlobalOptionsKey
- func (keys *GlobalOptionsKey) GardenerKubeconfig() string
- func (keys *GlobalOptionsKey) GardenerNamespace() string
- func (keys *GlobalOptionsKey) KEBAPIURL() string
- func (keys *GlobalOptionsKey) KubeconfigAPIURL() string
- func (keys *GlobalOptionsKey) MothershipAPIURL() string
- func (keys *GlobalOptionsKey) OAUTH2ClientID() string
- func (keys *GlobalOptionsKey) OAUTH2ClientSecret() string
- func (keys *GlobalOptionsKey) OAUTH2IssuerURL() string
- func (keys *GlobalOptionsKey) OIDCClientID() string
- func (keys *GlobalOptionsKey) OIDCClientSecret() string
- func (keys *GlobalOptionsKey) OIDCIssuerURL() string
- func (keys *GlobalOptionsKey) SlackAPIURL() string
- func (keys *GlobalOptionsKey) Username() string
- type KubeconfigCommand
- type LoginCommand
- type OrchestrationCommand
- type ReconcilerInfoResponses
- type ReconciliationCommand
- type ReconciliationOperationInfoCommand
- type RuntimeCommand
- type RuntimeLister
- type RuntimeStateCommand
- type RuntimeStateOptions
- type RuntimeTask
- type RuntimeTaskMakager
- type SlackRequestBody
- type TaskRunCommand
- type TaskRunError
- type UpgradeClusterCommand
- type UpgradeCommand
- type UpgradeKymaCommand
Constants ¶
const Gardener_Namespace_Prefix = "garden-kyma"
const ICON_EMOJI = ":high_brightness:"
const KCP_Prefix = "kcp"
const PROD_Postfix = "-prod"
const SLACK_COLOR = "#36a64f" //green
const SLACK_USER_NAME = "upgrade-info"
Variables ¶
var (
ErrMothershipResponse = errors.New("reconciler error response")
)
var GlobalOpts = GlobalOptionsKey{ // contains filtered or unexported fields }
GlobalOpts is the convenience object for storing the fixed global conifguration (parameter) keys
var Version string = "N/A"
Version is the CLI version to be filled in by the build system
Functions ¶
func CLICredentialManager ¶
func CLICredentialManager(logger logger.Logger) credential.Manager
CLICredentialManager returns a credential.Manager configured using the CLI global options
func NewCompletionCommand ¶
NewCompletionCmd constructs a new instance of CompletionCommand and configures it in terms of a cobra.Command
func NewDeprovisionCmd ¶
func NewKubeconfigCmd ¶
NewKubeconfigCmd constructs a new instance of KubeconfigCommand and configures it in terms of a cobra.Command
func NewLoginCmd ¶
NewLoginCmd constructs a new instance of LoginCommand and configures it in terms of a cobra.Command
func NewOperationCmd ¶
func NewOperationStopCmd ¶
func NewOrchestrationCmd ¶
NewOrchestrationCmd constructs a new instance of OrchestrationCommand and configures it in terms of a cobra.Command
func NewReconciliationCmd ¶
NewUpgradeCmd constructs the reconciliation command and all subcommands under the reconciliation command
func NewReconciliationOperationInfoCmd ¶
NewUpgradeCmd constructs the reconciliation command and all subcommands under the reconciliation command
func NewRuntimeCmd ¶
NewRuntimeCmd constructs a new instance of RuntimeCommand and configures it in terms of a cobra.Command
func NewTaskRunCmd ¶
NewTaskRunCmd constructs a new instance of TaskRunCommand and configures it in terms of a cobra.Command
func NewUpgradeCmd ¶
NewUpgradeCmd constructs the upgrade command and all subcommands under the upgrade command
func NewUpgradeKymaCmd ¶
NewUpgradeKymaCmd constructs a new instance of UpgradeKymaCommand and configures it in terms of a cobra.Command
func PromptUser ¶
func SendSlackNotification ¶
func SendSlackNotification(title string, cobraCmd *cobra.Command, output string, mgr credential.Manager) error
SendSlackNotification will post message including attachments to slackhookUrl.
func SetGlobalOpts ¶
SetGlobalOpts configures the global parameters on the given root command
func SetOutputOpt ¶
SetOutputOpt configures the optput type option on the given command
func SetRuntimeTargetOpts ¶
func SetRuntimeTargetOpts(cmd *cobra.Command, targetInputs *[]string, targetExcludeInputs *[]string)
SetRuntimeTargetOpts configures runtime target options on the given command
func ValidateGlobalOpts ¶
func ValidateGlobalOpts() error
ValidateGlobalOpts checks the presence of the required global configuration parameters
func ValidateOutputOpt ¶
ValidateOutputOpt checks whether the given optput type is one of the valid values
func ValidateTransformRuntimeTargetOpts ¶
func ValidateTransformRuntimeTargetOpts(targetInputs []string, targetExcludeInputs []string, targetSpec *orchestration.TargetSpec) error
ValidateTransformRuntimeTargetOpts checks the validity of runtime target options, and transforms them for internal usage
Types ¶
type Attachment ¶
type CompletionCommand ¶
type CompletionCommand struct {
// contains filtered or unexported fields
}
CompletionCommand represents an execution of the kcp completion command
func (*CompletionCommand) Run ¶
func (cmd *CompletionCommand) Run(comd *cobra.Command, args []string) error
Run executes the completion command
func (*CompletionCommand) Validate ¶
func (cmd *CompletionCommand) Validate(args []string) error
Validate checks the input parameters of the completion command
type DeprovisionCommand ¶
type DeprovisionCommand struct {
// contains filtered or unexported fields
}
func (*DeprovisionCommand) Run ¶
func (cmd *DeprovisionCommand) Run() error
func (*DeprovisionCommand) Validate ¶
func (cmd *DeprovisionCommand) Validate() error
type GlobalOptionsKey ¶
type GlobalOptionsKey struct {
// contains filtered or unexported fields
}
GlobalOptionsKey is the type for holding the configuration key for each global parameter
func (*GlobalOptionsKey) GardenerKubeconfig ¶
func (keys *GlobalOptionsKey) GardenerKubeconfig() string
GardenerKubeconfig gets the gardener-kubeconfig global parameter
func (*GlobalOptionsKey) GardenerNamespace ¶
func (keys *GlobalOptionsKey) GardenerNamespace() string
GardenerNamespace gets the gardener-namespace global parameter
func (*GlobalOptionsKey) KEBAPIURL ¶
func (keys *GlobalOptionsKey) KEBAPIURL() string
KEBAPIURL gets the keb-api-url global parameter
func (*GlobalOptionsKey) KubeconfigAPIURL ¶
func (keys *GlobalOptionsKey) KubeconfigAPIURL() string
KubeconfigAPIURL gets the kubeconfig-api-url global parameter
func (*GlobalOptionsKey) MothershipAPIURL ¶
func (keys *GlobalOptionsKey) MothershipAPIURL() string
MothershipAPIURL gets the mothership-api-url global parameter
func (*GlobalOptionsKey) OAUTH2ClientID ¶
func (keys *GlobalOptionsKey) OAUTH2ClientID() string
OAUTH2ClientID gets the oauth2-client-id global parameter
func (*GlobalOptionsKey) OAUTH2ClientSecret ¶
func (keys *GlobalOptionsKey) OAUTH2ClientSecret() string
OAUTH2ClientSecret gets the oauth2-client-secret global parameter
func (*GlobalOptionsKey) OAUTH2IssuerURL ¶
func (keys *GlobalOptionsKey) OAUTH2IssuerURL() string
OAUTH2IssuerURL gets the oauth2-issuer-url global parameter
func (*GlobalOptionsKey) OIDCClientID ¶
func (keys *GlobalOptionsKey) OIDCClientID() string
OIDCClientID gets the oidc-client-id global parameter
func (*GlobalOptionsKey) OIDCClientSecret ¶
func (keys *GlobalOptionsKey) OIDCClientSecret() string
OIDCClientSecret gets the oidc-client-secret global parameter
func (*GlobalOptionsKey) OIDCIssuerURL ¶
func (keys *GlobalOptionsKey) OIDCIssuerURL() string
OIDCIssuerURL gets the oidc-issuer-url global parameter
func (*GlobalOptionsKey) SlackAPIURL ¶
func (keys *GlobalOptionsKey) SlackAPIURL() string
SlackAPIURL gets the slack-api-url global parameter
func (*GlobalOptionsKey) Username ¶
func (keys *GlobalOptionsKey) Username() string
Username gets the username to use for auth
type KubeconfigCommand ¶
type KubeconfigCommand struct {
// contains filtered or unexported fields
}
KubeconfigCommand represents an execution of the kcp kubeconfig command
func (*KubeconfigCommand) Run ¶
func (cmd *KubeconfigCommand) Run() error
Run executes the kubeconfig command
func (*KubeconfigCommand) Validate ¶
func (cmd *KubeconfigCommand) Validate() error
Validate checks the input parameters of the kubeconfig command
type LoginCommand ¶
type LoginCommand struct {
// contains filtered or unexported fields
}
LoginCommand represents an execution of the kcp login command
func (*LoginCommand) Validate ¶
func (cmd *LoginCommand) Validate() error
Validate checks the input parameters of the login command
type OrchestrationCommand ¶
type OrchestrationCommand struct {
// contains filtered or unexported fields
}
OrchestrationCommand represents an execution of the kcp orchestrations command
func (*OrchestrationCommand) Run ¶
func (cmd *OrchestrationCommand) Run(args []string) error
Run executes the orchestrations command
func (*OrchestrationCommand) Validate ¶
func (cmd *OrchestrationCommand) Validate(args []string) error
Validate checks the input parameters of the orchestrations command
type ReconcilerInfoResponses ¶
type ReconcilerInfoResponses struct { mothership.ReconciliationInfoOKResponse KymaConfig mothership.KymaConfig `json:"kymaConfig"` }
type ReconciliationCommand ¶
type ReconciliationCommand struct {
// contains filtered or unexported fields
}
func (*ReconciliationCommand) Run ¶
func (cmd *ReconciliationCommand) Run() error
func (*ReconciliationCommand) Validate ¶
func (cmd *ReconciliationCommand) Validate() error
type ReconciliationOperationInfoCommand ¶
type ReconciliationOperationInfoCommand struct {
// contains filtered or unexported fields
}
func (*ReconciliationOperationInfoCommand) Run ¶
func (cmd *ReconciliationOperationInfoCommand) Run() error
func (*ReconciliationOperationInfoCommand) Validate ¶
func (cmd *ReconciliationOperationInfoCommand) Validate() error
type RuntimeCommand ¶
type RuntimeCommand struct {
// contains filtered or unexported fields
}
RuntimeCommand represents an execution of the kcp runtimes command
func (*RuntimeCommand) Run ¶
func (cmd *RuntimeCommand) Run() error
Run executes the runtimes command
func (*RuntimeCommand) Validate ¶
func (cmd *RuntimeCommand) Validate() error
Validate checks the input parameters of the runtimes command
type RuntimeLister ¶
type RuntimeLister struct {
// contains filtered or unexported fields
}
RuntimeLister implements the interface to obtains runtimes info from KEB for resolver
func NewRuntimeLister ¶
func NewRuntimeLister(client runtime.Client) *RuntimeLister
NewRuntimeLister constructs a RuntimeLister with the given runtime.Client
func (RuntimeLister) ListAllRuntimes ¶
func (rl RuntimeLister) ListAllRuntimes() ([]runtime.RuntimeDTO, error)
ListAllRuntimes fetches all runtimes from KEB using the runtime client
type RuntimeStateCommand ¶
type RuntimeStateCommand struct {
// contains filtered or unexported fields
}
func (*RuntimeStateCommand) Run ¶
func (cmd *RuntimeStateCommand) Run() error
type RuntimeStateOptions ¶
type RuntimeStateOptions struct {
// contains filtered or unexported fields
}
func (*RuntimeStateOptions) Validate ¶
func (opts *RuntimeStateOptions) Validate() error
type RuntimeTask ¶
type RuntimeTask struct {
// contains filtered or unexported fields
}
RuntimeTask is the runtime operation executed by RuntimeTaskMakager via strategy.
type RuntimeTaskMakager ¶
type RuntimeTaskMakager struct {
// contains filtered or unexported fields
}
RuntimeTaskMakager implements Executor interface needed by strategy to execute the runtime task operations.
func NewRuntimeTaskMakager ¶
func NewRuntimeTaskMakager(cmd *TaskRunCommand, operations []orchestration.RuntimeOperation) *RuntimeTaskMakager
NewRuntimeTaskMakager constructs a new RuntimeTaskMakager for the given runtime operations
func (*RuntimeTaskMakager) Execute ¶
func (mgr *RuntimeTaskMakager) Execute(operationID string) (time.Duration, error)
Execute runs the task on the runtime identified by the operationID
func (*RuntimeTaskMakager) Reschedule ¶
func (mgr *RuntimeTaskMakager) Reschedule(operationID string, maintenanceWindowBegin, maintenanceWindowEnd time.Time) error
type SlackRequestBody ¶
type SlackRequestBody struct { Text string `json:"text"` Icon_emoji string `json:"icon_emoji"` Attachments []Attachment `json:"attachments"` Username string `json:"username"` }
type TaskRunCommand ¶
type TaskRunCommand struct {
// contains filtered or unexported fields
}
TaskRunCommand represents an execution of the kcp taskrun command
func (*TaskRunCommand) Run ¶
func (cmd *TaskRunCommand) Run(args []string) error
Run executes the taskrun command
func (*TaskRunCommand) Validate ¶
func (cmd *TaskRunCommand) Validate(args []string) error
Validate checks the input parameters of the taskrun command
type TaskRunError ¶
type TaskRunError struct {
// contains filtered or unexported fields
}
TaskRunError represents failure in task execution for one or more runtimes
func (*TaskRunError) Error ¶
func (e *TaskRunError) Error() string
type UpgradeClusterCommand ¶
type UpgradeClusterCommand struct { UpgradeCommand // contains filtered or unexported fields }
func (*UpgradeClusterCommand) Run ¶
func (cmd *UpgradeClusterCommand) Run() error
Run executes the upgrade cluster command
func (*UpgradeClusterCommand) Validate ¶
func (cmd *UpgradeClusterCommand) Validate() error
type UpgradeCommand ¶
type UpgradeCommand struct {
// contains filtered or unexported fields
}
UpgradeCommand is the base type of all subcommands under the upgrade command. The type holds common attributes and methods inherited by all subcommands
func (*UpgradeCommand) SetUpgradeOpts ¶
func (cmd *UpgradeCommand) SetUpgradeOpts(cobraCmd *cobra.Command)
SetUpgradeOpts configures the upgrade specific options on the given command
func (*UpgradeCommand) ValidateTransformUpgradeOpts ¶
func (cmd *UpgradeCommand) ValidateTransformUpgradeOpts() error
ValidateTransformUpgradeOpts checks in the input upgrade options, and transforms them for internal usage
type UpgradeKymaCommand ¶
type UpgradeKymaCommand struct { UpgradeCommand // contains filtered or unexported fields }
UpgradeKymaCommand represents an execution of the kcp upgrade kyma command. Inherits fields and methods of UpgradeCommand
func (*UpgradeKymaCommand) Run ¶
func (cmd *UpgradeKymaCommand) Run() error
Run executes the upgrade kyma command
func (*UpgradeKymaCommand) SetUpgradeOpts ¶
func (cmd *UpgradeKymaCommand) SetUpgradeOpts(cobraCmd *cobra.Command)
SetUpgradeOpts configures the upgrade kyma specific options on the given command
func (*UpgradeKymaCommand) Validate ¶
func (cmd *UpgradeKymaCommand) Validate() error
Validate checks the input parameters of the upgrade kyma command
Source Files ¶
- completion.go
- deprovision.go
- kubeconfig.go
- login.go
- operation.go
- operation_debug_logs.go
- operation_stop.go
- options.go
- orchestration.go
- reconciliation_debug_logs.go
- reconciliation_info.go
- reconciliation_purge.go
- reconciliations.go
- reconciliations_disable.go
- reconciliations_enable.go
- reconciliations_state.go
- root.go
- runtime.go
- send_slack_notification.go
- taskrun.go
- upgrade.go
- upgrade_cluster.go
- upgrade_kyma.go