diff --git a/.github/workflows/test-upgrade.yml b/.github/workflows/test-upgrade.yml index bafbcf3760..b7b8a96dde 100644 --- a/.github/workflows/test-upgrade.yml +++ b/.github/workflows/test-upgrade.yml @@ -71,7 +71,7 @@ jobs: # NOTE: "PATH=$PATH" preserves the default user $PATH. This is needed to maintain the version of zarf installed # in a previous step. This test run will the current release to create a K3s cluster. run: | - sudo env "PATH=$PATH" CI=true zarf init --components k3s,git-server,logging --nodeport 31337 --confirm + sudo env "PATH=$PATH" CI=true zarf init --components k3s,git-server --nodeport 31337 --confirm # Before we run the regular tests we need to aggressively cleanup files to reduce disk pressure - name: Cleanup files diff --git a/README.md b/README.md index 7ea6cf63c0..221ac84ae0 100644 --- a/README.md +++ b/README.md @@ -32,13 +32,12 @@ Zarf eliminates the [complexity of air gap software delivery](https://www.itopst - Automate Kubernetes deployments in disconnected environments - Automate [Software Bill of Materials (SBOM)](https://docs.zarf.dev/ref/sboms/) generation -- Build and [publish packages as OCI image artifacts](https://docs.zarf.dev/tutorials/7-publish-and-deploy/) +- Build and [publish packages as OCI image artifacts](https://docs.zarf.dev/tutorials/6-publish-and-deploy/) - Provide a [web dashboard](https://docs.zarf.dev/ref/sboms/#the-sbom-viewer) for viewing SBOM output - Create and verify package signatures with [cosign](https://github.com/sigstore/cosign) - [Publish](https://docs.zarf.dev/commands/zarf_package_publish), [pull](https://docs.zarf.dev/commands/zarf_package_pull), and [deploy](https://docs.zarf.dev/commands/zarf_package_deploy) packages from an [OCI registry](https://opencontainers.org/) - Powerful component lifecycle [actions](https://docs.zarf.dev/ref/actions) - Deploy a new cluster while fully disconnected with [K3s](https://k3s.io/) or into any existing cluster using a [kube config](https://kubernetes.io/docs/concepts/configuration/organize-cluster-access-kubeconfig/) -- Builtin logging stack with [Loki](https://grafana.com/oss/loki/) - Built-in Git server with [Gitea](https://gitea.io/en-us/) - Built-in Docker registry - Builtin [K9s Dashboard](https://k9scli.io/) for managing a cluster from the terminal diff --git a/adr/0014-oci-publish.md b/adr/0014-oci-publish.md index e06c7fe739..20a5407815 100644 --- a/adr/0014-oci-publish.md +++ b/adr/0014-oci-publish.md @@ -47,7 +47,7 @@ zarf-package-adr-arm64.tar.zst With this new structure in place, we can now publish Zarf packages as OCI artifacts. Under the hood this implements the `oras` Go library using Docker's authentication system. For interacting with these packages, the `oci://` package path prefix has been added (ex. `zarf package publish oci://...`). -For an example of this in action, please see the corresponding [tutorial](../docs/5-zarf-tutorials/7-publish-and-deploy.md). +For an example of this in action, please see the corresponding [tutorial](../docs/5-zarf-tutorials/6-publish-and-deploy.md). ## Consequences diff --git a/examples/big-bang/zarf.yaml b/examples/big-bang/zarf.yaml index 7a9b5735b6..534ebd0ea4 100644 --- a/examples/big-bang/zarf.yaml +++ b/examples/big-bang/zarf.yaml @@ -77,7 +77,7 @@ x-mdx: | - To see a tutorial for the creation and deployment of this package see the [Big Bang Tutorial](/tutorials/6-big-bang/). + To see a tutorial for the creation and deployment of this package see the [Big Bang Tutorial](/tutorials/5-big-bang/). :::caution diff --git a/examples/component-webhooks/capabilities/zarf-types.ts b/examples/component-webhooks/capabilities/zarf-types.ts index 11e840d2d3..4ead23ab96 100644 --- a/examples/component-webhooks/capabilities/zarf-types.ts +++ b/examples/component-webhooks/capabilities/zarf-types.ts @@ -9,28 +9,28 @@ export interface ZarfTypes { DeployedPackage: DeployedPackage; - ZarfPackage: ZarfPackage; + ZarfPackage: Data; ZarfState: ZarfState; } export interface DeployedPackage { cliVersion: string; - componentWebhooks?: { [key: string]: { [key: string]: Webhook } }; - connectStrings?: { [key: string]: ConnectString }; - data: ZarfPackage; - deployedComponents: DeployedComponent[]; + componentWebhooks?: { [key: string]: { [key: string]: ComponentWebhookValue } }; + connectStrings?: { [key: string]: ConnectStringValue }; + data: Data; + deployedComponents: DeployedComponentElement[]; generation: number; name: string; } -export interface Webhook { +export interface ComponentWebhookValue { name: string; observedGeneration: number; status: string; waitDurationSeconds?: number; } -export interface ConnectString { +export interface ConnectStringValue { /** * Descriptive text that explains what the resource you would be connecting to is used for */ @@ -41,19 +41,19 @@ export interface ConnectString { url: string; } -export interface ZarfPackage { +export interface Data { /** * Zarf-generated package build data */ - build?: ZarfBuildData; + build?: Build; /** * List of components to deploy in this package */ - components: ZarfComponent[]; + components: ComponentElement[]; /** * Constant template values applied on deploy for K8s resources */ - constants?: ZarfPackageConstant[]; + constants?: ConstantElement[]; /** * The kind of Zarf package */ @@ -61,7 +61,7 @@ export interface ZarfPackage { /** * Package metadata */ - metadata?: ZarfMetadata; + metadata?: Metadata; /** * Variable template values applied on deploy for K8s resources */ @@ -71,7 +71,7 @@ export interface ZarfPackage { /** * Zarf-generated package build data */ -export interface ZarfBuildData { +export interface Build { /** * The architecture this package was created on */ @@ -84,6 +84,15 @@ export interface ZarfBuildData { * List of components that were not included in this package due to differential packaging */ differentialMissing?: string[]; + /** + * Version of a previously built package used as the basis for creating this differential + * package + */ + differentialPackageVersion?: string; + /** + * The flavor of Zarf used to build this package + */ + flavor?: string; /** * The minimum version of Zarf that does not have breaking package structure changes */ @@ -114,15 +123,15 @@ export interface ZarfBuildData { version: string; } -export interface ZarfComponent { +export interface ComponentElement { /** * Custom commands to run at various stages of a package lifecycle */ - actions?: ZarfComponentActions; + actions?: Actions; /** * Helm charts to install during package deploy */ - charts?: ZarfChart[]; + charts?: ChartElement[]; /** * [Deprecated] Specify a path to a public key to validate signed online resources. This * will be removed in Zarf v1.0.0. @@ -131,7 +140,7 @@ export interface ZarfComponent { /** * Datasets to inject into a container in the target cluster */ - dataInjections?: ZarfDataInjection[]; + dataInjections?: DataInjectionElement[]; /** * Determines the default Y/N state for installing this component on package deploy */ @@ -143,11 +152,11 @@ export interface ZarfComponent { /** * Extend component functionality with additional features */ - extensions?: ZarfComponentExtensions; + extensions?: Extensions; /** * Files or folders to place on disk during package deployment */ - files?: ZarfFile[]; + files?: FileElement[]; /** * [Deprecated] Create a user selector field based on all components in the same group. This * will be removed in Zarf v1.0.0. Consider using 'only.flavor' instead. @@ -160,11 +169,11 @@ export interface ZarfComponent { /** * Import a component from another Zarf package */ - import?: ZarfComponentImport; + import?: Import; /** * Kubernetes manifests to be included in a generated Helm chart on package deploy */ - manifests?: ZarfManifest[]; + manifests?: ManifestElement[]; /** * The name of the component */ @@ -172,7 +181,7 @@ export interface ZarfComponent { /** * Filter when this component is included in package creation or deployment */ - only?: ZarfComponentOnlyTarget; + only?: Only; /** * List of git repos to include in the package */ @@ -185,25 +194,25 @@ export interface ZarfComponent { * [Deprecated] (replaced by actions) Custom commands to run before or after package * deployment. This will be removed in Zarf v1.0.0. */ - scripts?: DeprecatedZarfComponentScripts; + scripts?: Scripts; } /** * Custom commands to run at various stages of a package lifecycle */ -export interface ZarfComponentActions { +export interface Actions { /** * Actions to run during package creation */ - onCreate?: ZarfComponentActionSet; + onCreate?: OnCreate; /** * Actions to run during package deployment */ - onDeploy?: ZarfComponentActionSet; + onDeploy?: OnCreate; /** * Actions to run during package removal */ - onRemove?: ZarfComponentActionSet; + onRemove?: OnCreate; } /** @@ -213,30 +222,30 @@ export interface ZarfComponentActions { * * Actions to run during package removal */ -export interface ZarfComponentActionSet { +export interface OnCreate { /** * Actions to run at the end of an operation */ - after?: ZarfComponentAction[]; + after?: AfterElement[]; /** * Actions to run at the start of an operation */ - before?: ZarfComponentAction[]; + before?: AfterElement[]; /** * Default configuration for all actions in this set */ - defaults?: ZarfComponentActionDefaults; + defaults?: Defaults; /** * Actions to run if all operations fail */ - onFailure?: ZarfComponentAction[]; + onFailure?: AfterElement[]; /** * Actions to run if all operations succeed */ - onSuccess?: ZarfComponentAction[]; + onSuccess?: AfterElement[]; } -export interface ZarfComponentAction { +export interface AfterElement { /** * The command to run. Must specify either cmd or wait for the action to do anything. */ @@ -275,20 +284,20 @@ export interface ZarfComponentAction { * (onDeploy/cmd only) An array of variables to update with the output of the command. These * variables will be available to all remaining actions and components in the package. */ - setVariables?: ZarfComponentActionSetVariable[]; + setVariables?: SetVariableElement[]; /** * (cmd only) Indicates a preference for a shell for the provided cmd to be executed in on * supported operating systems */ - shell?: ZarfComponentActionShell; + shell?: Shell; /** * Wait for a condition to be met before continuing. Must specify either cmd or wait for the * action. See the 'zarf tools wait-for' command for more info. */ - wait?: ZarfComponentActionWait; + wait?: Wait; } -export interface ZarfComponentActionSetVariable { +export interface SetVariableElement { /** * Whether to automatically indent the variable's value (if multiline) when templating. * Based on the number of chars before the start of ###ZARF_VAR_. @@ -304,7 +313,7 @@ export interface ZarfComponentActionSetVariable { */ pattern?: string; /** - * Whether to mark this variable as sensitive to not print it in the Zarf log + * Whether to mark this variable as sensitive to not print it in the log */ sensitive?: boolean; /** @@ -327,7 +336,7 @@ export enum Type { * (cmd only) Indicates a preference for a shell for the provided cmd to be executed in on * supported operating systems */ -export interface ZarfComponentActionShell { +export interface Shell { /** * (default 'sh') Indicates a preference for the shell to use on macOS systems */ @@ -347,24 +356,24 @@ export interface ZarfComponentActionShell { * Wait for a condition to be met before continuing. Must specify either cmd or wait for the * action. See the 'zarf tools wait-for' command for more info. */ -export interface ZarfComponentActionWait { +export interface Wait { /** * Wait for a condition to be met in the cluster before continuing. Only one of cluster or * network can be specified. */ - cluster?: ZarfComponentActionWaitCluster; + cluster?: WaitCluster; /** * Wait for a condition to be met on the network before continuing. Only one of cluster or * network can be specified. */ - network?: ZarfComponentActionWaitNetwork; + network?: Network; } /** * Wait for a condition to be met in the cluster before continuing. Only one of cluster or * network can be specified. */ -export interface ZarfComponentActionWaitCluster { +export interface WaitCluster { /** * The condition or jsonpath state to wait for; defaults to exist */ @@ -387,7 +396,7 @@ export interface ZarfComponentActionWaitCluster { * Wait for a condition to be met on the network before continuing. Only one of cluster or * network can be specified. */ -export interface ZarfComponentActionWaitNetwork { +export interface Network { /** * The address to wait for */ @@ -414,7 +423,7 @@ export enum Protocol { /** * Default configuration for all actions in this set */ -export interface ZarfComponentActionDefaults { +export interface Defaults { /** * Working directory for commands (default CWD) */ @@ -439,21 +448,21 @@ export interface ZarfComponentActionDefaults { * (cmd only) Indicates a preference for a shell for the provided cmd to be executed in on * supported operating systems */ - shell?: ZarfComponentActionShell; + shell?: Shell; } -export interface ZarfChart { +export interface ChartElement { /** - * The path to the chart in the repo if using a git repo instead of a helm repo + * (git repo only) The sub directory to the chart within a git repo */ gitPath?: string; /** - * The path to the chart folder + * The path to a local chart's folder or .tgz archive */ localPath?: string; /** - * The name of the chart to deploy; this should be the name of the chart as it is installed - * in the helm repo + * The name of the chart within Zarf; note that this must be unique and does not need to be + * the same as the name in the chart repo */ name: string; /** @@ -465,26 +474,49 @@ export interface ZarfChart { */ noWait?: boolean; /** - * The name of the release to create; defaults to the name of the chart + * The name of the Helm release to create (defaults to the Zarf name of the chart) */ releaseName?: string; + /** + * The name of a chart within a Helm repository (defaults to the Zarf name of the chart) + */ + repoName?: string; /** * The URL of the OCI registry, chart repository, or git repo where the helm chart is stored */ url?: string; /** * List of local values file paths or remote URLs to include in the package; these will be - * merged together + * merged together when deployed */ valuesFiles?: string[]; + /** + * [alpha] List of variables to set in the Helm chart + */ + variables?: ChartVariable[]; /** * The version of the chart to deploy; for git-based charts this is also the tag of the git - * repo + * repo by default (when not using the '@' syntax for 'repos') */ version?: string; } -export interface ZarfDataInjection { +export interface ChartVariable { + /** + * A brief description of what the variable controls + */ + description: string; + /** + * The name of the variable + */ + name: string; + /** + * The path within the Helm chart values where this variable applies + */ + path: string; +} + +export interface DataInjectionElement { /** * Compress the data before transmitting using gzip. Note: this requires support for * tar/gzip locally and in the target image. @@ -498,13 +530,13 @@ export interface ZarfDataInjection { /** * The target pod + container to inject the data into */ - target: ZarfContainerTarget; + target: Target; } /** * The target pod + container to inject the data into */ -export interface ZarfContainerTarget { +export interface Target { /** * The container name to target for data injection */ @@ -526,17 +558,17 @@ export interface ZarfContainerTarget { /** * Extend component functionality with additional features */ -export interface ZarfComponentExtensions { +export interface Extensions { /** * Configurations for installing Big Bang and Flux in the cluster */ - bigbang?: BigBang; + bigbang?: Bigbang; } /** * Configurations for installing Big Bang and Flux in the cluster */ -export interface BigBang { +export interface Bigbang { /** * Optional paths to Flux kustomize strategic merge patch files */ @@ -559,7 +591,7 @@ export interface BigBang { version: string; } -export interface ZarfFile { +export interface FileElement { /** * (files only) Determines if the file should be made executable during package deploy */ @@ -590,7 +622,7 @@ export interface ZarfFile { /** * Import a component from another Zarf package */ -export interface ZarfComponentImport { +export interface Import { /** * The name of the component to import from the referenced zarf.yaml */ @@ -605,7 +637,7 @@ export interface ZarfComponentImport { url?: string; } -export interface ZarfManifest { +export interface ManifestElement { /** * List of local K8s YAML files or remote URLs to deploy (in order) */ @@ -636,11 +668,11 @@ export interface ZarfManifest { /** * Filter when this component is included in package creation or deployment */ -export interface ZarfComponentOnlyTarget { +export interface Only { /** * Only deploy component to specified clusters */ - cluster?: ZarfComponentOnlyCluster; + cluster?: OnlyCluster; /** * Only include this component when a matching '--flavor' is specified on 'zarf package * create' @@ -655,7 +687,7 @@ export interface ZarfComponentOnlyTarget { /** * Only deploy component to specified clusters */ -export interface ZarfComponentOnlyCluster { +export interface OnlyCluster { /** * Only create and deploy to clusters of the given architecture */ @@ -687,7 +719,7 @@ export enum LocalOS { * [Deprecated] (replaced by actions) Custom commands to run before or after package * deployment. This will be removed in Zarf v1.0.0. */ -export interface DeprecatedZarfComponentScripts { +export interface Scripts { /** * Scripts to run after the component successfully deploys */ @@ -714,7 +746,7 @@ export interface DeprecatedZarfComponentScripts { timeoutSeconds?: number; } -export interface ZarfPackageConstant { +export interface ConstantElement { /** * Whether to automatically indent the variable's value (if multiline) when templating. * Based on the number of chars before the start of ###ZARF_CONST_. @@ -751,7 +783,7 @@ export enum Kind { /** * Package metadata */ -export interface ZarfMetadata { +export interface Metadata { /** * Checksum of a checksums.txt file that contains checksums all the layers within the * package. @@ -773,10 +805,6 @@ export interface ZarfMetadata { * Link to package documentation when online */ documentation?: string; - /** - * An image URL to embed in this package (Reserved for future use in Zarf UI) - */ - image?: string; /** * Name to identify this Zarf package */ @@ -829,8 +857,8 @@ export interface ZarfPackageVariable { */ name: string; /** - * An optional regex pattern that a variable value must match before a package can be - * deployed. + * An optional regex pattern that a variable value must match before a package deployment + * can continue. */ pattern?: string; /** @@ -838,7 +866,7 @@ export interface ZarfPackageVariable { */ prompt?: boolean; /** - * Whether to mark this variable as sensitive to not print it in the Zarf log + * Whether to mark this variable as sensitive to not print it in the log */ sensitive?: boolean; /** @@ -848,20 +876,20 @@ export interface ZarfPackageVariable { type?: Type; } -export interface DeployedComponent { - installedCharts: InstalledChart[]; +export interface DeployedComponentElement { + installedCharts: InstalledChartElement[]; name: string; observedGeneration: number; status: string; } -export interface InstalledChart { +export interface InstalledChartElement { chartName: string; namespace: string; } export interface ZarfState { - agentTLS: GeneratedPKI; + agentTLS: AgentTLS; /** * Machine architecture of the k8s node(s) */ @@ -869,7 +897,7 @@ export interface ZarfState { /** * Information about the artifact registry Zarf is configured to use */ - artifactServer: ArtifactServerInfo; + artifactServer: ArtifactServer; /** * K8s distribution of the cluster Zarf was deployed to */ @@ -877,11 +905,7 @@ export interface ZarfState { /** * Information about the repository Zarf is configured to use */ - gitServer: GitServerInfo; - /** - * Secret value that the internal Grafana server was seeded with - */ - loggingSecret: string; + gitServer: GitServer; /** * Information about the container registry Zarf is configured to use */ @@ -893,7 +917,7 @@ export interface ZarfState { zarfAppliance: boolean; } -export interface GeneratedPKI { +export interface AgentTLS { ca: string; cert: string; key: string; @@ -902,7 +926,7 @@ export interface GeneratedPKI { /** * Information about the artifact registry Zarf is configured to use */ -export interface ArtifactServerInfo { +export interface ArtifactServer { /** * URL address of the artifact registry */ @@ -924,7 +948,7 @@ export interface ArtifactServerInfo { /** * Information about the repository Zarf is configured to use */ -export interface GitServerInfo { +export interface GitServer { /** * URL address of the git server */ @@ -1161,40 +1185,42 @@ function r(name: string) { const typeMap: any = { "ZarfTypes": o([ { json: "DeployedPackage", js: "DeployedPackage", typ: r("DeployedPackage") }, - { json: "ZarfPackage", js: "ZarfPackage", typ: r("ZarfPackage") }, + { json: "ZarfPackage", js: "ZarfPackage", typ: r("Data") }, { json: "ZarfState", js: "ZarfState", typ: r("ZarfState") }, ], false), "DeployedPackage": o([ { json: "cliVersion", js: "cliVersion", typ: "" }, - { json: "componentWebhooks", js: "componentWebhooks", typ: u(undefined, m(m(r("Webhook")))) }, - { json: "connectStrings", js: "connectStrings", typ: u(undefined, m(r("ConnectString"))) }, - { json: "data", js: "data", typ: r("ZarfPackage") }, - { json: "deployedComponents", js: "deployedComponents", typ: a(r("DeployedComponent")) }, + { json: "componentWebhooks", js: "componentWebhooks", typ: u(undefined, m(m(r("ComponentWebhookValue")))) }, + { json: "connectStrings", js: "connectStrings", typ: u(undefined, m(r("ConnectStringValue"))) }, + { json: "data", js: "data", typ: r("Data") }, + { json: "deployedComponents", js: "deployedComponents", typ: a(r("DeployedComponentElement")) }, { json: "generation", js: "generation", typ: 0 }, { json: "name", js: "name", typ: "" }, ], false), - "Webhook": o([ + "ComponentWebhookValue": o([ { json: "name", js: "name", typ: "" }, { json: "observedGeneration", js: "observedGeneration", typ: 0 }, { json: "status", js: "status", typ: "" }, { json: "waitDurationSeconds", js: "waitDurationSeconds", typ: u(undefined, 0) }, ], false), - "ConnectString": o([ + "ConnectStringValue": o([ { json: "description", js: "description", typ: "" }, { json: "url", js: "url", typ: "" }, ], false), - "ZarfPackage": o([ - { json: "build", js: "build", typ: u(undefined, r("ZarfBuildData")) }, - { json: "components", js: "components", typ: a(r("ZarfComponent")) }, - { json: "constants", js: "constants", typ: u(undefined, a(r("ZarfPackageConstant"))) }, + "Data": o([ + { json: "build", js: "build", typ: u(undefined, r("Build")) }, + { json: "components", js: "components", typ: a(r("ComponentElement")) }, + { json: "constants", js: "constants", typ: u(undefined, a(r("ConstantElement"))) }, { json: "kind", js: "kind", typ: r("Kind") }, - { json: "metadata", js: "metadata", typ: u(undefined, r("ZarfMetadata")) }, + { json: "metadata", js: "metadata", typ: u(undefined, r("Metadata")) }, { json: "variables", js: "variables", typ: u(undefined, a(r("ZarfPackageVariable"))) }, ], false), - "ZarfBuildData": o([ + "Build": o([ { json: "architecture", js: "architecture", typ: "" }, { json: "differential", js: "differential", typ: u(undefined, true) }, { json: "differentialMissing", js: "differentialMissing", typ: u(undefined, a("")) }, + { json: "differentialPackageVersion", js: "differentialPackageVersion", typ: u(undefined, "") }, + { json: "flavor", js: "flavor", typ: u(undefined, "") }, { json: "lastNonBreakingVersion", js: "lastNonBreakingVersion", typ: u(undefined, "") }, { json: "migrations", js: "migrations", typ: u(undefined, a("")) }, { json: "registryOverrides", js: "registryOverrides", typ: u(undefined, m("")) }, @@ -1203,38 +1229,38 @@ const typeMap: any = { { json: "user", js: "user", typ: "" }, { json: "version", js: "version", typ: "" }, ], false), - "ZarfComponent": o([ - { json: "actions", js: "actions", typ: u(undefined, r("ZarfComponentActions")) }, - { json: "charts", js: "charts", typ: u(undefined, a(r("ZarfChart"))) }, + "ComponentElement": o([ + { json: "actions", js: "actions", typ: u(undefined, r("Actions")) }, + { json: "charts", js: "charts", typ: u(undefined, a(r("ChartElement"))) }, { json: "cosignKeyPath", js: "cosignKeyPath", typ: u(undefined, "") }, - { json: "dataInjections", js: "dataInjections", typ: u(undefined, a(r("ZarfDataInjection"))) }, + { json: "dataInjections", js: "dataInjections", typ: u(undefined, a(r("DataInjectionElement"))) }, { json: "default", js: "default", typ: u(undefined, true) }, { json: "description", js: "description", typ: u(undefined, "") }, - { json: "extensions", js: "extensions", typ: u(undefined, r("ZarfComponentExtensions")) }, - { json: "files", js: "files", typ: u(undefined, a(r("ZarfFile"))) }, + { json: "extensions", js: "extensions", typ: u(undefined, r("Extensions")) }, + { json: "files", js: "files", typ: u(undefined, a(r("FileElement"))) }, { json: "group", js: "group", typ: u(undefined, "") }, { json: "images", js: "images", typ: u(undefined, a("")) }, - { json: "import", js: "import", typ: u(undefined, r("ZarfComponentImport")) }, - { json: "manifests", js: "manifests", typ: u(undefined, a(r("ZarfManifest"))) }, + { json: "import", js: "import", typ: u(undefined, r("Import")) }, + { json: "manifests", js: "manifests", typ: u(undefined, a(r("ManifestElement"))) }, { json: "name", js: "name", typ: "" }, - { json: "only", js: "only", typ: u(undefined, r("ZarfComponentOnlyTarget")) }, + { json: "only", js: "only", typ: u(undefined, r("Only")) }, { json: "repos", js: "repos", typ: u(undefined, a("")) }, { json: "required", js: "required", typ: u(undefined, true) }, - { json: "scripts", js: "scripts", typ: u(undefined, r("DeprecatedZarfComponentScripts")) }, + { json: "scripts", js: "scripts", typ: u(undefined, r("Scripts")) }, ], false), - "ZarfComponentActions": o([ - { json: "onCreate", js: "onCreate", typ: u(undefined, r("ZarfComponentActionSet")) }, - { json: "onDeploy", js: "onDeploy", typ: u(undefined, r("ZarfComponentActionSet")) }, - { json: "onRemove", js: "onRemove", typ: u(undefined, r("ZarfComponentActionSet")) }, + "Actions": o([ + { json: "onCreate", js: "onCreate", typ: u(undefined, r("OnCreate")) }, + { json: "onDeploy", js: "onDeploy", typ: u(undefined, r("OnCreate")) }, + { json: "onRemove", js: "onRemove", typ: u(undefined, r("OnCreate")) }, ], false), - "ZarfComponentActionSet": o([ - { json: "after", js: "after", typ: u(undefined, a(r("ZarfComponentAction"))) }, - { json: "before", js: "before", typ: u(undefined, a(r("ZarfComponentAction"))) }, - { json: "defaults", js: "defaults", typ: u(undefined, r("ZarfComponentActionDefaults")) }, - { json: "onFailure", js: "onFailure", typ: u(undefined, a(r("ZarfComponentAction"))) }, - { json: "onSuccess", js: "onSuccess", typ: u(undefined, a(r("ZarfComponentAction"))) }, + "OnCreate": o([ + { json: "after", js: "after", typ: u(undefined, a(r("AfterElement"))) }, + { json: "before", js: "before", typ: u(undefined, a(r("AfterElement"))) }, + { json: "defaults", js: "defaults", typ: u(undefined, r("Defaults")) }, + { json: "onFailure", js: "onFailure", typ: u(undefined, a(r("AfterElement"))) }, + { json: "onSuccess", js: "onSuccess", typ: u(undefined, a(r("AfterElement"))) }, ], false), - "ZarfComponentAction": o([ + "AfterElement": o([ { json: "cmd", js: "cmd", typ: u(undefined, "") }, { json: "description", js: "description", typ: u(undefined, "") }, { json: "dir", js: "dir", typ: u(undefined, "") }, @@ -1243,78 +1269,85 @@ const typeMap: any = { { json: "maxTotalSeconds", js: "maxTotalSeconds", typ: u(undefined, 0) }, { json: "mute", js: "mute", typ: u(undefined, true) }, { json: "setVariable", js: "setVariable", typ: u(undefined, "") }, - { json: "setVariables", js: "setVariables", typ: u(undefined, a(r("ZarfComponentActionSetVariable"))) }, - { json: "shell", js: "shell", typ: u(undefined, r("ZarfComponentActionShell")) }, - { json: "wait", js: "wait", typ: u(undefined, r("ZarfComponentActionWait")) }, + { json: "setVariables", js: "setVariables", typ: u(undefined, a(r("SetVariableElement"))) }, + { json: "shell", js: "shell", typ: u(undefined, r("Shell")) }, + { json: "wait", js: "wait", typ: u(undefined, r("Wait")) }, ], false), - "ZarfComponentActionSetVariable": o([ + "SetVariableElement": o([ { json: "autoIndent", js: "autoIndent", typ: u(undefined, true) }, { json: "name", js: "name", typ: "" }, { json: "pattern", js: "pattern", typ: u(undefined, "") }, { json: "sensitive", js: "sensitive", typ: u(undefined, true) }, { json: "type", js: "type", typ: u(undefined, r("Type")) }, ], false), - "ZarfComponentActionShell": o([ + "Shell": o([ { json: "darwin", js: "darwin", typ: u(undefined, "") }, { json: "linux", js: "linux", typ: u(undefined, "") }, { json: "windows", js: "windows", typ: u(undefined, "") }, ], false), - "ZarfComponentActionWait": o([ - { json: "cluster", js: "cluster", typ: u(undefined, r("ZarfComponentActionWaitCluster")) }, - { json: "network", js: "network", typ: u(undefined, r("ZarfComponentActionWaitNetwork")) }, + "Wait": o([ + { json: "cluster", js: "cluster", typ: u(undefined, r("WaitCluster")) }, + { json: "network", js: "network", typ: u(undefined, r("Network")) }, ], false), - "ZarfComponentActionWaitCluster": o([ + "WaitCluster": o([ { json: "condition", js: "condition", typ: u(undefined, "") }, { json: "kind", js: "kind", typ: "" }, { json: "name", js: "name", typ: "" }, { json: "namespace", js: "namespace", typ: u(undefined, "") }, ], false), - "ZarfComponentActionWaitNetwork": o([ + "Network": o([ { json: "address", js: "address", typ: "" }, { json: "code", js: "code", typ: u(undefined, 0) }, { json: "protocol", js: "protocol", typ: r("Protocol") }, ], false), - "ZarfComponentActionDefaults": o([ + "Defaults": o([ { json: "dir", js: "dir", typ: u(undefined, "") }, { json: "env", js: "env", typ: u(undefined, a("")) }, { json: "maxRetries", js: "maxRetries", typ: u(undefined, 0) }, { json: "maxTotalSeconds", js: "maxTotalSeconds", typ: u(undefined, 0) }, { json: "mute", js: "mute", typ: u(undefined, true) }, - { json: "shell", js: "shell", typ: u(undefined, r("ZarfComponentActionShell")) }, + { json: "shell", js: "shell", typ: u(undefined, r("Shell")) }, ], false), - "ZarfChart": o([ + "ChartElement": o([ { json: "gitPath", js: "gitPath", typ: u(undefined, "") }, { json: "localPath", js: "localPath", typ: u(undefined, "") }, { json: "name", js: "name", typ: "" }, { json: "namespace", js: "namespace", typ: "" }, { json: "noWait", js: "noWait", typ: u(undefined, true) }, { json: "releaseName", js: "releaseName", typ: u(undefined, "") }, + { json: "repoName", js: "repoName", typ: u(undefined, "") }, { json: "url", js: "url", typ: u(undefined, "") }, { json: "valuesFiles", js: "valuesFiles", typ: u(undefined, a("")) }, + { json: "variables", js: "variables", typ: u(undefined, a(r("ChartVariable"))) }, { json: "version", js: "version", typ: u(undefined, "") }, ], false), - "ZarfDataInjection": o([ + "ChartVariable": o([ + { json: "description", js: "description", typ: "" }, + { json: "name", js: "name", typ: "" }, + { json: "path", js: "path", typ: "" }, + ], false), + "DataInjectionElement": o([ { json: "compress", js: "compress", typ: u(undefined, true) }, { json: "source", js: "source", typ: "" }, - { json: "target", js: "target", typ: r("ZarfContainerTarget") }, + { json: "target", js: "target", typ: r("Target") }, ], false), - "ZarfContainerTarget": o([ + "Target": o([ { json: "container", js: "container", typ: "" }, { json: "namespace", js: "namespace", typ: "" }, { json: "path", js: "path", typ: "" }, { json: "selector", js: "selector", typ: "" }, ], false), - "ZarfComponentExtensions": o([ - { json: "bigbang", js: "bigbang", typ: u(undefined, r("BigBang")) }, + "Extensions": o([ + { json: "bigbang", js: "bigbang", typ: u(undefined, r("Bigbang")) }, ], false), - "BigBang": o([ + "Bigbang": o([ { json: "fluxPatchFiles", js: "fluxPatchFiles", typ: u(undefined, a("")) }, { json: "repo", js: "repo", typ: u(undefined, "") }, { json: "skipFlux", js: "skipFlux", typ: u(undefined, true) }, { json: "valuesFiles", js: "valuesFiles", typ: u(undefined, a("")) }, { json: "version", js: "version", typ: "" }, ], false), - "ZarfFile": o([ + "FileElement": o([ { json: "executable", js: "executable", typ: u(undefined, true) }, { json: "extractPath", js: "extractPath", typ: u(undefined, "") }, { json: "shasum", js: "shasum", typ: u(undefined, "") }, @@ -1322,12 +1355,12 @@ const typeMap: any = { { json: "symlinks", js: "symlinks", typ: u(undefined, a("")) }, { json: "target", js: "target", typ: "" }, ], false), - "ZarfComponentImport": o([ + "Import": o([ { json: "name", js: "name", typ: u(undefined, "") }, { json: "path", js: "path", typ: u(undefined, "") }, { json: "url", js: "url", typ: u(undefined, "") }, ], false), - "ZarfManifest": o([ + "ManifestElement": o([ { json: "files", js: "files", typ: u(undefined, a("")) }, { json: "kustomizations", js: "kustomizations", typ: u(undefined, a("")) }, { json: "kustomizeAllowAnyDirectory", js: "kustomizeAllowAnyDirectory", typ: u(undefined, true) }, @@ -1335,16 +1368,16 @@ const typeMap: any = { { json: "namespace", js: "namespace", typ: u(undefined, "") }, { json: "noWait", js: "noWait", typ: u(undefined, true) }, ], false), - "ZarfComponentOnlyTarget": o([ - { json: "cluster", js: "cluster", typ: u(undefined, r("ZarfComponentOnlyCluster")) }, + "Only": o([ + { json: "cluster", js: "cluster", typ: u(undefined, r("OnlyCluster")) }, { json: "flavor", js: "flavor", typ: u(undefined, "") }, { json: "localOS", js: "localOS", typ: u(undefined, r("LocalOS")) }, ], false), - "ZarfComponentOnlyCluster": o([ + "OnlyCluster": o([ { json: "architecture", js: "architecture", typ: u(undefined, r("Architecture")) }, { json: "distros", js: "distros", typ: u(undefined, a("")) }, ], false), - "DeprecatedZarfComponentScripts": o([ + "Scripts": o([ { json: "after", js: "after", typ: u(undefined, a("")) }, { json: "before", js: "before", typ: u(undefined, a("")) }, { json: "prepare", js: "prepare", typ: u(undefined, a("")) }, @@ -1352,20 +1385,19 @@ const typeMap: any = { { json: "showOutput", js: "showOutput", typ: u(undefined, true) }, { json: "timeoutSeconds", js: "timeoutSeconds", typ: u(undefined, 0) }, ], false), - "ZarfPackageConstant": o([ + "ConstantElement": o([ { json: "autoIndent", js: "autoIndent", typ: u(undefined, true) }, { json: "description", js: "description", typ: u(undefined, "") }, { json: "name", js: "name", typ: "" }, { json: "pattern", js: "pattern", typ: u(undefined, "") }, { json: "value", js: "value", typ: "" }, ], false), - "ZarfMetadata": o([ + "Metadata": o([ { json: "aggregateChecksum", js: "aggregateChecksum", typ: u(undefined, "") }, { json: "architecture", js: "architecture", typ: u(undefined, "") }, { json: "authors", js: "authors", typ: u(undefined, "") }, { json: "description", js: "description", typ: u(undefined, "") }, { json: "documentation", js: "documentation", typ: u(undefined, "") }, - { json: "image", js: "image", typ: u(undefined, "") }, { json: "name", js: "name", typ: "" }, { json: "source", js: "source", typ: u(undefined, "") }, { json: "uncompressed", js: "uncompressed", typ: u(undefined, true) }, @@ -1384,39 +1416,38 @@ const typeMap: any = { { json: "sensitive", js: "sensitive", typ: u(undefined, true) }, { json: "type", js: "type", typ: u(undefined, r("Type")) }, ], false), - "DeployedComponent": o([ - { json: "installedCharts", js: "installedCharts", typ: a(r("InstalledChart")) }, + "DeployedComponentElement": o([ + { json: "installedCharts", js: "installedCharts", typ: a(r("InstalledChartElement")) }, { json: "name", js: "name", typ: "" }, { json: "observedGeneration", js: "observedGeneration", typ: 0 }, { json: "status", js: "status", typ: "" }, ], false), - "InstalledChart": o([ + "InstalledChartElement": o([ { json: "chartName", js: "chartName", typ: "" }, { json: "namespace", js: "namespace", typ: "" }, ], false), "ZarfState": o([ - { json: "agentTLS", js: "agentTLS", typ: r("GeneratedPKI") }, + { json: "agentTLS", js: "agentTLS", typ: r("AgentTLS") }, { json: "architecture", js: "architecture", typ: "" }, - { json: "artifactServer", js: "artifactServer", typ: r("ArtifactServerInfo") }, + { json: "artifactServer", js: "artifactServer", typ: r("ArtifactServer") }, { json: "distro", js: "distro", typ: "" }, - { json: "gitServer", js: "gitServer", typ: r("GitServerInfo") }, - { json: "loggingSecret", js: "loggingSecret", typ: "" }, + { json: "gitServer", js: "gitServer", typ: r("GitServer") }, { json: "registryInfo", js: "registryInfo", typ: r("RegistryInfo") }, { json: "storageClass", js: "storageClass", typ: "" }, { json: "zarfAppliance", js: "zarfAppliance", typ: true }, ], false), - "GeneratedPKI": o([ + "AgentTLS": o([ { json: "ca", js: "ca", typ: "" }, { json: "cert", js: "cert", typ: "" }, { json: "key", js: "key", typ: "" }, ], false), - "ArtifactServerInfo": o([ + "ArtifactServer": o([ { json: "address", js: "address", typ: "" }, { json: "internalServer", js: "internalServer", typ: true }, { json: "pushPassword", js: "pushPassword", typ: "" }, { json: "pushUsername", js: "pushUsername", typ: "" }, ], false), - "GitServerInfo": o([ + "GitServer": o([ { json: "address", js: "address", typ: "" }, { json: "internalServer", js: "internalServer", typ: true }, { json: "pullPassword", js: "pullPassword", typ: "" }, diff --git a/packages/README.md b/packages/README.md index 95686e0ab7..1776860ba4 100644 --- a/packages/README.md +++ b/packages/README.md @@ -38,14 +38,6 @@ Users who rely heavily on GitOps find it useful to deploy an internal Git reposi zarf init --components=git-server ``` -## Logging PGL - -The Logging PGL package deploys the Promtail, Grafana, and Loki stack which aggregates logs from different containers and presents them in a web dashboard. This is useful as a quick way to get logging into a cluster when you otherwise wouldn't be bringing over a logging stack. - -```bash -zarf init --components=logging -``` - ## Zarf Agent The Zarf Agent is a mutating admission controller used to modify the image property within a PodSpec. The purpose is to redirect it to Zarf's configured registry instead of the the original registry (such as DockerHub, GHCR, or Quay). Additionally, the webhook attaches the appropriate `ImagePullSecret` for the seed registry to the pod. This configuration allows the pod to successfully retrieve the image from the seed registry, even when operating in an air-gapped environment. diff --git a/packages/logging-pgl/connect.yaml b/packages/logging-pgl/connect.yaml deleted file mode 100644 index 41be9204d6..0000000000 --- a/packages/logging-pgl/connect.yaml +++ /dev/null @@ -1,12 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: zarf-connect-logging - labels: - # Enables "zarf connect logging" - zarf.dev/connect-name: logging - annotations: - zarf.dev/connect-description: "Zarf Cluster Logging Service (Grafana)" -spec: - ports: - - port: 3000 diff --git a/packages/logging-pgl/pgl-values.yaml b/packages/logging-pgl/pgl-values.yaml deleted file mode 100644 index 45662d9fa2..0000000000 --- a/packages/logging-pgl/pgl-values.yaml +++ /dev/null @@ -1,34 +0,0 @@ -grafana: - enabled: true - adminUser: "zarf-admin" - adminPassword: "###ZARF_LOGGING_AUTH###" - # K8s 1.25+ compatibility until loki stack upgrades the grafana chart to 6.36.1 - rbac: - pspEnabled: false - grafana.ini: - server: - root_url: "%(protocol)s://%(domain)s/monitor" - serve_from_sub_path: true -promtail: - extraScrapeConfigs: - - job_name: journal - journal: - max_age: 12h - labels: - job: systemd-journal - relabel_configs: - - source_labels: ["__journal__systemd_unit"] - target_label: "unit" - - source_labels: ["__journal__hostname"] - target_label: "hostname" - - # Mount journal directory into promtail pods - extraVolumes: - - name: journal - hostPath: - path: /var/log/journal - - extraVolumeMounts: - - name: journal - mountPath: /var/log/journal - readOnly: true diff --git a/packages/logging-pgl/zarf.yaml b/packages/logging-pgl/zarf.yaml deleted file mode 100644 index d5fc213dc3..0000000000 --- a/packages/logging-pgl/zarf.yaml +++ /dev/null @@ -1,49 +0,0 @@ -kind: ZarfPackageConfig -metadata: - name: init-package-logging - -components: - - name: logging - description: | - Deploys the Promtail Grafana & Loki (PGL) stack. - Aggregates logs from different containers and presents them in a web dashboard. - Recommended if no other logging stack is deployed in the cluster. - images: - - docker.io/grafana/promtail:2.9.2 - - grafana/grafana:8.3.5 - - grafana/loki:2.6.1 - - quay.io/kiwigrid/k8s-sidecar:1.19.2 - manifests: - - name: logging-connect - namespace: zarf - files: - - connect.yaml - charts: - - name: loki-stack - releaseName: zarf-loki-stack - url: https://grafana.github.io/helm-charts - version: 2.10.1 - namespace: zarf - valuesFiles: - - pgl-values.yaml - actions: - onDeploy: - after: - - wait: - cluster: - kind: pod - namespace: zarf - name: app=loki - condition: Ready - - wait: - cluster: - kind: pod - namespace: zarf - name: app.kubernetes.io/name=grafana - condition: Ready - - wait: - cluster: - kind: pod - namespace: zarf - name: app.kubernetes.io/name=promtail - condition: Ready diff --git a/site/public/tutorials/logging_credentials.html b/site/public/tutorials/logging_credentials.html deleted file mode 100644 index c412ee8442..0000000000 --- a/site/public/tutorials/logging_credentials.html +++ /dev/null @@ -1,58 +0,0 @@ - - - - - - -
- Zarf deployment complete
-
-
-     Application | Username   | Password                 | Connect              
-     Registry    | zarf-push  | Tka7dWq4GEit5G3GDX2dQwdh | zarf connect registry
-     Logging     | zarf-admin | ysC9TEWsSm37pBmA3hvqrLN3 | zarf connect logging
-
- - diff --git a/site/public/tutorials/logging_init.html b/site/public/tutorials/logging_init.html deleted file mode 100644 index 0786a5c310..0000000000 --- a/site/public/tutorials/logging_init.html +++ /dev/null @@ -1,343 +0,0 @@ - - - - - - -
-$ zarf init --components="logging" --confirm
-
-Saving log file to -/var/folders/bk/rz1xx2sd5zn134c0_j1s2n5r0000gp/T/zarf-2023-03-22-11-47-22-867656842.log - - • Loading Zarf Package /Users/jason/.zarf-cache/zarf-init-arm64-v0.24.3.tar.zst - • Loading Zarf Package /Users/jason/.zarf-cache/zarf-init-arm64-v0.24.3.tar.zst - -kind: ZarfInitConfig -metadata: - name: init - description: Used to establish a new Zarf cluster - architecture: arm64 -build: - terminal: fv-az488-281 - user: runner - architecture: arm64 - timestamp: Sun, 26 Feb 2023 01:28:31 +0000 - version: v0.24.3 - migrations: - - scripts-to-actions -components: -- name: zarf-injector - description: | - Bootstraps a Kubernetes cluster by cloning a running pod in the cluster and hosting the registry image. - Removed and destroyed after the Zarf Registry is self-hosting the registry image. - required: true - cosignKeyPath: cosign.pub - files: - - source: sget://defenseunicorns/zarf-injector:arm64-2023-02-09 - target: "###ZARF_TEMP###/zarf-injector" - executable: true -- name: zarf-seed-registry - description: | - Deploys the Zarf Registry using the registry image provided by the Zarf Injector. - required: true - charts: - - name: docker-registry - releaseName: zarf-docker-registry - version: 1.0.0 - namespace: zarf - valuesFiles: - - packages/zarf-registry/registry-values.yaml - - packages/zarf-registry/registry-values-seed.yaml - localPath: packages/zarf-registry/chart -- name: zarf-registry - description: | - Updates the Zarf Registry to use the self-hosted registry image. - Serves as the primary docker registry for the cluster. - required: true - charts: - - name: docker-registry - releaseName: zarf-docker-registry - version: 1.0.0 - namespace: zarf - valuesFiles: - - packages/zarf-registry/registry-values.yaml - localPath: packages/zarf-registry/chart - manifests: - - name: registry-connect - namespace: zarf - files: - - packages/zarf-registry/connect.yaml - - name: kep-1755-registry-annotation - namespace: zarf - files: - - packages/zarf-registry/configmap.yaml - images: - - registry:2.8.1 -- name: zarf-agent - description: | - A Kubernetes mutating webhook to enable automated URL rewriting for container - images and git repository references in Kubernetes manifests. This prevents - the need to manually update URLs from their original sources to the Zarf-managed - docker registry and git server. - required: true - actions: - onCreate: - before: - - cmd: make init-package-local-agent AGENT_IMAGE_TAG="v0.24.3" - manifests: - - name: zarf-agent - namespace: zarf - files: - - packages/zarf-agent/manifests/service.yaml - - packages/zarf-agent/manifests/secret.yaml - - packages/zarf-agent/manifests/deployment.yaml - - packages/zarf-agent/manifests/webhook.yaml - images: - - ghcr.io/defenseunicorns/zarf/agent:v0.24.3 -- name: logging - description: | - Deploys the Promtail Grafana & Loki (PGL) stack. - Aggregates logs from different containers and presents them in a web dashboard. - Recommended if no other logging stack is deployed in the cluster. - charts: - - name: loki-stack - releaseName: zarf-loki-stack - url: https://grafana.github.io/helm-charts - version: 2.8.9 - namespace: zarf - valuesFiles: - - packages/logging-pgl/pgl-values.yaml - manifests: - - name: logging-connect - namespace: zarf - files: - - packages/logging-pgl/connect.yaml - images: - - docker.io/grafana/promtail:2.7.0 - - grafana/grafana:8.3.5 - - grafana/loki:2.6.1 - - quay.io/kiwigrid/k8s-sidecar:1.19.2 -- name: git-server - description: | - Deploys Gitea to provide git repositories for Kubernetes configurations. - Required for GitOps deployments if no other git server is available. - actions: - onDeploy: - after: - - maxTotalSeconds: 60 - maxRetries: 3 - cmd: ./zarf internal create-read-only-gitea-user - charts: - - name: gitea - releaseName: zarf-gitea - url: https://dl.gitea.io/charts - version: 7.0.2 - namespace: zarf - valuesFiles: - - packages/gitea/gitea-values.yaml - manifests: - - name: git-connect - namespace: zarf - files: - - packages/gitea/connect.yaml - images: - - gitea/gitea:1.18.3 -variables: -- name: K3S_ARGS - description: Arguments to pass to K3s - default: --disable traefik -- name: REGISTRY_EXISTING_PVC - description: "Optional: Use an existing PVC for the registry instead of creating a new one. If this is set, the REGISTRY_PVC_SIZE variable will be ignored." -- name: REGISTRY_PVC_SIZE - description: The size of the persistent volume claim for the registry - default: 20Gi -- name: REGISTRY_CPU_REQ - description: The CPU request for the registry - default: 100m -- name: REGISTRY_MEM_REQ - description: The memory request for the registry - default: 256Mi -- name: REGISTRY_CPU_LIMIT - description: The CPU limit for the registry - default: "3" -- name: REGISTRY_MEM_LIMIT - description: The memory limit for the registry - default: 2Gi -- name: REGISTRY_HPA_MIN - description: The minimum number of registry replicas - default: "1" -- name: REGISTRY_HPA_MAX - description: The maximum number of registry replicas - default: "5" -- name: REGISTRY_HPA_ENABLE - description: Enable the Horizontal Pod Autoscaler for the registry - default: "true" -- name: GIT_SERVER_EXISTING_PVC - description: "Optional: Use an existing PVC for the git server instead of creating a new one. If this is set, the GIT_SERVER_PVC_SIZE variable will be ignored." -- name: GIT_SERVER_PVC_SIZE - description: The size of the persistent volume claim for git server - default: 10Gi -- name: GIT_SERVER_CPU_REQ - description: The CPU request for git server - default: 200m -- name: GIT_SERVER_MEM_REQ - description: The memory request for git server - default: 512Mi -- name: GIT_SERVER_CPU_LIMIT - description: The CPU limit for git server - default: "3" -- name: GIT_SERVER_MEM_LIMIT - description: The memory limit for git server - default: 2Gi -constants: -- name: AGENT_IMAGE - value: defenseunicorns/zarf/agent -- name: AGENT_IMAGE_TAG - value: v0.24.3 -- name: REGISTRY_IMAGE - value: registry -- name: REGISTRY_IMAGE_TAG - value: 2.8.1 -This package has 9 artifacts with software bill-of-materials (SBOM) included. You can view them now -in the zarf-sbom folder in this directory or to go directly to one, open this in your browser: -/Users/jason/src/github.com/jasonvanbrackel/zarf/docs/.examples/tutorials/zarf-sbom/sbom-viewer-docker.io_grafana_promtail_2.7.0.html - -* This directory will be removed after package deployment. - - Deploy Zarf package confirmed - -
- - 📦 ZARF-INJECTOR COMPONENT - - -
- - • Copying 1 files - • Copying 1 files - • Gathering cluster information - • Gathering cluster information - • Attempting to bootstrap the seed image into the cluster - • Attempting to bootstrap the seed image into the cluster -
- - 📦 ZARF-SEED-REGISTRY COMPONENT - - -
- • Loading the Zarf State from the Kubernetes cluster - • Loading the Zarf State from the Kubernetes cluster - • Processing helm chart docker-registry:1.0.0 from Zarf-generated helm chart - • Processing helm chart docker-registry:1.0.0 from Zarf-generated helm chart - -
- - 📦 ZARF-REGISTRY COMPONENT - - -
- - • Opening tunnel 52538 -> 5000 for svc/zarf-docker-registry in namespace zarf - • Creating port forwarding tunnel at http://127.0.0.1:52538/v2/_catalog - • Storing images in the zarf registry - • Storing images in the zarf registry - • Processing helm chart docker-registry:1.0.0 from Zarf-generated helm chart - • Processing helm chart docker-registry:1.0.0 from Zarf-generated helm chart - • Starting helm chart generation registry-connect - • Starting helm chart generation registry-connect - • Processing helm chart raw-init-zarf-registry-registry-connect:0.1.1679500042 from Zarf-generated - helm chart - • Processing helm chart raw-init-zarf-registry-registry-connect:0.1.1679500042 from Zarf-generated - helm chart - • Starting helm chart generation kep-1755-registry-annotation - • Starting helm chart generation kep-1755-registry-annotation - • Processing helm chart raw-init-zarf-registry-kep-1755-registry-annotation:0.1.1679500042 from - Zarf-generated helm chart - • Processing helm chart raw-init-zarf-registry-kep-1755-registry-annotation:0.1.1679500042 from - Zarf-generated helm chart - -
- - 📦 ZARF-AGENT COMPONENT - - -
- - • Opening tunnel 52550 -> 5000 for svc/zarf-docker-registry in namespace zarf - • Creating port forwarding tunnel at http://127.0.0.1:52550/v2/_catalog - • Storing images in the zarf registry - • Storing images in the zarf registry - • Starting helm chart generation zarf-agent - • Starting helm chart generation zarf-agent - • Processing helm chart raw-init-zarf-agent-zarf-agent:0.1.1679500042 from Zarf-generated helm chart - • Processing helm chart raw-init-zarf-agent-zarf-agent:0.1.1679500042 from Zarf-generated helm chart - -
- - 📦 LOGGING COMPONENT - - -
- - • Opening tunnel 52556 -> 5000 for svc/zarf-docker-registry in namespace zarf - • Creating port forwarding tunnel at http://127.0.0.1:52556/v2/_catalog - • Storing images in the zarf registry - • Storing images in the zarf registry - • Processing helm chart loki-stack:2.8.9 from https://grafana.github.io/helm-charts - • Processing helm chart loki-stack:2.8.9 from https://grafana.github.io/helm-charts - • Starting helm chart generation logging-connect - • Starting helm chart generation logging-connect - • Processing helm chart raw-init-logging-logging-connect:0.1.1679500042 from Zarf-generated helm chart - • Processing helm chart raw-init-logging-logging-connect:0.1.1679500042 from Zarf-generated helm chart - Zarf deployment complete - - - Application | Username | Password | Connect - Registry | zarf-push | Tka7dWq4GEit5G3GDX2dQwdh | zarf connect registry - Logging | zarf-admin | ysC9TEWsSm37pBmA3hvqrLN3 | zarf connect logging -
- - diff --git a/site/public/tutorials/logging_init_manual.html b/site/public/tutorials/logging_init_manual.html deleted file mode 100644 index e4a8fa5197..0000000000 --- a/site/public/tutorials/logging_init_manual.html +++ /dev/null @@ -1,276 +0,0 @@ - - - - - - -
-Saving log file to
-/var/folders/bk/rz1xx2sd5zn134c0_j1s2n5r0000gp/T/zarf-2023-03-23-09-17-19-1802773183.log
- Loading Zarf Package /Users/jason/.zarf-cache/zarf-init-arm64-v0.24.3.tar.zst
-
-kind: ZarfInitConfig
-metadata:
-  name: init
-  description: Used to establish a new Zarf cluster
-  architecture: arm64
-build:
-  terminal: fv-az488-281
-  user: runner
-  architecture: arm64
-  timestamp: Sun, 26 Feb 2023 01:28:31 +0000
-  version: v0.24.3
-  migrations:
-  - scripts-to-actions
-components:
-- name: zarf-injector
-  description: |
-    Bootstraps a Kubernetes cluster by cloning a running pod in the cluster and hosting the registry image.
-    Removed and destroyed after the Zarf Registry is self-hosting the registry image.
-  required: true
-  cosignKeyPath: cosign.pub
-  files:
-  - source: sget://defenseunicorns/zarf-injector:arm64-2023-02-09
-    target: "###ZARF_TEMP###/zarf-injector"
-    executable: true
-- name: zarf-seed-registry
-  description: |
-    Deploys the Zarf Registry using the registry image provided by the Zarf Injector.
-  required: true
-  charts:
-  - name: docker-registry
-    releaseName: zarf-docker-registry
-    version: 1.0.0
-    namespace: zarf
-    valuesFiles:
-    - packages/zarf-registry/registry-values.yaml
-    - packages/zarf-registry/registry-values-seed.yaml
-    localPath: packages/zarf-registry/chart
-- name: zarf-registry
-  description: |
-    Updates the Zarf Registry to use the self-hosted registry image. 
-    Serves as the primary docker registry for the cluster.
-  required: true
-  charts:
-  - name: docker-registry
-    releaseName: zarf-docker-registry
-    version: 1.0.0
-    namespace: zarf
-    valuesFiles:
-    - packages/zarf-registry/registry-values.yaml
-    localPath: packages/zarf-registry/chart
-  manifests:
-  - name: registry-connect
-    namespace: zarf
-    files:
-    - packages/zarf-registry/connect.yaml
-  - name: kep-1755-registry-annotation
-    namespace: zarf
-    files:
-    - packages/zarf-registry/configmap.yaml
-  images:
-  - registry:2.8.1
-- name: zarf-agent
-  description: |
-    A Kubernetes mutating webhook to enable automated URL rewriting for container
-    images and git repository references in Kubernetes manifests. This prevents
-    the need to manually update URLs from their original sources to the Zarf-managed
-    docker registry and git server.
-  required: true
-  actions:
-    onCreate:
-      before:
-      - cmd: make init-package-local-agent AGENT_IMAGE_TAG="v0.24.3"
-  manifests:
-  - name: zarf-agent
-    namespace: zarf
-    files:
-    - packages/zarf-agent/manifests/service.yaml
-    - packages/zarf-agent/manifests/secret.yaml
-    - packages/zarf-agent/manifests/deployment.yaml
-    - packages/zarf-agent/manifests/webhook.yaml
-  images:
-  - ghcr.io/defenseunicorns/zarf/agent:v0.24.3
-- name: logging
-  description: |
-    Deploys the Promtail Grafana & Loki (PGL) stack. 
-    Aggregates logs from different containers and presents them in a web dashboard. 
-    Recommended if no other logging stack is deployed in the cluster.
-  charts:
-  - name: loki-stack
-    releaseName: zarf-loki-stack
-    url: https://grafana.github.io/helm-charts
-    version: 2.8.9
-    namespace: zarf
-    valuesFiles:
-    - packages/logging-pgl/pgl-values.yaml
-  manifests:
-  - name: logging-connect
-    namespace: zarf
-    files:
-    - packages/logging-pgl/connect.yaml
-  images:
-  - docker.io/grafana/promtail:2.7.0
-  - grafana/grafana:8.3.5
-  - grafana/loki:2.6.1
-  - quay.io/kiwigrid/k8s-sidecar:1.19.2
-- name: git-server
-  description: |
-    Deploys Gitea to provide git repositories for Kubernetes configurations.
-    Required for GitOps deployments if no other git server is available.
-  actions:
-    onDeploy:
-      after:
-      - maxTotalSeconds: 60
-        maxRetries: 3
-        cmd: ./zarf internal create-read-only-gitea-user
-  charts:
-  - name: gitea
-    releaseName: zarf-gitea
-    url: https://dl.gitea.io/charts
-    version: 7.0.2
-    namespace: zarf
-    valuesFiles:
-    - packages/gitea/gitea-values.yaml
-  manifests:
-  - name: git-connect
-    namespace: zarf
-    files:
-    - packages/gitea/connect.yaml
-  images:
-  - gitea/gitea:1.18.3
-variables:
-- name: K3S_ARGS
-  description: Arguments to pass to K3s
-  default: --disable traefik
-- name: REGISTRY_EXISTING_PVC
-  description: "Optional: Use an existing PVC for the registry instead of creating a new one. If this is set, the REGISTRY_PVC_SIZE variable will be ignored."
-- name: REGISTRY_PVC_SIZE
-  description: The size of the persistent volume claim for the registry
-  default: 20Gi
-- name: REGISTRY_CPU_REQ
-  description: The CPU request for the registry
-  default: 100m
-- name: REGISTRY_MEM_REQ
-  description: The memory request for the registry
-  default: 256Mi
-- name: REGISTRY_CPU_LIMIT
-  description: The CPU limit for the registry
-  default: "3"
-- name: REGISTRY_MEM_LIMIT
-  description: The memory limit for the registry
-  default: 2Gi
-- name: REGISTRY_HPA_MIN
-  description: The minimum number of registry replicas
-  default: "1"
-- name: REGISTRY_HPA_MAX
-  description: The maximum number of registry replicas
-  default: "5"
-- name: REGISTRY_HPA_ENABLE
-  description: Enable the Horizontal Pod Autoscaler for the registry
-  default: "true"
-- name: GIT_SERVER_EXISTING_PVC
-  description: "Optional: Use an existing PVC for the git server instead of creating a new one. If this is set, the GIT_SERVER_PVC_SIZE variable will be ignored."
-- name: GIT_SERVER_PVC_SIZE
-  description: The size of the persistent volume claim for git server
-  default: 10Gi
-- name: GIT_SERVER_CPU_REQ
-  description: The CPU request for git server
-  default: 200m
-- name: GIT_SERVER_MEM_REQ
-  description: The memory request for git server
-  default: 512Mi
-- name: GIT_SERVER_CPU_LIMIT
-  description: The CPU limit for git server
-  default: "3"
-- name: GIT_SERVER_MEM_LIMIT
-  description: The memory limit for git server
-  default: 2Gi
-constants:
-- name: AGENT_IMAGE
-  value: defenseunicorns/zarf/agent
-- name: AGENT_IMAGE_TAG
-  value: v0.24.3
-- name: REGISTRY_IMAGE
-  value: registry
-- name: REGISTRY_IMAGE_TAG
-  value: 2.8.1
-This package has 9 artifacts with software bill-of-materials (SBOM) included. You can view them now
-in the zarf-sbom folder in this directory or to go directly to one, open this in your browser:
-/Users/jason/src/github.com/jasonvanbrackel/zarf/docs-website/zarf-sbom/sbom-viewer-docker.io_grafana_promtail_2.7.0.html
-
-* This directory will be removed after package deployment.
-
-? Deploy this Zarf package? (y/N) Yes
-
-───────────────────────────────────────────────────────────────────────────────────────
-name: logging
-charts:
-- name: loki-stack
-  releaseName: zarf-loki-stack
-  url: https://grafana.github.io/helm-charts
-  version: 2.8.9
-  namespace: zarf
-  valuesFiles:
-  - packages/logging-pgl/pgl-values.yaml
-manifests:
-- name: logging-connect
-  namespace: zarf
-  files:
-  - packages/logging-pgl/connect.yaml
-images:
-- docker.io/grafana/promtail:2.7.0
-- grafana/grafana:8.3.5
-- grafana/loki:2.6.1
-- quay.io/kiwigrid/k8s-sidecar:1.19.2
-
-Deploys the Promtail Grafana & Loki (PGL) stack. Aggregates logs from different containers and
-presents them in a web dashboard. Recommended if no other logging stack is deployed in the cluster.
-? Deploy the logging component? (y/N) Yes
-───────────────────────────────────────────────────────────────────────────────────────
-
-
- - diff --git a/site/public/tutorials/logging_list.html b/site/public/tutorials/logging_list.html deleted file mode 100644 index 2319fc86c0..0000000000 --- a/site/public/tutorials/logging_list.html +++ /dev/null @@ -1,58 +0,0 @@ - - - - - - -
-$ zarf package list
-Saving log file to -/var/folders/bk/rz1xx2sd5zn134c0_j1s2n5r0000gp/T/zarf-2023-03-22-13-13-47-3918845089.log - Package | Components - dos-games | [baseline] - init | [zarf-injector zarf-seed-registry zarf-registry zarf-agent logging] -
- - diff --git a/site/public/tutorials/logging_remove.html b/site/public/tutorials/logging_remove.html deleted file mode 100644 index bc6d258564..0000000000 --- a/site/public/tutorials/logging_remove.html +++ /dev/null @@ -1,56 +0,0 @@ - - - - - - -
-$ zarf package remove init --components="logging" --confirm
-Saving log file to -/var/folders/bk/rz1xx2sd5zn134c0_j1s2n5r0000gp/T/zarf-2023-03-22-13-17-09-3967112348.log -Removing zarf package init -
- - diff --git a/site/public/tutorials/package_create_init.html b/site/public/tutorials/package_create_init.html index 9ed5ef2265..6a21effc08 100644 --- a/site/public/tutorials/package_create_init.html +++ b/site/public/tutorials/package_create_init.html @@ -159,29 +159,6 @@ - packages/zarf-agent/manifests/webhook.yaml images: - ghcr.io/defenseunicorns/zarf/agent:local -- name: logging - description: | - Deploys the Promtail Grafana & Loki (PGL) stack. - Aggregates logs from different containers and presents them in a web dashboard. - Recommended if no other logging stack is deployed in the cluster. - charts: - - name: loki-stack - releaseName: zarf-loki-stack - url: https://grafana.github.io/helm-charts - version: 2.9.9 - namespace: zarf - valuesFiles: - - packages/logging-pgl/pgl-values.yaml - manifests: - - name: logging-connect - namespace: zarf - files: - - packages/logging-pgl/connect.yaml - images: - - docker.io/grafana/promtail:2.7.2 - - grafana/grafana:8.3.5 - - grafana/loki:2.6.1 - - quay.io/kiwigrid/k8s-sidecar:1.19.2 - name: git-server description: | Deploys Gitea to provide git repositories for Kubernetes configurations. diff --git a/site/public/tutorials/zarf_init.html b/site/public/tutorials/zarf_init.html deleted file mode 100644 index b3acb5c5fd..0000000000 --- a/site/public/tutorials/zarf_init.html +++ /dev/null @@ -1,429 +0,0 @@ - - - - - - -
-$ zarf init
-Using config file /Users/josimoore/Desktop/projects/zarf/zarf-config.toml - -Saving log file to -/var/folders/gb/qfjdrlp52_v87bj_2rfzqls00000gn/T/zarf-2023-03-28-08-39-23-314846914.log - - • Loading Zarf Package /Users/josimoore/.zarf-cache/zarf-init-arm64-v0.25.0.tar.zst - • Loading Zarf Package /Users/josimoore/.zarf-cache/zarf-init-arm64-v0.25.0.tar.zst - -kind: ZarfInitConfig -metadata: - name: init - description: Used to establish a new Zarf cluster - architecture: arm64 -build: - terminal: fv-az442-536 - user: runner - architecture: arm64 - timestamp: Tue, 21 Mar 2023 23:50:40 +0000 - version: v0.25.0 - migrations: - - scripts-to-actions -components: -- name: zarf-injector - description: | - Bootstraps a Kubernetes cluster by cloning a running pod in the cluster and hosting the registry image. - Removed and destroyed after the Zarf Registry is self-hosting the registry image. - required: true - cosignKeyPath: cosign.pub - files: - - source: sget://defenseunicorns/zarf-injector:arm64-2023-02-09 - target: "###ZARF_TEMP###/zarf-injector" - executable: true -- name: zarf-seed-registry - description: | - Deploys the Zarf Registry using the registry image provided by the Zarf Injector. - required: true - charts: - - name: docker-registry - releaseName: zarf-docker-registry - version: 1.0.0 - namespace: zarf - valuesFiles: - - packages/zarf-registry/registry-values.yaml - - packages/zarf-registry/registry-values-seed.yaml - localPath: packages/zarf-registry/chart -- name: zarf-registry - description: | - Updates the Zarf Registry to use the self-hosted registry image. - Serves as the primary docker registry for the cluster. - required: true - charts: - - name: docker-registry - releaseName: zarf-docker-registry - version: 1.0.0 - namespace: zarf - valuesFiles: - - packages/zarf-registry/registry-values.yaml - localPath: packages/zarf-registry/chart - manifests: - - name: registry-connect - namespace: zarf - files: - - packages/zarf-registry/connect.yaml - - name: kep-1755-registry-annotation - namespace: zarf - files: - - packages/zarf-registry/configmap.yaml - images: - - registry:2.8.1 -- name: zarf-agent - description: | - A Kubernetes mutating webhook to enable automated URL rewriting for container - images and git repository references in Kubernetes manifests. This prevents - the need to manually update URLs from their original sources to the Zarf-managed - docker registry and git server. - required: true - actions: - onCreate: - before: - - cmd: make init-package-local-agent AGENT_IMAGE_TAG="v0.25.0" - manifests: - - name: zarf-agent - namespace: zarf - files: - - packages/zarf-agent/manifests/service.yaml - - packages/zarf-agent/manifests/secret.yaml - - packages/zarf-agent/manifests/deployment.yaml - - packages/zarf-agent/manifests/webhook.yaml - images: - - ghcr.io/defenseunicorns/zarf/agent:v0.25.0 -- name: logging - description: | - Deploys the Promtail Grafana & Loki (PGL) stack. - Aggregates logs from different containers and presents them in a web dashboard. - Recommended if no other logging stack is deployed in the cluster. - charts: - - name: loki-stack - releaseName: zarf-loki-stack - url: https://grafana.github.io/helm-charts - version: 2.9.9 - namespace: zarf - valuesFiles: - - packages/logging-pgl/pgl-values.yaml - manifests: - - name: logging-connect - namespace: zarf - files: - - packages/logging-pgl/connect.yaml - images: - - docker.io/grafana/promtail:2.7.2 - - grafana/grafana:8.3.5 - - grafana/loki:2.6.1 - - quay.io/kiwigrid/k8s-sidecar:1.19.2 -- name: git-server - description: | - Deploys Gitea to provide git repositories for Kubernetes configurations. - Required for GitOps deployments if no other git server is available. - actions: - onDeploy: - after: - - maxTotalSeconds: 60 - maxRetries: 3 - cmd: ./zarf internal create-read-only-gitea-user - charts: - - name: gitea - releaseName: zarf-gitea - url: https://dl.gitea.io/charts - version: 7.0.4 - namespace: zarf - valuesFiles: - - packages/gitea/gitea-values.yaml - manifests: - - name: git-connect - namespace: zarf - files: - - packages/gitea/connect.yaml - images: - - gitea/gitea:1.19.3-rootless -variables: -- name: K3S_ARGS - description: Arguments to pass to K3s - default: --disable traefik -- name: REGISTRY_EXISTING_PVC - description: "Optional: Use an existing PVC for the registry instead of creating a new one. If this is set, the REGISTRY_PVC_SIZE variable will be ignored." -- name: REGISTRY_PVC_SIZE - description: The size of the persistent volume claim for the registry - default: 20Gi -- name: REGISTRY_CPU_REQ - description: The CPU request for the registry - default: 100m -- name: REGISTRY_MEM_REQ - description: The memory request for the registry - default: 256Mi -- name: REGISTRY_CPU_LIMIT - description: The CPU limit for the registry - default: "3" -- name: REGISTRY_MEM_LIMIT - description: The memory limit for the registry - default: 2Gi -- name: REGISTRY_HPA_MIN - description: The minimum number of registry replicas - default: "1" -- name: REGISTRY_HPA_MAX - description: The maximum number of registry replicas - default: "5" -- name: REGISTRY_HPA_ENABLE - description: Enable the Horizontal Pod Autoscaler for the registry - default: "true" -- name: GIT_SERVER_EXISTING_PVC - description: "Optional: Use an existing PVC for the git server instead of creating a new one. If this is set, the GIT_SERVER_PVC_SIZE variable will be ignored." -- name: GIT_SERVER_PVC_SIZE - description: The size of the persistent volume claim for git server - default: 10Gi -- name: GIT_SERVER_CPU_REQ - description: The CPU request for git server - default: 200m -- name: GIT_SERVER_MEM_REQ - description: The memory request for git server - default: 512Mi -- name: GIT_SERVER_CPU_LIMIT - description: The CPU limit for git server - default: "3" -- name: GIT_SERVER_MEM_LIMIT - description: The memory limit for git server - default: 2Gi -constants: -- name: AGENT_IMAGE - value: defenseunicorns/zarf/agent -- name: AGENT_IMAGE_TAG - value: v0.25.0 -- name: REGISTRY_IMAGE - value: registry -- name: REGISTRY_IMAGE_TAG - value: 2.8.1 -This package has 9 artifacts with software bill-of-materials (SBOM) included. You can view them now -in the zarf-sbom folder in this directory or to go directly to one, open this in your browser: -/Users/josimoore/Desktop/projects/zarf/zarf-sbom/sbom-viewer-docker.io_grafana_promtail_2.7.2.html - -* This directory will be removed after package deployment. - -? Deploy this Zarf package? (y/N) Yes - -─────────────────────────────────────────────────────────────────────────────────────── -name: k3s -only: - localOS: linux - cluster: - architecture: amd64 -actions: - onDeploy: - defaults: - maxRetries: 5 - before: - - maxRetries: 0 - cmd: ./zarf internal is-valid-hostname - - cmd: "[ -e /etc/redhat-release ] && systemctl disable firewalld --now || echo ''" - after: - - cmd: systemctl daemon-reload - - cmd: systemctl enable k3s - - cmd: systemctl start k3s -files: -- source: packages/distros/k3s/common/zarf-clean-k3s.sh - target: /opt/zarf/zarf-clean-k3s.sh - executable: true -- source: packages/distros/k3s/common/k3s.service - target: /etc/systemd/system/k3s.service - symlinks: - - /etc/systemd/system/multi-user.target.wants/k3s.service -- source: https://github.com/k3s-io/k3s/releases/download/v1.24.1+k3s1/k3s - shasum: ca398d82fee8f9f52b05fb184582054be3c0285a1b9e8fb5c7b9a91448a - target: /usr/sbin/k3s - executable: true - symlinks: - - /usr/sbin/kubctl - - /usr/sbin/ctr - - /usr/sbin/crictl -- source: https://github.com/k3s-io/k3s/releases/download/v1.24.1+k3s1/k3s-airgap-images-amd64.tar.zst - shasum: 6736bf9fa4d5754d60b0508bafb2f888a70cb99a203a3a1617a919ca4ee74034 - target: /var/lib/rancher/k3s/agent/images/k3s.tar.zst - -*** REQUIRES ROOT *** Install K3s, certified Kubernetes distribution built for IoT & Edge computing -K3s provides the cluster need for Zarf running in Appliance Mode as well as can host a low-resource -Gitops Service if not using an existing Kubernetes platform. - -? Deploy the k3s component? (y/N) No - -─────────────────────────────────────────────────────────────────────────────────────── - -name: logging -charts: -- name: loki-stack - releaseName: zarf-loki-stack - url: https://grafana.github.io/helm-charts - version: 2.9.9 - namespace: zarf - valuesFiles: - - packages/logging-pgl/pgl-values.yaml -manifests: -- name: logging-connect - namespace: zarf - files: - - packages/logging-pgl/connect.yaml -images: -- docker.io/grafana/promtail:2.7.2 -- grafana/grafana:8.3.5 -- grafana/loki:2.6.1 -- quay.io/kiwigrid/k8s-sidecar:1.19.2 - -Deploys the Promtail Grafana & Loki (PGL) stack. Aggregates logs from different containers and -presents them in a web dashboard. Recommended if no other logging stack is deployed in the cluster. - -? Deploy the logging component? (y/N) No - -─────────────────────────────────────────────────────────────────────────────────────── - -name: git-server -actions: - onDeploy: - after: - - maxTotalSeconds: 60 - maxRetries: 3 - cmd: ./zarf internal create-read-only-gitea-user -charts: -- name: gitea - releaseName: zarf-gitea - url: https://d1.gitea.io/charts - version: 7.0.4 - namespace: zarf - valuesFiles: - - packages/gitea/gitea-values.yaml -manifests: -- name: git-connect - namespace: zarf - files: - - packages/gitea/connect.yaml -images: -- gitea/gitea:1.19.3-rootless - -Deploys Gitea to provide git repositories for Kubernetes configurations. Required for GitOps -deployments if no other git server is available. -? Deploy the git-server component? (y/N) No - -
- - 📦 ZARF-INJECTOR COMPONENT - - -
- - • Copying 1 files - • Copying 1 files - • Gathering cluster information - • Gathering cluster information - • Attempting to bootstrap the seed image into the cluster - • Attempting to bootstrap the seed image into the cluster - -
- - 📦 ZARF-SEED-REGISTRY COMPONENT - - -
- - • Loading the Zarf State from the Kubernetes cluster - • Loading the Zarf State from the Kubernetes cluster - • Processing helm chart docker-registry:1.0.0 from Zarf-generated helm chart - • Processing helm chart docker-registry:1.0.0 from Zarf-generated helm chart - -
- - 📦 ZARF-REGISTRY COMPONENT - - -
- - • Opening tunnel 62270 -> 5000 for svc/zarf-docker-registry in namespace zarf - • Creating port forwarding tunnel at http://127.0.0.1:62270/v2/_catalog - • Storing images in the zarf registry - • Storing images in the zarf registry - • Processing helm chart docker-registry:1.0.0 from Zarf-generated helm chart - • Processing helm chart docker-registry:1.0.0 from Zarf-generated helm chart - • Starting helm chart generation registry-connect - • Starting helm chart generation registry-connect - • Processing helm chart raw-init-zarf-registry-registry-connect:0.1.1680014363 from Zarf-generated - helm chart - • Processing helm chart raw-init-zarf-registry-registry-connect:0.1.1680014363 from Zarf-generated - helm chart - • Starting helm chart generation kep-1755-registry-annotation - • Starting helm chart generation kep-1755-registry-annotation - • Processing helm chart raw-init-zarf-registry-kep-1755-registry-annotation:0.1.1680014363 from - Zarf-generated helm chart - • Processing helm chart raw-init-zarf-registry-kep-1755-registry-annotation:0.1.1680014363 from - Zarf-generated helm chart - -
- - 📦 ZARF-AGENT COMPONENT - - -
- - • Opening tunnel 62284 -> 5000 for svc/zarf-docker-registry in namespace zarf - • Creating port forwarding tunnel at http://127.0.0.1:62284/v2/_catalog - • Storing images in the zarf registry - • Storing images in the zarf registry - • Starting helm chart generation zarf-agent - • Starting helm chart generation zarf-agent - • Processing helm chart raw-init-zarf-agent-zarf-agent:0.1.1680014363 from Zarf-generated helm chart - • Processing helm chart raw-init-zarf-agent-zarf-agent:0.1.1680014363 from Zarf-generated helm chart - Zarf deployment complete - - - Application | Username | Password | Connect - Registry | zarf-push | DdarrzTahz6oclGTUAUOfbsY | zarf connect registry - - -
- - diff --git a/site/src/content/docs/commands/zarf_connect.md b/site/src/content/docs/commands/zarf_connect.md index 9cc76d83a0..88f519d332 100644 --- a/site/src/content/docs/commands/zarf_connect.md +++ b/site/src/content/docs/commands/zarf_connect.md @@ -13,7 +13,7 @@ Accesses services or pods deployed in the cluster ### Synopsis Uses a k8s port-forward to connect to resources within the cluster referenced by your kube-context. -Three default options for this command are . These will connect to the Zarf created resources (assuming they were selected when performing the `zarf init` command). +Two default options for this command are . These will connect to the Zarf created resources (assuming they were selected when performing the `zarf init` command). Packages can provide service manifests that define their own shortcut connection options. These options will be printed to the terminal when the package finishes deploying. If you don't remember what connection shortcuts your deployed package offers, you can search your cluster for services that have the 'zarf.dev/connect-name' label. The value of that label is the name you will pass into the 'zarf connect' command. @@ -21,7 +21,7 @@ Packages can provide service manifests that define their own shortcut connection Even if the packages you deploy don't define their own shortcut connection options, you can use the command flags to connect into specific resources. You can read the command flag descriptions below to get a better idea how to connect to whatever resource you are trying to connect to. ``` -zarf connect { REGISTRY | LOGGING | GIT | connect-name } [flags] +zarf connect { REGISTRY | GIT | connect-name } [flags] ``` ### Options diff --git a/site/src/content/docs/commands/zarf_init.md b/site/src/content/docs/commands/zarf_init.md index 650925435c..8fc88244c3 100644 --- a/site/src/content/docs/commands/zarf_init.md +++ b/site/src/content/docs/commands/zarf_init.md @@ -12,8 +12,8 @@ Prepares a k8s cluster for the deployment of Zarf packages ### Synopsis -Injects a docker registry as well as other optional useful things (such as a git server and a logging stack) into a k8s cluster under the 'zarf' namespace to support future application deployments. -If you do not have a k8s cluster already configured, this command will give you the ability to install a cluster locally. +Injects an OCI registry as well as an optional git server into a Kubernetes cluster in the zarf namespace to support future application deployments. +If you do not have a cluster already configured, this command will give you the ability to install a cluster locally. This command looks for a zarf-init package in the local directory that the command was executed from. If no package is found in the local directory and the Zarf CLI exists somewhere outside of the current directory, Zarf will failover and attempt to find a zarf-init package in the directory that the Zarf binary is located in. @@ -35,9 +35,6 @@ $ zarf init # Initializing w/ Zarfs internal git server: $ zarf init --components=git-server -# Initializing w/ Zarfs internal git server and PLG stack: -$ zarf init --components=git-server,logging - # Initializing w/ an internal registry but with a different nodeport: $ zarf init --nodeport=30333 @@ -61,7 +58,7 @@ $ zarf init --artifact-push-password={PASSWORD} --artifact-push-username={USERNA --artifact-push-token string [alpha] API Token for the push-user to access the artifact registry --artifact-push-username string [alpha] Username to access to the artifact registry Zarf is configured to use. User must be able to upload package artifacts. --artifact-url string [alpha] External artifact registry url to use for this Zarf cluster - --components string Specify which optional components to install. E.g. --components=git-server,logging + --components string Specify which optional components to install. E.g. --components=git-server --confirm 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. --git-pull-password string Password for the pull-only user to access the git server --git-pull-username string Username for pull-only access to the git server diff --git a/site/src/content/docs/commands/zarf_tools_get-creds.md b/site/src/content/docs/commands/zarf_tools_get-creds.md index 188313daff..4d56b4e2b8 100644 --- a/site/src/content/docs/commands/zarf_tools_get-creds.md +++ b/site/src/content/docs/commands/zarf_tools_get-creds.md @@ -31,7 +31,6 @@ $ zarf tools get-creds registry-readonly $ zarf tools get-creds git $ zarf tools get-creds git-readonly $ zarf tools get-creds artifact -$ zarf tools get-creds logging ``` diff --git a/site/src/content/docs/contribute/testing.mdx b/site/src/content/docs/contribute/testing.mdx index 1fa09ec997..c64c643aa6 100644 --- a/site/src/content/docs/contribute/testing.mdx +++ b/site/src/content/docs/contribute/testing.mdx @@ -125,9 +125,8 @@ Due to resource constraints in public GitHub runners, K8s tests are only perform ::: - 20 is reserved for `zarf init`. -- 21 is reserved for logging tests so they can be removed first (they take the most resources in the cluster). - 22 is reserved for tests required the git-server, which is removed at the end of the test. -- 23-98 are for the remaining tests that only require a basic Zarf cluster without logging or the git-server. +- 23-98 are for the remaining tests that only require a basic Zarf cluster without the git-server. - 99 is reserved for the `zarf destroy` and [YOLO Mode](/ref/examples/yolo/) test. ## CLI Unit Tests diff --git a/site/src/content/docs/getting-started/install.mdx b/site/src/content/docs/getting-started/install.mdx index cd713ee04c..7c115d8cfb 100644 --- a/site/src/content/docs/getting-started/install.mdx +++ b/site/src/content/docs/getting-started/install.mdx @@ -138,6 +138,6 @@ The default 'init' package can also be obtained by visiting the [Zarf releases]( :::tip -You can build your own custom 'init' package too if you'd like. For this you should check out the [Creating a Custom 'init' Package Tutorial](/tutorials/8-custom-init-packages). +You can build your own custom 'init' package too if you'd like. For this you should check out the [Creating a Custom 'init' Package Tutorial](/tutorials/7-custom-init-packages). ::: diff --git a/site/src/content/docs/index.mdx b/site/src/content/docs/index.mdx index ebceb10ace..48ac086e1c 100644 --- a/site/src/content/docs/index.mdx +++ b/site/src/content/docs/index.mdx @@ -36,13 +36,12 @@ Zarf provides a way to package and deploy software in a way that is **repeatable - Automate Kubernetes deployments in disconnected environments - Automate [Software Bill of Materials (SBOM)](/ref/sboms/) generation -- Build and [publish packages as OCI image artifacts](/tutorials/7-publish-and-deploy/) +- Build and [publish packages as OCI image artifacts](/tutorials/6-publish-and-deploy/) - Provide a [web dashboard](/ref/sboms/#the-sbom-viewer) for viewing SBOM output - Create and verify package signatures with [cosign](https://github.com/sigstore/cosign) - [Publish](/commands/zarf_package_publish/), [pull](/commands/zarf_package_pull/), and [deploy](/commands/zarf_package_deploy/) packages from an [OCI registry](https://opencontainers.org/) - Powerful component lifecycle [actions](/ref/actions/) - Deploy a new cluster while fully disconnected with [K3s](https://k3s.io/) or into any existing cluster using a [kube config](https://kubernetes.io/docs/concepts/configuration/organize-cluster-access-kubeconfig/) -- Builtin logging stack with [Loki](https://grafana.com/oss/loki/) - Builtin Git server with [Gitea](https://gitea.com/) - Builtin Docker registry - Builtin [K9s Dashboard](https://k9scli.io/) for managing a cluster from the terminal diff --git a/site/src/content/docs/ref/deploy.mdx b/site/src/content/docs/ref/deploy.mdx index 3b92ee1070..28e61f7114 100644 --- a/site/src/content/docs/ref/deploy.mdx +++ b/site/src/content/docs/ref/deploy.mdx @@ -18,7 +18,7 @@ A typical Zarf deployment is made up of three parts: 2. A [Zarf init package](/ref/init-package/): - A compressed tarball package that contains the configuration needed to instantiate an environment without connectivity. - Automatically seeds your cluster with a container registry or wires up a pre-existing one - - Provides additional capabilities such as logging, git server support, and/or a K8s cluster. + - Provides additional capabilities such as a git server and K3s cluster. 3. A [Zarf Package](/ref/packages/): - A compressed tarball package that contains all of the files, manifests, source repositories, and images needed to deploy your infrastructure, application, and resources in a disconnected environment. @@ -92,7 +92,7 @@ Zarf normally expects to operate against a Kubernetes cluster that has been [Zar - **YOLO Mode** - Yaml-OnLy Online mode allows for a faster deployment without requiring the `zarf init` command to be run beforehand. It can be useful for testing or for environments that manage their own registries and Git servers completely outside of Zarf. Given this mode does not use the [Zarf Agent](/faq#what-is-the-zarf-agent) any resources specified will need to be manually modified for the environment. -- **Cluster-less** - Zarf normally interacts with clusters and kubernetes resources, but it is possible to have Zarf perform actions before a cluster exists (including [deploying the cluster itself](/tutorials/5-creating-a-k8s-cluster-with-zarf)). These packages generally have more dependencies on the host or environment that they run within. +- **Cluster-less** - Zarf normally interacts with clusters and kubernetes resources, but it is possible to have Zarf perform actions before a cluster exists (including [deploying the cluster itself](/tutorials/4-creating-a-k8s-cluster-with-zarf)). These packages generally have more dependencies on the host or environment that they run within. ## Typical Deployment Workflow diff --git a/site/src/content/docs/ref/init-package.mdx b/site/src/content/docs/ref/init-package.mdx index f1669ae471..8bf4c8506b 100644 --- a/site/src/content/docs/ref/init-package.mdx +++ b/site/src/content/docs/ref/init-package.mdx @@ -184,7 +184,6 @@ The Zarf team maintains some optional components in the default 'init' package. | Components | Description | | ------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | | k3s | REQUIRES ROOT (not sudo). Installs a lightweight Kubernetes Cluster on the local host [K3s](https://k3s.io/) and configures it to start up on boot. | -| logging | Adds a log monitoring stack [promtail/loki/grafana (aka PLG)](https://github.com/grafana/loki) into the cluster. | | git-server | Adds a [GitOps](https://about.gitlab.com/topics/gitops/)-compatible source control service [Gitea](https://gitea.io/en-us/) into the cluster. | There are two ways to deploy these optional components. First, you can provide a comma-separated list of components to the `--components` flag, such as `zarf init --components k3s,git-server --confirm`, or, you can choose to exclude the `--components` and `--confirm` flags and respond with a yes (`y`) or no (`n`) for each optional component when interactively prompted. @@ -271,7 +270,7 @@ cd zarf mv zarf.yaml zarf.yaml.bak ``` -You can learn more about creating a custom init package in the [Creating a Custom 'init' Package Tutorial](/tutorials/8-custom-init-packages). +You can learn more about creating a custom init package in the [Creating a Custom 'init' Package Tutorial](/tutorials/7-custom-init-packages). ::: diff --git a/site/src/content/docs/ref/packages.mdx b/site/src/content/docs/ref/packages.mdx index 4cb1e4434c..723c6ed845 100644 --- a/site/src/content/docs/ref/packages.mdx +++ b/site/src/content/docs/ref/packages.mdx @@ -32,7 +32,7 @@ Check out our [K3s cluster package](https://github.com/defenseunicorns/zarf/blob ::: -During the initialization process, Zarf will seed the cluster with a container registry to store images that other packages may require. The init package has the option to deploy other features to your cluster, such as a Git server to manage your repositories or a PLG logging stack that allows you to monitor the applications running on your cluster. For additional information on the init package, we provide detailed documentation on the Zarf ['init' package page](/ref/init-package/). +During the initialization process, Zarf will seed the cluster with a container registry to store images that other packages may require. The init package has the option to deploy other features to your cluster, such as a Git server to manage your repositories. For additional information on the init package, we provide detailed documentation on the Zarf ['init' package page](/ref/init-package/). #### Using the init-package @@ -50,7 +50,7 @@ During the deployment process, Zarf will leverage the infrastructure created dur ## Differential Packages -If you already have a Zarf package and you want to create an updated package you would normally have to re-create the entire package from scratch, including things that might not have changed. Depending on your workflow, you may want to create a package that only contains the artifacts that have changed since the last time you built your package. This can be achieved by using the `--differential` flag while running the `zarf package create` command. You can use this flag to point to an already built package you have locally or to a package that has been previously [published](/tutorials/7-publish-and-deploy#publish-package) to a registry. +If you already have a Zarf package and you want to create an updated package you would normally have to re-create the entire package from scratch, including things that might not have changed. Depending on your workflow, you may want to create a package that only contains the artifacts that have changed since the last time you built your package. This can be achieved by using the `--differential` flag while running the `zarf package create` command. You can use this flag to point to an already built package you have locally or to a package that has been previously [published](/tutorials/6-publish-and-deploy#publish-package) to a registry. ## Package Sources @@ -79,7 +79,7 @@ A remote tarball is a Zarf package tarball that is hosted on a web server that i ### Remote OCI Reference (`oci://`) -An OCI package is one that has been published to an OCI compatible registry using `zarf package publish` or the `-o` option on `zarf package create`. These packages live within a given registry and you can learn more about them in our [Publish & Deploy Packages w/OCI Tutorial](/tutorials/7-publish-and-deploy/). +An OCI package is one that has been published to an OCI compatible registry using `zarf package publish` or the `-o` option on `zarf package create`. These packages live within a given registry and you can learn more about them in our [Publish & Deploy Packages w/OCI Tutorial](/tutorials/6-publish-and-deploy/). :::note diff --git a/site/src/content/docs/tutorials/1-initializing-a-k8s-cluster.mdx b/site/src/content/docs/tutorials/1-initializing-a-k8s-cluster.mdx index 0966abe3b4..006d3a5743 100644 --- a/site/src/content/docs/tutorials/1-initializing-a-k8s-cluster.mdx +++ b/site/src/content/docs/tutorials/1-initializing-a-k8s-cluster.mdx @@ -35,8 +35,6 @@ More information about the init-package and its components can be found [here](/ ::: - - :::note You will only be prompted to deploy the k3s component if you are on a Linux machine ::: diff --git a/site/src/content/docs/tutorials/2-deploying-zarf-packages.mdx b/site/src/content/docs/tutorials/2-deploying-zarf-packages.mdx index b813b31a39..a196b15e94 100644 --- a/site/src/content/docs/tutorials/2-deploying-zarf-packages.mdx +++ b/site/src/content/docs/tutorials/2-deploying-zarf-packages.mdx @@ -98,7 +98,7 @@ If you receive this error, either you don't have a Kubernetes cluster, your clus If you need to setup a cluster, you can perform the following. -1. Deploy a Kubernetes cluster with the [Creating a K8s Cluster with Zarf](/tutorials/5-creating-a-k8s-cluster-with-zarf/) tutorial. +1. Deploy a Kubernetes cluster with the [Creating a K8s Cluster with Zarf](/tutorials/4-creating-a-k8s-cluster-with-zarf/) tutorial. 2. Perform the [Initialize a cluster](/tutorials/1-initializing-a-k8s-cluster/) tutorial. After that you can try deploying the package again. diff --git a/site/src/content/docs/tutorials/3-deploy-a-retro-arcade.mdx b/site/src/content/docs/tutorials/3-deploy-a-retro-arcade.mdx index ff12f4cd91..9364e98bbe 100644 --- a/site/src/content/docs/tutorials/3-deploy-a-retro-arcade.mdx +++ b/site/src/content/docs/tutorials/3-deploy-a-retro-arcade.mdx @@ -26,7 +26,7 @@ Before beginning this tutorial you will need the following: :::tip -You can publish your own packages for deployment too via `oci://`. See the [Store and Deploy Packages with OCI](/tutorials/7-publish-and-deploy/) tutorial for more information. +You can publish your own packages for deployment too via `oci://`. See the [Store and Deploy Packages with OCI](/tutorials/6-publish-and-deploy/) tutorial for more information. ::: @@ -82,7 +82,7 @@ If you receive this error, either you don't have a Kubernetes cluster, your clus If you need to setup a cluster, you can perform the following. -1. Deploy a Kubernetes cluster with the [Creating a K8s Cluster with Zarf](/tutorials/5-creating-a-k8s-cluster-with-zarf/) tutorial. +1. Deploy a Kubernetes cluster with the [Creating a K8s Cluster with Zarf](/tutorials/4-creating-a-k8s-cluster-with-zarf/) tutorial. 2. Perform the [Initialize a cluster](/tutorials/1-initializing-a-k8s-cluster/) tutorial. After that you can try deploying the package again. diff --git a/site/src/content/docs/tutorials/4-add-logging.mdx b/site/src/content/docs/tutorials/4-add-logging.mdx deleted file mode 100644 index 9f19ce4881..0000000000 --- a/site/src/content/docs/tutorials/4-add-logging.mdx +++ /dev/null @@ -1,115 +0,0 @@ ---- -title: Add Logging to a Cluster -sidebar: - order: 4 ---- - -## Introduction - -In this tutorial, we are going to show how you can use a Zarf component to inject zero-config, centralized logging into your Zarf cluster. - -More specifically, you'll be adding a [Promtail / Loki / Grafana (PLG)](https://github.com/grafana/loki) stack to the [Retro Arcade Tutorial](/tutorials/3-deploy-a-retro-arcade/) by installing Zarf's "logging" component. - -## System Requirements - -- You'll need an internet connection to grab the Zarf Init Package if it's not already on your machine. - -## Prerequisites - -Prior to this tutorial you'll want to have a working cluster with Zarf initialized. - -- Zarf binary installed on your $PATH: ([Installing Zarf](/getting-started/install/)) -- [Initialize a cluster](/tutorials/1-initializing-a-k8s-cluster/). -- Perform the [Retro Arcade Tutorial](/tutorials/3-deploy-a-retro-arcade/). - -## Installing the Logging Component - -1. Run the `zarf init` command on your cluster. - -```sh -$ zarf init -``` - -2. When prompted to deploy the package select `y` for Yes, then hit the `enter` -key.
When prompted to deploy the logging component select `y` for Yes, then hit the `enter` key. - - - -4. You can automatically accept the logging component, and confirm the package using the `--confirm` and `--components` flags. - - - -### Connecting to the Logging Component - -#### Note the Credentials - -1. Review the `zarf init` command output for the following: - - - -You should see a section for `Logging`. You will need these credentials later on. - -## Deploy the Retro Arcade Tutorial - -1. If you haven't already in the prerequisites, deploy the [Retro Arcade Tutorial](/tutorials/3-deploy-a-retro-arcade/). - -## Check the logs - -:::note - -Because Doom may be freshly installed it is recommended to refresh the page a few times to generate more log traffic to view in Grafana - -::: - - -### Log into Grafana - -To open Grafana you can use the `zarf connect logging` command. - -You'll be redirected the `/login` page where you have to sign in with the Grafana credentials you saved [in a previous step](#note-the-credentials). - -![zarf user logging into Loki](../../../assets/tutorials/logging_login.png) - -Once you've successfully logged in go to: - -1. The "Explore" page (Button on the left that looks like a compass) -2. Select `Loki` in the dropdown, and then -3. Enter `{app="game"}` into the Log Browser query input field - -![zarf user typing {app='game'} into the Loki Log Browser](../../../assets/tutorials/logging_query.png) - -Submit that query and you'll get back a dump of all the game pod logs that Loki has collected. - -![Loki query results](../../../assets/tutorials/logging_logs.png) - -## Removal - -1. Use the `zarf package list` command to get a list of the installed packages and their components. This will give you the name of the init package and the logging component to remove it. - - - -2. Use the `zarf package remove` command to remove the `logging` component from the init package. Don't forget the `--confirm` flag. Otherwise you'll receive an error. - - - - -## Troubleshooting - -### Unable to connect to the Kubernetes cluster. - - - -:::note[Remediation] - -If you receive this error, either you don't have a Kubernetes cluster, your cluster is down, or your cluster is unreachable. - -1. Check your kubectl configuration, then try again. For more information about kubectl configuration see [Configure Access to Multiple Clusters](https://kubernetes.io/docs/tasks/access-application-cluster/configure-access-multiple-clusters/) from the Kubernetes documentation. - -If you need to setup a cluster, you can perform the following. - -1. Deploy a Kubernetes cluster with the [Creating a K8s Cluster with Zarf](/tutorials/5-creating-a-k8s-cluster-with-zarf/) tutorial. -2. Perform the [Initialize a cluster](/tutorials/1-initializing-a-k8s-cluster/) tutorial. - -After that you can try deploying the package again. - -::: diff --git a/site/src/content/docs/tutorials/5-creating-a-k8s-cluster-with-zarf.mdx b/site/src/content/docs/tutorials/4-creating-a-k8s-cluster-with-zarf.mdx similarity index 100% rename from site/src/content/docs/tutorials/5-creating-a-k8s-cluster-with-zarf.mdx rename to site/src/content/docs/tutorials/4-creating-a-k8s-cluster-with-zarf.mdx diff --git a/site/src/content/docs/tutorials/6-big-bang.mdx b/site/src/content/docs/tutorials/5-big-bang.mdx similarity index 99% rename from site/src/content/docs/tutorials/6-big-bang.mdx rename to site/src/content/docs/tutorials/5-big-bang.mdx index b609c1668c..b239f73ea3 100644 --- a/site/src/content/docs/tutorials/6-big-bang.mdx +++ b/site/src/content/docs/tutorials/5-big-bang.mdx @@ -145,7 +145,6 @@ zarf init # ? Do you want to download this init package? Yes # ? Deploy this Zarf package? Yes # ? Deploy the k3s component? No -# ? Deploy the logging component? No # ? Deploy the git-server component? Yes # (Optional) Inspect the results diff --git a/site/src/content/docs/tutorials/7-publish-and-deploy.mdx b/site/src/content/docs/tutorials/6-publish-and-deploy.mdx similarity index 99% rename from site/src/content/docs/tutorials/7-publish-and-deploy.mdx rename to site/src/content/docs/tutorials/6-publish-and-deploy.mdx index c50b8fee65..a03b0ec392 100644 --- a/site/src/content/docs/tutorials/7-publish-and-deploy.mdx +++ b/site/src/content/docs/tutorials/6-publish-and-deploy.mdx @@ -158,7 +158,7 @@ If you receive this error, either you don't have a Kubernetes cluster, your clus If you need to setup a cluster, you can perform the following. -1. Deploy a Kubernetes cluster with the [Creating a K8s Cluster with Zarf](/tutorials/5-creating-a-k8s-cluster-with-zarf/) tutorial. +1. Deploy a Kubernetes cluster with the [Creating a K8s Cluster with Zarf](/tutorials/4-creating-a-k8s-cluster-with-zarf/) tutorial. 2. Perform the [Initialize a cluster](/tutorials/1-initializing-a-k8s-cluster/) tutorial. After that you can try deploying the package again. diff --git a/site/src/content/docs/tutorials/8-custom-init-packages.mdx b/site/src/content/docs/tutorials/7-custom-init-packages.mdx similarity index 100% rename from site/src/content/docs/tutorials/8-custom-init-packages.mdx rename to site/src/content/docs/tutorials/7-custom-init-packages.mdx diff --git a/site/src/content/docs/tutorials/9-resource-adoption.mdx b/site/src/content/docs/tutorials/8-resource-adoption.mdx similarity index 100% rename from site/src/content/docs/tutorials/9-resource-adoption.mdx rename to site/src/content/docs/tutorials/8-resource-adoption.mdx diff --git a/site/src/content/docs/tutorials/10-package-create-differential.mdx b/site/src/content/docs/tutorials/9-package-create-differential.mdx similarity index 100% rename from site/src/content/docs/tutorials/10-package-create-differential.mdx rename to site/src/content/docs/tutorials/9-package-create-differential.mdx diff --git a/site/src/content/docs/tutorials/index.mdx b/site/src/content/docs/tutorials/index.mdx index 0e27235ae2..9c0b43ef6d 100644 --- a/site/src/content/docs/tutorials/index.mdx +++ b/site/src/content/docs/tutorials/index.mdx @@ -18,7 +18,7 @@ Almost all tutorials will have the following prerequisites/assumptions: ## Setting Up a Local Kubernetes Cluster -While Zarf is able to deploy a local k3s Kubernetes cluster for you, (as you'll find out more in the [Creating a K8s Cluster with Zarf](/tutorials/5-creating-a-k8s-cluster-with-zarf) tutorial), that k3s cluster will only work if you are on a root user on a Linux machine. If you are on a Mac, or you're on Linux but don't have root access, you'll need to set up a local dockerized Kubernetes cluster manually. We provide instructions on how to quickly set up a local k3d cluster that you can use for the majority of the tutorials. +While Zarf is able to deploy a local k3s Kubernetes cluster for you, (as you'll find out more in the [Creating a K8s Cluster with Zarf](/tutorials/4-creating-a-k8s-cluster-with-zarf) tutorial), that k3s cluster will only work if you are on a root user on a Linux machine. If you are on a Mac, or you're on Linux but don't have root access, you'll need to set up a local dockerized Kubernetes cluster manually. We provide instructions on how to quickly set up a local k3d cluster that you can use for the majority of the tutorials. ### Install k3d diff --git a/src/cmd/connect.go b/src/cmd/connect.go index 054587337c..e2f3884183 100644 --- a/src/cmd/connect.go +++ b/src/cmd/connect.go @@ -25,7 +25,7 @@ var ( cliOnly bool connectCmd = &cobra.Command{ - Use: "connect { REGISTRY | LOGGING | GIT | connect-name }", + Use: "connect { REGISTRY | GIT | connect-name }", Aliases: []string{"c"}, Short: lang.CmdConnectShort, Long: lang.CmdConnectLong, diff --git a/src/config/config.go b/src/config/config.go index 53e49d720b..d3b0c07a21 100644 --- a/src/config/config.go +++ b/src/config/config.go @@ -41,8 +41,6 @@ const ( ZarfImagePullSecretName = "private-registry" ZarfGitServerSecretName = "private-git-server" - ZarfLoggingUser = "zarf-admin" - UnsetCLIVersion = "unset-development-only" ) diff --git a/src/config/lang/english.go b/src/config/lang/english.go index 59dcdc5af2..68caf91270 100644 --- a/src/config/lang/english.go +++ b/src/config/lang/english.go @@ -64,7 +64,7 @@ const ( // zarf connect CmdConnectShort = "Accesses services or pods deployed in the cluster" CmdConnectLong = "Uses a k8s port-forward to connect to resources within the cluster referenced by your kube-context.\n" + - "Three default options for this command are . These will connect to the Zarf created resources " + + "Two default options for this command are . These will connect to the Zarf created resources " + "(assuming they were selected when performing the `zarf init` command).\n\n" + "Packages can provide service manifests that define their own shortcut connection options. These options will be " + "printed to the terminal when the package finishes deploying.\n If you don't remember what connection shortcuts your deployed " + @@ -112,10 +112,10 @@ const ( // zarf init CmdInitShort = "Prepares a k8s cluster for the deployment of Zarf packages" - CmdInitLong = "Injects a docker registry as well as other optional useful things (such as a git server " + - "and a logging stack) into a k8s cluster under the 'zarf' namespace " + + CmdInitLong = "Injects an OCI registry as well as an optional git server " + + "into a Kubernetes cluster in the zarf namespace " + "to support future application deployments.\n" + - "If you do not have a k8s cluster already configured, this command will give you " + + "If you do not have a cluster already configured, this command will give you " + "the ability to install a cluster locally.\n\n" + "This command looks for a zarf-init package in the local directory that the command was executed " + "from. If no package is found in the local directory and the Zarf CLI exists somewhere outside of " + @@ -129,9 +129,6 @@ $ zarf init # Initializing w/ Zarfs internal git server: $ zarf init --components=git-server -# Initializing w/ Zarfs internal git server and PLG stack: -$ zarf init --components=git-server,logging - # Initializing w/ an internal registry but with a different nodeport: $ zarf init --nodeport=30333 @@ -162,7 +159,7 @@ $ zarf init --artifact-push-password={PASSWORD} --artifact-push-username={USERNA CmdInitFlagSet = "Specify deployment variables to set on the command line (KEY=value)" 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." - CmdInitFlagComponents = "Specify which optional components to install. E.g. --components=git-server,logging" + CmdInitFlagComponents = "Specify which optional components to install. E.g. --components=git-server" CmdInitFlagStorageClass = "Specify the storage class to use for the registry and git server. E.g. --storage-class=standard" CmdInitFlagGitURL = "External git server url to use for this Zarf cluster" @@ -590,7 +587,6 @@ $ zarf tools get-creds registry-readonly $ zarf tools get-creds git $ zarf tools get-creds git-readonly $ zarf tools get-creds artifact -$ zarf tools get-creds logging ` CmdToolsUpdateCredsShort = "Updates the credentials for deployed Zarf services. Pass a service key to update credentials for a single service" diff --git a/src/internal/packager/template/template.go b/src/internal/packager/template/template.go index ad7ee64f11..8b76252aa1 100644 --- a/src/internal/packager/template/template.go +++ b/src/internal/packager/template/template.go @@ -81,9 +81,6 @@ func GetZarfTemplates(componentName string, state *types.ZarfState) (templateMap } builtinMap["HTPASSWD"] = htpasswd builtinMap["REGISTRY_SECRET"] = regInfo.Secret - - case "logging": - builtinMap["LOGGING_AUTH"] = state.LoggingSecret } // Iterate over any custom variables and add them to the mappings for templating @@ -93,7 +90,7 @@ func GetZarfTemplates(componentName string, state *types.ZarfState) (templateMap Value: value, } - if key == "LOGGING_AUTH" || key == "REGISTRY_SECRET" || key == "HTPASSWD" || + if key == "REGISTRY_SECRET" || key == "HTPASSWD" || key == "AGENT_CA" || key == "AGENT_KEY" || key == "AGENT_CRT" || key == "GIT_AUTH_PULL" || key == "GIT_AUTH_PUSH" || key == "REGISTRY_AUTH_PULL" || key == "REGISTRY_AUTH_PUSH" { // Sanitize any builtin templates that are sensitive diff --git a/src/pkg/cluster/state.go b/src/pkg/cluster/state.go index ca3abf75ea..5471628667 100644 --- a/src/pkg/cluster/state.go +++ b/src/pkg/cluster/state.go @@ -35,10 +35,7 @@ const ( // InitZarfState initializes the Zarf state with the given temporary directory and init configs. func (c *Cluster) InitZarfState(ctx context.Context, initOptions types.ZarfInitOptions) error { - var ( - distro string - err error - ) + var distro string spinner := message.NewProgressSpinner("Gathering cluster state information") defer spinner.Stop() @@ -79,9 +76,6 @@ func (c *Cluster) InitZarfState(ctx context.Context, initOptions types.ZarfInitO // Defaults state.Distro = distro - if state.LoggingSecret, err = helpers.RandomString(types.ZarfGeneratedPasswordLen); err != nil { - return fmt.Errorf("%s: %w", lang.ErrUnableToGenerateRandomSecret, err) - } // Setup zarf agent PKI state.AgentTLS = pki.GeneratePKI(config.ZarfAgentHost) @@ -246,9 +240,6 @@ func (c *Cluster) sanitizeZarfState(state *types.ZarfState) *types.ZarfState { // Overwrite the ArtifactServer secret state.ArtifactServer.PushToken = "**sanitized**" - // Overwrite the Logging secret - state.LoggingSecret = "**sanitized**" - return state } diff --git a/src/pkg/cluster/tunnel.go b/src/pkg/cluster/tunnel.go index 3ce53fa53e..e09103829d 100644 --- a/src/pkg/cluster/tunnel.go +++ b/src/pkg/cluster/tunnel.go @@ -31,7 +31,6 @@ import ( // Zarf specific connect strings const ( ZarfRegistry = "REGISTRY" - ZarfLogging = "LOGGING" ZarfGit = "GIT" ZarfInjector = "INJECTOR" @@ -107,28 +106,18 @@ func (c *Cluster) Connect(ctx context.Context, target string) (*Tunnel, error) { zt.resourceName = ZarfRegistryName zt.remotePort = ZarfRegistryPort zt.urlSuffix = `/v2/_catalog` - - case ZarfLogging: - zt.resourceName = "zarf-loki-stack-grafana" - zt.remotePort = 3000 - // Start the logs with something useful. - zt.urlSuffix = `/monitor/explore?orgId=1&left=%5B"now-12h","now","Loki",%7B"refId":"Zarf%20Logs","expr":"%7Bnamespace%3D%5C"zarf%5C"%7D"%7D%5D` - case ZarfGit: zt.resourceName = ZarfGitServerName zt.remotePort = ZarfGitServerPort - case ZarfInjector: zt.resourceName = ZarfInjectorName zt.remotePort = ZarfInjectorPort - default: if target != "" { if zt, err = c.checkForZarfConnectLabel(ctx, target); err != nil { return nil, fmt.Errorf("problem looking for a zarf connect label in the cluster: %s", err.Error()) } } - if zt.resourceName == "" { return nil, fmt.Errorf("missing resource name") } @@ -136,7 +125,6 @@ func (c *Cluster) Connect(ctx context.Context, target string) (*Tunnel, error) { return nil, fmt.Errorf("missing remote port") } } - return c.ConnectTunnelInfo(ctx, zt) } diff --git a/src/pkg/message/credentials.go b/src/pkg/message/credentials.go index 07b85525bc..19f86f8516 100644 --- a/src/pkg/message/credentials.go +++ b/src/pkg/message/credentials.go @@ -8,7 +8,6 @@ import ( "fmt" "strings" - "github.com/defenseunicorns/zarf/src/config" "github.com/defenseunicorns/zarf/src/types" "github.com/pterm/pterm" ) @@ -20,14 +19,13 @@ const ( GitKey = "git" GitReadKey = "git-readonly" ArtifactKey = "artifact" - LoggingKey = "logging" AgentKey = "agent" ) // PrintCredentialTable displays credentials in a table func PrintCredentialTable(state *types.ZarfState, componentsToDeploy []types.DeployedComponent) { if len(componentsToDeploy) == 0 { - componentsToDeploy = []types.DeployedComponent{{Name: "logging"}, {Name: "git-server"}} + componentsToDeploy = []types.DeployedComponent{{Name: "git-server"}} } // Pause the logfile's output to avoid credentials being printed to the log file @@ -45,10 +43,6 @@ func PrintCredentialTable(state *types.ZarfState, componentsToDeploy []types.Dep } for _, component := range componentsToDeploy { - // Show message if including logging stack - if component.Name == "logging" { - loginData = append(loginData, []string{"Logging", config.ZarfLoggingUser, state.LoggingSecret, "zarf connect logging", LoggingKey}) - } // Show message if including git-server if component.Name == "git-server" { loginData = append(loginData, @@ -68,9 +62,6 @@ func PrintCredentialTable(state *types.ZarfState, componentsToDeploy []types.Dep // PrintComponentCredential displays credentials for a single component func PrintComponentCredential(state *types.ZarfState, componentName string) { switch strings.ToLower(componentName) { - case LoggingKey: - Notef("Logging credentials (username: %s):", config.ZarfLoggingUser) - fmt.Println(state.LoggingSecret) case GitKey: Notef("Git Server push password (username: %s):", state.GitServer.PushUsername) fmt.Println(state.GitServer.PushPassword) diff --git a/src/test/e2e/00_use_cli_test.go b/src/test/e2e/00_use_cli_test.go index be3afb6b4f..93c5778c0c 100644 --- a/src/test/e2e/00_use_cli_test.go +++ b/src/test/e2e/00_use_cli_test.go @@ -75,7 +75,7 @@ func TestUseCLI(t *testing.T) { t.Parallel() // Test for expected failure when given a bad component input path := fmt.Sprintf("build/zarf-package-component-actions-%s.tar.zst", e2e.Arch) - _, _, err := e2e.Zarf("package", "deploy", path, "--components=on-create,foo,logging", "--confirm") + _, _, err := e2e.Zarf("package", "deploy", path, "--components=on-create,foo,git-server", "--confirm") require.Error(t, err) }) diff --git a/src/test/e2e/20_zarf_init_test.go b/src/test/e2e/20_zarf_init_test.go index ddcf084394..92fe26bc98 100644 --- a/src/test/e2e/20_zarf_init_test.go +++ b/src/test/e2e/20_zarf_init_test.go @@ -20,10 +20,9 @@ func TestZarfInit(t *testing.T) { t.Log("E2E: Zarf init") e2e.SetupWithCluster(t) - initComponents := "logging,git-server" - // Add k3s component in appliance mode + initComponents := "git-server" if e2e.ApplianceMode { - initComponents = "k3s,logging,git-server" + initComponents = "k3s,git-server" } initPackageVersion := e2e.GetZarfVersion(t) @@ -83,11 +82,6 @@ func TestZarfInit(t *testing.T) { require.NoError(t, err) checkLogForSensitiveState(t, logText, state) - // Check the old state values as well (if they exist) to ensure they weren't printed and then updated during init - if oldState.LoggingSecret != "" { - checkLogForSensitiveState(t, logText, oldState) - } - if e2e.ApplianceMode { // make sure that we upgraded `k3s` correctly and are running the correct version - this should match that found in `packages/distros/k3s` kubeletVersion, _, err := e2e.Kubectl("get", "nodes", "-o", "jsonpath={.items[0].status.nodeInfo.kubeletVersion}") @@ -130,7 +124,6 @@ func checkLogForSensitiveState(t *testing.T, logText string, zarfState types.Zar require.NotContains(t, logText, zarfState.RegistryInfo.PullPassword) require.NotContains(t, logText, zarfState.RegistryInfo.PushPassword) require.NotContains(t, logText, zarfState.RegistryInfo.Secret) - require.NotContains(t, logText, zarfState.LoggingSecret) } func verifyZarfNamespaceLabels(t *testing.T) { @@ -198,16 +191,8 @@ func verifyZarfPodLabels(t *testing.T) { require.NoError(t, err) require.Equal(t, expectedLabels, actualLabels) - // logging and git server pods should have the `zarf-agent=patched` label - // since they should have been mutated by the agent - patchedLabel := `"zarf-agent":"patched"` - - // logging - actualLabels, _, err = e2e.Kubectl("get", "-n=zarf", "--selector=app.kubernetes.io/instance=zarf-loki-stack", "pods", "-o=jsonpath='{.items[0].metadata.labels}'") - require.NoError(t, err) - require.Contains(t, actualLabels, patchedLabel) - // git server + patchedLabel := `"zarf-agent":"patched"` actualLabels, _, err = e2e.Kubectl("get", "-n=zarf", "--selector=app.kubernetes.io/instance=zarf-gitea ", "pods", "-o=jsonpath='{.items[0].metadata.labels}'") require.NoError(t, err) require.Contains(t, actualLabels, patchedLabel) @@ -222,12 +207,6 @@ func verifyZarfServiceLabels(t *testing.T) { require.NoError(t, err) require.Equal(t, expectedLabels, actualLabels) - // logging - expectedLabels = `'{"app.kubernetes.io/managed-by":"Helm","zarf.dev/connect-name":"logging"}'` - actualLabels, _, err = e2e.Kubectl("get", "-n=zarf", "service", "zarf-connect-logging", "-o=jsonpath='{.metadata.labels}'") - require.NoError(t, err) - require.Equal(t, expectedLabels, actualLabels) - // git server expectedLabels = `'{"app.kubernetes.io/managed-by":"Helm","zarf.dev/connect-name":"git"}'` actualLabels, _, err = e2e.Kubectl("get", "-n=zarf", "service", "zarf-connect-git", "-o=jsonpath='{.metadata.labels}'") diff --git a/src/test/e2e/21_connect_creds_test.go b/src/test/e2e/21_connect_creds_test.go index f7bc4ce25a..5c68277ff7 100644 --- a/src/test/e2e/21_connect_creds_test.go +++ b/src/test/e2e/21_connect_creds_test.go @@ -40,26 +40,6 @@ func TestConnectAndCreds(t *testing.T) { require.NotEqual(t, prevAgentSecretData, newAgentSecretData, "agent secrets should not be the same") connectToZarfServices(ctx, t) - - stdOut, stdErr, err = e2e.Zarf("package", "remove", "init", "--components=logging", "--confirm") - require.NoError(t, err, stdOut, stdErr) - - // Prune the images from Grafana and ensure that they are gone - stdOut, stdErr, err = e2e.Zarf("tools", "registry", "prune", "--confirm") - require.NoError(t, err, stdOut, stdErr) - - stdOut, stdErr, err = e2e.Zarf("tools", "registry", "ls", "127.0.0.1:31337/library/registry") - require.NoError(t, err, stdOut, stdErr) - require.Contains(t, stdOut, "2.8.3") - stdOut, stdErr, err = e2e.Zarf("tools", "registry", "ls", "127.0.0.1:31337/grafana/promtail") - require.NoError(t, err, stdOut, stdErr) - require.Empty(t, stdOut) - stdOut, stdErr, err = e2e.Zarf("tools", "registry", "ls", "127.0.0.1:31337/grafana/grafana") - require.NoError(t, err, stdOut, stdErr) - require.Empty(t, stdOut) - stdOut, stdErr, err = e2e.Zarf("tools", "registry", "ls", "127.0.0.1:31337/grafana/loki") - require.NoError(t, err, stdOut, stdErr) - require.Empty(t, stdOut) } func TestMetrics(t *testing.T) { @@ -107,15 +87,11 @@ func connectToZarfServices(ctx context.Context, t *testing.T) { require.NoError(t, err, stdOut, stdErr) registryList := strings.Split(strings.Trim(stdOut, "\n "), "\n") - // We assert greater than or equal to since the base init has 12 images + // We assert greater than or equal to since the base init has 8 images // HOWEVER during an upgrade we could have mismatched versions/names resulting in more images - require.GreaterOrEqual(t, len(registryList), 7) + require.GreaterOrEqual(t, len(registryList), 3) require.Contains(t, stdOut, "defenseunicorns/zarf/agent") require.Contains(t, stdOut, "gitea/gitea") - require.Contains(t, stdOut, "grafana/grafana") - require.Contains(t, stdOut, "grafana/loki") - require.Contains(t, stdOut, "grafana/promtail") - require.Contains(t, stdOut, "kiwigrid/k8s-sidecar") require.Contains(t, stdOut, "library/registry") // Get the git credentials @@ -149,16 +125,4 @@ func connectToZarfServices(ctx context.Context, t *testing.T) { respGit, err = http.Get(gitArtifactURL) require.NoError(t, err) require.Equal(t, 200, respGit.StatusCode) - - // Connect to the Logging Stack - c, err = cluster.NewCluster() - require.NoError(t, err) - tunnelLog, err := c.Connect(ctx, cluster.ZarfLogging) - require.NoError(t, err) - defer tunnelLog.Close() - - // Make sure Grafana comes up cleanly - respLog, err := http.Get(tunnelLog.HTTPEndpoint()) - require.NoError(t, err) - require.Equal(t, 200, respLog.StatusCode) } diff --git a/src/types/k8s.go b/src/types/k8s.go index 2bf0900cf9..2c2c6b3527 100644 --- a/src/types/k8s.go +++ b/src/types/k8s.go @@ -67,7 +67,6 @@ type ZarfState struct { GitServer GitServerInfo `json:"gitServer" jsonschema:"description=Information about the repository Zarf is configured to use"` RegistryInfo RegistryInfo `json:"registryInfo" jsonschema:"description=Information about the container registry Zarf is configured to use"` ArtifactServer ArtifactServerInfo `json:"artifactServer" jsonschema:"description=Information about the artifact registry Zarf is configured to use"` - LoggingSecret string `json:"loggingSecret" jsonschema:"description=Secret value that the internal Grafana server was seeded with"` } // DeployedPackage contains information about a Zarf Package that has been deployed to a cluster diff --git a/zarf.yaml b/zarf.yaml index 859813fde5..0932f8155b 100644 --- a/zarf.yaml +++ b/zarf.yaml @@ -32,11 +32,6 @@ components: import: path: packages/zarf-agent - # (Optional) Adds logging to the cluster - - name: logging - import: - path: packages/logging-pgl - # (Optional) Adds a git server to the cluster - name: git-server import: