constants

package
v2.0.0-...-2d05721 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ArtifactDirectory is a directory containing artifacts for the project and shouldn't be committed to source.
	ArtifactDirectory = ".artifacts"

	// PermissionUserReadWriteExecute is the permissions for the artifact directory.
	PermissionUserReadWriteExecute = 0o0700

	// ConfigsDirectory is where the credentials used for testing is placed.
	// This isn't committed in git.
	ConfigsDirectory = "configs"

	// CacheDirectory is where the cache for the project is placed, ie artifacts that don't need to be rebuilt often.
	CacheDirectory = ".cache"

	// ExamplesDirectory is the directory where the kubernetes manifests are stored.
	ExamplesDirectory = "examples"

	// CacheChartsDirectory is the directory where the cached helm values file is copied to.
	CacheChartsDirectory = ".cache/charts"

	// CacheCredentialFile is the path to the credential file for the project, which is cached locally.
	CacheCredentialFile = ".cache/credentials.json" //nolint:gosec // this is a test project and this directory is excluded from source
)
View Source
const (
	// KindClusterName is the name of the kind cluster.
	KindClusterName = "dsvtest"
	// KindClusterName is the name of the kind cluster.
	KindContextName = "dsvtest"
	// KubeconfigPath is the path to the kubeconfig file for this project, which is cached locally.
	Kubeconfig = ".cache/config"
	// KubectlNamespace is the namespace used for all kubectl commands, so that they don't operate in default or other namespace by accident.
	KubectlNamespace = "dsv"

	// DockerImageQualified is the qualified path of the image in Docker Hub.
	DockerImageQualified = "docker.io/delineaxpm/dsv-k8s"
	// DockerImageNameLocal is the name of the built image to run locally and load with minikube/kind.
	DockerImageNameLocal = "dsv-k8s"
)
View Source
const (

	// HelmTimeout is the timeout for helm commands using the CLI.
	HelmTimeout = "5m"
	// ChartsDirectory is the directory where the helm charts are placed, in sub directories.
	ChartsDirectory = "charts"
	// SternFilter is the filter for dsv-filter-name for streaming logs easily.
	SternFilter = "dsv-syncer, dsv-injector"
)
View Source
const (
	// MinikubeCPU is the CPU count for minikube.
	MinikubeCPU = "2"
	// MinikubeMemory is the memory for minikube.
	MinikubeMemory = "2048"
)

Variables

View Source
var CacheManifestDirectory = filepath.Join(CacheDirectory, "manifests")

CacheManifestDirectory is the directory where helm charts are cached for local tweaking. They are copied from the examples directory to allow editing without committing to source control.

View Source
var DefaultHelmTimeoutMinutes = time.Minute * 5

DefaultHelmTimeoutMinutes is the default timeout for helm commands.

View Source
var HelmChartsList = []HelmCharts{
	{
		ReleaseName: "dsv-syncer",
		ChartPath:   filepath.Join(ChartsDirectory, "dsv-syncer"),
		Namespace:   "dsv",
		Values:      filepath.Join(CacheDirectory, "dsv-syncer", "values.yaml"),
	},
	{
		ReleaseName: "dsv-injector",
		ChartPath:   filepath.Join(ChartsDirectory, "dsv-injector"),
		Namespace:   "dsv",
		Values:      filepath.Join(CacheDirectory, "dsv-injector", "values.yaml"),
	},
}

Functions

This section is empty.

Types

type HelmCharts

type HelmCharts struct {
	ReleaseName string
	ChartPath   string
	Namespace   string
	// Values is the customized yaml file placed in the CacheDirectory to run install with.
	// Copy the values.yaml from the helm chart to start here.
	Values string
}

Jump to

Keyboard shortcuts

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