config

package
v1.0.0 Latest Latest
Warning

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

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

Documentation

Overview

Package config stores the global configuration and constants.

Index

Constants

View Source
const (
	GithubProject = "racer159/jackal"

	// JackalMaxChartNameLength limits helm chart name size to account for K8s/helm limits and jackal prefix
	JackalMaxChartNameLength = 40

	JackalAgentHost = "agent-hook.jackal.svc"

	JackalConnectLabelName             = "jackal.dev/connect-name"
	JackalConnectAnnotationDescription = "jackal.dev/connect-description"
	JackalConnectAnnotationURL         = "jackal.dev/connect-url"

	JackalManagedByLabel     = "app.kubernetes.io/managed-by"
	JackalCleanupScriptsPath = "/opt/jackal"

	JackalPackagePrefix = "jackal-package-"

	JackalDeployStage = "Deploy"
	JackalCreateStage = "Create"
	JackalMirrorStage = "Mirror"
)

Jackal Global Configuration Constants.

View Source
const (
	JackalArtifactTokenName = "jackal-artifact-registry-token"

	JackalImagePullSecretName = "private-registry"
	JackalGitServerSecretName = "private-git-server"

	JackalLoggingUser = "jackal-admin"

	UnsetCLIVersion = "unset-development-only"
)

Jackal Constants for In-Cluster Services.

Variables

View Source
var (
	// CLIVersion track the version of the CLI
	CLIVersion = UnsetCLIVersion

	// ActionsUseSystemJackal sets whether to use Jackal from the system path if Jackal is being used as a library
	ActionsUseSystemJackal = false

	// ActionsCommandJackalPrefix sets a sub command prefix that Jackal commands are under in the current binary if Jackal is being used as a library (and use system Jackal is not specified)
	ActionsCommandJackalPrefix = ""

	// CommonOptions tracks user-defined values that apply across commands
	CommonOptions types.JackalCommonOptions

	// CLIArch is the computer architecture of the device executing the CLI commands
	CLIArch string

	// JackalSeedPort is the NodePort Jackal uses for the 'seed registry'
	JackalSeedPort string

	// SkipLogFile is a flag to skip logging to a file
	SkipLogFile bool

	// NoColor is a flag to disable colors in output
	NoColor bool

	CosignPublicKey string
	JackalSchema    embed.FS

	JackalDefaultCachePath = filepath.Join("~", ".jackal-cache")

	// Default Time Vars
	JackalDefaultTimeout = 15 * time.Minute
	JackalDefaultRetries = 3
)

Jackal Global Configuration Variables.

Functions

func GetAbsCachePath

func GetAbsCachePath() string

GetAbsCachePath gets the absolute cache path for images and git repos.

func GetAbsHomePath

func GetAbsHomePath(path string) string

GetAbsHomePath replaces ~ with the absolute path to a user's home dir

func GetArch

func GetArch(archs ...string) string

GetArch returns the arch based on a priority list with options for overriding.

func GetCraneAuthOption

func GetCraneAuthOption(username string, secret string) crane.Option

GetCraneAuthOption returns a crane auth option with the provided credentials.

func GetCraneOptions

func GetCraneOptions(insecure bool, archs ...string) []crane.Option

GetCraneOptions returns a crane option object with the correct options & platform.

func GetDataInjectionMarker

func GetDataInjectionMarker() string

GetDataInjectionMarker returns the data injection marker based on the current CLI start time.

func GetStartTime

func GetStartTime() int64

GetStartTime returns the timestamp of when the CLI was started.

Types

This section is empty.

Directories

Path Synopsis
Package lang contains the language strings for english used by Jackal Alternative languages can be created by duplicating this file and changing the build tag to "//go:build alt_language && <language>".
Package lang contains the language strings for english used by Jackal Alternative languages can be created by duplicating this file and changing the build tag to "//go:build alt_language && <language>".

Jump to

Keyboard shortcuts

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