create

package
v1.7.0 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2023 License: Apache-2.0 Imports: 23 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	FlagName               = "name"
	FlagAuthenticationType = "auth-type"
	FlagAccount            = "account"

	// Azure Service Principal
	FlagAKSClusterName       = "aks-cluster-name"
	FlagAKSResourceGroupName = "aks-resource-group-name"
	FlagUseAdminCredentials  = "aks-use-admin-credentials"

	// AWS Account
	FlagUseServiceRole             = "eks-use-service-role"
	FlagAssumeServiceRole          = "eks-assume-service-role"
	FlagAssumedRoleARN             = "eks-assumed-role-arn"
	FlagAssumedRoleSessionName     = "eks-assumed-role-session-name"
	FlagAssumedRoleSessionDuration = "eks-assumed-role-session-duration"
	FlagAssumedRoleExternalID      = "eks-assumed-role-external-id"
	FlagEKSClusterName             = "eks-cluster-name"

	// Google Cloud Account
	FlagUseVMServiceAccount       = "gke-use-vm-service-account"
	FlagImpersonateServiceAccount = "gke-impersonate-service-account"
	FlagServiceAccountEmails      = "gke-service-account-emails"
	FlagGKEClusterName            = "gke-cluster-name"
	FlagProject                   = "gke-project"
	FlagClusterType               = "gke-cluster-type"
	FlagZone                      = "gke-zone"
	FlagRegion                    = "gke-region"

	FlagClientCertificate = "client-certificate"

	// Pod Service Account
	FlagTokenFilePath = "pod-token-path"

	FlagSkipTLSVerification  = "skip-tls-verification"
	FlagKubernetesClusterURL = "cluster-url"
	FlagKubernetesNamespace  = "namespace"
	FlagCertificate          = "certificate"
	FlagCertificateFilePath  = "certificate-path"

	FlagHealthCheckContainerRegistry = "docker-container-registry"
	FlagHealthCheckTags              = "docker-image-flags"
)
View Source
const (
	AuthTypeDisplayUsernameAndPassword   = "Username and Password"
	AuthTypeDisplayToken                 = "Token"
	AuthTypeDisplayAzureServicePrincipal = "Azure Service Principal"
	AuthTypeDisplayAWSAccount            = "AWS Account"
	AuthTypeDisplayGoogleCloud           = "Google Cloud Account"
	AuthTypeDisplayClientCertificate     = "Client Certificate"
	AuthTypeDisplayPodServiceAccount     = "Pod Service Account"

	AuthTypeUsernameAndPassword   = "UsernamePassword"
	AuthTypeToken                 = "Token"
	AuthTypeAzureServicePrincipal = "AzureServicePrincipal"
	AuthTypeAWSAccount            = "AmazonWebServicesAccount"
	AuthTypeGoogleCloud           = "GoogleCloudAccount"
	AuthTypeClientCertificate     = "KubernetesCertificate"
	AuthTypePodServiceAccount     = "KubernetesPodService"
)
View Source
const (
	ClusterTypeRegional = "Regional"
	ClusterTypeZonal    = "Zonal"
)

Variables

Functions

func NewCmdCreate

func NewCmdCreate(f factory.Factory) *cobra.Command

func PromptAWS

func PromptAWS(opts *CreateOptions) error

func PromptAccount

func PromptAccount(ask question.Asker, acc string, GetAccounts GetAccountsCallback) (string, error)

func PromptAzureService

func PromptAzureService(opts *CreateOptions) error

func PromptCertificate

func PromptCertificate(ask question.Asker, cert string, GetCerts GetCertificatesCallback) (string, error)

func PromptCertificatePath

func PromptCertificatePath(ask question.Asker, certificatePath string) (string, error)

func PromptClientCert

func PromptClientCert(opts *CreateOptions) error

func PromptClusterURL

func PromptClusterURL(ask question.Asker, url string) (string, error)

func PromptContainerRegistry

func PromptContainerRegistry(ask question.Asker, getFeedsCallback GetFeedsCallback) (string, error)

func PromptForAuthTypeInfo

func PromptForAuthTypeInfo(opts *CreateOptions) error

func PromptForAuthenticationType

func PromptForAuthenticationType(ask question.Asker) (string, error)

func PromptForHealthCheck

func PromptForHealthCheck(opts *CreateOptions) error

func PromptGCP

func PromptGCP(opts *CreateOptions) error

func PromptKubernetesDetails

func PromptKubernetesDetails(opts *CreateOptions) error

func PromptKubernetesNamespace

func PromptKubernetesNamespace(ask question.Asker, namespace string) (string, error)

func PromptMissing

func PromptMissing(opts *CreateOptions) error

func PromptPodService

func PromptPodService(opts *CreateOptions) error

func PromptSkipTLS

func PromptSkipTLS(ask question.Asker, skipTLS bool) (bool, error)

func PromptToken

func PromptToken(opts *CreateOptions) error

func PromptUsernamePassword

func PromptUsernamePassword(opts *CreateOptions) error

func QualifyAccount

func QualifyAccount(octopus *client.Client, account string) (string, error)

func QualifyAuthType

func QualifyAuthType(authType string) (string, error)

func QualifyCertificate

func QualifyCertificate(octopus *client.Client, certificate string) (string, error)

Types

type CreateFlags

type CreateFlags struct {
	Name               *flag.Flag[string]
	AuthenticationType *flag.Flag[string]
	Account            *flag.Flag[string]

	// Azure Service Principal
	AKSClusterName       *flag.Flag[string]
	AKSResourceGroupName *flag.Flag[string]
	UseAdminCredentials  *flag.Flag[bool]

	// AWS Account
	UseServiceRole             *flag.Flag[bool]
	AssumeServiceRole          *flag.Flag[bool]
	AssumedRoleARN             *flag.Flag[string]
	AssumedRoleSessionName     *flag.Flag[string]
	AssumedRoleSessionDuration *flag.Flag[int]
	AssumedRoleExternalID      *flag.Flag[string]
	EKSClusterName             *flag.Flag[string]

	// Google Cloud Account
	UseVMServiceAccount       *flag.Flag[bool]
	ImpersonateServiceAccount *flag.Flag[bool]
	ServiceAccountEmails      *flag.Flag[string]
	GKEClusterName            *flag.Flag[string]
	Project                   *flag.Flag[string]
	Zone                      *flag.Flag[string]
	Region                    *flag.Flag[string]

	ClientCertificate *flag.Flag[string]

	// Pod Service Account
	TokenFilePath *flag.Flag[string]

	SkipTLSVerification  *flag.Flag[bool]
	KubernetesClusterURL *flag.Flag[string]
	KubernetesNamespace  *flag.Flag[string]
	Certificate          *flag.Flag[string]
	CertificateFilePath  *flag.Flag[string]

	ContainerRegistry *flag.Flag[string]
	ImageFlags        *flag.Flag[string]

	*shared.CreateTargetEnvironmentFlags
	*shared.CreateTargetRoleFlags
	*machinescommon.CreateTargetMachinePolicyFlags
	*shared.WorkerPoolFlags
	*shared.CreateTargetTenantFlags
	*machinescommon.WebFlags
}

func NewCreateFlags

func NewCreateFlags() *CreateFlags

type CreateOptions

type CreateOptions struct {
	GetUsernamePasswordAccountsCallback GetAccountsCallback
	GetTokenAccountsCallback            GetAccountsCallback
	GetAzureServiceAccountsCallback     GetAccountsCallback
	GetGCPAccountsCallback              GetAccountsCallback
	GetAWSAccountsCallback              GetAccountsCallback
	GetCertificatesCallback             GetCertificatesCallback
	GetFeedsCallback                    GetFeedsCallback
	*CreateFlags
	*shared.CreateTargetEnvironmentOptions
	*shared.CreateTargetRoleOptions
	*shared.WorkerPoolOptions
	*shared.CreateTargetTenantOptions
	*machinescommon.CreateTargetMachinePolicyOptions
	*cmd.Dependencies
}

func NewCreateOptions

func NewCreateOptions(createFlags *CreateFlags, dependencies *cmd.Dependencies) *CreateOptions

func (*CreateOptions) Commit

func (opts *CreateOptions) Commit() error

type GetAccountsCallback

type GetAccountsCallback = func() ([]accounts.IAccount, error)

func CreateGetAccountsCallback

func CreateGetAccountsCallback(octopus *client.Client, accountType accounts.AccountType) GetAccountsCallback

type GetCertificatesCallback

type GetCertificatesCallback = func() ([]*certificates.CertificateResource, error)

func CreateGetCertificatesCallback

func CreateGetCertificatesCallback(octopus *client.Client) GetCertificatesCallback

type GetFeedsCallback

type GetFeedsCallback = func() ([]feeds.IFeed, error)

func CreateGetFeedsCallback

func CreateGetFeedsCallback(octopus *client.Client) GetFeedsCallback

Jump to

Keyboard shortcuts

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