gitops

package
v1.108.10 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2024 License: Apache-2.0 Imports: 31 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CloneAndCheckout

func CloneAndCheckout(workDir string, cloneOptions *git.CloneOptions, branchName string) (*git.Repository, *git.Worktree, error)

func CreateGitOps

func CreateGitOps(provider string, repoURI string, hostname string, httpPort string, sshPort string) error

func CreateGitOpsCommit

func CreateGitOpsCommit(gitOpsConfig *GitOpsConfig, appSlug string, appName string, newSequence int, archiveDir string, downstreamName string) (string, error)

func DisableDownstreamGitOps

func DisableDownstreamGitOps(appID string, clusterID string, gitOpsConfig *GitOpsConfig) error

func ResetGitOps

func ResetGitOps() error

func SetGitOpsError

func SetGitOpsError(appID string, clusterID string, errMsg string) error

func TestGitOpsConnection

func TestGitOpsConnection(gitOpsConfig *GitOpsConfig) (string, error)

TestGitOpsConnection will attempt a clone of the target gitops repo. It returns the default branch name from the clone.

func UpdateDownstreamGitOps

func UpdateDownstreamGitOps(appID, clusterID, uri, branch, path, format, action string) error

Types

type GitOpsConfig

type GitOpsConfig struct {
	Provider    string `json:"provider"`
	RepoURI     string `json:"repoUri"`
	Hostname    string `json:"hostname"`
	HTTPPort    string `json:"httpPort"`
	SSHPort     string `json:"sshPort"`
	Path        string `json:"path"`
	Branch      string `json:"branch"`
	Format      string `json:"format"`
	Action      string `json:"action"`
	PublicKey   string `json:"publicKey"`
	PrivateKey  string `json:"-"`
	IsConnected bool   `json:"isConnected"`
}

func GetDownstreamGitOps

func GetDownstreamGitOps(appID string, clusterID string) (*GitOpsConfig, error)

GetDownstreamGitOps will return the gitops config for a downstream, This implementation copies how it works in typescript.

func GetDownstreamGitOpsConfig added in v1.97.0

func GetDownstreamGitOpsConfig(clientset kubernetes.Interface, appID string, clusterID string) (*GitOpsConfig, error)

func (*GitOpsConfig) CloneURL

func (g *GitOpsConfig) CloneURL() (string, error)

func (*GitOpsConfig) CommitURL

func (g *GitOpsConfig) CommitURL(hash string) string

type GlobalGitOpsConfig

type GlobalGitOpsConfig struct {
	Enabled  bool   `json:"enabled"`
	Hostname string `json:"hostname"`
	HTTPPort string `json:"httpPort"`
	SSHPort  string `json:"sshPort"`
	Provider string `json:"provider"`
	URI      string `json:"uri"`
}

func GetGitOps

func GetGitOps() (GlobalGitOpsConfig, error)

type KeyPair

type KeyPair struct {
	PrivateKeyPEM string
	PublicKeySSH  string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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