Documentation
¶
Index ¶
- Constants
- func CopyEmbeddedDirToRepo(ctx context.Context, client *github.Client, ...) error
- func CreateNamespace(ctx context.Context, clientset kubernetes.Interface, namespace string) error
- func CreateOrUpdateSecret(ctx context.Context, clientset kubernetes.Interface, namespace, name string, ...) error
- func CreateRepoSecrets(ctx context.Context, k8sClient kubernetes.Interface, credentials *Credentials, ...) error
- func NewDemoCommand() *cobra.Command
- func UploadManifests(ctx context.Context, client *github.Client, repo *github.Repository, ...) error
- type ArgoCDConfig
- type Config
- type Credentials
- type CredentialsProvider
- type FileCredentialsProvider
- type GitOpsPromoterConfig
- type Installer
- func (i *Installer) ApplyBaseApp(ctx context.Context, githubUser string, repoName string) error
- func (i *Installer) InstallArgoCD(ctx context.Context) error
- func (i *Installer) InstallGitOpsPromoter(ctx context.Context) error
- func (i *Installer) PatchArgoCD(ctx context.Context) error
- func (i *Installer) PatchControllerConfiguration(ctx context.Context) error
- func (i *Installer) PortForward(ctx context.Context) error
- func (i *Installer) RefreshAllApps(ctx context.Context) error
- func (i *Installer) RefreshApp(ctx context.Context, appName string) error
- func (i *Installer) SetupCluster(ctx context.Context) error
- type InteractivePrompter
- type PEMValidator
- type Replacements
Constants ¶
const ARGOCDURL = "https://raw.githubusercontent.com/argoproj/argo-cd/%s/manifests/install-with-hydrator.yaml"
ARGOCDURL is the ArgoCD release URL template.
const PROMOTERURL = "https://github.com/argoproj-labs/gitops-promoter/releases/download/%s/install.yaml"
PROMOTERURL is the GitOps Promoter release URL template.
Variables ¶
This section is empty.
Functions ¶
func CopyEmbeddedDirToRepo ¶
func CopyEmbeddedDirToRepo( ctx context.Context, client *github.Client, destOwner, destRepo, destPath string, ) error
CopyEmbeddedDirToRepo copies the embedded helm_guestbook directory to a GitHub repository
func CreateNamespace ¶
CreateNamespace creates a Kubernetes namespace if it doesn't already exist
func CreateOrUpdateSecret ¶
func CreateOrUpdateSecret( ctx context.Context, clientset kubernetes.Interface, namespace, name string, data map[string]string, labels map[string]string, ) error
CreateOrUpdateSecret creates a secret or updates it if it already exists
func CreateRepoSecrets ¶
func CreateRepoSecrets( ctx context.Context, k8sClient kubernetes.Interface, credentials *Credentials, username, repoName string, ) error
CreateRepoSecrets creates the ArgoCD repository secrets for read and write access
func NewDemoCommand ¶
NewDemoCommand creates a new demo command for setting up a gitops-promoter demo repository
func UploadManifests ¶
func UploadManifests( ctx context.Context, client *github.Client, repo *github.Repository, replacements Replacements, ) error
UploadManifests uploads manifest files to a GitHub repository with placeholder replacements
Types ¶
type ArgoCDConfig ¶
type ArgoCDConfig struct {
Upstream string `yaml:"upstream"`
}
ArgoCDConfig holds ArgoCD configuration
type Config ¶
type Config struct {
ArgoCD ArgoCDConfig `yaml:"argocd"`
GitOpsPromoter GitOpsPromoterConfig `yaml:"gitops-promoter"`
}
Config structure for config.yaml
type Credentials ¶
Credentials holds all user-provided authentication info
type CredentialsProvider ¶
type CredentialsProvider interface {
GetCredentials() (*Credentials, error)
}
CredentialsProvider defines the interface for obtaining credentials
type FileCredentialsProvider ¶
type FileCredentialsProvider struct {
// contains filtered or unexported fields
}
FileCredentialsProvider loads credentials from a config file
func NewFileCredentialsProvider ¶
func NewFileCredentialsProvider(path string) *FileCredentialsProvider
NewFileCredentialsProvider creates a provider that loads from a file
func (*FileCredentialsProvider) GetCredentials ¶
func (p *FileCredentialsProvider) GetCredentials() (*Credentials, error)
GetCredentials implements CredentialsProvider
type GitOpsPromoterConfig ¶
type GitOpsPromoterConfig struct {
Upstream string `yaml:"upstream"`
}
GitOpsPromoterConfig holds GitOps Promoter configuration
type Installer ¶
Installer handles cluster setup operations
func NewInstaller ¶
NewInstaller creates a new Installer with the given config path
func (*Installer) ApplyBaseApp ¶
ApplyBaseApp applies the embedded ArgoCD base application
func (*Installer) InstallArgoCD ¶
InstallArgoCD installs ArgoCD into the cluster
func (*Installer) InstallGitOpsPromoter ¶
InstallGitOpsPromoter installs the GitOps Promoter controller
func (*Installer) PatchArgoCD ¶
PatchArgoCD patches the ArgoCD server deployment
func (*Installer) PatchControllerConfiguration ¶
PatchControllerConfiguration patches the ControllerConfiguration resource in the cluster.
func (*Installer) PortForward ¶
PortForward starts port forwarding with automatic restart on failure
func (*Installer) RefreshAllApps ¶
RefreshAllApps refreshes all ArgoCD applications in the argocd namespace
func (*Installer) RefreshApp ¶
RefreshApp forces a hard refresh on an ArgoCD application
type InteractivePrompter ¶
type InteractivePrompter struct {
// contains filtered or unexported fields
}
InteractivePrompter prompts the user for credentials via terminal
func NewInteractivePrompter ¶
func NewInteractivePrompter() *InteractivePrompter
NewInteractivePrompter creates a new interactive prompter
func (*InteractivePrompter) GetCredentials ¶
func (p *InteractivePrompter) GetCredentials() (*Credentials, error)
GetCredentials implements CredentialsProvider
func (*InteractivePrompter) PrintCLIInformation ¶
func (p *InteractivePrompter) PrintCLIInformation()
PrintCLIInformation prints introductory information about the CLI
func (*InteractivePrompter) WithReader ¶
func (p *InteractivePrompter) WithReader(r io.Reader) *InteractivePrompter
WithReader sets a custom reader (useful for testing)
func (*InteractivePrompter) WithWriter ¶
func (p *InteractivePrompter) WithWriter(w io.Writer) *InteractivePrompter
WithWriter sets a custom writer (useful for testing)
type PEMValidator ¶
type PEMValidator struct{}
PEMValidator validates PEM files
func (*PEMValidator) Validate ¶
func (v *PEMValidator) Validate(path string) error
Validate checks if a file contains a valid private key