Skip to content

feat(argo): use the store as the Argo artifact repository #4769

Open

Description

@dan-petty

Update 2026-11-26 (infra move): the store side is in dan-petty/homelab.

  • Namespace devops already has backup-client: "true", and bucket argo-artifacts and its lifecycle exist there.
  • The argo key reaches namespace argo-workflows only. A copy into devops is the follow-up issue.
  • This issue keeps the k8s/devops/ ConfigMap, test template and egress rule. k8s/argo/ does not exist.

Follow-up: dan-petty/homelab#281.


Problem or Motivation

Argo Workflows has no artifact repository: the controller ConfigMap has no artifactRepository. The ArtifactRepository type of Argo Workflows v4.1.5 has no HTTP field, so a step that passes an output to the next step needs S3. No WorkflowTemplate declares an output today, so this item starts when the first one does.

Proposed Solution & Architectural Design

  • ConfigMap artifact-repositories with the default annotation in namespace devops (after feat(k8s): let Argo Workflows run roadmap pods in devops #4566), and the Secret of the argo key from a ClusterSecret row (keyring).
  • Target: bucket argo-artifacts on the S3 gateway Service, port 8333, path style, the region set explicitly. A keyFormat and archiveLogs: false (Loki keeps the logs).
  • An egress rule from the workflow pods to object-store on 8333.
  • No artifactGC: argoproj/argo-workflows#15765 reports a GC loop on SeaweedFS for directory artifacts (archive: none). The 7-day lifecycle rule of argo-artifacts (feat(k8s): apply store buckets, keys and rules from git #4756) removes old objects.

Target Subsystem

Kubernetes & Minikube Automation (k8s/devops/, the devops namespace).

Existing Tool Considered

The S3 artifact repository of Argo Workflows (Apache-2.0) on the store of #4742. No custom code. Rejected: an OCI or HTTP artifact repository (the ArtifactRepository type has no HTTP field, and Argo has no OCI artifact type).

Acceptance Criteria

  • A test Workflow passes a file output artifact and a directory output artifact (archive: none) from one step to the next.
  • An invariant test shows that no Workflow or WorkflowTemplate sets artifactGC.
  • The BucketLifecyclePolicy of argo-artifacts has a 7-day Expiration, and the lifecycle expiry check of the store passes.
  • kubectl get cm -n devops artifact-repositories shows the ConfigMap with the default annotation.

Dependencies

Source: #4742

Alternatives check of 2026-11-26: in-use.
The repository already uses this tool.
Tool: argoproj/argo-workflows (https://github.com/argoproj/argo-workflows), Apache-2.0, last activity 2026-11-26, maintained.
Reason: Searches returned only unrelated pages, but the repository facts and README show Argo Workflows ships S3 artifact support and step-level output artifacts; the item only configures that built-in repository, adding no code.

Covers:

  • S3 artifact repository set in ConfigMap artifact-repositories
  • File and directory outputs passed between steps
  • secretKeyRef credentials, path style, insecure endpoint, keyFormat

Lacks:

  • No artifactGC; expiry relies on the bucket lifecycle rule
  • No HTTP or OCI artifact repository type in v4.1.5
  • Needs the argo key Secret from dan-petty/homelab#98 before the live pass

Proposed design

Problem statement

Argo Workflows in namespace devops has no artifact repository. One step cannot pass an output artifact to the next. The ArtifactRepository type of Argo Workflows v4.1.5 has no HTTP field, so the S3 gateway of the SeaweedFS store is the target. This repository adds ConfigMap artifact-repositories and WorkflowTemplate argo-artifacts-test under k8s/devops/. It adds the egress rule to the store on port 8333 and the offline k8s gate checks. The store side, the backup-client label and the 7-day lifecycle of bucket argo-artifacts live in dan-petty/homelab.

Acceptance criteria

Requirement: Artifact repository files are in the kustomization

The k8s/devops/kustomization.yaml SHALL list artifact-repositories.yaml and workflowtemplate-argo-artifacts-test.yaml in its resources.

Scenario: The k8s row asserts both file names

  • WHEN The validator command uv run devops ci --check --only k8s runs on the change.
  • THEN The k8s row passes and prints 0 failed, because the argo_artifacts check finds both file names in the resources of k8s/devops/kustomization.yaml.

Requirement: Artifact repository ConfigMap and default annotation

ConfigMap artifact-repositories in namespace devops SHALL hold one repository entry under data key default and the annotation workflows.argoproj.io/default-artifact-repository: default.

Scenario: The k8s row asserts the ConfigMap and its default annotation

  • WHEN The validator command uv run devops ci --check --only k8s runs on the change.
  • THEN The k8s row passes and prints 0 failed, because the argo_artifacts check finds the ConfigMap, its data key default and its default annotation.

Requirement: S3 endpoint and object settings

The default entry MUST name bucket argo-artifacts at seaweedfs-s3.object-store.svc.cluster.local on port 8333, with s3ForcePathStyle: true, insecure: true, a non-empty region, a keyFormat and archiveLogs: false.

Scenario: The k8s row asserts the endpoint and object settings

  • WHEN The validator command uv run devops ci --check --only k8s runs on the change.
  • THEN The k8s row passes and prints 0 failed. The argo_artifacts checks report no problem on the bucket, the endpoint, the port, the path style, the region, the keyFormat and archiveLogs: false.

Requirement: Credentials from a Secret

The default entry MUST read both S3 keys from a Secret of namespace devops through accessKeySecret and secretKeySecret, with no literal key value.

Scenario: The k8s row asserts the secret key selectors

  • WHEN The validator command uv run devops ci --check --only k8s runs on the change.
  • THEN The k8s row passes and prints 0 failed. The argo_artifacts checks find accessKeySecret and secretKeySecret with a name and a key, and no literal accessKey or secretKey value.

Requirement: Test WorkflowTemplate declares both artifact types

WorkflowTemplate argo-artifacts-test in k8s/devops/ SHALL declare a file output, a directory output with archive: none, and both as inputs in a second step.

Scenario: The k8s row asserts both artifacts in both steps

  • WHEN The validator command uv run devops ci --check --only k8s runs on the change.
  • THEN The k8s row passes and prints 0 failed. argo lint --offline accepts the template. The argo_artifacts checks find the file output, the directory output with archive: none and both inputs in the second step.

Requirement: No artifact garbage collection

Every Workflow and WorkflowTemplate under k8s/ MUST leave artifactGC unset.

Scenario: The k8s row finds no artifactGC

  • WHEN The validator command uv run devops ci --check --only k8s runs on the change.
  • THEN The k8s row passes and prints 0 failed. The argo_artifacts check reports no artifactGC in a rendered Workflow or WorkflowTemplate.

Requirement: Egress to the object store

NetworkPolicy devops-default-perimeter-egress in k8s/devops/networkpolicy.yaml SHALL allow egress to namespace object-store on TCP port 8333.

Scenario: The k8s row asserts the egress rule

  • WHEN The validator command uv run devops ci --check --only k8s runs on the change.
  • THEN The k8s row passes and prints 0 failed. The argo_artifacts check finds the rule to the object-store namespace selector on TCP 8333, and the other rules are unchanged.

Requirement: Deploy stack names the new files

The devops entry of PRODUCT_POST_HELM_BY_STACK SHALL name artifact-repositories.yaml and workflowtemplate-argo-artifacts-test.yaml.

Scenario: The k8s row asserts the deploy-stack table

  • WHEN The validator command uv run devops ci --check --only k8s runs on the change.
  • THEN The k8s row passes and prints 0 failed. The argo_artifacts check finds both paths in the devops entry of PRODUCT_POST_HELM_BY_STACK.

Requirement: Pending a person after the merge

The cluster SHALL show ConfigMap artifact-repositories with the default annotation, and the test WorkflowTemplate SHALL pass both outputs to the second step.

Scenario: The live ConfigMap and Workflow checks pass

  • WHEN A person runs kubectl get cm -n devops artifact-repositories -o yaml. The person runs the live check argo submit -n devops --from workflowtemplate/argo-artifacts-test --wait. Both run after feat(k8s): let Argo Workflows run roadmap pods in devops #4566 and dan-petty/homelab#281.
  • THEN The ConfigMap shows data key default and the default annotation. The Workflow succeeds, and the second step reads the file output and the directory output.

Existing Tool Considered

argoproj/argo-workflows is Apache-2.0 and maintained. The verdict is in-use. The alternatives check of 2026-11-26 in the issue body names the tool and lists what it covers and lacks. The proposal adds no artifact-repository code. It configures the built-in S3 repository, adds WorkflowTemplate argo-artifacts-test to prove it, and adds one gate-check module for the offline proof. For the missing artifactGC, expiry comes from the 7-day lifecycle rule of bucket argo-artifacts in dan-petty/homelab. The live pass waits for the Secret that dan-petty/homelab#281 copies into devops.

Key questions

  • Does the store side of the item still need work in this repository?: No. The store manifests, their k8s row checks and the build test moved to dan-petty/homelab (refactor(k8s): delete the environment files from devops-cli #7290), and ADR 0034 records that move. A tracked file under k8s/ must be in k8s/devops or be Markdown. A namespace label or a bucket lifecycle rule cannot live here. The body update of 2026-11-26 records that the label backup-client: "true" and the 7-day lifecycle of argo-artifacts already exist there. This repository adds the ConfigMap, the test WorkflowTemplate, the egress rule and the gate checks only. [sources: docs/adr/0034-the-object-store-is-seaweedfs-with-its-operator.md, tests/gate/k8s_checks/product_tree.py, k8s/README.md]
  • Which artifact repository serves the Argo workflows?: The S3 artifact repository built into Argo Workflows serves the workflows. A Workflow selects it through ConfigMap artifact-repositories. ADR 0034 records the SeaweedFS store as the object store. The alternatives check of 2026-11-26 gives the verdict in-use for argoproj/argo-workflows. The item adds no artifact-repository code. (best practice) [sources: docs/adr/0034-the-object-store-is-seaweedfs-with-its-operator.md]
    • Chosen: S3 artifact repository of Argo Workflows. The installed controller ships it, and ADR 0034 makes the store the object store.
    • Rejected: OCI artifact repository. The ArtifactRepository type of v4.1.5 has no OCI artifact type, as the alternatives block records.
    • Rejected: HTTP artifact repository. The ArtifactRepository type of v4.1.5 has no HTTP field, as the issue body states.
    • Rejected: Custom artifact repository sidecar. It builds code that the installed tool already ships.
  • Where does the ConfigMap live, and how do the workflows select it?: The ConfigMap lives in k8s/devops/artifact-repositories.yaml, in namespace devops. It holds one entry under data key default and the annotation workflows.argoproj.io/default-artifact-repository: default. A Workflow of namespace devops reads that default repository without its own reference. (best practice) [sources: k8s/devops/kustomization.yaml, k8s/README.md]
    • Chosen: Per-namespace ConfigMap in devops with the default annotation. Every Workflow of devops reads it, and no Workflow names the repository.
    • Rejected: The artifactRepository key of the controller ConfigMap. It gives one repository to all namespaces, and the workflows run in devops.
    • Rejected: An artifactRepositoryRef in each Workflow. Every Workflow must name the repository, which the default annotation avoids.
  • How do the S3 credentials reach the artifact repository?: The entry uses accessKeySecret and secretKeySecret to the Secret that dan-petty/homelab#281 copies into namespace devops. The entry holds no literal key value. CLUSTER_SECRETS holds no row for a store key, because the cluster-secrets-loader spec forbids a row whose name starts with object-store-. The implementer reads the Secret name and the two key names from that issue. (best practice) [sources: openspec/specs/cluster-secrets-loader/spec.md, src/devops_cli/k8s/cluster_secrets.py]
    • Chosen: Secret selector to the Secret that homelab copies into devops. The store keys stay out of the keyring, and the ConfigMap stays readable.
    • Rejected: A CLUSTER_SECRETS row in the keyring. The cluster-secrets-loader spec forbids a row whose name starts with object-store-.
    • Rejected: Literal keys in the ConfigMap. It puts a credential in a ConfigMap that many persons read.
  • Which bucket and endpoint settings does the entry use?: The entry uses bucket argo-artifacts at Service seaweedfs-s3 in namespace object-store, port 8333, over HTTP. It sets s3ForcePathStyle: true, insecure: true, a non-empty region, a keyFormat and archiveLogs: false. The issue body sets port 8333 and path style, and ADR 0034 records the SeaweedFS store. Loki keeps the logs, so the entry sets archiveLogs: false. (best practice) [sources: docs/adr/0034-the-object-store-is-seaweedfs-with-its-operator.md, openspec/changes/archive/2026-11-22-4756-store-buckets-from-git/specs/object-store/spec.md]
    • Chosen: Path style on the seaweedfs-s3 Service over HTTP. The store serves S3 on that Service and port, so the entry sets insecure: true.
    • Rejected: A virtual-host address of the bucket. The gateway has no DNS name for each bucket.
    • Rejected: archiveLogs: true. Loki keeps the logs, so the bucket would hold a second copy.
  • Does the item set artifactGC?: No. Bucket argo-artifacts has a lifecycle rule that expires each object after 7 days, so the repository leaves artifactGC unset. The alternatives check of 2026-11-26 records that the tool lacks artifactGC. The cause is a GC loop on SeaweedFS for directory artifacts (argoproj/argo-workflows#15765). (best practice) [sources: openspec/changes/archive/2026-11-22-4756-store-buckets-from-git/specs/object-store/spec.md]
    • Chosen: No artifactGC, with the 7-day bucket lifecycle. The lifecycle expires each object, and the executor Role stays narrow.
    • Rejected: artifactGC on completion. It enters the GC loop that the alternatives block records for directory artifacts on SeaweedFS.
  • Does the item wait for the first WorkflowTemplate that declares an output?: No. The item ships WorkflowTemplate argo-artifacts-test in k8s/devops/ with a file output and a directory output with archive: none. The template proves the repository itself. A WorkflowTemplate runs only when a person submits it, and a committed Workflow would run on each sync. (best practice) [sources: k8s/devops/kustomization.yaml, k8s/README.md]
    • Chosen: Ship a test WorkflowTemplate with both artifact types. The repository is tested now, and a template runs only when a person submits it.
    • Rejected: Wait for a production WorkflowTemplate with an output. The item then stalls, and the repository stays untested.
    • Rejected: Ship a committed Workflow. Argo CD applies it, so it runs on every sync.
  • Where does the egress rule to the store go?: The rule goes into NetworkPolicy devops-default-perimeter-egress in k8s/devops/networkpolicy.yaml. It is a rule to the object-store namespace selector on TCP port 8333, in the shape of its existing namespace-selector rules. Namespace devops already carries backup-client: "true" in dan-petty/homelab, so the store admits it. No label change is needed here. (best practice) [sources: k8s/devops/networkpolicy.yaml, docs/adr/0034-the-object-store-is-seaweedfs-with-its-operator.md]
    • Chosen: Add the rule to devops-default-perimeter-egress. The policy selects the workflow pods, and it already carries the namespace-selector rules.
    • Rejected: A second NetworkPolicy for the same pods. Two policies that select the same pods are harder to read.
    • Rejected: Name namespace devops in the store's ingress policy. That file is an environment file of dan-petty/homelab, not of this repository.
  • Must deploy-stack apply the new files on a cluster without Argo CD?: Yes. k8s/README.md requires each product manifest in PRODUCT_MANIFESTS_BY_STACK or PRODUCT_POST_HELM_BY_STACK. The WorkflowTemplate needs the CRD that the chart installs. So both files go in the devops entry of PRODUCT_POST_HELM_BY_STACK, after the charts. (best practice) [sources: k8s/README.md, src/devops_cli/commands/k8s/stack_lifecycle.py:387, tests/gate/k8s_checks/deploy_stack.py]
    • Chosen: Add both files to the devops entry of PRODUCT_POST_HELM_BY_STACK. The WorkflowTemplate needs the chart CRD, and that entry already holds the WorkflowTemplates of the base.
    • Rejected: Add them to PRODUCT_MANIFESTS_BY_STACK. That table runs before the charts, so the WorkflowTemplate CRD does not exist yet.
    • Rejected: Register them nowhere. A cluster without Argo CD then gets neither object, which k8s/README.md forbids.
  • How do the offline checks run?: A new module tests/gate/k8s_checks/argo_artifacts.py runs in the k8s row of uv run devops ci. It renders k8s/devops/ and asserts the ConfigMap, the test WorkflowTemplate, the egress rule, the absence of artifactGC and the apply paths. The row prints only the failures and a k8s: <n> cases, <m> failed line, so the proof is 0 failed. The artifact pass is the live argo submit of the template. (best practice) [sources: tests/gate/k8s_checks/network_policies.py, tests/gate/k8s_checks/deploy_stack.py, tests/gate/k8s_checks/product_tree.py]
    • Chosen: A new gate-check module beside the other k8s_checks modules, plus the live check. The k8s row renders the kustomizations, and the cluster result needs a live check.
    • Rejected: Pytest tests that read the manifests. The proof of a manifest is a validator command, not a test that reads the file.
    • Rejected: Extend tests/gate/k8s_checks/network_policies.py. That module asserts other NetworkPolicy facts, not a ConfigMap or a WorkflowTemplate.

Fit

Fits in one pull request.

Suspected block

dan-petty/homelab#281 must copy the Secret of the argo key into namespace devops. The entry reads that Secret name, and the live artifact pass needs it.

Dependencies

#4566

Activity

  1. added
    source/agent
    on Nov 11, 2026
  2. added
    type/feature
    scope/argo
    status/new
    value/medium
    effort/medium
    on Nov 11, 2026
  3. dan-petty commented on Nov 11, 2026

    @dan-petty
    OwnerAuthor

    Intake placed this item to the backlog: intake puts every new item in the backlog. A person plans the milestones.

    • Type: type/feature. The feat prefix of the title gives the type.
    • Scope: scope/argo. The (argo) scope of the title gives the scope.
    • Priority: P2-Medium. It enables artifact passing but only becomes active when the first WorkflowTemplate declares an output.
    • Value: Medium. It unblocks workflows that need to pass file or directory outputs between steps.
    • Effort: Medium. It requires a ConfigMap, Secret, egress rule, lifecycle policy, and acceptance tests.
    • Related: feat(k8s): let Argo Workflows run roadmap pods in devops #4566, which asks for a different change. Both items configure Argo Workflows in the devops namespace; #4566 lets pods run there, while this item adds the artifact repository for step-to-step file passing.
  4. added
    priority/p2-medium
    on Nov 11, 2026
  5. devops-cli-service commented on Nov 14, 2026

    @devops-cli-service
    Contributor

    Alternatives check: in-use

    Reason: The issue needs an artifact repository so a step can pass file and directory outputs to the next, and it already names the S3 artifact repository of Argo Workflows (Apache-2.0) as the tool considered. Argo Workflows itself ships that repository (the artifact-repositories ConfigMap / controller artifactRepository with an S3 backend, keyFormat, archiveLogs and archive modes), so one tool covers the whole need; the searches returned no better alternative.

    The repository already uses this tool.

    Tool: argoproj/argo-workflows (https://github.com/argoproj/argo-workflows)

    • License: Apache-2.0
    • Last activity: 2026-11-14
    • Maintained: yes

    Covers:

    • A built-in S3-compatible artifact repository, configured through the artifact-repositories ConfigMap with a default annotation in the target namespace
    • File and directory output artifacts passed from one workflow step to the next
    • The keyFormat, archiveLogs: false and archive: none settings the item asks for, with no custom code

    Lacks:

    • No HTTP field in the ArtifactRepository type and no OCI artifact type, so an HTTP or OCI repository is not an option (the item already rejects those)
    • A known GC loop on SeaweedFS for directory artifacts (argoproj/argo-workflows#15765), which is why the item drops artifactGC

    Tools considered:

    Searches run:

    • argoproj/argo-workflows GitHub repository, results: 5
    • Argo Workflows artifact repository S3 configure, results: 5
    • argo-workflows.readthedocs.io artifact repository, results: 5
    • argoproj argo-workflows github, results: 5
    • Argo Workflows documentation, results: 5
    • argo workflows artifact-repositories configmap default s3 keyFormat, results: 5

    Sources:

    Checked on 2026-11-14. A person decides what this means for the item. The check changes no label and closes no issue.

  6. devops-cli-service commented on Nov 15, 2026

    @devops-cli-service
    Contributor

    Refine cannot set this item to Ready at e5dfddb while the items below stay open. The next refine round looks at the item again when they close, or when a person replies in a comment or edits the body.

    The next refine round also looks at the item again when a commit on the default branch changes one of these files: k8s/argo-workflows/values.yaml.

  7. devops-cli-service commented on Nov 21, 2026

    @devops-cli-service
    Contributor

    Next step: the open items close, or a person replies in a comment or edits the body. See Dependencies in the section Proposed design of the body.

  8. dan-petty commented on Nov 22, 2026

    @dan-petty
    OwnerAuthor

    Dependency correction (2026-11-22): #4756 closed with PR #6724, which made only the buckets reports, reports-private, cache and argo-artifacts, with no S3Identity and no key. Its operator watches only object-store and cannot write a key Secret into another namespace. The tenant chart of dan-petty/infra#14 renders only for a services entry, not for a platform namespace. Live: 0 S3Identity and 0 S3Credentials objects, and no store key Secret in gitea. The backup buckets and writer keys of the platform namespaces now come with dan-petty/homelab#98 (External Secrets Operator copies each key from object-store). I changed the Dependencies section of this item to name it.

  9. devops-cli-service commented on Nov 22, 2026

    @devops-cli-service
    Contributor

    Owner question: See the first point of Open questions and Watched files in the section Proposed design of the body.

    Options

    1. Decide the question: The job refines the item with your answer.
    2. Leave it to the job: The job records the best-practice answer and goes on.

    Recommendation: Decide the question: only a person can answer it.

    Evidence

  10. devops-cli-service commented on Nov 26, 2026

    @devops-cli-service
    Contributor

    Next step: the open items close, or a person replies in a comment or edits the body. See Dependencies and Watched files in the section Proposed design of the body.

  11. devops-cli-service commented on Nov 27, 2026

    @devops-cli-service
    Contributor

    Next step: the open items close, or a person replies in a comment or edits the body. See Dependencies in the section Proposed design of the body.

  12. devops-cli-service commented on Dec 1, 2026

    @devops-cli-service
    Contributor

    Owner question: See Suspected block in the section Proposed design of the body.

    Options

    1. Decide the question: The job refines the item with your answer.
    2. Leave it to the job: The job records the best-practice answer and goes on.

    Recommendation: Decide the question: only a person can answer it.

    Evidence

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    effort/mediumpriority/p2-mediumscope/argosource/agentstatus/newtype/featurevalue/medium

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions