Documentation ¶
Overview ¶
Package types contains all the types used by Jackal.
Package types contains all the types used by Jackal.
Package types contains all the types used by Jackal.
Package types contains all the types used by Jackal.
Package types contains all the types used by Jackal.
Index ¶
- Constants
- type ArtifactServerInfo
- type ComponentStatus
- type ConnectString
- type ConnectStrings
- type DeployedComponent
- type DeployedPackage
- type DeprecatedJackalComponentScripts
- type DifferentialData
- type GitServerInfo
- type InstalledChart
- type JackalBuildData
- type JackalChart
- type JackalCommonOptions
- type JackalComponent
- type JackalComponentAction
- type JackalComponentActionDefaults
- type JackalComponentActionSet
- type JackalComponentActionSetVariable
- type JackalComponentActionWait
- type JackalComponentActionWaitCluster
- type JackalComponentActionWaitNetwork
- type JackalComponentActions
- type JackalComponentImport
- type JackalComponentOnlyCluster
- type JackalComponentOnlyTarget
- type JackalContainerTarget
- type JackalCreateOptions
- type JackalDataInjection
- type JackalDeployOptions
- type JackalFile
- type JackalFindImagesOptions
- type JackalGenerateOptions
- type JackalInitOptions
- type JackalInspectOptions
- type JackalManifest
- type JackalMetadata
- type JackalMirrorOptions
- type JackalPackage
- type JackalPackageConstant
- type JackalPackageKind
- type JackalPackageOptions
- type JackalPackageVariable
- type JackalPublishOptions
- type JackalPullOptions
- type JackalSetVariable
- type JackalSplitPackageData
- type JackalState
- type PackagerConfig
- type RegistryInfo
- type VariableType
- type Webhook
- type WebhookStatus
Constants ¶
const ( WebhookStatusSucceeded WebhookStatus = "Succeeded" WebhookStatusFailed WebhookStatus = "Failed" WebhookStatusRunning WebhookStatus = "Running" WebhookStatusRemoving WebhookStatus = "Removing" ComponentStatusSucceeded ComponentStatus = "Succeeded" ComponentStatusFailed ComponentStatus = "Failed" ComponentStatusDeploying ComponentStatus = "Deploying" ComponentStatusRemoving ComponentStatus = "Removing" )
All the different status options for a Jackal Component or a webhook that is running for a Jackal Component deployment.
const ( JackalGeneratedPasswordLen = 24 JackalGeneratedSecretLen = 48 JackalInClusterContainerRegistryNodePort = 31999 JackalRegistryPushUser = "jackal-push" JackalRegistryPullUser = "jackal-pull" JackalGitPushUser = "jackal-git-user" JackalGitReadUser = "jackal-git-read-user" JackalInClusterGitServiceURL = "http://jackal-gitea-http.jackal.svc.cluster.local:3000" JackalInClusterArtifactServiceURL = JackalInClusterGitServiceURL + "/api/packages/" + JackalGitPushUser )
Values during setup of the initial jackal state
const ( JackalPackageTemplatePrefix = "###JACKAL_PKG_TMPL_" JackalPackageVariablePrefix = "###JACKAL_PKG_VAR_" JackalPackageArch = "###JACKAL_PKG_ARCH###" JackalComponentName = "###JACKAL_COMPONENT_NAME###" )
Jackal looks for these strings in jackal.yaml to make dynamic changes
const DefaultWebhookWaitDuration = time.Minute * 5
DefaultWebhookWaitDuration is the default amount of time Jackal will wait for a webhook to complete.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ArtifactServerInfo ¶
type ArtifactServerInfo struct { PushUsername string `json:"pushUsername" jsonschema:"description=Username of a user with push access to the artifact registry"` PushToken string `json:"pushPassword" jsonschema:"description=Password of a user with push access to the artifact registry"` Address string `json:"address" jsonschema:"description=URL address of the artifact registry"` InternalServer bool `json:"internalServer" jsonschema:"description=Indicates if we are using a artifact registry that Jackal is directly managing"` }
ArtifactServerInfo contains information Jackal uses to communicate with a artifact registry to push/pull repositories to.
func (*ArtifactServerInfo) FillInEmptyValues ¶
func (as *ArtifactServerInfo) FillInEmptyValues()
FillInEmptyValues sets every necessary value that's currently empty to a reasonable default
type ComponentStatus ¶
type ComponentStatus string
ComponentStatus defines the deployment status of a Jackal component within a package.
type ConnectString ¶
type ConnectString struct { Description string `` /* 131-byte string literal not displayed */ URL string `json:"url" jsonschema:"description=URL path that gets appended to the k8s port-forward result"` }
ConnectString contains information about a connection made with Jackal connect.
type ConnectStrings ¶
type ConnectStrings map[string]ConnectString
ConnectStrings is a map of connect names to connection information.
type DeployedComponent ¶
type DeployedComponent struct { Name string `json:"name"` InstalledCharts []InstalledChart `json:"installedCharts"` Status ComponentStatus `json:"status"` ObservedGeneration int `json:"observedGeneration"` }
DeployedComponent contains information about a Jackal Package Component that has been deployed to a cluster.
type DeployedPackage ¶
type DeployedPackage struct { Name string `json:"name"` Data JackalPackage `json:"data"` CLIVersion string `json:"cliVersion"` Generation int `json:"generation"` DeployedComponents []DeployedComponent `json:"deployedComponents"` ComponentWebhooks map[string]map[string]Webhook `json:"componentWebhooks,omitempty"` ConnectStrings ConnectStrings `json:"connectStrings,omitempty"` }
DeployedPackage contains information about a Jackal Package that has been deployed to a cluster This object is saved as the data of a k8s secret within the 'Jackal' namespace (not as part of the JackalState secret).
type DeprecatedJackalComponentScripts ¶
type DeprecatedJackalComponentScripts struct { ShowOutput bool `json:"showOutput,omitempty" jsonschema:"description=Show the output of the script during package deployment"` TimeoutSeconds int `json:"timeoutSeconds,omitempty" jsonschema:"description=Timeout in seconds for the script"` Retry bool `json:"retry,omitempty" jsonschema:"description=Retry the script if it fails"` Prepare []string `json:"prepare,omitempty" jsonschema:"description=Scripts to run before the component is added during package create"` Before []string `json:"before,omitempty" jsonschema:"description=Scripts to run before the component is deployed"` After []string `json:"after,omitempty" jsonschema:"description=Scripts to run after the component successfully deploys"` }
DeprecatedJackalComponentScripts are scripts that run before or after a component is deployed
type DifferentialData ¶
type DifferentialData struct { DifferentialImages map[string]bool DifferentialRepos map[string]bool DifferentialPackageVersion string }
DifferentialData contains image and repository information about the package a Differential Package is Based on.
type GitServerInfo ¶
type GitServerInfo struct { PushUsername string `json:"pushUsername" jsonschema:"description=Username of a user with push access to the git repository"` PushPassword string `json:"pushPassword" jsonschema:"description=Password of a user with push access to the git repository"` PullUsername string `` /* 178-byte string literal not displayed */ PullPassword string `` /* 178-byte string literal not displayed */ Address string `json:"address" jsonschema:"description=URL address of the git server"` InternalServer bool `json:"internalServer" jsonschema:"description=Indicates if we are using a git server that Jackal is directly managing"` }
GitServerInfo contains information Jackal uses to communicate with a git repository to push/pull repositories to.
func (*GitServerInfo) FillInEmptyValues ¶
func (gs *GitServerInfo) FillInEmptyValues() error
FillInEmptyValues sets every necessary value that's currently empty to a reasonable default
type InstalledChart ¶
type InstalledChart struct { Namespace string `json:"namespace"` ChartName string `json:"chartName"` }
InstalledChart contains information about a Helm Chart that has been deployed to a cluster.
type JackalBuildData ¶
type JackalBuildData struct { Terminal string `json:"terminal" jsonschema:"description=The machine name that created this package"` User string `json:"user" jsonschema:"description=The username who created this package"` Architecture string `json:"architecture" jsonschema:"description=The architecture this package was created on"` Timestamp string `json:"timestamp" jsonschema:"description=The timestamp when this package was created"` Version string `json:"version" jsonschema:"description=The version of Jackal used to build this package"` Migrations []string `json:"migrations,omitempty" jsonschema:"description=Any migrations that have been run on this package"` RegistryOverrides map[string]string `` /* 139-byte string literal not displayed */ Differential bool `json:"differential,omitempty" jsonschema:"description=Whether this package was created with differential components"` DifferentialPackageVersion string `` /* 163-byte string literal not displayed */ DifferentialMissing []string `` /* 149-byte string literal not displayed */ LastNonBreakingVersion string `` /* 148-byte string literal not displayed */ Flavor string `json:"flavor,omitempty" jsonschema:"description=The flavor of Jackal used to build this package"` }
JackalBuildData is written during the packager.Create() operation to track details of the created package.
type JackalChart ¶
type JackalChart struct { Name string `` /* 166-byte string literal not displayed */ Version string `` /* 198-byte string literal not displayed */ URL string `` /* 390-byte string literal not displayed */ RepoName string `` /* 138-byte string literal not displayed */ GitPath string `` /* 140-byte string literal not displayed */ LocalPath string `json:"localPath,omitempty" jsonschema:"description=The path to a local chart's folder or .tgz archive"` Namespace string `json:"namespace" jsonschema:"description=The namespace to deploy the chart to"` ReleaseName string `` /* 135-byte string literal not displayed */ NoWait bool `json:"noWait,omitempty" jsonschema:"description=Whether to not wait for chart resources to be ready before continuing"` ValuesFiles []string `` /* 171-byte string literal not displayed */ }
JackalChart defines a helm chart to be deployed.
type JackalCommonOptions ¶
type JackalCommonOptions struct { Confirm bool `json:"confirm" jsonschema:"description=Verify that Jackal should perform an action"` Insecure bool `json:"insecure" jsonschema:"description=Allow insecure connections for remote packages"` CachePath string `json:"cachePath" jsonschema:"description=Path to use to cache images and git repos on package create"` TempDirectory string `` /* 159-byte string literal not displayed */ OCIConcurrency int `jsonschema:"description=Number of concurrent layer operations to perform when interacting with a remote package"` }
JackalCommonOptions tracks the user-defined preferences used across commands.
type JackalComponent ¶
type JackalComponent struct { // Name is the unique identifier for this component Name string `json:"name" jsonschema:"description=The name of the component,pattern=^[a-z0-9\\-]*[a-z0-9]$"` // Description is a message given to a user when deciding to enable this component or not Description string `` /* 135-byte string literal not displayed */ // Default changes the default option when deploying this component Default bool `` /* 130-byte string literal not displayed */ // Required makes this component mandatory for package deployment Required *bool `` /* 130-byte string literal not displayed */ // Only include compatible components during package deployment Only JackalComponentOnlyTarget `json:"only,omitempty" jsonschema:"description=Filter when this component is included in package creation or deployment"` // DeprecatedGroup is a key to match other components to produce a user selector field, used to create a BOOLEAN XOR for a set of components // // Note: ignores default and required flags DeprecatedGroup string `` /* 225-byte string literal not displayed */ // DeprecatedCosignKeyPath to cosign public key for signed online resources DeprecatedCosignKeyPath string `` /* 191-byte string literal not displayed */ // Import refers to another jackal.yaml package component. Import JackalComponentImport `json:"import,omitempty" jsonschema:"description=Import a component from another Jackal package"` // Manifests are raw manifests that get converted into jackal-generated helm charts during deploy Manifests []JackalManifest `` /* 131-byte string literal not displayed */ // Charts are helm charts to install during package deploy Charts []JackalChart `json:"charts,omitempty" jsonschema:"description=Helm charts to install during package deploy"` // Data packages to push into a running cluster DataInjections []JackalDataInjection `json:"dataInjections,omitempty" jsonschema:"description=Datasets to inject into a container in the target cluster"` // Files are files to place on disk during deploy Files []JackalFile `json:"files,omitempty" jsonschema:"description=Files or folders to place on disk during package deployment"` // Images are the online images needed to be included in the jackal package Images []string `json:"images,omitempty" jsonschema:"description=List of OCI images to include in the package"` // Repos are any git repos that need to be pushed into the git server Repos []string `json:"repos,omitempty" jsonschema:"description=List of git repos to include in the package"` // Extensions provide additional functionality to a component Extensions extensions.JackalComponentExtensions `json:"extensions,omitempty" jsonschema:"description=Extend component functionality with additional features"` // DeprecatedScripts are custom commands that run before or after package deployment DeprecatedScripts DeprecatedJackalComponentScripts `` /* 199-byte string literal not displayed */ // Replaces scripts, fine-grained control over commands to run at various stages of a package lifecycle Actions JackalComponentActions `json:"actions,omitempty" jsonschema:"description=Custom commands to run at various stages of a package lifecycle"` }
JackalComponent is the primary functional grouping of assets to deploy by Jackal.
func (JackalComponent) RequiresCluster ¶
func (c JackalComponent) RequiresCluster() bool
RequiresCluster returns if the component requires a cluster connection to deploy
type JackalComponentAction ¶
type JackalComponentAction struct { Mute *bool `json:"mute,omitempty" jsonschema:"description=Hide the output of the command during package deployment (default false)"` MaxTotalSeconds *int `` /* 171-byte string literal not displayed */ MaxRetries *int `json:"maxRetries,omitempty" jsonschema:"description=Retry the command if it fails up to given number of times (default 0)"` Dir *string `json:"dir,omitempty" jsonschema:"description=The working directory to run the command in (default is CWD)"` Env []string `json:"env,omitempty" jsonschema:"description=Additional environment variables to set for the command"` Cmd string `` /* 128-byte string literal not displayed */ Shell *exec.Shell `` /* 163-byte string literal not displayed */ DeprecatedSetVariable string `` /* 325-byte string literal not displayed */ SetVariables []JackalComponentActionSetVariable `` /* 228-byte string literal not displayed */ Description string `` /* 143-byte string literal not displayed */ Wait *JackalComponentActionWait `` /* 199-byte string literal not displayed */ }
JackalComponentAction represents a single action to run during a jackal package operation
type JackalComponentActionDefaults ¶
type JackalComponentActionDefaults struct { Mute bool `json:"mute,omitempty" jsonschema:"description=Hide the output of commands during execution (default false)"` MaxTotalSeconds int `json:"maxTotalSeconds,omitempty" jsonschema:"description=Default timeout in seconds for commands (default to 0, no timeout)"` MaxRetries int `json:"maxRetries,omitempty" jsonschema:"description=Retry commands given number of times if they fail (default 0)"` Dir string `json:"dir,omitempty" jsonschema:"description=Working directory for commands (default CWD)"` Env []string `json:"env,omitempty" jsonschema:"description=Additional environment variables for commands"` Shell exec.Shell `` /* 163-byte string literal not displayed */ }
JackalComponentActionDefaults sets the default configs for child actions
type JackalComponentActionSet ¶
type JackalComponentActionSet struct { Defaults JackalComponentActionDefaults `json:"defaults,omitempty" jsonschema:"description=Default configuration for all actions in this set"` Before []JackalComponentAction `json:"before,omitempty" jsonschema:"description=Actions to run at the start of an operation"` After []JackalComponentAction `json:"after,omitempty" jsonschema:"description=Actions to run at the end of an operation"` OnSuccess []JackalComponentAction `json:"onSuccess,omitempty" jsonschema:"description=Actions to run if all operations succeed"` OnFailure []JackalComponentAction `json:"onFailure,omitempty" jsonschema:"description=Actions to run if all operations fail"` }
JackalComponentActionSet is a set of actions to run during a jackal package operation
type JackalComponentActionSetVariable ¶
type JackalComponentActionSetVariable struct { Name string `json:"name" jsonschema:"description=The name to be used for the variable,pattern=^[A-Z0-9_]+$"` Type VariableType `` /* 223-byte string literal not displayed */ Pattern string `` /* 150-byte string literal not displayed */ Sensitive bool `` /* 128-byte string literal not displayed */ AutoIndent bool `` /* 202-byte string literal not displayed */ }
JackalComponentActionSetVariable represents a variable that is to be set via an action
type JackalComponentActionWait ¶
type JackalComponentActionWait struct { Cluster *JackalComponentActionWaitCluster `` /* 163-byte string literal not displayed */ Network *JackalComponentActionWaitNetwork `` /* 163-byte string literal not displayed */ }
JackalComponentActionWait specifies a condition to wait for before continuing
type JackalComponentActionWaitCluster ¶
type JackalComponentActionWaitCluster struct { Kind string `json:"kind" jsonschema:"description=The kind of resource to wait for,example=Pod,example=Deployment)"` Identifier string `json:"name" jsonschema:"description=The name of the resource or selector to wait for,example=podinfo,example=app=podinfo"` Namespace string `json:"namespace,omitempty" jsonschema:"description=The namespace of the resource to wait for"` Condition string `` /* 241-byte string literal not displayed */ }
JackalComponentActionWaitCluster specifies a condition to wait for before continuing
type JackalComponentActionWaitNetwork ¶
type JackalComponentActionWaitNetwork struct { Protocol string `json:"protocol" jsonschema:"description=The protocol to wait for,enum=tcp,enum=http,enum=https"` Address string `json:"address" jsonschema:"description=The address to wait for,example=localhost:8080,example=1.1.1.1"` Code int `` /* 126-byte string literal not displayed */ }
JackalComponentActionWaitNetwork specifies a condition to wait for before continuing
type JackalComponentActions ¶
type JackalComponentActions struct { OnCreate JackalComponentActionSet `json:"onCreate,omitempty" jsonschema:"description=Actions to run during package creation"` OnDeploy JackalComponentActionSet `json:"onDeploy,omitempty" jsonschema:"description=Actions to run during package deployment"` OnRemove JackalComponentActionSet `json:"onRemove,omitempty" jsonschema:"description=Actions to run during package removal"` }
JackalComponentActions are ActionSets that map to different jackal package operations
type JackalComponentImport ¶
type JackalComponentImport struct { ComponentName string `json:"name,omitempty" jsonschema:"description=The name of the component to import from the referenced jackal.yaml"` // For further explanation see https://regex101.com/r/nxX8vx/1 Path string `json:"path,omitempty" jsonschema:"description=The relative path to a directory containing a jackal.yaml to import from"` // For further explanation see https://regex101.com/r/nxX8vx/1 URL string `json:"url,omitempty" jsonschema:"description=[beta] The URL to a Jackal package to import via OCI,pattern=^oci://.*$"` }
JackalComponentImport structure for including imported Jackal components.
type JackalComponentOnlyCluster ¶
type JackalComponentOnlyCluster struct { Architecture string `` /* 137-byte string literal not displayed */ Distros []string `` /* 152-byte string literal not displayed */ }
JackalComponentOnlyCluster represents the architecture and K8s cluster distribution to filter on.
type JackalComponentOnlyTarget ¶
type JackalComponentOnlyTarget struct { LocalOS string `json:"localOS,omitempty" jsonschema:"description=Only deploy component to specified OS,enum=linux,enum=darwin,enum=windows"` Cluster JackalComponentOnlyCluster `json:"cluster,omitempty" jsonschema:"description=Only deploy component to specified clusters"` Flavor string `` /* 143-byte string literal not displayed */ }
JackalComponentOnlyTarget filters a component to only show it for a given local OS and cluster.
type JackalContainerTarget ¶
type JackalContainerTarget struct { Namespace string `json:"namespace" jsonschema:"description=The namespace to target for data injection"` Selector string `json:"selector" jsonschema:"description=The K8s selector to target for data injection,example=app=data-injection"` Container string `json:"container" jsonschema:"description=The container name to target for data injection"` Path string `json:"path" jsonschema:"description=The path within the container to copy the data into"` }
JackalContainerTarget defines the destination info for a JackalData target
type JackalCreateOptions ¶
type JackalCreateOptions struct { SkipSBOM bool `json:"skipSBOM" jsonschema:"description=Disable the generation of SBOM materials during package creation"` BaseDir string `json:"baseDir" jsonschema:"description=Location where the Jackal package will be created from"` Output string `json:"output" jsonschema:"description=Location where the finalized Jackal package will be placed"` ViewSBOM bool `json:"sbom" jsonschema:"description=Whether to pause to allow for viewing the SBOM post-creation"` SBOMOutputDir string `json:"sbomOutput" jsonschema:"description=Location to output an SBOM into after package creation"` SetVariables map[string]string `` /* 175-byte string literal not displayed */ MaxPackageSizeMB int `` /* 135-byte string literal not displayed */ SigningKeyPath string `json:"signingKeyPath" jsonschema:"description=Location where the private key component of a cosign key-pair can be found"` SigningKeyPassword string `` /* 139-byte string literal not displayed */ DifferentialPackagePath string `` /* 144-byte string literal not displayed */ RegistryOverrides map[string]string `json:"registryOverrides" jsonschema:"description=A map of domains to override on package create when pulling images"` Flavor string `json:"flavor" jsonschema:"description=An optional variant that controls which components will be included in a package"` IsSkeleton bool `json:"isSkeleton" jsonschema:"description=Whether to create a skeleton package"` NoYOLO bool `json:"noYOLO" jsonschema:"description=Whether to create a YOLO package"` }
JackalCreateOptions tracks the user-defined options used to create the package.
type JackalDataInjection ¶
type JackalDataInjection struct { Source string `` /* 149-byte string literal not displayed */ Target JackalContainerTarget `json:"target" jsonschema:"description=The target pod + container to inject the data into"` Compress bool `` /* 175-byte string literal not displayed */ }
JackalDataInjection is a data-injection definition.
type JackalDeployOptions ¶
type JackalDeployOptions struct { AdoptExistingResources bool `` /* 141-byte string literal not displayed */ SkipWebhooks bool `` /* 133-byte string literal not displayed */ Timeout time.Duration `json:"timeout" jsonschema:"description=Timeout for performing Helm operations"` // TODO (@WSTARR): This is a library only addition to Jackal and should be refactored in the future (potentially to utilize component composability). As is it should NOT be exposed directly on the CLI ValuesOverridesMap map[string]map[string]map[string]interface{} `` /* 163-byte string literal not displayed */ }
JackalDeployOptions tracks the user-defined preferences during a package deploy.
type JackalFile ¶
type JackalFile struct { Source string `json:"source" jsonschema:"description=Local folder or file path or remote URL to pull into the package"` Shasum string `json:"shasum,omitempty" jsonschema:"description=(files only) Optional SHA256 checksum of the file"` Target string `` /* 135-byte string literal not displayed */ Executable bool `` /* 136-byte string literal not displayed */ Symlinks []string `json:"symlinks,omitempty" jsonschema:"description=List of symlinks to create during package deploy"` ExtractPath string `json:"extractPath,omitempty" jsonschema:"description=Local folder or file to be extracted from a 'source' archive"` }
JackalFile defines a file to deploy.
type JackalFindImagesOptions ¶
type JackalFindImagesOptions struct { RepoHelmChartPath string `json:"repoHelmChartPath" jsonschema:"description=Path to the helm chart directory"` KubeVersionOverride string `json:"kubeVersionOverride" jsonschema:"description=Kubernetes version to use for the helm chart"` RegistryURL string `json:"registryURL" jsonschema:"description=Manual override for ###JACKAL_REGISTRY###"` Why string `json:"why" jsonschema:"description=Find the location of the image given as an argument and print it to the console."` }
JackalFindImagesOptions tracks the user-defined preferences during a prepare find-images search.
type JackalGenerateOptions ¶
type JackalGenerateOptions struct { Name string `json:"name" jsonschema:"description=Name of the package being generated"` URL string `json:"url" jsonschema:"description=URL to the source git repository"` Version string `json:"version" jsonschema:"description=Version of the chart to use"` GitPath string `json:"gitPath" jsonschema:"description=Relative path to the chart in the git repository"` Output string `json:"output" jsonschema:"description=Location where the finalized jackal.yaml will be placed"` }
JackalGenerateOptions tracks the user-defined options during package generation.
type JackalInitOptions ¶
type JackalInitOptions struct { // Jackal init is installing the k3s component ApplianceMode bool `json:"applianceMode" jsonschema:"description=Indicates if Jackal was initialized while deploying its own k8s cluster"` // Using alternative services GitServer GitServerInfo `json:"gitServer" jsonschema:"description=Information about the repository Jackal is going to be using"` RegistryInfo RegistryInfo `json:"registryInfo" jsonschema:"description=Information about the container registry Jackal is going to be using"` ArtifactServer ArtifactServerInfo `json:"artifactServer" jsonschema:"description=Information about the artifact registry Jackal is going to be using"` StorageClass string `json:"storageClass" jsonschema:"description=StorageClass of the k8s cluster Jackal is initializing"` }
JackalInitOptions tracks the user-defined options during cluster initialization.
type JackalInspectOptions ¶
type JackalInspectOptions struct { ViewSBOM bool `json:"sbom" jsonschema:"description=View SBOM contents while inspecting the package"` SBOMOutputDir string `json:"sbomOutput" jsonschema:"description=Location to output an SBOM into after package inspection"` }
JackalInspectOptions tracks the user-defined preferences during a package inspection.
type JackalManifest ¶
type JackalManifest struct { Name string `` /* 145-byte string literal not displayed */ Namespace string `json:"namespace,omitempty" jsonschema:"description=The namespace to deploy the manifests to"` Files []string `json:"files,omitempty" jsonschema:"description=List of local K8s YAML files or remote URLs to deploy (in order)"` KustomizeAllowAnyDirectory bool `` /* 151-byte string literal not displayed */ Kustomizations []string `` /* 131-byte string literal not displayed */ NoWait bool `json:"noWait,omitempty" jsonschema:"description=Whether to not wait for manifest resources to be ready before continuing"` }
JackalManifest defines raw manifests Jackal will deploy as a helm chart.
type JackalMetadata ¶
type JackalMetadata struct { Name string `json:"name" jsonschema:"description=Name to identify this Jackal package,pattern=^[a-z0-9\\-]*[a-z0-9]$"` Description string `json:"description,omitempty" jsonschema:"description=Additional information about this package"` Version string `` /* 209-byte string literal not displayed */ URL string `json:"url,omitempty" jsonschema:"description=Link to package information when online"` Image string `json:"image,omitempty" jsonschema:"description=An image URL to embed in this package (Reserved for future use in Jackal UI)"` Uncompressed bool `json:"uncompressed,omitempty" jsonschema:"description=Disable compression of this package"` Architecture string `` /* 131-byte string literal not displayed */ YOLO bool `` /* 268-byte string literal not displayed */ Authors string `` /* 209-byte string literal not displayed */ Documentation string `json:"documentation,omitempty" jsonschema:"description=Link to package documentation when online"` Source string `json:"source,omitempty" jsonschema:"description=Link to package source code when online"` Vendor string `json:"vendor,omitempty" jsonschema_description:"Name of the distributing entity, organization or individual."` AggregateChecksum string `` /* 151-byte string literal not displayed */ }
JackalMetadata lists information about the current JackalPackage.
type JackalMirrorOptions ¶
type JackalMirrorOptions struct {
NoImgChecksum bool `json:"noImgChecksum" jsonschema:"description=Whether to skip adding a Jackal checksum to image references."`
}
JackalMirrorOptions tracks the user-defined preferences during a package mirror.
type JackalPackage ¶
type JackalPackage struct { Kind JackalPackageKind `` /* 138-byte string literal not displayed */ Metadata JackalMetadata `json:"metadata,omitempty" jsonschema:"description=Package metadata"` Build JackalBuildData `json:"build,omitempty" jsonschema:"description=Jackal-generated package build data"` Components []JackalComponent `json:"components" jsonschema:"description=List of components to deploy in this package"` Constants []JackalPackageConstant `json:"constants,omitempty" jsonschema:"description=Constant template values applied on deploy for K8s resources"` Variables []JackalPackageVariable `json:"variables,omitempty" jsonschema:"description=Variable template values applied on deploy for K8s resources"` }
JackalPackage the top-level structure of a Jackal config file.
func (JackalPackage) IsInitConfig ¶
func (pkg JackalPackage) IsInitConfig() bool
IsInitConfig returns whether a Jackal package is an init config.
func (JackalPackage) IsSBOMAble ¶
func (pkg JackalPackage) IsSBOMAble() bool
IsSBOMAble checks if a package has contents that an SBOM can be created on (i.e. images, files, or data injections).
type JackalPackageConstant ¶
type JackalPackageConstant struct { Name string `json:"name" jsonschema:"description=The name to be used for the constant,pattern=^[A-Z0-9_]+$"` Value string `json:"value" jsonschema:"description=The value to set for the constant during deploy"` // Include a description that will only be displayed during package create/deploy confirm prompts Description string `` /* 155-byte string literal not displayed */ AutoIndent bool `` /* 204-byte string literal not displayed */ Pattern string `` /* 141-byte string literal not displayed */ }
JackalPackageConstant are constants that can be used to dynamically template K8s resources.
type JackalPackageKind ¶
type JackalPackageKind string
JackalPackageKind is an enum of the different kinds of Jackal packages.
const ( // JackalInitConfig is the kind of Jackal package used during `jackal init`. JackalInitConfig JackalPackageKind = "JackalInitConfig" // JackalPackageConfig is the default kind of Jackal package, primarily used during `jackal package`. JackalPackageConfig JackalPackageKind = "JackalPackageConfig" )
type JackalPackageOptions ¶
type JackalPackageOptions struct { Shasum string `json:"shasum" jsonschema:"description=The SHA256 checksum of the package"` PackageSource string `json:"packageSource" jsonschema:"description=Location where a Jackal package can be found"` OptionalComponents string `json:"optionalComponents" jsonschema:"description=Comma separated list of optional components"` SGetKeyPath string `json:"sGetKeyPath" jsonschema:"description=Location where the public key component of a cosign key-pair can be found"` SetVariables map[string]string `` /* 179-byte string literal not displayed */ PublicKeyPath string `json:"publicKeyPath" jsonschema:"description=Location where the public key component of a cosign key-pair can be found"` Retries int `` /* 136-byte string literal not displayed */ }
JackalPackageOptions tracks the user-defined preferences during common package operations.
type JackalPackageVariable ¶
type JackalPackageVariable struct { Name string `json:"name" jsonschema:"description=The name to be used for the variable,pattern=^[A-Z0-9_]+$"` Description string `` /* 126-byte string literal not displayed */ Default string `json:"default,omitempty" jsonschema:"description=The default value to use for the variable"` Prompt bool `json:"prompt,omitempty" jsonschema:"description=Whether to prompt the user for input for this variable"` Sensitive bool `` /* 128-byte string literal not displayed */ AutoIndent bool `` /* 202-byte string literal not displayed */ Pattern string `` /* 142-byte string literal not displayed */ Type VariableType `` /* 223-byte string literal not displayed */ }
JackalPackageVariable are variables that can be used to dynamically template K8s resources.
type JackalPublishOptions ¶
type JackalPublishOptions struct { PackageDestination string `json:"packageDestination" jsonschema:"description=Location where the Jackal package will be published to"` SigningKeyPassword string `` /* 141-byte string literal not displayed */ SigningKeyPath string `json:"signingKeyPath" jsonschema:"description=Location where the private key component of a cosign key-pair can be found"` }
JackalPublishOptions tracks the user-defined preferences during a package publish.
type JackalPullOptions ¶
type JackalPullOptions struct {
OutputDirectory string `json:"outputDirectory" jsonschema:"description=Location where the pulled Jackal package will be placed"`
}
JackalPullOptions tracks the user-defined preferences during a package pull.
type JackalSetVariable ¶
type JackalSetVariable struct { Name string `json:"name" jsonschema:"description=The name to be used for the variable,pattern=^[A-Z0-9_]+$"` Sensitive bool `` /* 128-byte string literal not displayed */ AutoIndent bool `` /* 202-byte string literal not displayed */ Value string `json:"value" jsonschema:"description=The value the variable is currently set with"` Type VariableType `` /* 223-byte string literal not displayed */ }
JackalSetVariable tracks internal variables that have been set during this run of Jackal
type JackalSplitPackageData ¶
type JackalSplitPackageData struct { Sha256Sum string `json:"sha256Sum" jsonschema:"description=The sha256sum of the package"` Bytes int64 `json:"bytes" jsonschema:"description=The size of the package in bytes"` Count int `json:"count" jsonschema:"description=The number of parts the package is split into"` }
JackalSplitPackageData contains info about a split package.
type JackalState ¶
type JackalState struct { JackalAppliance bool `json:"jackalAppliance" jsonschema:"description=Indicates if Jackal was initialized while deploying its own k8s cluster"` Distro string `json:"distro" jsonschema:"description=K8s distribution of the cluster Jackal was deployed to"` Architecture string `json:"architecture" jsonschema:"description=Machine architecture of the k8s node(s)"` StorageClass string `json:"storageClass" jsonschema:"Default StorageClass value Jackal uses for variable templating"` AgentTLS k8s.GeneratedPKI `json:"agentTLS" jsonschema:"PKI certificate information for the agent pods Jackal manages"` GitServer GitServerInfo `json:"gitServer" jsonschema:"description=Information about the repository Jackal is configured to use"` RegistryInfo RegistryInfo `json:"registryInfo" jsonschema:"description=Information about the container registry Jackal is configured to use"` ArtifactServer ArtifactServerInfo `json:"artifactServer" jsonschema:"description=Information about the artifact registry Jackal is configured to use"` LoggingSecret string `json:"loggingSecret" jsonschema:"description=Secret value that the internal Grafana server was seeded with"` }
JackalState is maintained as a secret in the Jackal namespace to track Jackal init data.
type PackagerConfig ¶
type PackagerConfig struct { // CreateOpts tracks the user-defined options used to create the package CreateOpts JackalCreateOptions // PkgOpts tracks user-defined options PkgOpts JackalPackageOptions // DeployOpts tracks user-defined values for the active deployment DeployOpts JackalDeployOptions // MirrorOpts tracks user-defined values for the active mirror MirrorOpts JackalMirrorOptions // InitOpts tracks user-defined values for the active Jackal initialization. InitOpts JackalInitOptions // InspectOpts tracks user-defined options used to inspect the package InspectOpts JackalInspectOptions // PublishOpts tracks user-defined options used to publish the package PublishOpts JackalPublishOptions // PullOpts tracks user-defined options used to pull packages PullOpts JackalPullOptions // FindImagesOpts tracks user-defined options used to find images FindImagesOpts JackalFindImagesOptions // GenerateOpts tracks user-defined values for package generation. GenerateOpts JackalGenerateOptions // The package data Pkg JackalPackage // The active jackal state State *JackalState // Variables set by the user SetVariableMap map[string]*JackalSetVariable }
PackagerConfig is the main struct that the packager uses to hold high-level options.
func (*PackagerConfig) CheckVariablePattern ¶
func (cfg *PackagerConfig) CheckVariablePattern(name, pattern string) error
CheckVariablePattern checks to see if a variable is set to a value that matches its pattern.
func (*PackagerConfig) SetVariable ¶
func (cfg *PackagerConfig) SetVariable(name, value string, sensitive bool, autoIndent bool, varType VariableType)
SetVariable sets a value for a variable in PackagerConfig.SetVariableMap.
type RegistryInfo ¶
type RegistryInfo struct { PushUsername string `json:"pushUsername" jsonschema:"description=Username of a user with push access to the registry"` PushPassword string `json:"pushPassword" jsonschema:"description=Password of a user with push access to the registry"` PullUsername string `` /* 170-byte string literal not displayed */ PullPassword string `` /* 170-byte string literal not displayed */ Address string `json:"address" jsonschema:"description=URL address of the registry"` NodePort int `` /* 135-byte string literal not displayed */ InternalRegistry bool `json:"internalRegistry" jsonschema:"description=Indicates if we are using a registry that Jackal is directly managing"` Secret string `json:"secret" jsonschema:"description=Secret value that the registry was seeded with"` }
RegistryInfo contains information Jackal uses to communicate with a container registry to push/pull images.
func (*RegistryInfo) FillInEmptyValues ¶
func (ri *RegistryInfo) FillInEmptyValues() error
FillInEmptyValues sets every necessary value not already set to a reasonable default
type VariableType ¶
type VariableType string
VariableType represents a type of a Jackal package variable
const ( // RawVariableType is the default type for a Jackal package variable RawVariableType VariableType = "raw" // FileVariableType is a type for a Jackal package variable that loads its contents from a file FileVariableType VariableType = "file" )
type Webhook ¶
type Webhook struct { Name string `json:"name"` WaitDurationSeconds int `json:"waitDurationSeconds,omitempty"` Status WebhookStatus `json:"status"` ObservedGeneration int `json:"observedGeneration"` }
Webhook contains information about a Component Webhook operating on a Jackal package secret.
type WebhookStatus ¶
type WebhookStatus string
WebhookStatus defines the status of a Component Webhook operating on a Jackal package secret.
Directories ¶
Path | Synopsis |
---|---|
Package extensions contains the types for all official extensions.
|
Package extensions contains the types for all official extensions. |