Skip to content

DOCS-2833 Add script that updates Felix config for OSS#2510

Open
ctauchen wants to merge 1 commit intotigera:mainfrom
ctauchen:felix-update-script-oss
Open

DOCS-2833 Add script that updates Felix config for OSS#2510
ctauchen wants to merge 1 commit intotigera:mainfrom
ctauchen:felix-update-script-oss

Conversation

@ctauchen
Copy link
Collaborator

@ctauchen ctauchen commented Feb 4, 2026

This script updates the FelixConfiguration component with data from projectcalico/calico. Works for master and OSS 3.30+.

DOCS-2833

Product Version(s):

Issue:

Link to docs preview:

SME review:

  • An SME has approved this change.

DOCS review:

  • A member of the docs team has approved this change.

Additional information:

Merge checklist:

  • Deploy preview inspected wherever changes were made
  • Build completed successfully
  • Test have passed

@ctauchen ctauchen requested a review from a team as a code owner February 4, 2026 13:15
Copilot AI review requested due to automatic review settings February 4, 2026 13:15
@netlify
Copy link

netlify bot commented Feb 4, 2026

Deploy Preview succeeded!

Built without sensitive environment variables

Name Link
🔨 Latest commit 0208d65
🔍 Latest deploy log https://app.netlify.com/projects/tigera/deploys/6983773feaeac200089dc101
😎 Deploy Preview https://deploy-preview-2510--tigera.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 68 (🔴 down 3 from production)
Accessibility: 98 (no change from production)
Best Practices: 92 (no change from production)
SEO: 100 (no change from production)
PWA: -
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify
Copy link

netlify bot commented Feb 4, 2026

Deploy Preview for calico-docs-preview-next ready!

Name Link
🔨 Latest commit 0208d65
🔍 Latest deploy log https://app.netlify.com/projects/calico-docs-preview-next/deploys/6983773f028f4d00074a140e
😎 Deploy Preview https://deploy-preview-2510--calico-docs-preview-next.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link
Contributor

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

Adds a new helper script to keep the Felix configuration parameter data in this docs repo synchronized with projectcalico/calico for master and versioned OSS branches (3.30+).

Changes:

  • Introduces scripts/felix-config-update.sh to download felix/docs/config-params.json from upstream Calico.
  • Updates the unversioned (master) FelixConfig data file and iterates through calico_versions.json to update versioned docs, skipping 3.29.

@ctauchen ctauchen force-pushed the felix-update-script-oss branch 2 times, most recently from f5c37f3 to 6eb2d7b Compare February 4, 2026 13:41
@lwr20
Copy link
Member

lwr20 commented Feb 4, 2026

How does this script fit into your process? Do you run it regularly?
Or run it just before every release?

Presumably the intent is that you run it and use the changes it makes to raise a PR?

The script itself looks fine.

@ctauchen
Copy link
Collaborator Author

ctauchen commented Feb 4, 2026

How does this script fit into your process? Do you run it regularly? Or run it just before every release?

Presumably the intent is that you run it and use the changes it makes to raise a PR?

The script itself looks fine.

For now, the idea is just to have this available to run manually for quick and accurate updates. So yes, run and raise a PR. I'd probably aim to run it at release time.

Next steps are to include other products and fold into proper automation. But that was beyond the scope for the moment.

@@ -0,0 +1,65 @@
#!/bin/bash

set -e/-u/pipefail
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think copilot meant that you should add at least one of the "-e/-u/pipefail" options. The actual syntax would be set -eu -o pipefail

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yeah, I realized that after when i couldn't run the script! That's changed now.

exit 1
fi

curl -o "$LOCAL_PATH" "$REMOTE_URL"
Copy link
Collaborator

Choose a reason for hiding this comment

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

I always add -fsSL to my curl invocations.

  • -f causes it to return an error code if it gets an HTTP error (so the script ends)
  • -s causes it not to print the (usually pointless) progress indicator (silent)
  • -S shows (prints out) the error if one happened
  • -L follows HTTP redirects instead of saving the redirect response

Long form is --fail --silent --show-error --location

IMHO all of these options should always be used whenever using curl in a shell script, as it catches a lot of errors that would otherwise be missed.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

That's great, thanks. Added.


# Exclude version 3.29, which came before direct-from-source method.
if [ "$VERSION" == "3.29" ]; then
printf "%s\n" "Skipping $VERSION: No action required."
Copy link
Collaborator

Choose a reason for hiding this comment

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

You can use echo "blah blah" instead of printf "%s\n" "blah blah" unless you're doing more complex variable printing (like trying to print values as hex or formatting a number in a specific way). Tends to be more readable.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I got to that after having trouble with newlines. I think I'll leave it for now, but I take the point that it's cleaner with a plain echo statement.

This script updates the FelixConfiguration component with
data from projectcalico/calico. Works for master and OSS 3.30+.

DOCS-2833
@ctauchen ctauchen force-pushed the felix-update-script-oss branch from 6eb2d7b to 0208d65 Compare February 4, 2026 16:43
@ctauchen ctauchen requested a review from danudey February 4, 2026 17:07
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.

3 participants