Skip to content

Add tufcli to cli-stacks configuration - #561

Merged
sampras343 merged 1 commit into
mainfrom
add-tufcli-to-cli-stacks
Jul 21, 2026
Merged

Add tufcli to cli-stacks configuration#561
sampras343 merged 1 commit into
mainfrom
add-tufcli-to-cli-stacks

Conversation

@sampras343

@sampras343 sampras343 commented Jul 21, 2026

Copy link
Copy Markdown
Member

Summary

  • Add tufcli-cli-stack component to the cli-stacks project with nudge to client-server
  • Create tufcli project overlay to manage core tufcli and tufcli-init components with nudge configuration
  • Add tufcli development stream

Nudge chain

tufcli (core) → tufcli-cli-stack → client-server

Test plan

  • Verify kustomize build succeeds for dev and prod overlays
  • Confirm tufcli Application and Components are patched with build-nudges-ref after apply
  • Validate tufcli-cli-stack component is created under cli-stacks application

Ref: SECURESIGN-5054

Add tufcli-cli-stack component to the cli-stacks project with nudge
to client-server, and create the tufcli project overlay to manage
the core tufcli and tufcli-init components with nudge configuration
(tufcli -> tufcli-cli-stack -> client-server -> operator).

Ref: SECURESIGN-5054

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@qodo-for-securesign

Copy link
Copy Markdown

PR Summary by Qodo

Add tufcli project overlay, dev stream, and cli-stacks component nudge chain

✨ Enhancement ⚙️ Configuration changes 🕐 40+ Minutes

Grey Divider

AI Description

• Register a new tufcli project overlay under the base project kustomization.
• Add tufcli-cli-stack to the cli-stacks template with build nudge to client-server.
• Introduce a tufcli development stream and template for tufcli/tufcli-init components.
Diagram

graph TD
  A["base/project/kustomization.yaml"] --> B["overlay/tufcli (kustomization)"] --> C["tufcli-template"]
  C --> D(["Component: tufcli"]) --> E(["Component: tufcli-cli-stack"]) --> F(["Component: client-server"]) --> G(["Component: rhtas-operator"])
  C --> H(["Component: tufcli-init"]) --> G
  I["tufcli dev stream"] --> C
Loading
High-Level Assessment

The following are alternative approaches to this PR:

1. Manage tufcli-cli-stack inside the tufcli overlay (not cli-stacks)
  • ➕ Keeps all tufcli-owned components in a single project overlay
  • ➕ Avoids coupling tufcli onboarding to the cli-stacks template structure
  • ➖ May blur ownership boundaries if cli-stacks is the canonical home for stack components
  • ➖ Would require duplicating cli-stacks conventions/pipelines in the tufcli overlay
2. Create a reusable patch/component snippet for SBOM webhook ImageRepositories
  • ➕ Reduces duplication across overlays for Bombino webhook notifications
  • ➕ Makes future component onboarding more consistent and less error-prone
  • ➖ Introduces an abstraction layer that may be harder to understand/debug
  • ➖ Not necessary unless many more components will be added soon
3. Use a single nudge target (top-level) instead of a multi-hop chain
  • ➕ Simpler mental model and fewer cross-project dependencies
  • ➕ Fewer places to update if downstream naming changes
  • ➖ Loses the intentional staged propagation (tufcli → cli-stack → client-server → operator)
  • ➖ May cause broader rebuilds than desired when only an intermediate needs rebuilding

Recommendation: The current approach is reasonable: cli-stacks remains the place where stack components are injected, while the new tufcli overlay cleanly owns tufcli/tufcli-init and wires the intended staged build-nudge chain. Unless reuse pressure emerges, avoid over-abstracting the SBOM webhook pattern for now; focus review on validating naming/templating and that the nudge chain matches the intended rollout semantics.

Files changed (10) +208 / -0

Enhancement (3) +126 / -0
tufcli-cli-stack.yamlAdd tufcli-cli-stack Component and ImageRepository with build nudge +44/-0

Add tufcli-cli-stack Component and ImageRepository with build nudge

• Introduces a new Component definition for 'tufcli-cli-stack' sourcing from the securesign/tufcli repo and Dockerfile, and nudging 'client-server'. Adds an ImageRepository for the component with public visibility and SBOM webhook notification.

konflux-configs/base/project/overlay/cli-stacks/patch/tufcli-cli-stack.yaml

tufcli-init.yamlDefine tufcli-init Component/ImageRepository and nudge to rhtas-operator +41/-0

Define tufcli-init Component/ImageRepository and nudge to rhtas-operator

• Adds a tufcli-init Component sourced from securesign/tufcli with its Dockerfile and a build-nudge target of 'rhtas-operator'. Adds a corresponding public ImageRepository with SBOM webhook notifications.

konflux-configs/base/project/overlay/tufcli/patch/tufcli-init.yaml

tufcli.yamlDefine tufcli Component/ImageRepository and nudge to tufcli-cli-stack +41/-0

Define tufcli Component/ImageRepository and nudge to tufcli-cli-stack

• Adds the core tufcli Component sourced from securesign/tufcli and configures build nudging to 'tufcli-cli-stack'. Adds a corresponding public ImageRepository with SBOM webhook notifications.

konflux-configs/base/project/overlay/tufcli/patch/tufcli.yaml

Other (7) +82 / -0
kustomization.yamlRegister new tufcli overlay in base project resources +1/-0

Register new tufcli overlay in base project resources

• Adds 'overlay/tufcli' to the base project kustomization resources so the tufcli project overlay is included during builds.

konflux-configs/base/project/kustomization.yaml

kustomization.yamlPatch cli-stacks template to include tufcli-cli-stack resources +4/-0

Patch cli-stacks template to include tufcli-cli-stack resources

• Extends the cli-stacks overlay patches to apply the new 'tufcli-cli-stack.yaml' patch against the 'cli-stacks-template' ProjectDevelopmentStreamTemplate.

konflux-configs/base/project/overlay/cli-stacks/kustomization.yaml

kustomization.yamlCreate tufcli overlay wiring template + component patches +20/-0

Create tufcli overlay wiring template + component patches

• Adds a new kustomization overlay that brings in the tufcli Project and DevelopmentStreamTemplate and applies patches to add 'tufcli' and 'tufcli-init' resources. Reuses common EC and release-plan components.

konflux-configs/base/project/overlay/tufcli/kustomization.yaml

project.yamlAdd tufcli Project metadata +8/-0

Add tufcli Project metadata

• Introduces the 'tufcli' Project resource with display name and a short description of the CLI utility.

konflux-configs/base/project/overlay/tufcli/project.yaml

template.yamlAdd tufcli ProjectDevelopmentStreamTemplate with variables + Application +33/-0

Add tufcli ProjectDevelopmentStreamTemplate with variables + Application

• Creates the 'tufcli-template' development stream template, defining variables like version/branch/nameSuffix and an Application resource. Establishes the templating foundation that the component patches append to.

konflux-configs/base/project/overlay/tufcli/template.yaml

kustomization.yamlInclude tufcli development stream in rhtas base stream set +1/-0

Include tufcli development stream in rhtas base stream set

• Adds 'tufcli-stream.yaml' to the rhtas base stream kustomization so the tufcli stream is applied as part of the stream bundle.

konflux-configs/base/stream/rhtas/base/kustomization.yaml

tufcli-stream.yamlCreate tufcli ProjectDevelopmentStream bound to tufcli-template +15/-0

Create tufcli ProjectDevelopmentStream bound to tufcli-template

• Defines the 'tufcli' ProjectDevelopmentStream using 'tufcli-template' and sets default values targeting the 'main' branch/version with an empty nameSuffix.

konflux-configs/base/stream/rhtas/base/tufcli-stream.yaml

@github-actions

Copy link
Copy Markdown

Configuration Diff

6 document(s) impacted:

+ 5 added
- 0 removed
! 1 modified
Diff
@@ spec.resources @@
# projctl.konflux.dev/v1beta1/ProjectDevelopmentStreamTemplate/rhtas-tenant/cli-stacks-template
! + two list entries added:
+   - apiVersion: appstudio.redhat.com/v1alpha1
+     kind: Component
+     metadata:
+       name: tufcli-cli-stack{{.nameSuffix}}
+       annotations:
+         build.appstudio.openshift.io/pipeline: "{\"name\":\"docker-build-oci-ta\",\"bundle\":\"latest\"}"
+         git-provider: github
+         git-provider-url: "https://github.com"
+         mintmaker.appstudio.redhat.com/disabled: {{.mintmakerDisabled}}
+     spec:
+       source:
+         git:
+           url: "https://github.com/securesign/tufcli"
+           dockerfileUrl: Dockerfile.cli-stack.rh
+           revision: {{.branch}}
+       application: {{.application}}{{.nameSuffix}}
+       componentName: tufcli-cli-stack
+       build-nudges-ref:
+       - client-server{{.nameSuffix}}
+   - apiVersion: appstudio.redhat.com/v1alpha1
+     kind: ImageRepository
+     metadata:
+       name: tufcli-cli-stack{{.nameSuffix}}
+       annotations:
+         image-controller.appstudio.redhat.com/update-component-image: "true"
+       labels:
+         appstudio.redhat.com/application: {{.application}}{{.nameSuffix}}
+         appstudio.redhat.com/component: tufcli-cli-stack{{.nameSuffix}}
+     spec:
+       image:
+         name: rhtas-tenant/tufcli-cli-stack
+         visibility: public
+       notifications:
+       - config:
+           url: "https://bombino.api.redhat.com/v1/sbom/quay/push"
+         event: repo_push
+         method: webhook
+         title: SBOM-event-to-Bombino

@@ (root level) @@
# projctl.konflux.dev/v1beta1/Project/rhtas-tenant/tufcli
! + one document added:
+   ---
+   apiVersion: projctl.konflux.dev/v1beta1
+   kind: Project
+   metadata:
+     name: tufcli
+     namespace: rhtas-tenant
+   spec:
+     description: |
+       tufcli is a Go command-line utility for generating and signing TUF repositories.
+       
+     displayName: tufcli

@@ (root level) @@
# projctl.konflux.dev/v1beta1/ProjectDevelopmentStream/rhtas-tenant/tufcli-main
! + one document added:
+   ---
+   apiVersion: projctl.konflux.dev/v1beta1
+   kind: ProjectDevelopmentStream
+   metadata:
+     name: tufcli-main
+     namespace: rhtas-tenant
+   spec:
+     project: tufcli
+     template:
+       name: tufcli-template
+       values:
+       - name: version
+         value: main
+       - name: branch
+         value: main
+       - name: nameSuffix
+         value:

@@ (root level) @@
# projctl.konflux.dev/v1beta1/ProjectDevelopmentStream/rhtas-tenant/tufcli-v1-3
! + one document added:
+   ---
+   apiVersion: projctl.konflux.dev/v1beta1
+   kind: ProjectDevelopmentStream
+   metadata:
+     name: tufcli-v1-3
+     namespace: rhtas-tenant
+   spec:
+     project: tufcli
+     template:
+       name: tufcli-template
+       values:
+       - name: version
+         value: v1.3
+       - name: branch
+         value: release-1.3

@@ (root level) @@
# projctl.konflux.dev/v1beta1/ProjectDevelopmentStream/rhtas-tenant/tufcli-v1-4
! + one document added:
+   ---
+   apiVersion: projctl.konflux.dev/v1beta1
+   kind: ProjectDevelopmentStream
+   metadata:
+     name: tufcli-v1-4
+     namespace: rhtas-tenant
+   spec:
+     project: tufcli
+     template:
+       name: tufcli-template
+       values:
+       - name: version
+         value: v1.4
+       - name: branch
+         value: release-1.4
+       - name: modelTransparencyBranch
+         value: tech-preview

@@ (root level) @@
# projctl.konflux.dev/v1beta1/ProjectDevelopmentStreamTemplate/rhtas-tenant/tufcli-template
! + one document added:
+   ---
+   apiVersion: projctl.konflux.dev/v1beta1
+   kind: ProjectDevelopmentStreamTemplate
+   metadata:
+     name: tufcli-template
+     namespace: rhtas-tenant
+     labels:
+       build.rhtas.com/ec: registry-rhtas
+       build.rhtas.com/type: component
+   spec:
+     resources:
+     - apiVersion: appstudio.redhat.com/v1alpha1
+       kind: Application
+       metadata:
+         name: {{.application}}{{.nameSuffix}}
+         annotations:
+           application.thumbnail: 5
+       spec:
+         displayName: "tufcli ({{.version}})"
+     - apiVersion: appstudio.redhat.com/v1beta2
+       kind: IntegrationTestScenario
+       metadata:
+         name: {{.application}}{{.nameSuffix}}-enterprise-contract
+         annotations:
+           test.appstudio.openshift.io/kind: enterprise-contract
+       spec:
+         application: {{.application}}{{.nameSuffix}}
+         params:
+         - name: POLICY_CONFIGURATION
+           value: rhtap-releng-tenant/registry-rhtas
+         resolverRef:
+           params:
+           - name: url
+             value: "https://github.com/konflux-ci/build-definitions"
+           - name: revision
+             value: main
+           - name: pathInRepo
+             value: pipelines/enterprise-contract.yaml
+           resolver: git
+           resourceKind: pipeline
+     - apiVersion: appstudio.redhat.com/v1alpha1
+       kind: ReleasePlan
+       metadata:
+         name: promote-to-candidate-{{.application}}{{.nameSuffix}}
+         labels:
+           release.appstudio.openshift.io/auto-release: "true"
+           release.appstudio.openshift.io/standing-attribution: "true"
+       spec:
+         application: {{.application}}{{.nameSuffix}}
+         tenantPipeline:
+           params:
+           - name: git-url
+             value: "https://github.com/securesign/releases"
+           - name: revision
+             value: RHTAS-build-bot_candidate-images-{{.version}}
+           - name: code-freeze
+             value: "false"
+           - name: type
+             value: component
+           pipelineRef:
+             params:
+             - name: url
+               value: "https://github.com/securesign/pipelines"
+             - name: revision
+               value: main
+             - name: pathInRepo
+               value: pipelines/promote-to-candidate.yaml
+             resolver: git
+           serviceAccountName: rhtas-build-bot
+     - apiVersion: appstudio.redhat.com/v1alpha1
+       kind: Component
+       metadata:
+         name: tufcli{{.nameSuffix}}
+         annotations:
+           build.appstudio.openshift.io/pipeline: "{\"name\":\"docker-build-oci-ta\",\"bundle\":\"latest\"}"
+           git-provider: github
+           git-provider-url: "https://github.com"
+           mintmaker.appstudio.redhat.com/disabled: {{.mintmakerDisabled}}
+       spec:
+         source:
+           git:
+             url: "https://github.com/securesign/tufcli"
+             dockerfileUrl: Dockerfile.rh
+             revision: {{.branch}}
+         application: {{.application}}{{.nameSuffix}}
+         componentName: tufcli
+         build-nudges-ref:
+         - tufcli-cli-stack{{.nameSuffix}}
+     - apiVersion: appstudio.redhat.com/v1alpha1
+       kind: ImageRepository
+       metadata:
+         name: imagerepository-for-{{.application}}{{.nameSuffix}}-tufcli
+         labels:
+           appstudio.redhat.com/component: tufcli{{.nameSuffix}}
+       spec:
+         image:
+           name: rhtas-tenant/tufcli
+           visibility: public
+         notifications:
+         - config:
+             url: "https://bombino.api.redhat.com/v1/sbom/quay/push"
+           event: repo_push
+           method: webhook
+           title: SBOM-event-to-Bombino
+     - apiVersion: appstudio.redhat.com/v1alpha1
+       kind: Component
+       metadata:
+         name: tufcli-init{{.nameSuffix}}
+         annotations:
+           build.appstudio.openshift.io/pipeline: "{\"name\":\"docker-build-oci-ta\",\"bundle\":\"latest\"}"
+           git-provider: github
+           git-provider-url: "https://github.com"
+           mintmaker.appstudio.redhat.com/disabled: {{.mintmakerDisabled}}
+       spec:
+         source:
+           git:
+             url: "https://github.com/securesign/tufcli"
+             dockerfileUrl: Dockerfile.tufcli-init
+             revision: {{.branch}}
+         application: {{.application}}{{.nameSuffix}}
+         componentName: tufcli-init
+         build-nudges-ref:
+         - rhtas-operator{{.nameSuffix}}
+     - apiVersion: appstudio.redhat.com/v1alpha1
+       kind: ImageRepository
+       metadata:
+         name: imagerepository-for-{{.application}}{{.nameSuffix}}-tufcli-init
+         labels:
+           appstudio.redhat.com/component: tufcli-init{{.nameSuffix}}
+       spec:
+         image:
+           name: rhtas-tenant/tufcli-init
+           visibility: public
+         notifications:
+         - config:
+             url: "https://bombino.api.redhat.com/v1/sbom/quay/push"
+           event: repo_push
+           method: webhook
+           title: SBOM-event-to-Bombino
+     project: tufcli
+     variables:
+     - name: version
+       description: "A version number for a new development stream"
+     - name: branch
+       defaultValue: main
+       description: "Git branch"
+     - name: nameSuffix
+       defaultValue: "-{{hyphenize .version}}"
+       description: "A suffix which will be added to K8s resource name"
+     - name: application
+       defaultValue: tufcli
+       description: "The application name"
+     - name: mintmakerDisabled
+       defaultValue: "false"
+       description: "Whether to disable mintmaker annotation on the Component"

📦 Artifacts: base-output.yaml, head-output.yaml, dyff-output.txt

@qodo-for-securesign

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)

Grey Divider

Great, no issues found!

Qodo reviewed your code and found no material issues that require review

Grey Divider

Qodo Logo

@sampras343
sampras343 merged commit 67c4a37 into main Jul 21, 2026
4 checks passed
@sampras343
sampras343 deleted the add-tufcli-to-cli-stacks branch July 21, 2026 15:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants