Skip to content

feat: renovate support for kubara catalogs - #533

Open
tuunit wants to merge 1 commit into
mainfrom
feat/renovate-support-for-catalogs
Open

feat: renovate support for kubara catalogs#533
tuunit wants to merge 1 commit into
mainfrom
feat/renovate-support-for-catalogs

Conversation

@tuunit

@tuunit tuunit commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

📝 Summary

  • Adds a renovate config example to the docs
  • Adds a automatically generated added renovate config when running kubara init

🧩 Type of change

  • 🔧 CLI / Go code
  • 📝 Documentation
  • 🧪 Test or CI change
  • ♻️ Refactor / cleanup

⚠️ Is this a breaking change?

  • Yes, this change breaks existing functionality (explain in summary)

🧪 Testing

  • CI passed
  • Manually tested (local/dev cluster)
  • Unit tested
  • Not tested (explain why below)

🔗 Additional Context / Related Issues / Tickets

✅ Checklist

  • Code compiles and passes all tests
  • Linting and style checks pass
  • Comments added for complex logic
  • Documentation updated (if applicable)

@tuunit
tuunit requested review from a team and Copilot July 29, 2026 08:24
@tuunit
tuunit force-pushed the feat/renovate-support-for-catalogs branch from 5a8a780 to e1bcdaf Compare July 29, 2026 08:26
Signed-off-by: Jan Larwig <jan@larwig.com>
@tuunit
tuunit force-pushed the feat/renovate-support-for-catalogs branch from e1bcdaf to 2dfe415 Compare July 29, 2026 08:26

Copilot AI 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.

Pull request overview

This PR adds first-class Renovate support for keeping OCI catalog references up to date, by (1) documenting a Renovate custom manager configuration and (2) auto-generating a renovate.json alongside the config when running kubara init.

Changes:

  • Generate a renovate.json during kubara init (new ensureRenovateConfig helper).
  • Document a Renovate custom manager + package rules configuration for catalog OCI references.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
src/cmd/init.go Adds automatic renovate.json generation during init and the underlying generator logic.
docs/content/2_concepts/catalog_distribution.md Adds an example Renovate config for automatic catalog updates.
Comments suppressed due to low confidence (1)

src/cmd/init.go:276

  • ensureRenovateConfig is executed before the "config already exists" short-circuit and before env validation. As a result, kubara init can write renovate.json even when it subsequently returns an error (e.g., invalid env). Consider generating it only in the success paths (existing config, or after building the new cluster) instead of unconditionally at the top.
	if err := o.ensureRenovateConfig(cs); err != nil {
		return err
	}

	if fileExists {

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/cmd/init.go
Comment on lines +234 to 238
if err := o.ensureRenovateConfig(cs); err != nil {
return err
}

if err := workflow.CreateOrUpdateCluster(cs.GetConfig(), es.GetConfig(), o.catalogLoadOptions()); err != nil {
Comment thread src/cmd/init.go
%q
],
"matchStrings": [
"oci:\\/\\/(?<depName>[^:\\s\"'`+"`"+`]+):(?<currentValue>[^\\s\"'`+"`"+`]+)"
"customType": "regex",
"description": "Update kubara catalog OCI references",
"fileMatch": ["(^|/)config\\.yaml$"],
"matchStrings": ["oci:\\/\\/(?<depName>[^:\\s\"'\\`]+):(?<currentValue>[^\\s\"'\\`]+)"],
Copilot AI review requested due to automatic review settings July 29, 2026 08:31

Copilot AI 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.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.

Comments suppressed due to low confidence (2)

docs/content/2_concepts/catalog_distribution.md:203

  • The Renovate JSON example escapes the backtick as \\`` inside the regex character class, which makes the shown regex differ from the one generated by kubara init` and adds an unnecessary escape sequence for Renovate's JS regex engine. Keeping the example aligned with the generated config avoids copy/paste confusion.
      "matchStrings": ["oci:\\/\\/(?<depName>[^:\\s\"'\\`]+):(?<currentValue>[^\\s\"'\\`]+)"],

src/cmd/init.go:274

  • ensureRenovateConfig runs before the envValidateErr early-return in normal mode, so kubara init can generate renovate.json even when init ultimately fails due to invalid env and no config is written. This leaves partial side effects on error paths.
	if err := o.ensureRenovateConfig(cs); err != nil {
		return err
	}

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