Documentation
¶
Index ¶
- Constants
- func ApplyAnnotation(ctx context.Context, kubeClient client.Client, obj client.Object, ...) error
- func ApplyTemplate(in []byte, templateData any) ([]byte, error)
- func CloneRemoteRepoToDir(ctx context.Context, remote v1alpha1.RemoteRepositorySpec, depth int, ...) (billy.Filesystem, *git.Repository, error)
- func CloneRemoteRepoToMemory(ctx context.Context, remote v1alpha1.RemoteRepositorySpec, depth int, ...) (billy.Filesystem, *git.Repository, error)
- func ConvertFSToBytes(inFS FS, name string, templateData any) ([][]byte, error)
- func Copy(srcFile, dstFile string) error
- func CopyDir(src fs.FS, dest string) error
- func CopyDirectory(scrDir, dest string) error
- func CopyFile(src fs.File, dest string) error
- func CopyTreeToTree(srcWT, dstWT billy.Filesystem, srcPath, dstPath string) error
- func CopyWTFile(srcWT, dstWT billy.Filesystem, srcFile, dstFile string) error
- func CreateIfNotExists(dir string, perm os.FileMode) error
- func Exists(filePath string) bool
- func FirstRemoteURL(repo *git.Repository) (string, error)
- func GeneratePassword() (string, error)
- func GetCLIStartTimeAnnotationValue(annotations map[string]string) (string, error)
- func GetHttpClient() *http.Client
- func GetLastObservedSyncTimeAnnotationValue(annotations map[string]string) (string, error)
- func GetWorktreeYamlFiles(parent string, wt billy.Filesystem, recurse bool) ([]string, error)
- func IsYamlFile(input string) bool
- func ReadWorktreeFile(wt billy.Filesystem, path string) ([]byte, error)
- func RepoDir(repoUrl, parent string) string
- func RepoUrlHash(repoUrl string) string
- func SetCLIStartTimeAnnotationValue(annotations map[string]string, timeStamp string)
- func SetLastObservedSyncTimeAnnotationValue(annotations map[string]string, timeStamp string)
- func UpdateSyncAnnotation(ctx context.Context, kubeClient client.Client, obj client.Object) error
- func WriteFS(src fs.FS, dest string) error
- type FS
- type KustomizeRemote
- type RepoMap
- type RepoState
Constants ¶
View Source
const ( QueryStringRef = "ref" QueryStringVersion = "version" QueryStringTimeout = "timeout" QueryStringSubmodules = "submodules" RepoUrlDelimiter = "//" SCPDelimiter = ":" UserDelimiter = "@" )
constants from remote target parameters supported by Kustomize https://github.com/kubernetes-sigs/kustomize/blob/master/examples/remoteBuild.md
Variables ¶
This section is empty.
Functions ¶
func ApplyAnnotation ¶
func CloneRemoteRepoToDir ¶
func CloneRemoteRepoToDir(ctx context.Context, remote v1alpha1.RemoteRepositorySpec, depth int, insecureSkipTLS bool, dir, fallbackUrl string) (billy.Filesystem, *git.Repository, error)
func CloneRemoteRepoToMemory ¶
func CloneRemoteRepoToMemory(ctx context.Context, remote v1alpha1.RemoteRepositorySpec, depth int, insecureSkipTLS bool) (billy.Filesystem, *git.Repository, error)
func ConvertFSToBytes ¶
func CopyDirectory ¶
func CopyTreeToTree ¶
func CopyTreeToTree(srcWT, dstWT billy.Filesystem, srcPath, dstPath string) error
func CopyWTFile ¶
func CopyWTFile(srcWT, dstWT billy.Filesystem, srcFile, dstFile string) error
func FirstRemoteURL ¶
func FirstRemoteURL(repo *git.Repository) (string, error)
func GeneratePassword ¶
func GetHttpClient ¶ added in v0.3.2
func GetWorktreeYamlFiles ¶
returns all files with yaml or yml suffix from a worktree
func IsYamlFile ¶
func ReadWorktreeFile ¶
func ReadWorktreeFile(wt billy.Filesystem, path string) ([]byte, error)
func RepoUrlHash ¶
func UpdateSyncAnnotation ¶
Types ¶
type KustomizeRemote ¶
type KustomizeRemote struct {
Scheme string
User string
Password string
Host string
Port string
RepoPath string
FilePath string
Ref string
Submodules bool
Timeout time.Duration
// contains filtered or unexported fields
}
func NewKustomizeRemote ¶
func NewKustomizeRemote(uri string) (*KustomizeRemote, error)
func (*KustomizeRemote) CloneUrl ¶
func (g *KustomizeRemote) CloneUrl() string
func (*KustomizeRemote) Path ¶
func (g *KustomizeRemote) Path() string
type RepoMap ¶
type RepoMap struct {
// contains filtered or unexported fields
}
func NewRepoLock ¶
func NewRepoLock() *RepoMap
func (*RepoMap) LoadOrStore ¶
Click to show internal directories.
Click to hide internal directories.