Skip to content

Conversation

@meomnzak
Copy link
Contributor

Description

Add security group drift detection

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Helm chart change
  • Other (please describe)

Testing

  • Unit tests added/updated
  • Helm chart tests pass (helm lint and template validation)
  • Tested changes manually
  • Added examples for new features

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have updated the relevant CRDs if needed
  • I have updated the Helm chart version if needed
  • I have added tests that prove my fix is effective or that my feature works

Additional context

closes #442

@k8s-ci-robot k8s-ci-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Dec 24, 2025
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: meomnzak
Once this PR has been reviewed and has the lgtm label, please assign pfeifferj for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found 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

@k8s-ci-robot k8s-ci-robot added the size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. label Dec 24, 2025
@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Dec 24, 2025

// createTestNodeClassWithPlacementStrategy creates a NodeClass using PlacementStrategy
// instead of explicit Subnet - used for testing subnet pool drift scenarios
func (s *E2ETestSuite) createTestNodeClassWithPlacementStrategy(t *testing.T, testName string) *v1alpha1.IBMNodeClass {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

wasn't compiling 💀
Screenshot 2025-12-24 at 4 05 12 PM

Copy link
Member

Choose a reason for hiding this comment

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

yeaaaaa fixing e2e properly has been a moving target for a while now... the latest open issue to track this is #431

I'm putting this off until we get new infra. pls leave the e2e files as they are for now, and feel free to ignore the failures for now as well lol

} else {
// Get default security group for VPC
defaultSG, sgErr := p.getDefaultSecurityGroup(ctx, vpcClient, nodeClass.Spec.VPC)
defaultSG, sgErr := vpcClient.GetDefaultSecurityGroup(ctx, nodeClass.Spec.VPC)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I am not sure how costly this vpc call is. an alternative will be adding Status.SecurityGroups and populate it. Your call

@meomnzak meomnzak marked this pull request as ready for review December 24, 2025 14:12
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Dec 24, 2025
@codecov-commenter
Copy link

codecov-commenter commented Dec 24, 2025

Codecov Report

❌ Patch coverage is 10.00000% with 45 lines in your changes missing coverage. Please review.
✅ Project coverage is 55.49%. Comparing base (943d64b) to head (2704da1).
⚠️ Report is 4 commits behind head on main.

Files with missing lines Patch % Lines
pkg/cloudprovider/cloudprovider.go 15.62% 25 Missing and 2 partials ⚠️
pkg/cloudprovider/ibm/vpc.go 0.00% 12 Missing ⚠️
pkg/providers/vpc/instance/provider.go 0.00% 6 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #467      +/-   ##
==========================================
- Coverage   55.77%   55.49%   -0.28%     
==========================================
  Files          58       58              
  Lines        8757     8792      +35     
==========================================
- Hits         4884     4879       -5     
- Misses       3525     3563      +38     
- Partials      348      350       +2     
Files with missing lines Coverage Δ
pkg/providers/vpc/instance/provider.go 24.31% <0.00%> (-0.90%) ⬇️
pkg/cloudprovider/ibm/vpc.go 45.39% <0.00%> (-1.94%) ⬇️
pkg/cloudprovider/cloudprovider.go 51.41% <15.62%> (-2.51%) ⬇️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@meomnzak meomnzak force-pushed the feat/add-security-group-drift branch from c6f271c to acf1d57 Compare December 24, 2025 14:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add Security Group drift detection

4 participants