Documentation ¶
Index ¶
- Variables
- func Clone(options *CloneOptions) (*gogit.GoGit, error)
- func CommitPush(g *gogit.GoGit, authorName string, authorEmail string, message string, ...) error
- func Create(options *CreateOptions, status *cli.Status) (string, gitprovider.UserRepository, error)
- func DecodeUniversalURL(URL string, transport gitprovider.TransportType) (string, error)
- func GetValueFromMap(obj map[interface{}]interface{}, keys []string) (interface{}, error)
- func OpenApplicationFile(path string) (map[interface{}]interface{}, error)
- func UniversalURL(URL string) (string, gitprovider.TransportType, error)
- type Application
- type ApplicationConfig
- type ApplicationDependency
- type ApplicationRepo
- func (r *ApplicationRepo) CommitPush(authorName string, authorEmail string, message string, destinationUrl string, ...) error
- func (r *ApplicationRepo) Config() *ApplicationConfig
- func (r *ApplicationRepo) Encrypt(clusterConfig *ClusterConfig, status *cli.Status) error
- func (r *ApplicationRepo) GetFilesFromAnotherRepo(repo *ApplicationRepo) error
- func (r *ApplicationRepo) Git() *gogit.GoGit
- func (r *ApplicationRepo) OpenApplicationConfig() error
- func (r *ApplicationRepo) Render(destinationRepo Repository, username, pwd string, status *cli.Status) error
- func (r *ApplicationRepo) RenderApplicationConfig(values []string, clusterConfig *ClusterConfig, cloneOptions *CloneOptions, ...) error
- type ApplicationSecret
- type ApplicationValue
- type CloneOptions
- type ClusterConfig
- func (c *ClusterConfig) AddApplication(repository Repository, applicationConfig *ApplicationConfig)
- func (c *ClusterConfig) GetApplicationConfig(name string) (ApplicationConfig, error)
- func (c *ClusterConfig) GetApplicationRepository(name string) (Repository, error)
- func (c *ClusterConfig) RemoveApplication(name string)
- func (c *ClusterConfig) Save(path string) error
- type ClusterRepo
- func (r *ClusterRepo) AddApplication(URL string, branch string, provider string, destinationPrivate bool, ...) (string, error)
- func (r *ClusterRepo) CommitPush(authorName string, authorEmail string, message string, destinationUrl string, ...) error
- func (r *ClusterRepo) Config() *ClusterConfig
- func (r *ClusterRepo) ConfigureSecretManagement(secretName string, output string, path string, status *cli.Status) error
- func (r *ClusterRepo) Git() *gogit.GoGit
- func (r *ClusterRepo) NewClusterConfig(repository string, sha string, status *cli.Status) error
- func (r *ClusterRepo) OpenClusterConfig(status *cli.Status) error
- func (r *ClusterRepo) RefreshApplication(name string, applicationConfig *ApplicationConfig, status *cli.Status) error
- func (r *ClusterRepo) RemoveApplication(name string, status *cli.Status) error
- func (r *ClusterRepo) SaveClusterConfig() error
- type ClusterValue
- type Configuration
- type CreateOptions
- type Encryption
- type Password
- type Repository
- type UserValue
- type Values
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrReconciledWithWarning = errors.New("reconciled with warning")
)
Functions ¶
func CommitPush ¶
func Create ¶
func Create(options *CreateOptions, status *cli.Status) (string, gitprovider.UserRepository, error)
func DecodeUniversalURL ¶
func DecodeUniversalURL(URL string, transport gitprovider.TransportType) (string, error)
func GetValueFromMap ¶
func OpenApplicationFile ¶
func UniversalURL ¶
func UniversalURL(URL string) (string, gitprovider.TransportType, error)
Types ¶
type Application ¶
type Application struct { Name string `json:"name"` Repository Repository `json:"repository"` Configuration ApplicationConfig `json:"configuration"` }
type ApplicationConfig ¶
type ApplicationConfig struct { Name string `json:"name"` Namespace string `json:"namespace"` ServiceAccountName string `json:"serviceAccountName"` Repository string `json:"repository"` TransportType gitprovider.TransportType `json:"transportType"` Sha string `json:"sha"` Values Values `json:"values,omitempty"` TemplatingBlackList []string `json:"templatingBlackList,omitempty"` Encryption Encryption `json:"encryption,omitempty"` Dependencies []bool `json:"dependencies,omitempty"` DependsOn []meta.NamespacedObjectReference `json:"dependsOn,omitempty"` }
func OpenApplicationConfig ¶
func OpenApplicationConfig(path string) (*ApplicationConfig, error)
func RenderApplicationConfig ¶
func RenderApplicationConfig( path string, values []string, clusterConfig *ClusterConfig, cloneOptions *CloneOptions, status *cli.Status, ) (*ApplicationConfig, error)
func (*ApplicationConfig) Check ¶
func (c *ApplicationConfig) Check(clusterConfig *ClusterConfig, alreadyInstalled bool, status *cli.Status) error
func (*ApplicationConfig) GetSha ¶
func (c *ApplicationConfig) GetSha() (string, error)
func (*ApplicationConfig) GetUrl ¶
func (c *ApplicationConfig) GetUrl() (string, error)
func (*ApplicationConfig) Save ¶
func (c *ApplicationConfig) Save(path string) error
type ApplicationDependency ¶
type ApplicationRepo ¶
type ApplicationRepo struct {
// contains filtered or unexported fields
}
func CloneApplicationRepo ¶
func CloneApplicationRepo(options *CloneOptions, status *cli.Status) (*ApplicationRepo, error)
func (*ApplicationRepo) CommitPush ¶
func (*ApplicationRepo) Config ¶
func (r *ApplicationRepo) Config() *ApplicationConfig
func (*ApplicationRepo) Encrypt ¶
func (r *ApplicationRepo) Encrypt(clusterConfig *ClusterConfig, status *cli.Status) error
func (*ApplicationRepo) GetFilesFromAnotherRepo ¶
func (r *ApplicationRepo) GetFilesFromAnotherRepo(repo *ApplicationRepo) error
Replace all the files from r by the ones from repo except the .git folder
func (*ApplicationRepo) Git ¶
func (r *ApplicationRepo) Git() *gogit.GoGit
func (*ApplicationRepo) OpenApplicationConfig ¶
func (r *ApplicationRepo) OpenApplicationConfig() error
func (*ApplicationRepo) Render ¶
func (r *ApplicationRepo) Render(destinationRepo Repository, username, pwd string, status *cli.Status) error
func (*ApplicationRepo) RenderApplicationConfig ¶
func (r *ApplicationRepo) RenderApplicationConfig(values []string, clusterConfig *ClusterConfig, cloneOptions *CloneOptions, status *cli.Status) error
type ApplicationSecret ¶
type ApplicationValue ¶
type CloneOptions ¶
type CloneOptions struct { URL string RepositoryName string Owner string TransportType gitprovider.TransportType Branch string Sha string Username string Password string PrivateKeyFile string Timeout time.Duration Personal bool Description string Visibility string Reconcile bool Teams map[string]string ReadWriteKey bool CaBundle []byte SshHostname string Provider gitprovider.Client }
type ClusterConfig ¶
type ClusterConfig struct { Repository string `json:"repository"` Sha string `json:"sha"` AgeKey string `json:"ageKey,omitempty"` SopsAgeSecret string `json:"sopsAgeSecret,omitempty"` Applications []Application `json:"applications,omitempty"` }
func NewClusterConfig ¶
func NewClusterConfig(repository string, sha string) *ClusterConfig
func OpenClusterConfig ¶
func OpenClusterConfig(path string) (*ClusterConfig, error)
func (*ClusterConfig) AddApplication ¶
func (c *ClusterConfig) AddApplication(repository Repository, applicationConfig *ApplicationConfig)
func (*ClusterConfig) GetApplicationConfig ¶
func (c *ClusterConfig) GetApplicationConfig(name string) (ApplicationConfig, error)
func (*ClusterConfig) GetApplicationRepository ¶
func (c *ClusterConfig) GetApplicationRepository(name string) (Repository, error)
func (*ClusterConfig) RemoveApplication ¶
func (c *ClusterConfig) RemoveApplication(name string)
func (*ClusterConfig) Save ¶
func (c *ClusterConfig) Save(path string) error
type ClusterRepo ¶
type ClusterRepo struct {
// contains filtered or unexported fields
}
func CloneClusterRepo ¶
func CloneClusterRepo(options *CloneOptions, status *cli.Status) (*ClusterRepo, error)
func (*ClusterRepo) AddApplication ¶
func (r *ClusterRepo) AddApplication( URL string, branch string, provider string, destinationPrivate bool, applicationConfig *ApplicationConfig, clusterRole bool, decryptionSecret string, path string, sourceSecretOptions *yaml.SourceSecretOptions, status *cli.Status, ) (string, error)
func (*ClusterRepo) CommitPush ¶
func (*ClusterRepo) Config ¶
func (r *ClusterRepo) Config() *ClusterConfig
func (*ClusterRepo) ConfigureSecretManagement ¶
func (*ClusterRepo) Git ¶
func (r *ClusterRepo) Git() *gogit.GoGit
func (*ClusterRepo) NewClusterConfig ¶
func (*ClusterRepo) OpenClusterConfig ¶
func (r *ClusterRepo) OpenClusterConfig(status *cli.Status) error
func (*ClusterRepo) RefreshApplication ¶
func (r *ClusterRepo) RefreshApplication(name string, applicationConfig *ApplicationConfig, status *cli.Status) error
func (*ClusterRepo) RemoveApplication ¶
func (r *ClusterRepo) RemoveApplication(name string, status *cli.Status) error
func (*ClusterRepo) SaveClusterConfig ¶
func (r *ClusterRepo) SaveClusterConfig() error
type ClusterValue ¶
type Configuration ¶
type CreateOptions ¶
type Encryption ¶
type Password ¶
type Password struct { Name string `json:"name"` Description string `json:"description,omitempty"` Print bool `json:"print,omitempty"` Lenght int `json:"length,omitempty"` NumDigits int `json:"numDigits,omitempty"` NumSymbols int `json:"numSymbols,omitempty"` NoUpper bool `json:"noUpper,omitempty"` AllowRepeat bool `json:"allowRepeat,omitempty"` Base64 bool `json:"base64,omitempty"` Value interface{} `json:"value,omitempty"` }
type Repository ¶
type Repository struct { URL string `json:"url,omitempty"` Owner string `json:"owner,omitempty"` Name string `json:"name,omitempty"` Branch string `json:"branch,omitempty"` Path string `json:"path,omitempty"` }
func CreateRepository ¶
func CreateRepository(URL, branch, provider, path string) (Repository, error)
type Values ¶
type Values struct { ApplicationDependencies []ApplicationDependency `json:"applicationDependencies,omitempty"` UserValues []UserValue `json:"userValues,omitempty"` ClusterValues []ClusterValue `json:"clusterValues,omitempty"` ApplicationValues []ApplicationValue `json:"applicationValues,omitempty"` ApplicationSecrets []ApplicationSecret `json:"applicationSecrets,omitempty"` Passwords []Password `json:"passwords,omitempty"` }
Click to show internal directories.
Click to hide internal directories.