Skip to content

making vars for gitea chart repo and zarf injector #3752

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/gitea/zarf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ components:
charts:
- name: gitea
releaseName: zarf-gitea
url: https://dl.gitea.io/charts
url: "###ZARF_PKG_TMPL_GITEA_HELM_REPO###"
version: 10.1.1
namespace: zarf
valuesFiles:
Expand Down
4 changes: 2 additions & 2 deletions packages/zarf-registry/zarf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ components:
architecture: amd64
files:
# Rust Injector Binary
- source: https://zarf-init-resources.s3.us-east-1.amazonaws.com/injector/###ZARF_PKG_TMPL_INJECTOR_VERSION###/zarf-injector-amd64
- source: https://###ZARF_PKG_TMPL_INJECTOR_DOMAIN###/injector/###ZARF_PKG_TMPL_INJECTOR_VERSION###/zarf-injector-amd64
target: "###ZARF_TEMP###/zarf-injector"
shasum: "###ZARF_PKG_TMPL_INJECTOR_AMD64_SHASUM###"
executable: true
Expand All @@ -126,7 +126,7 @@ components:
architecture: arm64
files:
# Rust Injector Binary
- source: https://zarf-init-resources.s3.us-east-1.amazonaws.com/injector/###ZARF_PKG_TMPL_INJECTOR_VERSION###/zarf-injector-arm64
- source: https://###ZARF_PKG_TMPL_INJECTOR_DOMAIN###/injector/###ZARF_PKG_TMPL_INJECTOR_VERSION###/zarf-injector-arm64
target: "###ZARF_TEMP###/zarf-injector"
shasum: "###ZARF_PKG_TMPL_INJECTOR_ARM64_SHASUM###"
executable: true
Expand Down
2 changes: 2 additions & 0 deletions site/src/content/docs/tutorials/7-custom-init-packages.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,8 @@ $ zarf package create . \
--set REGISTRY_IMAGE="opensource/registry" \
--set REGISTRY_IMAGE_DOMAIN="custom.enterprise.corp" \
--set GITEA_IMAGE="custom.enterprise.corp/opensource/gitea:v1.21.0-rootless"
--set GITEA_HELM_REPO="custom.enterprise.corp/charts"
--set INJECTOR_DOMAIN="custom.enterprise.corp/s3-proxy"
```

⚠️ - The Gitea image is different from the Agent and Registry in that Zarf will always prefer the `rootless` version of a given server image. The image no longer must be tagged with `-rootless`, but it still needs to implement the [Gitea configuration of a rootless image](https://github.com/go-gitea/gitea/blob/main/Dockerfile.rootless). If you need to change this, edit the `packages/gitea` package.
Expand Down
2 changes: 2 additions & 0 deletions zarf-config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ agent_image_tag = 'local'

# Tag for the zarf injector binary to use
injector_version = '2025-03-24'
injector_domain = 'zarf-init-resources.s3.us-east-1.amazonaws.com'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When I execute zarf dev inspect definition . at the root of the repository - I get the following for the injector

- 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
  only:
    cluster:
      architecture: arm64
  files:
  - source: packages/zarf-registry/https:/zarf-init-resources.s3.us-east-1.amazonaws.com/injector/2025-03-24/zarf-injector-arm64
    shasum: f68cf097ace34bdd04f6b1571a8d8ab4e04a27614dd7e752199ff09e21f4089b
    target: "###ZARF_TEMP###/zarf-injector"
    executable: true

We need to determine why this is malformed.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like it's adding prepending the source path with the path to the imported package, without first checking if the file is a URL

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah because templating happens after imports, Zarf doesn't see the file as a URL during imports and therefore adds the path to the imported component

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Created #3762 as the believed issue preventing this work from completion. We'll get it on our backlog - otherwise feel free to experiment with solutions in the PR if interested.

injector_amd64_shasum = 'a78d66b9e2b00a22edd9b4e6432a4d934621e3757f09493b12f688c7c9baca93'
injector_arm64_shasum = 'f68cf097ace34bdd04f6b1571a8d8ab4e04a27614dd7e752199ff09e21f4089b'

Expand All @@ -17,3 +18,4 @@ registry_image_tag = '3.0.0'

# The image reference to use for the optional git-server Zarf deploys
gitea_image = 'gitea/gitea:1.21.5-rootless'
gitea_helm_repo = 'dl.gitea.io/charts'