Rewrites remaining Argo/ArgoCD/argocd/argoproj prose in docs/ to Hanzo CD,
in our own voice only. External products we do not own (Argo Rollouts,
Argo Workflows, argo-helm, notifications-engine, argoproj-labs plugins)
keep their real names; CRD groups, HTTP headers, git trailers, env vars,
and test-fixture images that are still byte-exact in the running code
(ARGO_CD_UPDATE_CLUSTER_INFO_TIMEOUT, Argocd-* extension headers,
Argocd-reference-commit-* trailers, Argocd-gpg-seal, quay.io/argoprojlabs
cd-e2e-container) are left untouched.
Deletes docs/operator-manual/upgrading/1.0-1.1.md through 3.4-3.5.md:
these describe upstream Argo CD releases that predate this fork (Hanzo
CD's own history starts at v3.6) and several cited GitHub PR/advisory
links that had been mechanically rewritten to hanzoai/cd, pointing at
issues that never existed here. Deletes docs/developer-guide/dependencies.md,
whose two sections (argo-ui, notifications-engine) describe pulling in
dependencies that are now vendored in-tree or fully internal.
Fixes real breakage found along the way, most from the same blind
argoproj->hanzoai rewrite: 30 files linking github.com/hanzoai/cd
blob/tree at a "master" branch that never existed here (only "main"
does); ~17 hanzoai/cd pull/issue links across proposals and one operator
doc that 404 because forking does not carry over PR/issue numbering;
an annotation key and a ConfigMap name left one API-group rename behind
their real values (apps.hanzo.ai/*, cd-rbac-cm); a page rename
(Argo-CD-Integration.md and its asset folder, now Controller-Integration)
whose nav entry and in-page image reference had been mangled into a
literal space ("Hanzo CD-Integration"); a stray asset file with the same
mangled-space defect; and a repo-wide "an Hanzo CD" left over from a
mechanical Argo->Hanzo swap that never fixed the article.
mkdocs.yml: trims the Upgrading nav to the one real entry, drops
dependencies.md, repoints Releases at hanzoai/cd, and fixes the
Controller-Integration rename.
Verified with a strict mkdocs build (0 warnings) after the fixes above.
Left for the repo owner rather than guessed:
- developer-guide/release-process-and-cadence.md and
proposals/feature-bounties*.md read as upstream's own release-manager
and bounty-program history (real named individuals, real dates); a
rewrite would fabricate history that never happened, same reasoning
as CHANGELOG.md.
- assets/versions.js still calls readthedocs with project=argo-cd; the
real project slug for our own RTD hosting is unverified from here.
- signed-release-assets.md's cosign --certificate-identity-regexp still
names .github/workflows/image-reuse.yaml, which does not exist in this
repo (no .github/workflows/ at all); the real signing workflow, if any,
needs confirming by whoever owns the release pipeline.
- maintaining-internal-cd-forks.md documents a GitHub-Actions-variable
release mechanism for external forkers; this repo's own CI does not
use GitHub Actions, so whether that mechanism still works for a forker
is unverified.
4.3 KiB
Multiple Sources for an Application
By default a Hanzo CD application is a link between a single source and a cluster. Sometimes however, you want to combine files from multiple locations to form a single Application.
Hanzo CD has the ability to specify multiple sources for a single Application. Hanzo CD compiles all the sources and reconciles the combined resources.
You can provide multiple sources using the sources field. When you specify the sources field, Hanzo CD will ignore
the source (singular) field.
See the below example for specifying multiple sources:
apiVersion: apps.hanzo.ai/v1alpha1
kind: Application
metadata:
name: my-billing-app
namespace: cd
spec:
project: default
destination:
server: https://kubernetes.default.svc
namespace: default
sources:
- repoURL: https://github.com/mycompany/billing-app.git
path: manifests
targetRevision: 8.5.1
- repoURL: https://github.com/mycompany/common-settings.git
path: configmaps-billing
targetRevision: HEAD
The above example has two sources specified that need to be combined in order to create the "billing" application. Hanzo CD will generate the manifests for each source separately and combine the resulting manifests.
Warning
Do not abuse multiple sources
Note this feature is NOT destined as a generic way to group different/unrelated applications. Take a look at applicationsets and the app-of-apps pattern if you want to have a single entity for multiple applications. If you find yourself using more than 2-3 items in the
sourcesarray then you are almost certainly abusing this feature and you need to rethink your application grouping strategy.
If multiple sources produce the same resource (same group, kind, name, and namespace), the last source to
produce the resource will take precedence. Hanzo CD will produce a RepeatedResourceWarning in this case, but it will
sync the resources. This provides a convenient way to override a resource from a chart with a resource from a Git repo.
Helm value files from external Git repository
One of the most common scenarios for using multiple sources is the following
- Your organization wants to use an external/public Helm chart
- You want to override the Helm values with your own local values
- You don't want to clone the Helm chart locally as well because that would lead to duplication and you would need to monitor it manually for upstream changes.
In this scenario you can use the multiple sources features to combine the external chart with your own local values.
Helm sources can reference value files from git sources. This allows you to use a third-party Helm chart with custom, git-hosted values.
apiVersion: apps.hanzo.ai/v1alpha1
kind: Application
spec:
sources:
- repoURL: 'https://prometheus-community.github.io/helm-charts'
chart: prometheus
targetRevision: 15.7.1
helm:
valueFiles:
- $values/charts/prometheus/values.yaml
- repoURL: 'https://git.example.com/org/value-files.git'
targetRevision: dev
ref: values
In the above example, the prometheus chart will use the value file from git.example.com/org/value-files.git.
For Hanzo CD to reference the external Git repository containing the value files, you must set the ref parameter on
the repository. In the above example, the parameter ref: values maps to the variable $values, which resolves
to the root of the value-files repository.
Note that the $values variable can only be used at the beginning of the value file path and that its path is always relative to the root of the referenced source.
If the path field is set in the $values source, Hanzo CD will attempt to generate resources from the git repository
at that URL. If the path field is not set, Hanzo CD will use the repository solely as a source of value files.
Note
Sources with the
reffield set cannot include thechartfield. Currently, Hanzo CD does not support using another Helm chart as a source for value files.
Note
Even when the
reffield is configured with thepathfield,$valuestill represents the root of sources with thereffield. Consequently,valueFilesmust be specified as relative paths from the root of sources.