feat(container-pull): add version channel selector for sensor image pulls#490
Conversation
|
This pull request has been automatically marked as stale because it has had no activity in the last 14 days. Next steps: We value your contribution and look forward to reviewing your changes! |
6dbf203 to
0fb0e67
Compare
|
This pull request has been automatically marked as stale because it has had no activity in the last 14 days. Next steps: We value your contribution and look forward to reviewing your changes! |
|
Keep open |
|
This pull request has been automatically marked as stale because it has had no activity in the last 14 days. Next steps: We value your contribution and look forward to reviewing your changes! |
… LTS, LTS-1) Allow users to pull images by release channel keyword via the existing -v/--version flag instead of requiring exact version numbers. Channel keywords are resolved from registry tag data with no new API calls.
… error handling Replace echo-to-stderr + return 1 with die() calls, and remove the set +e / CHANNEL_STATUS boilerplate in the caller. die() prints to stderr (not captured by $()) and exit 1 propagates via set -e.
…mage The registry uses lowercase "-lts" suffix on LTS tags (e.g. 7.32.0-18504-1-lts), but the version channel resolver was grepping for uppercase "-LTS", causing LTS/LTS-1 to always die with "No LTS versions found" and the N-1/N-2 exclusion to silently leak LTS tags into the candidate list. Also changes LTS/LTS-1 resolution to return the full "-lts" tagged image directly rather than extracting the major.minor prefix, which previously caused match_sensor_version to select the latest non-LTS build of that line instead of the designated LTS build.
0fb0e67 to
8589288
Compare
…nel examples Reword N-1/N-2 descriptions to generic "one/two releases prior to the latest" phrasing in both usage help and README. Add a note that LTS tags are not yet published to the registry, and add two examples showing channel keywords in automation (N-1 image-path pinning) and registry mirroring (LTS copy) workflows.
Adds support for version channel keywords (
latest,N-1,N-2,LTS,LTS-1) to the-v, --versionflag infalcon-container-sensor-pull.sh. This allows users to pull sensor images by release channel instead of needing exact version numbers, which is useful for automation and policy-driven deployments.Channel keywords are resolved entirely from existing registry tag data — no new API calls or scopes required. Keywords are case-insensitive and fully backward compatible with existing
-vusage.New functions:
extract_raw_tags()— refactored from duplicated awk logic inmatch_sensor_version()resolve_version_channel()— maps channel keywords to version prefixes, which then feed into the existingmatch_sensor_version()flowKeyword behavior:
latestN-1N-2LTSLTS-1LTS (Long Term Support) release tags are not yet published to the registry. The
LTSandLTS-1keywords are included ahead of that release and will return an error until LTS-tagged images are available — this is documented in the README so the behavior is clear to users.Also updates usage help, error messages, and README with channel keyword documentation and examples showing the keywords in automation (image-path pinning) and registry-mirroring workflows.