create

package
v0.7.14-84-g82deacc3 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2024 License: BSD-3-Clause Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Create

Create a KraftCloud instance.

func NewCmd

func NewCmd() *cobra.Command

func Rollout added in v0.7.14

func Rollout(ctx context.Context, opts *CreateOptions, newInstance *kcinstances.GetResponseItem, newServiceGroup *kcservices.GetResponseItem) error

Rollout an instance in a service group.

Types

type CreateOptions

type CreateOptions struct {
	Auth                   *config.AuthConfig    `noattribute:"true"`
	Client                 kraftcloud.KraftCloud `noattribute:"true"`
	Env                    []string              `local:"true" long:"env" short:"e" usage:"Environmental variables"`
	Features               []string              `local:"true" long:"feature" short:"f" usage:"List of features to enable"`
	FQDN                   string                `local:"true" long:"fqdn" short:"d" usage:"The Fully Qualified Domain Name to use for the service"`
	Image                  string                `noattribute:"true"`
	Memory                 int                   `local:"true" long:"memory" short:"M" usage:"Specify the amount of memory to allocate (MiB)"`
	Metro                  string                `noattribute:"true"`
	Name                   string                `local:"true" long:"name" short:"n" usage:"Specify the name of the instance"`
	Output                 string                `local:"true" long:"output" short:"o" usage:"Set output format. Options: table,yaml,json,list" default:"table"`
	Ports                  []string              `local:"true" long:"port" short:"p" usage:"Specify the port mapping between external to internal"`
	Replicas               int                   `local:"true" long:"replicas" short:"R" usage:"Number of replicas of the instance" default:"0"`
	Rollout                bool                  `local:"true" long:"rollout" short:"r" usage:"Roll out the instance in a service group"`
	ServiceGroupNameOrUUID string                `local:"true" long:"service-group" short:"g" usage:"Attach this instance to an existing service group"`
	Start                  bool                  `local:"true" long:"start" short:"S" usage:"Immediately start the instance after creation"`
	ScaleToZero            bool                  `local:"true" long:"scale-to-zero" short:"0" usage:"Scale the instance to zero after deployment"`
	SubDomain              string                `local:"true" long:"subdomain" short:"s" usage:"Set the subdomain to use when creating the service"`
	Token                  string                `noattribute:"true"`
	Volumes                []string              `local:"true" long:"volumes" short:"v" usage:"List of volumes to attach instance to"`
	WaitForImage           bool                  `local:"true" long:"wait-for-image" short:"w" usage:"Wait for the image to be available before creating the instance"`
}

func (*CreateOptions) Pre

func (opts *CreateOptions) Pre(cmd *cobra.Command, _ []string) error

func (*CreateOptions) Run

func (opts *CreateOptions) Run(ctx context.Context, args []string) error

Jump to

Keyboard shortcuts

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