Skip to content

fix(cluster_setup): stop reverting artifacts.yaml on repeat installs,…#134

Open
kupratyu-splunk wants to merge 1 commit into
ai-tier-gafrom
fix/k0s-install-image-upgrade
Open

fix(cluster_setup): stop reverting artifacts.yaml on repeat installs,…#134
kupratyu-splunk wants to merge 1 commit into
ai-tier-gafrom
fix/k0s-install-image-upgrade

Conversation

@kupratyu-splunk

Copy link
Copy Markdown
Collaborator

… warn on mutable image tags

configure_images() snapshotted artifacts.yaml/splunk-operator-cluster.yaml to a .original file on first run and restored from it on every subsequent run before re-injecting image values. Since .original was never refreshed, any legitimate change to those manifests (new operator release, new env var, new sidecar) was silently reverted on every re-install after the first. Drop the snapshot/restore step; the sed substitutions already only touch their own named fields, so rewriting in place is idempotent.

Also warn in validate_image_config() when a configured image has no tag or uses a mutable tag (:latest, :preview, :stable*, :dev, :nightly), since imagePullPolicy: IfNotPresent means re-running install without a new distinct tag will not actually upgrade the running image.

Description

Related Issues

  • Related to #

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Refactoring (no functional changes)
  • Performance improvement
  • Test improvement
  • CI/CD improvement
  • Chore (dependency updates, etc.)

Changes Made

Testing Performed

  • Unit tests pass (make test)
  • Linting passes (make lint)
  • Integration tests pass (if applicable)
  • E2E tests pass (if applicable)
  • Manual testing performed

Test Environment

  • Kubernetes Version:
  • Cloud Provider:
  • Deployment Method:

Test Steps

Documentation

  • Updated inline code comments
  • Updated README.md (if adding features)
  • Updated API documentation
  • Updated deployment guides
  • Updated CHANGELOG.md
  • No documentation needed

Checklist

  • My code follows the project's style guidelines
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published
  • I have updated the Helm chart version (if applicable)
  • I have updated CRD schemas (if applicable)

Breaking Changes

Impact:

Migration Path:

Screenshots/Recordings

Additional Notes

Reviewer Notes

Please pay special attention to:


Commit Message Convention: This PR follows Conventional Commits

… warn on mutable image tags

configure_images() snapshotted artifacts.yaml/splunk-operator-cluster.yaml
to a .original file on first run and restored from it on every subsequent
run before re-injecting image values. Since .original was never refreshed,
any legitimate change to those manifests (new operator release, new env
var, new sidecar) was silently reverted on every re-install after the
first. Drop the snapshot/restore step; the sed substitutions already only
touch their own named fields, so rewriting in place is idempotent.

Also warn in validate_image_config() when a configured image has no tag
or uses a mutable tag (:latest, :preview, :stable*, :dev, :nightly),
since imagePullPolicy: IfNotPresent means re-running install without a
new distinct tag will not actually upgrade the running image.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 4b8c88dd52

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +848 to +850
# refreshed. The sed patterns below only ever touch their own named
# RELATED_IMAGE_*/image: fields, so re-running against an already-updated
# file is idempotent and safe.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Preserve idempotent rewrites for operator image lines

With the backup/restore removed here, the image: substitutions below are not actually idempotent for configured operator image names that do not contain the original splunk...ai...operator or splunk...operator substrings. For example, after a first run sets images.operator.image to registry.example.com/team/platform:v1, a later run with :v2 leaves the manifest at :v1 because s|image: .*splunk.*ai.*operator.*|...| no longer matches; the same applies to the Splunk Operator manifest in internal mode. Previously restoring the original manifest made those regexes match on every run, so repeat installs/upgrades can now silently keep the stale operator image.

Useful? React with 👍 / 👎.

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.

1 participant