Skip to content

update manifest generation variables #10618

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 1 commit into
base: master
Choose a base branch
from

Conversation

radTuti
Copy link
Contributor

@radTuti radTuti commented Jun 27, 2025

Description

This updates some variables for generating manifests to ensure they are only overriden explictly.

Related issues/PRs

Todos

  • Tests
  • Documentation
  • Release note

Release Note

TBD

Reminder for the reviewer

Make sure that this PR has the correct labels and milestone set.

Every PR needs one docs-* label.

  • docs-pr-required: This change requires a change to the documentation that has not been completed yet.
  • docs-completed: This change has all necessary documentation completed.
  • docs-not-required: This change has no user-facing impact and requires no docs.

Every PR needs one release-note-* label.

  • release-note-required: This PR has user-facing changes. Most PRs should have this label.
  • release-note-not-required: This PR has no user-facing changes.

Other optional labels:

  • cherry-pick-candidate: This PR should be cherry-picked to an earlier release. For bug fixes only.
  • needs-operator-pr: This PR is related to install and requires a corresponding change to the operator.

@Copilot Copilot AI review requested due to automatic review settings June 27, 2025 22:41
@radTuti radTuti added the docs-not-required Docs not required for this change label Jun 27, 2025
@radTuti radTuti requested a review from a team as a code owner June 27, 2025 22:41
@radTuti radTuti added the release-note-not-required Change has no user-facing impact label Jun 27, 2025
@marvin-tigera marvin-tigera added this to the Calico v3.31.0 milestone Jun 27, 2025
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR updates environment variable names used for manifest generation to require explicit overrides and adds binary existence checks in the generation script.

  • Renames CALICO_VERSION to PRODUCT_VERSION and introduces _OVERRIDE suffixes for operator image settings.
  • Updates generate.sh to use the new override variables and validate presence of helm and yq.

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
release/pkg/manager/calico/manager.go Replace CALICO_VERSION with PRODUCT_VERSION and add OPERATOR_*_OVERRIDE vars
manifests/generate.sh Use new override env vars and add checks for HELM and YQ binaries
Comments suppressed due to low confidence (3)

release/pkg/manager/calico/manager.go:913

  • [nitpick] The new variable name PRODUCT_VERSION is less specific than the original CALICO_VERSION and inconsistent with the _OVERRIDE suffix used for operator settings. Consider renaming it to CALICO_VERSION_OVERRIDE for clarity and consistency.
	env = append(env, fmt.Sprintf("PRODUCT_VERSION=%s", r.calicoVersion))

manifests/generate.sh:24

  • There are no tests covering the new override logic for PRODUCT_VERSION, OPERATOR_REGISTRY_OVERRIDE, and OPERATOR_IMAGE_OVERRIDE. Consider adding unit or integration tests to validate both default and override behaviors.
CALICO_VERSION=${PRODUCT_VERSION:-$defaultCalicoVersion}

manifests/generate.sh:22

  • The script comments and README should be updated to document the new environment variables (PRODUCT_VERSION, OPERATOR_REGISTRY_OVERRIDE, OPERATOR_IMAGE_OVERRIDE) and their intended usage.
# Get versions to install.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs-not-required Docs not required for this change release-note-not-required Change has no user-facing impact
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants