cmc

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: 26 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Redacted = "REDACTED"
)
View Source
const (
	SopsFile = ".sops.yaml"
)

Variables

This section is empty.

Functions

func GetData

func GetData(c *CMC) ([]byte, error)

func MarkUnchangedSecretsInMap

func MarkUnchangedSecretsInMap(currentCMC *CMC, desiredCMC *CMC, update map[string]string) (map[string]string, error)

the reason for this is that when secrets are encrypted, they will always appear to be different so we need to remove secrets that have not changed from the update map

Types

type App

type App struct {
	Name    string `yaml:"name"`
	Catalog string `yaml:"catalog"`
	Version string `yaml:"version"`
	Values  string `yaml:"values"`
	AppName string `yaml:"appName,omitempty"`
}

type CAPV

type CAPV struct {
	CloudConfig string `yaml:"cloudConfig"`
}

type CAPVCD

type CAPVCD struct {
	RefreshToken string `yaml:"refreshToken"`
}

type CAPZ

type CAPZ struct {
	UAClientID     string `yaml:"uaClientID"`
	UATenantID     string `yaml:"uaTenantID"`
	UAResourceID   string `yaml:"uaResourceID"`
	ClientID       string `yaml:"clientID"`
	ClientSecret   string `yaml:"clientSecret"`
	TenantID       string `yaml:"tenantID"`
	SubscriptionID string `yaml:"subscriptionID"`
}

type CMC

type CMC struct {
	AgePubKey                    string                       `yaml:"agePubKey"`
	Cluster                      string                       `yaml:"cluster"`
	ClusterApp                   App                          `yaml:"clusterApp"`
	DefaultApps                  App                          `yaml:"defaultApps,omitempty"`
	ClusterIntegratesDefaultApps bool                         `yaml:"clusterIntegratesDefaultApps"`
	MCAppsPreventDeletion        bool                         `yaml:"mcAppsPreventDeletion"`
	PrivateCA                    bool                         `yaml:"privateCA"`
	PrivateMC                    bool                         `yaml:"privateMC"`
	ClusterNamespace             string                       `yaml:"clusterNamespace"`
	Provider                     Provider                     `yaml:"provider"`
	TaylorBotToken               string                       `yaml:"taylorBotToken"`
	SSHdeployKey                 DeployKey                    `yaml:"sshDeployKey"`
	CustomerDeployKey            DeployKey                    `yaml:"customerDeployKey"`
	SharedDeployKey              DeployKey                    `yaml:"sharedDeployKey"`
	CertManagerDNSChallenge      CertManagerDNSChallenge      `yaml:"certManagerDNSChallenge"`
	ConfigureContainerRegistries ConfigureContainerRegistries `yaml:"configureContainerRegistries"`
	CustomCoreDNS                CustomCoreDNS                `yaml:"customCoreDNS"`
	DisableDenyAllNetPol         bool                         `yaml:"disableDenyAllNetPol"`
	MCProxy                      MCProxy                      `yaml:"mcProxy"`
	BaseDomain                   string                       `yaml:"baseDomain,omitempty"`
	RegistryDomain               string                       `yaml:"registryDomain,omitempty"`
	GitOps                       GitOps                       `yaml:"gitOps,omitempty"`
}

func GetCMC

func GetCMC(data []byte) (*CMC, error)

func GetCMCFromFile

func GetCMCFromFile(file string) (*CMC, error)

func GetCMCFromMap

func GetCMCFromMap(input map[string]string, cluster string, cmcRepository string) (*CMC, error)

func (*CMC) DecodeSecrets

func (c *CMC) DecodeSecrets() error

func (*CMC) EncodeSecrets

func (c *CMC) EncodeSecrets()

func (*CMC) Equals

func (c *CMC) Equals(desired *CMC) bool

func (*CMC) GetBaseFiles

func (c *CMC) GetBaseFiles(cmcTemplate map[string]string, path string) (map[string]string, error)

BaseFiles

func (*CMC) GetClusterApps

func (c *CMC) GetClusterApps(cmcTemplate map[string]string, path string) (map[string]string, error)

ClusterApps

func (*CMC) GetCustomCoreDNS

func (c *CMC) GetCustomCoreDNS(cmcTemplate map[string]string, path string) (map[string]string, error)

CustomCoreDNS

func (*CMC) GetDefaultApps

func (c *CMC) GetDefaultApps(cmcTemplate map[string]string, path string) (map[string]string, error)

DefaultApps

func (*CMC) GetDenyNetPol

func (c *CMC) GetDenyNetPol(cmcTemplate map[string]string, path string) (map[string]string, error)

DenyNetPol

func (*CMC) GetDeployKey

func (c *CMC) GetDeployKey(cmcTemplate map[string]string, path string) (map[string]string, error)

DeployKey

func (*CMC) GetKustomization

func (c *CMC) GetKustomization(cmcTemplate map[string]string, path string) (map[string]string, error)

Kustomization

func (*CMC) GetMCProxy

func (c *CMC) GetMCProxy(cmcTemplate map[string]string, path string) (map[string]string, error)

MCProxy

func (*CMC) GetMap

func (c *CMC) GetMap(cmcTemplate map[string]string) (map[string]string, error)

func (*CMC) GetPrivateCA

func (c *CMC) GetPrivateCA(cmcTemplate map[string]string, path string) (map[string]string, error)

PrivateCA

func (*CMC) GetProviders

func (c *CMC) GetProviders(cmcTemplate map[string]string, path string) (map[string]string, error)

Providers

func (*CMC) GetSecrets

func (c *CMC) GetSecrets(cmcTemplate map[string]string, path string) (map[string]string, error)

func (*CMC) GetSops

func (c *CMC) GetSops(cmcTemplate map[string]string, path string) (map[string]string, error)

Sops

func (*CMC) Override

func (c *CMC) Override(override *CMC) *CMC

func (*CMC) Print

func (c *CMC) Print() error

func (*CMC) RedactSecrets

func (c *CMC) RedactSecrets()

func (*CMC) SetDefaultAppValues

func (c *CMC) SetDefaultAppValues() error

func (*CMC) Validate

func (c *CMC) Validate() error

type CertManagerDNSChallenge

type CertManagerDNSChallenge struct {
	Enabled         bool   `yaml:"enabled"`
	Region          string `yaml:"region,omitempty"`
	Role            string `yaml:"role,omitempty"`
	AccessKeyID     string `yaml:"accessKeyID,omitempty"`
	SecretAccessKey string `yaml:"secretAccessKey,omitempty"`
}

type ConfigureContainerRegistries

type ConfigureContainerRegistries struct {
	Enabled bool   `yaml:"enabled"`
	Values  string `yaml:"values,omitempty"`
}

type CustomCoreDNS

type CustomCoreDNS struct {
	Enabled bool   `yaml:"enabled"`
	Values  string `yaml:"values,omitempty"`
}

type DeployKey

type DeployKey struct {
	Passphrase string `yaml:"key"`
	Identity   string `yaml:"identity"`
	KnownHosts string `yaml:"knownHosts"`
}

type GitOps

type GitOps struct {
	CMCRepository         string `yaml:"cmcRepository"`
	CMCBranch             string `yaml:"cmcBranch"`
	MCBBranchSource       string `yaml:"mcbBranchSource"`
	ConfigBranch          string `yaml:"configBranch"`
	MCAppCollectionBranch string `yaml:"mcAppCollectionBranch"`
}

type MCProxy

type MCProxy struct {
	Enabled  bool   `yaml:"enabled"`
	Hostname string `yaml:"hostname,omitempty"`
	Port     string `yaml:"port,omitempty"`
}

type Provider

type Provider struct {
	Name   string `yaml:"name"`
	CAPV   CAPV   `yaml:"capv,omitempty"`
	CAPZ   CAPZ   `yaml:"capz,omitempty"`
	CAPVCD CAPVCD `yaml:"capvcd,omitempty"`
}

Jump to

Keyboard shortcuts

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