Skip to content
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

update manifests for dev releases #9754

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

radTuti
Copy link
Contributor

@radTuti radTuti commented Jan 24, 2025

Description

The maifests generated when the registry is overwritten are currently incorrect since the generate manifests currently does not update the registries. This attempts to fix that by:

  • updating registriy in the helm manifest images in charts/calico/values.yaml
  • updating the tigera/operator and non-helm manifests images

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.

@radTuti radTuti requested a review from a team as a code owner January 24, 2025 17:22
@marvin-tigera marvin-tigera added this to the Calico v3.30.0 milestone Jan 24, 2025
@marvin-tigera marvin-tigera added release-note-required Change has user-facing impact (no matter how small) docs-pr-required Change is not yet documented labels Jan 24, 2025
@radTuti radTuti added docs-not-required Docs not required for this change release-note-not-required Change has no user-facing impact labels Jan 24, 2025
@marvin-tigera marvin-tigera removed release-note-required Change has user-facing impact (no matter how small) docs-pr-required Change is not yet documented labels Jan 24, 2025
manifests/generate.sh Outdated Show resolved Hide resolved
manifests/generate.sh Outdated Show resolved Hide resolved
--set tigeraOperator.image=$OPERATOR_IMAGE \
--set tigeraOperator.version=$OPERATOR_VERSION \
--set tigeraOperator.registry=$OPERATOR_REGISTRY \
--set calicoctl.image=$REGISTRY/ctl \
Copy link
Member

Choose a reason for hiding this comment

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

Seems wrong that calicoctl.image is of the form REGISTRY/CTL whereas the tigeraOperator.image is just of the form tigera/operator with the registry configured separately - we should be using consistent meanings for image / version / registry.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

the calicoctl images are pushed as /ctl

sadly we currently do not follow a consistent pattern b/w operator and monorepo images, that will require a bigger overhaul which is beyond the scope of this PR

Copy link
Member

Choose a reason for hiding this comment

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

The calicoctl images are pushed as /ctl

Surely they must be pushed as docker.io/calico/ctl no?

Operator has two separate config options - registry and image

Calicoctl has a single option - image - that appears to be a merged version of registry and image.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

For my dev images, it is created as docker.io/tuticat/ctl

When the default registry is not overwritten, this be set to calico/ctl which matches the current state of image: calico/ctl:master

@@ -891,7 +897,7 @@ func (r *CalicoManager) generateManifests() error {
}

func (r *CalicoManager) resetManifests() {
if _, err := r.runner.RunInDir(r.repoRoot, "git", []string{"checkout", "manifests"}, nil); err != nil {
if _, err := r.runner.RunInDir(r.repoRoot, "git", []string{"checkout", "manifests", "charts"}, nil); err != nil {
Copy link
Member

Choose a reason for hiding this comment

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

What change happens in the charts diretory? I can't see where we're modifying that

Copy link
Contributor Author

Choose a reason for hiding this comment

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

the images in charts/calico/values.yaml have their registies updated by manifests/generate.sh here

Copy link
Member

Choose a reason for hiding this comment

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

Ah, right. I need to think about that one for a moment. I think it's a change in scope of the generate.sh script that I might not be completely comfortable with. That script is meant to deterministically generate manifests based on values.yaml, not be responsible for modifying values.yaml itself.

release/pkg/manager/calico/manager.go Outdated Show resolved Hide resolved
@radTuti radTuti changed the title update manifests for hashreleases & dev releases update manifests for dev releases Jan 27, 2025
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.

3 participants