github.com/Racer159/jackal@v0.32.7-0.20240401174413-0bd2339e4f2e/src/config/lang/english.go (about)

     1  //go:build !alt_language
     2  
     3  // SPDX-License-Identifier: Apache-2.0
     4  // SPDX-FileCopyrightText: 2021-Present The Jackal Authors
     5  
     6  // Package lang contains the language strings for english used by Jackal
     7  // Alternative languages can be created by duplicating this file and changing the build tag to "//go:build alt_language && <language>".
     8  package lang
     9  
    10  import (
    11  	"errors"
    12  )
    13  
    14  // All language strings should be in the form of a constant
    15  // The constants should be grouped by the top level package they are used in (or common)
    16  // The format should be <PathName><Err/Info><ShortDescription>
    17  // Debug messages will not be a part of the language strings since they are not intended to be user facing
    18  // Include sprintf formatting directives in the string if needed.
    19  const (
    20  	ErrLoadState                    = "Failed to load the Jackal State from the cluster."
    21  	ErrSaveState                    = "Failed to save the Jackal State to the cluster."
    22  	ErrLoadPackageSecret            = "Failed to load %s's secret from the cluster"
    23  	ErrNoClusterConnection          = "Failed to connect to the cluster."
    24  	ErrTunnelFailed                 = "Failed to create a tunnel to the cluster."
    25  	ErrUnmarshal                    = "failed to unmarshal file: %w"
    26  	ErrWritingFile                  = "failed to write file %s: %s"
    27  	ErrDownloading                  = "failed to download %s: %s"
    28  	ErrCreatingDir                  = "failed to create directory %s: %s"
    29  	ErrRemoveFile                   = "failed to remove file %s: %s"
    30  	ErrUnarchive                    = "failed to unarchive %s: %s"
    31  	ErrConfirmCancel                = "confirm selection canceled: %s"
    32  	ErrFileExtract                  = "failed to extract filename %s from archive %s: %s"
    33  	ErrFileNameExtract              = "failed to extract filename from URL %s: %s"
    34  	ErrUnableToGenerateRandomSecret = "unable to generate a random secret"
    35  )
    36  
    37  // Lint messages
    38  const (
    39  	UnsetVarLintWarning = "There are templates that are not set and won't be evaluated during lint"
    40  )
    41  
    42  // Jackal CLI commands.
    43  const (
    44  	// common command language
    45  	CmdConfirmProvided = "Confirm flag specified, continuing without prompting."
    46  	CmdConfirmContinue = "Continue with these changes?"
    47  
    48  	// root jackal command
    49  	RootCmdShort = "DevSecOps for Airgap"
    50  	RootCmdLong  = "Jackal eliminates the complexity of air gap software delivery for Kubernetes clusters and cloud native workloads\n" +
    51  		"using a declarative packaging strategy to support DevSecOps in offline and semi-connected environments."
    52  
    53  	RootCmdFlagLogLevel    = "Log level when running Jackal. Valid options are: warn, info, debug, trace"
    54  	RootCmdFlagArch        = "Architecture for OCI images and Jackal packages"
    55  	RootCmdFlagSkipLogFile = "Disable log file creation"
    56  	RootCmdFlagNoProgress  = "Disable fancy UI progress bars, spinners, logos, etc"
    57  	RootCmdFlagNoColor     = "Disable colors in output"
    58  	RootCmdFlagCachePath   = "Specify the location of the Jackal cache directory"
    59  	RootCmdFlagTempDir     = "Specify the temporary directory to use for intermediate files"
    60  	RootCmdFlagInsecure    = "Allow access to insecure registries and disable other recommended security enforcements such as package checksum and signature validation. This flag should only be used if you have a specific reason and accept the reduced security posture."
    61  
    62  	RootCmdDeprecatedDeploy = "Deprecated: Please use \"jackal package deploy %s\" to deploy this package.  This warning will be removed in Jackal v1.0.0."
    63  	RootCmdDeprecatedCreate = "Deprecated: Please use \"jackal package create\" to create this package.  This warning will be removed in Jackal v1.0.0."
    64  
    65  	RootCmdErrInvalidLogLevel = "Invalid log level. Valid options are: warn, info, debug, trace."
    66  
    67  	// jackal connect
    68  	CmdConnectShort = "Accesses services or pods deployed in the cluster"
    69  	CmdConnectLong  = "Uses a k8s port-forward to connect to resources within the cluster referenced by your kube-context.\n" +
    70  		"Three default options for this command are <REGISTRY|LOGGING|GIT>. These will connect to the Jackal created resources " +
    71  		"(assuming they were selected when performing the `jackal init` command).\n\n" +
    72  		"Packages can provide service manifests that define their own shortcut connection options. These options will be " +
    73  		"printed to the terminal when the package finishes deploying.\n If you don't remember what connection shortcuts your deployed " +
    74  		"package offers, you can search your cluster for services that have the 'jackal.dev/connect-name' label. The value of that label is " +
    75  		"the name you will pass into the 'jackal connect' command.\n\n" +
    76  		"Even if the packages you deploy don't define their own shortcut connection options, you can use the command flags " +
    77  		"to connect into specific resources. You can read the command flag descriptions below to get a better idea how to connect " +
    78  		"to whatever resource you are trying to connect to."
    79  
    80  	// jackal connect list
    81  	CmdConnectListShort = "Lists all available connection shortcuts"
    82  
    83  	CmdConnectFlagName       = "Specify the resource name.  E.g. name=unicorns or name=unicorn-pod-7448499f4d-b5bk6"
    84  	CmdConnectFlagNamespace  = "Specify the namespace.  E.g. namespace=default"
    85  	CmdConnectFlagType       = "Specify the resource type.  E.g. type=svc or type=pod"
    86  	CmdConnectFlagLocalPort  = "(Optional, autogenerated if not provided) Specify the local port to bind to.  E.g. local-port=42000"
    87  	CmdConnectFlagRemotePort = "Specify the remote port of the resource to bind to.  E.g. remote-port=8080"
    88  	CmdConnectFlagCliOnly    = "Disable browser auto-open"
    89  
    90  	CmdConnectPreparingTunnel = "Preparing a tunnel to connect to %s"
    91  	CmdConnectErrCluster      = "Unable to connect to the cluster: %s"
    92  	CmdConnectErrService      = "Unable to connect to the service: %s"
    93  	CmdConnectEstablishedCLI  = "Tunnel established at %s, waiting for user to interrupt (ctrl-c to end)"
    94  	CmdConnectEstablishedWeb  = "Tunnel established at %s, opening your default web browser (ctrl-c to end)"
    95  	CmdConnectTunnelClosed    = "Tunnel to %s successfully closed due to user interrupt"
    96  
    97  	// jackal destroy
    98  	CmdDestroyShort = "Tears down Jackal and removes its components from the environment"
    99  	CmdDestroyLong  = "Tear down Jackal.\n\n" +
   100  		"Deletes everything in the 'jackal' namespace within your connected k8s cluster.\n\n" +
   101  		"If Jackal deployed your k8s cluster, this command will also tear your cluster down by " +
   102  		"searching through /opt/jackal for any scripts that start with 'jackal-clean-' and executing them. " +
   103  		"Since this is a cleanup operation, Jackal will not stop the teardown if one of the scripts produce " +
   104  		"an error.\n\n" +
   105  		"If Jackal did not deploy your k8s cluster, this command will delete the Jackal namespace, delete secrets " +
   106  		"and labels that only Jackal cares about, and optionally uninstall components that Jackal deployed onto " +
   107  		"the cluster. Since this is a cleanup operation, Jackal will not stop the uninstalls if one of the " +
   108  		"resources produce an error while being deleted."
   109  
   110  	CmdDestroyFlagConfirm          = "REQUIRED. Confirm the destroy action to prevent accidental deletions"
   111  	CmdDestroyFlagRemoveComponents = "Also remove any installed components outside the jackal namespace"
   112  
   113  	CmdDestroyErrNoScriptPath           = "Unable to find the folder (%s) which has the scripts to cleanup the cluster. Please double-check you have the right kube-context"
   114  	CmdDestroyErrScriptPermissionDenied = "Received 'permission denied' when trying to execute the script (%s). Please double-check you have the correct kube-context."
   115  
   116  	// jackal init
   117  	CmdInitShort = "Prepares a k8s cluster for the deployment of Jackal packages"
   118  	CmdInitLong  = "Injects a docker registry as well as other optional useful things (such as a git server " +
   119  		"and a logging stack) into a k8s cluster under the 'jackal' namespace " +
   120  		"to support future application deployments.\n" +
   121  		"If you do not have a k8s cluster already configured, this command will give you " +
   122  		"the ability to install a cluster locally.\n\n" +
   123  		"This command looks for a jackal-init package in the local directory that the command was executed " +
   124  		"from. If no package is found in the local directory and the Jackal CLI exists somewhere outside of " +
   125  		"the current directory, Jackal will failover and attempt to find a jackal-init package in the directory " +
   126  		"that the Jackal binary is located in.\n\n\n\n"
   127  
   128  	CmdInitExample = `
   129  # Initializing without any optional components:
   130  $ jackal init
   131  
   132  # Initializing w/ Jackals internal git server:
   133  $ jackal init --components=git-server
   134  
   135  # Initializing w/ Jackals internal git server and PLG stack:
   136  $ jackal init --components=git-server,logging
   137  
   138  # Initializing w/ an internal registry but with a different nodeport:
   139  $ jackal init --nodeport=30333
   140  
   141  # Initializing w/ an external registry:
   142  $ jackal init --registry-push-password={PASSWORD} --registry-push-username={USERNAME} --registry-url={URL}
   143  
   144  # Initializing w/ an external git server:
   145  $ jackal init --git-push-password={PASSWORD} --git-push-username={USERNAME} --git-url={URL}
   146  
   147  # Initializing w/ an external artifact server:
   148  $ jackal init --artifact-push-password={PASSWORD} --artifact-push-username={USERNAME} --artifact-url={URL}
   149  
   150  # NOTE: Not specifying a pull username/password will use the push user for pulling as well.
   151  `
   152  
   153  	CmdInitErrFlags             = "Invalid command flags were provided."
   154  	CmdInitErrDownload          = "failed to download the init package: %s"
   155  	CmdInitErrValidateGit       = "the 'git-push-username' and 'git-push-password' flags must be provided if the 'git-url' flag is provided"
   156  	CmdInitErrValidateRegistry  = "the 'registry-push-username' and 'registry-push-password' flags must be provided if the 'registry-url' flag is provided"
   157  	CmdInitErrValidateArtifact  = "the 'artifact-push-username' and 'artifact-push-token' flags must be provided if the 'artifact-url' flag is provided"
   158  	CmdInitErrUnableCreateCache = "Unable to create the cache directory: %s"
   159  
   160  	CmdInitPullAsk       = "It seems the init package could not be found locally, but can be pulled from oci://%s"
   161  	CmdInitPullNote      = "Note: This will require an internet connection."
   162  	CmdInitPullConfirm   = "Do you want to pull this init package?"
   163  	CmdInitPullErrManual = "pull the init package manually and place it in the current working directory"
   164  
   165  	CmdInitFlagSet = "Specify deployment variables to set on the command line (KEY=value)"
   166  
   167  	CmdInitFlagConfirm      = "Confirms package deployment without prompting. ONLY use with packages you trust. Skips prompts to review SBOM, configure variables, select optional components and review potential breaking changes."
   168  	CmdInitFlagComponents   = "Specify which optional components to install.  E.g. --components=git-server,logging"
   169  	CmdInitFlagStorageClass = "Specify the storage class to use for the registry and git server.  E.g. --storage-class=standard"
   170  
   171  	CmdInitFlagGitURL      = "External git server url to use for this Jackal cluster"
   172  	CmdInitFlagGitPushUser = "Username to access to the git server Jackal is configured to use. User must be able to create repositories via 'git push'"
   173  	CmdInitFlagGitPushPass = "Password for the push-user to access the git server"
   174  	CmdInitFlagGitPullUser = "Username for pull-only access to the git server"
   175  	CmdInitFlagGitPullPass = "Password for the pull-only user to access the git server"
   176  
   177  	CmdInitFlagRegURL      = "External registry url address to use for this Jackal cluster"
   178  	CmdInitFlagRegNodePort = "Nodeport to access a registry internal to the k8s cluster. Between [30000-32767]"
   179  	CmdInitFlagRegPushUser = "Username to access to the registry Jackal is configured to use"
   180  	CmdInitFlagRegPushPass = "Password for the push-user to connect to the registry"
   181  	CmdInitFlagRegPullUser = "Username for pull-only access to the registry"
   182  	CmdInitFlagRegPullPass = "Password for the pull-only user to access the registry"
   183  	CmdInitFlagRegSecret   = "Registry secret value"
   184  
   185  	CmdInitFlagArtifactURL       = "[alpha] External artifact registry url to use for this Jackal cluster"
   186  	CmdInitFlagArtifactPushUser  = "[alpha] Username to access to the artifact registry Jackal is configured to use. User must be able to upload package artifacts."
   187  	CmdInitFlagArtifactPushToken = "[alpha] API Token for the push-user to access the artifact registry"
   188  
   189  	// jackal internal
   190  	CmdInternalShort = "Internal tools used by jackal"
   191  
   192  	CmdInternalAgentShort = "Runs the jackal agent"
   193  	CmdInternalAgentLong  = "NOTE: This command is a hidden command and generally shouldn't be run by a human.\n" +
   194  		"This command starts up a http webhook that Jackal deployments use to mutate pods to conform " +
   195  		"with the Jackal container registry and Gitea server URLs."
   196  
   197  	CmdInternalProxyShort = "[alpha] Runs the jackal agent http proxy"
   198  	CmdInternalProxyLong  = "[alpha] NOTE: This command is a hidden command and generally shouldn't be run by a human.\n" +
   199  		"This command starts up a http proxy that can be used by running pods to transform queries " +
   200  		"that conform to Gitea / Gitlab repository and package URLs in the airgap."
   201  
   202  	CmdInternalGenerateCliDocsShort   = "Creates auto-generated markdown of all the commands for the CLI"
   203  	CmdInternalGenerateCliDocsSuccess = "Successfully created the CLI documentation"
   204  	CmdInternalGenerateCliDocsErr     = "Unable to generate the CLI documentation: %s"
   205  
   206  	CmdInternalConfigSchemaShort = "Generates a JSON schema for the jackal.yaml configuration"
   207  	CmdInternalConfigSchemaErr   = "Unable to generate the jackal config schema"
   208  
   209  	CmdInternalTypesSchemaShort = "Generates a JSON schema for the Jackal types (DeployedPackage JackalPackage JackalState)"
   210  	CmdInternalTypesSchemaErr   = "Unable to generate the JSON schema for the Jackal types (DeployedPackage JackalPackage JackalState)"
   211  
   212  	CmdInternalCreateReadOnlyGiteaUserShort = "Creates a read-only user in Gitea"
   213  	CmdInternalCreateReadOnlyGiteaUserLong  = "Creates a read-only user in Gitea by using the Gitea API. " +
   214  		"This is called internally by the supported Gitea package component."
   215  	CmdInternalCreateReadOnlyGiteaUserErr = "Unable to create a read-only user in the Gitea service."
   216  
   217  	CmdInternalArtifactRegistryGiteaTokenShort = "Creates an artifact registry token for Gitea"
   218  	CmdInternalArtifactRegistryGiteaTokenLong  = "Creates an artifact registry token in Gitea using the Gitea API. " +
   219  		"This is called internally by the supported Gitea package component."
   220  	CmdInternalArtifactRegistryGiteaTokenErr = "Unable to create an artifact registry token for the Gitea service."
   221  
   222  	CmdInternalUpdateGiteaPVCShort = "Updates an existing Gitea persistent volume claim"
   223  	CmdInternalUpdateGiteaPVCLong  = "Updates an existing Gitea persistent volume claim by assessing if claim is a custom user provided claim or default." +
   224  		"This is called internally by the supported Gitea package component."
   225  	CmdInternalUpdateGiteaPVCErr          = "Unable to update the existing Gitea persistent volume claim."
   226  	CmdInternalFlagUpdateGiteaPVCRollback = "Roll back previous Gitea persistent volume claim updates."
   227  
   228  	CmdInternalIsValidHostnameShort = "Checks if the current machine's hostname is RFC1123 compliant"
   229  	CmdInternalIsValidHostnameErr   = "The hostname '%s' is not valid. Ensure the hostname meets RFC1123 requirements https://www.rfc-editor.org/rfc/rfc1123.html."
   230  
   231  	CmdInternalCrc32Short = "Generates a decimal CRC32 for the given text"
   232  
   233  	// jackal package
   234  	CmdPackageShort             = "Jackal package commands for creating, deploying, and inspecting packages"
   235  	CmdPackageFlagConcurrency   = "Number of concurrent layer operations to perform when interacting with a remote package."
   236  	CmdPackageFlagFlagPublicKey = "Path to public key file for validating signed packages"
   237  	CmdPackageFlagRetries       = "Number of retries to perform for Jackal deploy operations like git/image pushes or Helm installs"
   238  
   239  	CmdPackageCreateShort = "Creates a Jackal package from a given directory or the current directory"
   240  	CmdPackageCreateLong  = "Builds an archive of resources and dependencies defined by the 'jackal.yaml' in the specified directory.\n" +
   241  		"Private registries and repositories are accessed via credentials in your local '~/.docker/config.json', " +
   242  		"'~/.git-credentials' and '~/.netrc'.\n"
   243  
   244  	CmdPackageDeployShort = "Deploys a Jackal package from a local file or URL (runs offline)"
   245  	CmdPackageDeployLong  = "Unpacks resources and dependencies from a Jackal package archive and deploys them onto the target system.\n" +
   246  		"Kubernetes clusters are accessed via credentials in your current kubecontext defined in '~/.kube/config'"
   247  
   248  	CmdPackageMirrorShort = "Mirrors a Jackal package's internal resources to specified image registries and git repositories"
   249  	CmdPackageMirrorLong  = "Unpacks resources and dependencies from a Jackal package archive and mirrors them into the specified\n" +
   250  		"image registries and git repositories within the target environment"
   251  	CmdPackageMirrorExample = `
   252  # Mirror resources to internal Jackal resources
   253  $ jackal package mirror-resources <your-package.tar.zst> \
   254  	--registry-url 127.0.0.1:31999 \
   255  	--registry-push-username jackal-push \
   256  	--registry-push-password <generated-registry-push-password> \
   257  	--git-url http://jackal-gitea-http.jackal.svc.cluster.local:3000 \
   258  	--git-push-username jackal-git-user \
   259  	--git-push-password <generated-git-push-password>
   260  
   261  # Mirror resources to external resources
   262  $ jackal package mirror-resources <your-package.tar.zst> \
   263  	--registry-url registry.enterprise.corp \
   264  	--registry-push-username <registry-push-username> \
   265  	--registry-push-password <registry-push-password> \
   266  	--git-url https://git.enterprise.corp \
   267  	--git-push-username <git-push-username> \
   268  	--git-push-password <git-push-password>
   269  `
   270  
   271  	CmdPackageInspectShort = "Displays the definition of a Jackal package (runs offline)"
   272  	CmdPackageInspectLong  = "Displays the 'jackal.yaml' definition for the specified package and optionally allows SBOMs to be viewed"
   273  
   274  	CmdPackageListShort         = "Lists out all of the packages that have been deployed to the cluster (runs offline)"
   275  	CmdPackageListNoPackageWarn = "Unable to get the packages deployed to the cluster"
   276  	CmdPackageListUnmarshalErr  = "Unable to read all of the packages deployed to the cluster"
   277  
   278  	CmdPackageCreateFlagConfirm               = "Confirm package creation without prompting"
   279  	CmdPackageCreateFlagSet                   = "Specify package variables to set on the command line (KEY=value)"
   280  	CmdPackageCreateFlagOutput                = "Specify the output (either a directory or an oci:// URL) for the created Jackal package"
   281  	CmdPackageCreateFlagSbom                  = "View SBOM contents after creating the package"
   282  	CmdPackageCreateFlagSbomOut               = "Specify an output directory for the SBOMs from the created Jackal package"
   283  	CmdPackageCreateFlagSkipSbom              = "Skip generating SBOM for this package"
   284  	CmdPackageCreateFlagMaxPackageSize        = "Specify the maximum size of the package in megabytes, packages larger than this will be split into multiple parts to be loaded onto smaller media (i.e. DVDs). Use 0 to disable splitting."
   285  	CmdPackageCreateFlagSigningKey            = "Path to private key file for signing packages"
   286  	CmdPackageCreateFlagSigningKeyPassword    = "Password to the private key file used for signing packages"
   287  	CmdPackageCreateFlagDeprecatedKey         = "[Deprecated] Path to private key file for signing packages (use --signing-key instead)"
   288  	CmdPackageCreateFlagDeprecatedKeyPassword = "[Deprecated] Password to the private key file used for signing packages (use --signing-key-pass instead)"
   289  	CmdPackageCreateFlagDifferential          = "[beta] Build a package that only contains the differential changes from local resources and differing remote resources from the specified previously built package"
   290  	CmdPackageCreateFlagRegistryOverride      = "Specify a map of domains to override on package create when pulling images (e.g. --registry-override docker.io=dockerio-reg.enterprise.intranet)"
   291  	CmdPackageCreateFlagFlavor                = "The flavor of components to include in the resulting package (i.e. have a matching or empty \"only.flavor\" key)"
   292  	CmdPackageCreateCleanPathErr              = "Invalid characters in Jackal cache path, defaulting to %s"
   293  	CmdPackageCreateErr                       = "Failed to create package: %s"
   294  
   295  	CmdPackageDeployFlagConfirm                        = "Confirms package deployment without prompting. ONLY use with packages you trust. Skips prompts to review SBOM, configure variables, select optional components and review potential breaking changes."
   296  	CmdPackageDeployFlagAdoptExistingResources         = "Adopts any pre-existing K8s resources into the Helm charts managed by Jackal. ONLY use when you have existing deployments you want Jackal to takeover."
   297  	CmdPackageDeployFlagSet                            = "Specify deployment variables to set on the command line (KEY=value)"
   298  	CmdPackageDeployFlagComponents                     = "Comma-separated list of components to deploy.  Adding this flag will skip the prompts for selected components.  Globbing component names with '*' and deselecting 'default' components with a leading '-' are also supported."
   299  	CmdPackageDeployFlagShasum                         = "Shasum of the package to deploy. Required if deploying a remote package and \"--insecure\" is not provided"
   300  	CmdPackageDeployFlagSget                           = "[Deprecated] Path to public sget key file for remote packages signed via cosign. This flag will be removed in v1.0.0 please use the --key flag instead."
   301  	CmdPackageDeployFlagSkipWebhooks                   = "[alpha] Skip waiting for external webhooks to execute as each package component is deployed"
   302  	CmdPackageDeployFlagTimeout                        = "Timeout for Helm operations such as installs and rollbacks"
   303  	CmdPackageDeployValidateArchitectureErr            = "this package architecture is %s, but the target cluster only has the %s architecture(s). These architectures must be compatible when \"images\" are present"
   304  	CmdPackageDeployValidateLastNonBreakingVersionWarn = "The version of this Jackal binary '%s' is less than the LastNonBreakingVersion of '%s'. You may need to upgrade your Jackal version to at least '%s' to deploy this package"
   305  	CmdPackageDeployInvalidCLIVersionWarn              = "CLIVersion is set to '%s' which can cause issues with package creation and deployment. To avoid such issues, please set the value to the valid semantic version for this version of Jackal."
   306  	CmdPackageDeployErr                                = "Failed to deploy package: %s"
   307  
   308  	CmdPackageMirrorFlagComponents = "Comma-separated list of components to mirror.  This list will be respected regardless of a component's 'required' or 'default' status.  Globbing component names with '*' and deselecting components with a leading '-' are also supported."
   309  	CmdPackageMirrorFlagNoChecksum = "Turns off the addition of a checksum to image tags (as would be used by the Jackal Agent) while mirroring images."
   310  
   311  	CmdPackageInspectFlagSbom    = "View SBOM contents while inspecting the package"
   312  	CmdPackageInspectFlagSbomOut = "Specify an output directory for the SBOMs from the inspected Jackal package"
   313  	CmdPackageInspectErr         = "Failed to inspect package: %s"
   314  
   315  	CmdPackageRemoveShort          = "Removes a Jackal package that has been deployed already (runs offline)"
   316  	CmdPackageRemoveFlagConfirm    = "REQUIRED. Confirm the removal action to prevent accidental deletions"
   317  	CmdPackageRemoveFlagComponents = "Comma-separated list of components to remove.  This list will be respected regardless of a component's 'required' or 'default' status.  Globbing component names with '*' and deselecting components with a leading '-' are also supported."
   318  	CmdPackageRemoveTarballErr     = "Invalid tarball path provided"
   319  	CmdPackageRemoveExtractErr     = "Unable to extract the package contents"
   320  	CmdPackageRemoveErr            = "Unable to remove the package with an error of: %s"
   321  
   322  	CmdPackageRegistryPrefixErr = "Registry must be prefixed with 'oci://'"
   323  
   324  	CmdPackagePublishShort   = "Publishes a Jackal package to a remote registry"
   325  	CmdPackagePublishExample = `
   326  # Publish a package to a remote registry
   327  $ jackal package publish my-package.tar oci://my-registry.com/my-namespace
   328  
   329  # Publish a skeleton package to a remote registry
   330  $ jackal package publish ./path/to/dir oci://my-registry.com/my-namespace
   331  `
   332  	CmdPackagePublishFlagSigningKey         = "Path to a private key file for signing or re-signing packages with a new key"
   333  	CmdPackagePublishFlagSigningKeyPassword = "Password to the private key file used for publishing packages"
   334  	CmdPackagePublishErr                    = "Failed to publish package: %s"
   335  
   336  	CmdPackagePullShort   = "Pulls a Jackal package from a remote registry and save to the local file system"
   337  	CmdPackagePullExample = `
   338  # Pull a package matching the current architecture
   339  $ jackal package pull oci://ghcr.io/defenseunicorns/packages/dos-games:1.0.0
   340  
   341  # Pull a package matching a specific architecture
   342  $ jackal package pull oci://ghcr.io/defenseunicorns/packages/dos-games:1.0.0 -a arm64
   343  
   344  # Pull a skeleton package
   345  $ jackal package pull oci://ghcr.io/defenseunicorns/packages/dos-games:1.0.0 -a skeleton`
   346  	CmdPackagePullFlagOutputDirectory = "Specify the output directory for the pulled Jackal package"
   347  	CmdPackagePullErr                 = "Failed to pull package: %s"
   348  
   349  	CmdPackageChoose                = "Choose or type the package file"
   350  	CmdPackageChooseErr             = "Package path selection canceled: %s"
   351  	CmdPackageClusterSourceFallback = "%q does not satisfy any current sources, assuming it is a package deployed to a cluster"
   352  	CmdPackageInvalidSource         = "Unable to identify source from %q: %s"
   353  
   354  	// jackal dev (prepare is an alias for dev)
   355  	CmdDevShort = "Commands useful for developing packages"
   356  
   357  	CmdDevDeployShort      = "[beta] Creates and deploys a Jackal package from a given directory"
   358  	CmdDevDeployLong       = "[beta] Creates and deploys a Jackal package from a given directory, setting options like YOLO mode for faster iteration."
   359  	CmdDevDeployFlagNoYolo = "Disable the YOLO mode default override and create / deploy the package as-defined"
   360  	CmdDevDeployErr        = "Failed to dev deploy: %s"
   361  
   362  	CmdDevGenerateShort   = "[alpha] Creates a jackal.yaml automatically from a given remote (git) Helm chart"
   363  	CmdDevGenerateExample = "jackal dev generate podinfo --url https://github.com/stefanprodan/podinfo.git --version 6.4.0 --gitPath charts/podinfo"
   364  
   365  	CmdDevPatchGitShort = "Converts all .git URLs to the specified Jackal HOST and with the Jackal URL pattern in a given FILE.  NOTE:\n" +
   366  		"This should only be used for manifests that are not mutated by the Jackal Agent Mutating Webhook."
   367  	CmdDevPatchGitOverwritePrompt = "Overwrite the file %s with these changes?"
   368  	CmdDevPatchGitOverwriteErr    = "Confirm overwrite canceled: %s"
   369  	CmdDevPatchGitFileReadErr     = "Unable to read the file %s"
   370  	CmdDevPatchGitFileWriteErr    = "Unable to write the changes back to the file"
   371  
   372  	CmdDevSha256sumShort         = "Generates a SHA256SUM for the given file"
   373  	CmdDevSha256sumRemoteWarning = "This is a remote source. If a published checksum is available you should use that rather than calculating it directly from the remote link."
   374  	CmdDevSha256sumHashErr       = "Unable to compute the SHA256SUM hash: %s"
   375  
   376  	CmdDevFindImagesShort = "Evaluates components in a Jackal file to identify images specified in their helm charts and manifests"
   377  	CmdDevFindImagesLong  = "Evaluates components in a Jackal file to identify images specified in their helm charts and manifests.\n\n" +
   378  		"Components that have repos that host helm charts can be processed by providing the --repo-chart-path."
   379  	CmdDevFindImagesErr = "Unable to find images: %s"
   380  
   381  	CmdDevGenerateConfigShort = "Generates a config file for Jackal"
   382  	CmdDevGenerateConfigLong  = "Generates a Jackal config file for controlling how the Jackal CLI operates. Optionally accepts a filename to write the config to.\n\n" +
   383  		"The extension will determine the format of the config file, e.g. env-1.yaml, env-2.json, env-3.toml etc.\n" +
   384  		"Accepted extensions are json, toml, yaml.\n\n" +
   385  		"NOTE: This file must not already exist. If no filename is provided, the config will be written to the current working directory as jackal-config.toml."
   386  	CmdDevGenerateConfigErr = "Unable to write the config file %s, make sure the file doesn't already exist"
   387  
   388  	CmdDevFlagExtractPath        = `The path inside of an archive to use to calculate the sha256sum (i.e. for use with "files.extractPath")`
   389  	CmdDevFlagSet                = "Specify package variables to set on the command line (KEY=value). Note, if using a config file, this will be set by [package.create.set]."
   390  	CmdDevFlagRepoChartPath      = `If git repos hold helm charts, often found with gitops tools, specify the chart path, e.g. "/" or "/chart"`
   391  	CmdDevFlagGitAccount         = "User or organization name for the git account that the repos are created under."
   392  	CmdDevFlagKubeVersion        = "Override the default helm template KubeVersion when performing a package chart template"
   393  	CmdDevFlagFindImagesRegistry = "Override the ###JACKAL_REGISTRY### value"
   394  	CmdDevFlagFindImagesWhy      = "Prints the source manifest for the specified image"
   395  
   396  	CmdDevLintShort = "Lints the given package for valid schema and recommended practices"
   397  	CmdDevLintLong  = "Verifies the package schema, checks if any variables won't be evaluated, and checks for unpinned images/repos/files"
   398  	CmdDevLintErr   = "Unable to lint package: %s"
   399  
   400  	// jackal tools
   401  	CmdToolsShort = "Collection of additional tools to make airgap easier"
   402  
   403  	CmdToolsArchiverShort           = "Compresses/Decompresses generic archives, including Jackal packages"
   404  	CmdToolsArchiverCompressShort   = "Compresses a collection of sources based off of the destination file extension."
   405  	CmdToolsArchiverCompressErr     = "Unable to perform compression: %s"
   406  	CmdToolsArchiverDecompressShort = "Decompresses an archive or Jackal package based off of the source file extension."
   407  	CmdToolsArchiverDecompressErr   = "Unable to perform decompression: %s"
   408  
   409  	CmdToolsArchiverUnarchiveAllErr = "Unable to unarchive all nested tarballs: %s"
   410  
   411  	CmdToolsRegistryShort       = "Tools for working with container registries using go-containertools"
   412  	CmdToolsRegistryJackalState = "Retrieving registry information from Jackal state"
   413  	CmdToolsRegistryTunnel      = "Opening a tunnel from %s locally to %s in the cluster"
   414  
   415  	CmdToolsRegistryCatalogExample = `
   416  # List the repos internal to Jackal
   417  $ jackal tools registry catalog
   418  
   419  # List the repos for reg.example.com
   420  $ jackal tools registry catalog reg.example.com
   421  `
   422  	CmdToolsRegistryListExample = `
   423  # List the tags for a repo internal to Jackal
   424  $ jackal tools registry ls 127.0.0.1:31999/stefanprodan/podinfo
   425  
   426  # List the tags for a repo hosted at reg.example.com
   427  $ jackal tools registry ls reg.example.com/stefanprodan/podinfo
   428  `
   429  
   430  	CmdToolsRegistryPushExample = `
   431  # Push an image into an internal repo in Jackal
   432  $ jackal tools registry push image.tar 127.0.0.1:31999/stefanprodan/podinfo:6.4.0
   433  
   434  # Push an image into an repo hosted at reg.example.com
   435  $ jackal tools registry push image.tar reg.example.com/stefanprodan/podinfo:6.4.0
   436  `
   437  
   438  	CmdToolsRegistryPullExample = `
   439  # Pull an image from an internal repo in Jackal to a local tarball
   440  $ jackal tools registry pull 127.0.0.1:31999/stefanprodan/podinfo:6.4.0 image.tar
   441  
   442  # Pull an image from a repo hosted at reg.example.com to a local tarball
   443  $ jackal tools registry pull reg.example.com/stefanprodan/podinfo:6.4.0 image.tar
   444  `
   445  
   446  	CmdToolsRegistryDeleteExample = `
   447  # Delete an image digest from an internal repo in Jackal
   448  $ jackal tools registry delete 127.0.0.1:31999/stefanprodan/podinfo@sha256:57a654ace69ec02ba8973093b6a786faa15640575fbf0dbb603db55aca2ccec8
   449  
   450  # Delete an image digest from a repo hosted at reg.example.com
   451  $ jackal tools registry delete reg.example.com/stefanprodan/podinfo@sha256:57a654ace69ec02ba8973093b6a786faa15640575fbf0dbb603db55aca2ccec8
   452  `
   453  
   454  	CmdToolsRegistryDigestExample = `
   455  # Return an image digest for an internal repo in Jackal
   456  $ jackal tools registry digest 127.0.0.1:31999/stefanprodan/podinfo:6.4.0
   457  
   458  # Return an image digest from a repo hosted at reg.example.com
   459  $ jackal tools registry digest reg.example.com/stefanprodan/podinfo:6.4.0
   460  `
   461  
   462  	CmdToolsRegistryPruneShort       = "Prunes images from the registry that are not currently being used by any Jackal packages."
   463  	CmdToolsRegistryPruneFlagConfirm = "Confirm the image prune action to prevent accidental deletions"
   464  	CmdToolsRegistryPruneImageList   = "The following image digests will be pruned from the registry:"
   465  	CmdToolsRegistryPruneNoImages    = "There are no images to prune"
   466  	CmdToolsRegistryPruneLookup      = "Looking up images within package definitions"
   467  	CmdToolsRegistryPruneCatalog     = "Cataloging images in the registry"
   468  	CmdToolsRegistryPruneCalculate   = "Calculating images to prune"
   469  	CmdToolsRegistryPruneDelete      = "Deleting unused images"
   470  
   471  	CmdToolsRegistryInvalidPlatformErr = "Invalid platform '%s': %s"
   472  	CmdToolsRegistryFlagVerbose        = "Enable debug logs"
   473  	CmdToolsRegistryFlagInsecure       = "Allow image references to be fetched without TLS"
   474  	CmdToolsRegistryFlagNonDist        = "Allow pushing non-distributable (foreign) layers"
   475  	CmdToolsRegistryFlagPlatform       = "Specifies the platform in the form os/arch[/variant][:osversion] (e.g. linux/amd64)."
   476  
   477  	CmdToolsGetGitPasswdShort       = "[Deprecated] Returns the push user's password for the Git server"
   478  	CmdToolsGetGitPasswdLong        = "[Deprecated] Reads the password for a user with push access to the configured Git server in Jackal State. Note that this command has been replaced by 'jackal tools get-creds git' and will be removed in Jackal v1.0.0."
   479  	CmdToolsGetGitPasswdDeprecation = "Deprecated: This command has been replaced by 'jackal tools get-creds git' and will be removed in Jackal v1.0.0."
   480  	CmdToolsYqExample               = `
   481  # yq defaults to 'eval' command if no command is specified. See "jackal tools yq eval --help" for more examples.
   482  
   483  # read the "stuff" node from "myfile.yml"
   484  jackal tools yq '.stuff' < myfile.yml
   485  
   486  # update myfile.yml in place
   487  jackal tools yq -i '.stuff = "foo"' myfile.yml
   488  
   489  # print contents of sample.json as idiomatic YAML
   490  jackal tools yq -P sample.json
   491  `
   492  	CmdToolsYqEvalAllExample = `
   493  # Merge f2.yml into f1.yml (inplace)
   494  jackal tools yq eval-all --inplace 'select(fileIndex == 0) * select(fileIndex == 1)' f1.yml f2.yml
   495  ## the same command and expression using shortened names:
   496  jackal tools yq ea -i 'select(fi == 0) * select(fi == 1)' f1.yml f2.yml
   497  
   498  
   499  # Merge all given files
   500  jackal tools yq ea '. as $item ireduce ({}; . * $item )' file1.yml file2.yml ...
   501  
   502  # Pipe from STDIN
   503  ## use '-' as a filename to pipe from STDIN
   504  cat file2.yml | jackal tools yq ea '.a.b' file1.yml - file3.yml
   505  `
   506  	CmdToolsYqEvalExample = `
   507  # Reads field under the given path for each file
   508  jackal tools yq e '.a.b' f1.yml f2.yml 
   509  
   510  # Prints out the file
   511  jackal tools yq e sample.yaml 
   512  
   513  # Pipe from STDIN
   514  ## use '-' as a filename to pipe from STDIN
   515  cat file2.yml | jackal tools yq e '.a.b' file1.yml - file3.yml
   516  
   517  # Creates a new yaml document
   518  ## Note that editing an empty file does not work.
   519  jackal tools yq e -n '.a.b.c = "cat"' 
   520  
   521  # Update a file inplace
   522  jackal tools yq e '.a.b = "cool"' -i file.yaml 
   523  `
   524  	CmdToolsMonitorShort = "Launches a terminal UI to monitor the connected cluster using K9s."
   525  
   526  	CmdToolsHelmShort = "Subset of the Helm CLI included with Jackal to help manage helm charts."
   527  	CmdToolsHelmLong  = "Subset of the Helm CLI that includes the repo and dependency commands for managing helm charts destined for the air gap."
   528  
   529  	CmdToolsClearCacheShort         = "Clears the configured git and image cache directory"
   530  	CmdToolsClearCacheDir           = "Cache directory set to: %s"
   531  	CmdToolsClearCacheErr           = "Unable to clear the cache directory %s"
   532  	CmdToolsClearCacheSuccess       = "Successfully cleared the cache from %s"
   533  	CmdToolsClearCacheFlagCachePath = "Specify the location of the Jackal artifact cache (images and git repositories)"
   534  
   535  	CmdToolsCraneNotEnoughArgumentsErr   = "You do not have enough arguments specified for this command"
   536  	CmdToolsCraneConnectedButBadStateErr = "Detected a K8s cluster but was unable to get Jackal state - continuing without state information: %s"
   537  
   538  	CmdToolsDownloadInitShort               = "Downloads the init package for the current Jackal version into the specified directory"
   539  	CmdToolsDownloadInitFlagOutputDirectory = "Specify a directory to place the init package in."
   540  	CmdToolsDownloadInitErr                 = "Unable to download the init package: %s"
   541  
   542  	CmdToolsGenPkiShort       = "Generates a Certificate Authority and PKI chain of trust for the given host"
   543  	CmdToolsGenPkiSuccess     = "Successfully created a chain of trust for %s"
   544  	CmdToolsGenPkiFlagAltName = "Specify Subject Alternative Names for the certificate"
   545  
   546  	CmdToolsGenKeyShort                 = "Generates a cosign public/private keypair that can be used to sign packages"
   547  	CmdToolsGenKeyPrompt                = "Private key password (empty for no password): "
   548  	CmdToolsGenKeyPromptAgain           = "Private key password again (empty for no password): "
   549  	CmdToolsGenKeyPromptExists          = "File %s already exists. Overwrite? "
   550  	CmdToolsGenKeyErrUnableGetPassword  = "unable to get password for private key: %s"
   551  	CmdToolsGenKeyErrPasswordsNotMatch  = "passwords do not match"
   552  	CmdToolsGenKeyErrUnableToGenKeypair = "unable to generate key pair: %s"
   553  	CmdToolsGenKeyErrNoConfirmOverwrite = "did not receive confirmation for overwriting key file(s)"
   554  	CmdToolsGenKeySuccess               = "Generated key pair and written to %s and %s"
   555  
   556  	CmdToolsSbomShort = "Generates a Software Bill of Materials (SBOM) for the given package"
   557  	CmdToolsSbomErr   = "Unable to create SBOM (Syft) CLI"
   558  
   559  	CmdToolsWaitForShort = "Waits for a given Kubernetes resource to be ready"
   560  	CmdToolsWaitForLong  = "By default Jackal will wait for all Kubernetes resources to be ready before completion of a component during a deployment.\n" +
   561  		"This command can be used to wait for a Kubernetes resources to exist and be ready that may be created by a Gitops tool or a Kubernetes operator.\n" +
   562  		"You can also wait for arbitrary network endpoints using REST or TCP checks.\n\n"
   563  	CmdToolsWaitForExample = `
   564  # Wait for Kubernetes resources:
   565  $ jackal tools wait-for pod my-pod-name ready -n default                  #  wait for pod my-pod-name in namespace default to be ready
   566  $ jackal tools wait-for p cool-pod-name ready -n cool                     #  wait for pod (using p alias) cool-pod-name in namespace cool to be ready
   567  $ jackal tools wait-for deployment podinfo available -n podinfo           #  wait for deployment podinfo in namespace podinfo to be available
   568  $ jackal tools wait-for pod app=podinfo ready -n podinfo                  #  wait for pod with label app=podinfo in namespace podinfo to be ready
   569  $ jackal tools wait-for svc jackal-docker-registry exists -n jackal           #  wait for service jackal-docker-registry in namespace jackal to exist
   570  $ jackal tools wait-for svc jackal-docker-registry -n jackal                  #  same as above, except exists is the default condition
   571  $ jackal tools wait-for crd addons.k3s.cattle.io                          #  wait for crd addons.k3s.cattle.io to exist
   572  $ jackal tools wait-for sts test-sts '{.status.availableReplicas}'=23     #  wait for statefulset test-sts to have 23 available replicas
   573  
   574  # Wait for network endpoints:
   575  $ jackal tools wait-for http localhost:8080 200                           #  wait for a 200 response from http://localhost:8080
   576  $ jackal tools wait-for tcp localhost:8080                                #  wait for a connection to be established on localhost:8080
   577  $ jackal tools wait-for https 1.1.1.1 200                                 #  wait for a 200 response from https://1.1.1.1
   578  $ jackal tools wait-for http google.com                                   #  wait for any 2xx response from http://google.com
   579  $ jackal tools wait-for http google.com success                           #  wait for any 2xx response from http://google.com
   580  `
   581  	CmdToolsWaitForFlagTimeout        = "Specify the timeout duration for the wait command."
   582  	CmdToolsWaitForErrTimeoutString   = "Invalid timeout duration '%s'. Please use a valid duration string (e.g. 1s, 2m, 3h)."
   583  	CmdToolsWaitForErrTimeout         = "Wait timed out."
   584  	CmdToolsWaitForErrConditionString = "Invalid HTTP status code. Please use a valid HTTP status code (e.g. 200, 404, 500)."
   585  	CmdToolsWaitForErrJackalPath      = "Could not locate the current Jackal binary path."
   586  	CmdToolsWaitForFlagNamespace      = "Specify the namespace of the resources to wait for."
   587  
   588  	CmdToolsKubectlDocs = "Kubectl command. See https://kubernetes.io/docs/reference/kubectl/overview/ for more information."
   589  
   590  	CmdToolsGetCredsShort   = "Displays a table of credentials for deployed Jackal services. Pass a service key to get a single credential"
   591  	CmdToolsGetCredsLong    = "Display a table of credentials for deployed Jackal services. Pass a service key to get a single credential. i.e. 'jackal tools get-creds registry'"
   592  	CmdToolsGetCredsExample = `
   593  # Print all Jackal credentials:
   594  $ jackal tools get-creds
   595  
   596  # Get specific Jackal credentials:
   597  $ jackal tools get-creds registry
   598  $ jackal tools get-creds registry-readonly
   599  $ jackal tools get-creds git
   600  $ jackal tools get-creds git-readonly
   601  $ jackal tools get-creds artifact
   602  $ jackal tools get-creds logging
   603  `
   604  
   605  	CmdToolsUpdateCredsShort   = "Updates the credentials for deployed Jackal services. Pass a service key to update credentials for a single service"
   606  	CmdToolsUpdateCredsLong    = "Updates the credentials for deployed Jackal services. Pass a service key to update credentials for a single service. i.e. 'jackal tools update-creds registry'"
   607  	CmdToolsUpdateCredsExample = `
   608  # Autogenerate all Jackal credentials at once:
   609  $ jackal tools update-creds
   610  
   611  # Autogenerate specific Jackal service credentials:
   612  $ jackal tools update-creds registry
   613  $ jackal tools update-creds git
   614  $ jackal tools update-creds artifact
   615  $ jackal tools update-creds agent
   616  
   617  # Update all Jackal credentials w/external services at once:
   618  $ jackal tools update-creds \
   619  	--registry-push-username={USERNAME} --registry-push-password={PASSWORD} \
   620  	--git-push-username={USERNAME} --git-push-password={PASSWORD} \
   621  	--artifact-push-username={USERNAME} --artifact-push-token={PASSWORD}
   622  
   623  # NOTE: Any credentials omitted from flags without a service key specified will be autogenerated - URLs will only change if specified.
   624  # Config options can also be set with the 'init' section of a Jackal config file.
   625  
   626  # Update specific Jackal credentials w/external services:
   627  $ jackal tools update-creds registry --registry-push-username={USERNAME} --registry-push-password={PASSWORD}
   628  $ jackal tools update-creds git --git-push-username={USERNAME} --git-push-password={PASSWORD}
   629  $ jackal tools update-creds artifact --artifact-push-username={USERNAME} --artifact-push-token={PASSWORD}
   630  
   631  # NOTE: Not specifying a pull username/password will keep the previous pull username/password.
   632  `
   633  	CmdToolsUpdateCredsConfirmFlag          = "Confirm updating credentials without prompting"
   634  	CmdToolsUpdateCredsConfirmProvided      = "Confirm flag specified, continuing without prompting."
   635  	CmdToolsUpdateCredsConfirmContinue      = "Continue with these changes?"
   636  	CmdToolsUpdateCredsInvalidServiceErr    = "Invalid service key specified - valid keys are: %s, %s, and %s"
   637  	CmdToolsUpdateCredsUnableCreateToken    = "Unable to create the new Gitea artifact token: %s"
   638  	CmdToolsUpdateCredsUnableUpdateRegistry = "Unable to update Jackal Registry values: %s"
   639  	CmdToolsUpdateCredsUnableUpdateGit      = "Unable to update Jackal Git Server values: %s"
   640  	CmdToolsUpdateCredsUnableUpdateAgent    = "Unable to update Jackal Agent TLS secrets: %s"
   641  	CmdToolsUpdateCredsUnableUpdateCreds    = "Unable to update Jackal credentials"
   642  
   643  	// jackal version
   644  	CmdVersionShort = "Shows the version of the running Jackal binary"
   645  	CmdVersionLong  = "Displays the version of the Jackal release that the current binary was built from."
   646  
   647  	// tools version
   648  	CmdToolsVersionShort = "Print the version"
   649  
   650  	// cmd viper setup
   651  	CmdViperErrLoadingConfigFile = "failed to load config file: %s"
   652  	CmdViperInfoUsingConfigFile  = "Using config file %s"
   653  )
   654  
   655  // Jackal Agent messages
   656  // These are only seen in the Kubernetes logs.
   657  const (
   658  	AgentInfoWebhookAllowed = "Webhook [%s - %s] - Allowed: %t"
   659  	AgentInfoShutdown       = "Shutdown gracefully..."
   660  	AgentInfoPort           = "Server running in port: %s"
   661  
   662  	AgentErrBadRequest             = "could not read request body: %s"
   663  	AgentErrBindHandler            = "Unable to bind the webhook handler"
   664  	AgentErrCouldNotDeserializeReq = "could not deserialize request: %s"
   665  	AgentErrGetState               = "failed to load jackal state from file: %w"
   666  	AgentErrHostnameMatch          = "failed to complete hostname matching: %w"
   667  	AgentErrImageSwap              = "Unable to swap the host for (%s)"
   668  	AgentErrInvalidMethod          = "invalid method only POST requests are allowed"
   669  	AgentErrInvalidOp              = "invalid operation: %s"
   670  	AgentErrInvalidType            = "only content type 'application/json' is supported"
   671  	AgentErrMarshallJSONPatch      = "unable to marshall the json patch"
   672  	AgentErrMarshalResponse        = "unable to marshal the response"
   673  	AgentErrNilReq                 = "malformed admission review: request is nil"
   674  	AgentErrShutdown               = "unable to properly shutdown the web server"
   675  	AgentErrStart                  = "Failed to start the web server"
   676  	AgentErrUnableTransform        = "unable to transform the provided request; see jackal http proxy logs for more details"
   677  )
   678  
   679  // Package create
   680  const (
   681  	PkgCreateErrDifferentialSameVersion = "unable to create differential package. Please ensure the differential package version and reference package version are not the same. The package version must be incremented"
   682  	PkgCreateErrDifferentialNoVersion   = "unable to create differential package. Please ensure both package versions are set"
   683  )
   684  
   685  // Package validate
   686  const (
   687  	PkgValidateTemplateDeprecation        = "Package template %q is using the deprecated syntax ###JACKAL_PKG_VAR_%s###. This will be removed in Jackal v1.0.0. Please update to ###JACKAL_PKG_TMPL_%s###."
   688  	PkgValidateMustBeUppercase            = "variable name %q must be all uppercase and contain no special characters except _"
   689  	PkgValidateErrAction                  = "invalid action: %w"
   690  	PkgValidateErrActionVariables         = "component %q cannot contain setVariables outside of onDeploy in actions"
   691  	PkgValidateErrActionCmdWait           = "action %q cannot be both a command and wait action"
   692  	PkgValidateErrActionClusterNetwork    = "a single wait action must contain only one of cluster or network"
   693  	PkgValidateErrChart                   = "invalid chart definition: %w"
   694  	PkgValidateErrChartName               = "chart %q exceed the maximum length of %d characters"
   695  	PkgValidateErrChartNameMissing        = "chart %q must include a name"
   696  	PkgValidateErrChartNameNotUnique      = "chart name %q is not unique"
   697  	PkgValidateErrChartNamespaceMissing   = "chart %q must include a namespace"
   698  	PkgValidateErrChartURLOrPath          = "chart %q must have either a url or localPath"
   699  	PkgValidateErrChartVersion            = "chart %q must include a chart version"
   700  	PkgValidateErrComponentName           = "component name %q must be all lowercase and contain no special characters except '-' and cannot start with a '-'"
   701  	PkgValidateErrComponentLocalOS        = "component %q contains a localOS value that is not supported: %s (supported: %s)"
   702  	PkgValidateErrComponentNameNotUnique  = "component name %q is not unique"
   703  	PkgValidateErrComponent               = "invalid component %q: %w"
   704  	PkgValidateErrComponentReqDefault     = "component %q cannot be both required and default"
   705  	PkgValidateErrComponentReqGrouped     = "component %q cannot be both required and grouped"
   706  	PkgValidateErrComponentYOLO           = "component %q incompatible with the online-only package flag (metadata.yolo): %w"
   707  	PkgValidateErrGroupMultipleDefaults   = "group %q has multiple defaults (%q, %q)"
   708  	PkgValidateErrGroupOneComponent       = "group %q only has one component (%q)"
   709  	PkgValidateErrConstant                = "invalid package constant: %w"
   710  	PkgValidateErrImportDefinition        = "invalid imported definition for %s: %s"
   711  	PkgValidateErrInitNoYOLO              = "sorry, you can't YOLO an init package"
   712  	PkgValidateErrManifest                = "invalid manifest definition: %w"
   713  	PkgValidateErrManifestFileOrKustomize = "manifest %q must have at least one file or kustomization"
   714  	PkgValidateErrManifestNameLength      = "manifest %q exceed the maximum length of %d characters"
   715  	PkgValidateErrManifestNameMissing     = "manifest %q must include a name"
   716  	PkgValidateErrManifestNameNotUnique   = "manifest name %q is not unique"
   717  	PkgValidateErrName                    = "invalid package name: %w"
   718  	PkgValidateErrPkgConstantName         = "constant name %q must be all uppercase and contain no special characters except _"
   719  	PkgValidateErrPkgConstantPattern      = "provided value for constant %q does not match pattern %q"
   720  	PkgValidateErrPkgName                 = "package name %q must be all lowercase and contain no special characters except '-' and cannot start with a '-'"
   721  	PkgValidateErrVariable                = "invalid package variable: %w"
   722  	PkgValidateErrYOLONoArch              = "cluster architecture not allowed"
   723  	PkgValidateErrYOLONoDistro            = "cluster distros not allowed"
   724  	PkgValidateErrYOLONoGit               = "git repos not allowed"
   725  	PkgValidateErrYOLONoOCI               = "OCI images not allowed"
   726  )
   727  
   728  // Collection of reusable error messages.
   729  var (
   730  	ErrInitNotFound        = errors.New("this command requires a jackal-init package, but one was not found on the local system. Re-run the last command again without '--confirm' to download the package")
   731  	ErrUnableToCheckArch   = errors.New("unable to get the configured cluster's architecture")
   732  	ErrInterrupt           = errors.New("execution cancelled due to an interrupt")
   733  	ErrUnableToGetPackages = errors.New("unable to load the Jackal Package data from the cluster")
   734  )
   735  
   736  // Collection of reusable warn messages.
   737  var (
   738  	WarnSGetDeprecation = "Using sget to download resources is being deprecated and will removed in the v1.0.0 release of Jackal. Please publish the packages as OCI artifacts instead."
   739  )