pushcmc

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CertManagerRegionKey         = "cert_manager_route53_region"
	CertManagerRoleKey           = "cert_manager_route53_role_base"
	CertManagerAccessKey         = "cert_manager_route53_accesskey"
	CertManagerSecretKey         = "cert_manager_route53_secretaccesskey" // #nosec G101
	CloudDirectorRefreshTokenKey = "REFRESH_TOKEN"
	AzureClientIDKey             = "clientId"
	AzureClientSecretKey         = "clientSecret"
	AzureSubscriptionIdKey       = "subscriptionId"
	AzureTenantIDKey             = "tenantId"
)
View Source
const (
	CloudDirectorCredentialsFile = "cloud-director.sh"        // #nosec G101
	VsphereCredentialsFile       = "vsphere-credentials.yaml" // #nosec G101
	AzureCredentialsFile         = "capz.secrets.sh"          // #nosec G101
	AzureIdentityFile            = "capz.identity.sh"
)

Variables

View Source
var ErrInvalidFlag = errors.New("invalid flag")

Functions

func GetSecrets

func GetSecrets(cluster string) []string

Types

type AzureFlags

type AzureFlags struct {
	UAClientID     string
	UATenantID     string
	UAResourceID   string
	ClientID       string
	TenantID       string
	ClientSecret   string
	SubscriptionID string
}

type CMCFlags

type CMCFlags struct {
	Secrets                      SecretFlags
	SecretFolder                 string
	AgePubKey                    string
	TaylorBotToken               string
	MCAppsPreventDeletion        bool
	ClusterAppName               string
	ClusterAppCatalog            string
	ClusterAppVersion            string
	ClusterNamespace             string
	ClusterIntegratesDefaultApps bool
	ConfigureContainerRegistries bool
	DefaultAppsName              string
	DefaultAppsCatalog           string
	DefaultAppsVersion           string
	PrivateCA                    bool
	PrivateMC                    bool
	CertManagerDNSChallenge      bool
	MCCustomCoreDNSConfig        string
	MCProxyEnabled               bool
	MCHTTPSProxy                 string
	RegistryDomain               string
	MCBBranchSource              string
	ConfigBranch                 string
	MCAppCollectionBranch        string
}

type Config

type Config struct {
	Cluster        string
	Github         *github.Github
	BaseDomain     string
	CMCRepository  string
	CMCBranch      string
	Provider       string
	Input          *cmc.CMC
	Flags          CMCFlags
	DisplaySecrets bool
}

func (*Config) Branch

func (c *Config) Branch(ctx context.Context, cmcRepository github.Repository) error

func (*Config) Create

func (c *Config) Create(ctx context.Context, sopsFile string) (*cmc.CMC, error)

func (*Config) EnsureFlagsAreSet

func (c *Config) EnsureFlagsAreSet() error

func (*Config) Pull

func (c *Config) Pull(ctx context.Context, cmcRepository github.Repository) (map[string]string, error)

func (*Config) PullTemplate

func (c *Config) PullTemplate() (map[string]string, error)

func (*Config) PullTemplateFile

func (c *Config) PullTemplateFile(path string) (string, error)

func (*Config) Push

func (c *Config) Push(ctx context.Context, desiredCMC map[string]string, message string) (*cmc.CMC, error)

func (*Config) PushCMC

func (c *Config) PushCMC(ctx context.Context) (*cmc.CMC, error)

func (*Config) ReadFileFromSecretFolder

func (c *Config) ReadFileFromSecretFolder(file string) (string, error)

func (*Config) ReadSecretFlags

func (c *Config) ReadSecretFlags() error

func (*Config) Run

func (c *Config) Run(ctx context.Context) (*cmc.CMC, error)

func (*Config) SetSecretFlags

func (c *Config) SetSecretFlags(secrets map[string]string) error

func (*Config) Update

func (c *Config) Update(ctx context.Context, currentCMCmap map[string]string) (*cmc.CMC, error)

func (*Config) Validate

func (c *Config) Validate() error

type DeployKey

type DeployKey struct {
	Passphrase string
	Identity   string
	KnownHosts string
}

type SecretFlags

type SecretFlags struct {
	SSHDeployKey                      DeployKey
	CustomerDeployKey                 DeployKey
	SharedDeployKey                   DeployKey
	VSphereCredentials                string
	CloudDirectorRefreshToken         string
	Azure                             AzureFlags
	ContainerRegistryConfiguration    string
	ClusterValues                     string
	CertManagerRoute53Region          string
	CertManagerRoute53Role            string
	CertManagerRoute53AccessKeyID     string
	CertManagerRoute53SecretAccessKey string
}

Jump to

Keyboard shortcuts

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