Skip to content

Conversation

@Pacho20
Copy link
Contributor

@Pacho20 Pacho20 commented Dec 2, 2025

By default, the ibmcloud provider uses the VPC's default Security Group, which does not allow connections to the cluster by default, but it can expose the VSIs to other services unnecessarily. With this change, CAA will use the cluster's security group as the default and always attach it to the VSIs. This ensures that the VSIs can always access the cluster and CAA.

The PR also introduces the ability to define multiple security groups instead of just one, and all of them will be attached to the VSI during creation. The IBMCLOUD_VPC_SG_ID variable is replaced by IBMCLOUD_SECURITY_GROUP_IDS. This field accepts a comma-separated list of security group IDs.

Example:

kind: ConfigMap
apiVersion: v1
metadata:
  name: peer-pods-cm
  namespace: openshift-sandboxed-containers-operator
data:
  ...
  IBMCLOUD_SECURITY_GROUP_IDS: '550e8400-e29b-41d4-a716-446655440000,123e4567-e89b-12d3-a456-426614174000,9f8c7d6e-5b4a-3c2d-1e0f-abcdefabcdef'
  ...

@Pacho20 Pacho20 force-pushed the ibmcloud-security-groups branch 2 times, most recently from 6a9dfa8 to 21bef26 Compare December 2, 2025 16:50
@Pacho20 Pacho20 marked this pull request as ready for review December 12, 2025 18:38
@Pacho20 Pacho20 requested a review from a team as a code owner December 12, 2025 18:38
@stevenhorsman
Copy link
Member

I don't know enough about the IBM Cloud SDK to tell if this is definitely the right approach, but it seems reasonably and isolated to the ibmcloud provider, so if it passes the build and unit tests then it's probably good enough. I think it will need a rebase to re-trigger the CI though.

@Pacho20 Pacho20 force-pushed the ibmcloud-security-groups branch from 7a24023 to 8be71ed Compare January 6, 2026 10:22
@Pacho20 Pacho20 force-pushed the ibmcloud-security-groups branch 2 times, most recently from cae27ad to a0c1c13 Compare January 12, 2026 10:19
Add ClusterV2 service for retrieving security groups.
Implements a temporary service using the IBM Cloud Cluster v2 API
to fetch a cluster's security group, which can serve as the default.
This workaround is needed because current IBM Cloud SDKs
lack endpoints for security groups.

The plan is to add this functionalityto one of the
SDKs in the future and use that instead.

Signed-off-by: Patrik Fodor <[email protected]>
Introduce the Cluster v2 interface and retrieve the cluster's security
group using it instead of the VPC's.

Signed-off-by: Patrik Fodor <[email protected]>
Instead of attaching a single security group to VSIs, allow specifying
multiple security groups.

Signed-off-by: Patrik Fodor <[email protected]>
Update README and ROKS_SETUP to reflect recent changes
in security group configuration.

Signed-off-by: Patrik Fodor <[email protected]>
@Pacho20 Pacho20 force-pushed the ibmcloud-security-groups branch from a0c1c13 to 54e4033 Compare January 13, 2026 16:28
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