Skip to content

🐛 Gracefully skip tls-profile-sync sidecar when image env var is missing#1037

Open
zhujian7 wants to merge 1 commit intostolostron:mainfrom
zhujian7:fix-tls-sidecar-missing-env-graceful
Open

🐛 Gracefully skip tls-profile-sync sidecar when image env var is missing#1037
zhujian7 wants to merge 1 commit intostolostron:mainfrom
zhujian7:fix-tls-sidecar-missing-env-graceful

Conversation

@zhujian7
Copy link
Copy Markdown
Contributor

@zhujian7 zhujian7 commented Apr 7, 2026

Summary

  • When TLS_PROFILE_SYNC_IMAGE env var is not set, getTLSProfileSyncImage() now returns an empty string instead of a fatal error
  • Generate() logs a warning and skips sidecar injection, allowing the import secret to still be created
  • Fixes regression from PR ✨ Add tls-profile-sync sidecar for OpenShift TLS profile compliance #1032 where manually importing OpenShift discovered clusters failed

Related issue(s)

Test plan

  • Existing unit tests updated and passing
  • Verify import secret is generated for OpenShift discovered clusters when TLS_PROFILE_SYNC_IMAGE is not set
  • Verify tls-profile-sync sidecar is still injected when TLS_PROFILE_SYNC_IMAGE is properly set

@openshift-ci
Copy link
Copy Markdown

openshift-ci Bot commented Apr 7, 2026

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: zhujian7

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci Bot added the approved label Apr 7, 2026
When TLS_PROFILE_SYNC_IMAGE is not set, getTLSProfileSyncImage() now
returns an empty string instead of a fatal error. The Generate() function
logs a warning and skips sidecar injection, allowing the import secret to
still be created. This fixes a regression where manually importing
OpenShift discovered clusters would fail because the env var was not yet
injected by backplane-operator.

Ref: https://redhat.atlassian.net/browse/ACM-32524

Signed-off-by: Jian Zhu <jiazhu@redhat.com>
Signed-off-by: zhujian <jiazhu@redhat.com>
@zhujian7 zhujian7 force-pushed the fix-tls-sidecar-missing-env-graceful branch from c9ad47c to 16f6e20 Compare April 7, 2026 03:04
@zhujian7
Copy link
Copy Markdown
Contributor Author

zhujian7 commented Apr 7, 2026

/hold

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant