package paths

import "github.com/oslokommune/okctl/pkg/paths"

Package paths knows how to construct paths to different locations used by okctl.

Full paths are constructed by combining the GetAbsoluteRepositoryRootDirectory() with a relative path constructor function.

- All relative path construction functions MUST be relative to the users IAC repository root.

Index

Constants

const (
	// DefaultApplicationsOutputDir is where the application declarations reside
	DefaultApplicationsOutputDir = "applications"
	// DefaultApplicationBaseDir is where the directory where application base files reside
	DefaultApplicationBaseDir = "base"
	// DefaultApplicationOverlayDir is where the directory where application overlay files reside
	DefaultApplicationOverlayDir = "overlays"
)
const (
	// DefaultArgoCDClusterConfigDir is where we do cluster specific ArgoCD configuration
	DefaultArgoCDClusterConfigDir = "argocd"
	// DefaultArgoCDClusterConfigApplicationsDir is where we put ArgoCD application manifests for applications
	DefaultArgoCDClusterConfigApplicationsDir = "applications"
	// DefaultArgoCDClusterConfigNamespacesDir is where we put namespace manifests for applications
	DefaultArgoCDClusterConfigNamespacesDir = "namespaces"
)

Functions

func GetAbsoluteRepositoryRootDirectory

func GetAbsoluteRepositoryRootDirectory() (string, error)

GetAbsoluteRepositoryRootDirectory returns the absolute path of the repository root no matter what the current working directory of the repository the user is in.

func GetRelativeApplicationDir

func GetRelativeApplicationDir(cluster v1alpha1.Cluster, app v1alpha1.Application) string

GetRelativeApplicationDir knows how to construct the relative path to a specific applications root directory

func GetRelativeArgoCDApplicationsDir

func GetRelativeArgoCDApplicationsDir(cluster v1alpha1.Cluster) string

GetRelativeArgoCDApplicationsDir knows how to construct the relative path to the directory synched by ArgoCD where we place ArgoCD applications representing active applications in the cluster

Source Files

application.go argocd-cluster-configuration-dir.go doc.go repository.go

Version
v0.0.106 (latest)
Published
Oct 21, 2022
Platform
linux/amd64
Imports
5 packages
Last checked
18 hours ago

Tools for package owners.