Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,10 @@ require (
github.com/opencontainers/go-digest v1.0.0
github.com/openshift-eng/openshift-tests-extension v0.0.0-20260127124016-0fed2b824818
github.com/openshift-kni/commatrix v0.0.5-0.20251111204857-e5a931eff73f
github.com/openshift/api v0.0.0-20260629123346-784126000268
github.com/openshift/api v0.0.0-20260703175546-02e2c3de12fb
github.com/openshift/apiserver-library-go v0.0.0-20260303173613-cd3676268d31
github.com/openshift/build-machinery-go v0.0.0-20250530140348-dc5b2804eeee
github.com/openshift/client-go v0.0.0-20260629081241-b769428f4111
github.com/openshift/client-go v0.0.0-20260703082747-24d059aea27a
github.com/openshift/library-go v0.0.0-20260303171201-5d9eb6295ff6
github.com/ovn-org/ovn-kubernetes/go-controller v0.0.0-20250118001652-a8b9c3c31417
github.com/pborman/uuid v1.2.0
Expand Down
8 changes: 4 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -903,14 +903,14 @@ github.com/openshift-eng/openshift-tests-extension v0.0.0-20260127124016-0fed2b8
github.com/openshift-eng/openshift-tests-extension v0.0.0-20260127124016-0fed2b824818/go.mod h1:6gkP5f2HL0meusT0Aim8icAspcD1cG055xxBZ9yC68M=
github.com/openshift-kni/commatrix v0.0.5-0.20251111204857-e5a931eff73f h1:E72Zoc+JImPehBrXkgaCbIDbSFuItvyX6RCaZ0FQE5k=
github.com/openshift-kni/commatrix v0.0.5-0.20251111204857-e5a931eff73f/go.mod h1:cDVdp0eda7EHE6tLuSeo4IqPWdAX/KJK+ogBirIGtsI=
github.com/openshift/api v0.0.0-20260629123346-784126000268 h1:s2Z/n/ihnmPddz89PnLMkcOgjoe28VlkuDOMUu7y3uI=
github.com/openshift/api v0.0.0-20260629123346-784126000268/go.mod h1:Jm45pE7O6/G0tYYhiLzNyZykTjmf9BfhsKYuGfLLwTE=
github.com/openshift/api v0.0.0-20260703175546-02e2c3de12fb h1:OBv9vTp65mBtFDoz5iqaPhdjtZPv2Y3p4Q0C2yONA0M=
github.com/openshift/api v0.0.0-20260703175546-02e2c3de12fb/go.mod h1:7WJ3IPaK6nmWT8bDcaNooHqd0H5WepjVqV/10VlkMEM=
github.com/openshift/apiserver-library-go v0.0.0-20260303173613-cd3676268d31 h1:oYPQMrkzyk002L5aN8I2tkUHTEu9lsVrc1qiJmHJdXU=
github.com/openshift/apiserver-library-go v0.0.0-20260303173613-cd3676268d31/go.mod h1:mnTsMMTtXSPBQzqBp5HXBjLvliveKenRADFQy9m5jc0=
github.com/openshift/build-machinery-go v0.0.0-20250530140348-dc5b2804eeee h1:+Sp5GGnjHDhT/a/nQ1xdp43UscBMr7G5wxsYotyhzJ4=
github.com/openshift/build-machinery-go v0.0.0-20250530140348-dc5b2804eeee/go.mod h1:8jcm8UPtg2mCAsxfqKil1xrmRMI3a+XU2TZ9fF8A7TE=
github.com/openshift/client-go v0.0.0-20260629081241-b769428f4111 h1:Wa3YiBDvUxenrcE03qF//gWV/DRQf+03ptFUikYO5Kw=
github.com/openshift/client-go v0.0.0-20260629081241-b769428f4111/go.mod h1:X9OaPiMdlU4xQC5SUGxgxoQ/56/GsjAa1wMO/N1Vt08=
github.com/openshift/client-go v0.0.0-20260703082747-24d059aea27a h1:RfmstmmWz5/23/Tt8gBipICzC1VHQLgGBeQUQ1aWoUA=
github.com/openshift/client-go v0.0.0-20260703082747-24d059aea27a/go.mod h1:fNuXvm6bMJff2AxiRb9CR5L3a9CLzVgcoSmHZ3l7FgU=
github.com/openshift/kubernetes v0.0.0-20260305123649-d18f3f005eaa h1:4TK07egSJrny442x0Kl0HgzXgt2lnCKTKHF3sbL2U3E=
github.com/openshift/kubernetes v0.0.0-20260305123649-d18f3f005eaa/go.mod h1:1r2FIoYrPU0110cjYlWAwNcbiqRPLWAgmZK4d0YeEZw=
github.com/openshift/kubernetes/staging/src/k8s.io/api v0.0.0-20260305123649-d18f3f005eaa h1:ifOqAFthJWnT1HS6Sq2AcLQWNSJ1+XEiyA9eo+PIcR0=
Expand Down
20 changes: 8 additions & 12 deletions test/extended/internalreleaseimage/helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,7 @@ import (

configv1 "github.com/openshift/api/config/v1"
v1 "github.com/openshift/api/machineconfiguration/v1"
machineconfigv1alpha1types "github.com/openshift/api/machineconfiguration/v1alpha1"
machineconfigv1 "github.com/openshift/client-go/machineconfiguration/clientset/versioned/typed/machineconfiguration/v1"
machineconfigv1alpha1 "github.com/openshift/client-go/machineconfiguration/clientset/versioned/typed/machineconfiguration/v1alpha1"
exutil "github.com/openshift/origin/test/extended/util"
)

Expand All @@ -28,9 +26,8 @@ const (

// IRITestHelper is a helper class for InternalReleaseImage tests
type IRITestHelper struct {
oc *exutil.CLI
McClientV1 machineconfigv1.MachineconfigurationV1Interface
McClientV1alpha1 machineconfigv1alpha1.MachineconfigurationV1alpha1Interface
oc *exutil.CLI
McClientV1 machineconfigv1.MachineconfigurationV1Interface
}

// MCInfo holds MachineConfig metadata for reconciliation verification
Expand All @@ -42,15 +39,14 @@ type MCInfo struct {
// NewIRITestHelper creates a new test helper instance
func NewIRITestHelper(oc *exutil.CLI) *IRITestHelper {
return &IRITestHelper{
oc: oc,
McClientV1: oc.MachineConfigurationClient().MachineconfigurationV1(),
McClientV1alpha1: oc.MachineConfigurationClient().MachineconfigurationV1alpha1(),
oc: oc,
McClientV1: oc.MachineConfigurationClient().MachineconfigurationV1(),
}
}

// GetIRI gets the InternalReleaseImage resource and fails the test if not found
func (h *IRITestHelper) GetIRI() *machineconfigv1alpha1types.InternalReleaseImage {
iri, err := h.McClientV1alpha1.InternalReleaseImages().Get(context.Background(), IRIResourceName, metav1.GetOptions{})
func (h *IRITestHelper) GetIRI() *v1.InternalReleaseImage {
iri, err := h.McClientV1.InternalReleaseImages().Get(context.Background(), IRIResourceName, metav1.GetOptions{})
o.Expect(err).NotTo(o.HaveOccurred(), "Failed to get InternalReleaseImage resource")
return iri
}
Expand Down Expand Up @@ -86,7 +82,7 @@ func (h *IRITestHelper) DeleteMachineConfig(name string) {

// DeleteIRI attempts to delete the InternalReleaseImage resource
func (h *IRITestHelper) DeleteIRI() error {
return h.McClientV1alpha1.InternalReleaseImages().Delete(context.Background(), IRIResourceName, metav1.DeleteOptions{})
return h.McClientV1.InternalReleaseImages().Delete(context.Background(), IRIResourceName, metav1.DeleteOptions{})
}

// VerifyIDMSConfigured verifies that the test image repo is present as a mirror in at least one IDMS
Expand Down Expand Up @@ -205,7 +201,7 @@ func skipIfNoRegistryFeatureUnsupported(oc *exutil.CLI) {
}

// Check if InternalReleaseImage resource is present. If not present, the feature is not enabled.
_, err = oc.MachineConfigurationClient().MachineconfigurationV1alpha1().InternalReleaseImages().Get(context.Background(), IRIResourceName, metav1.GetOptions{})
_, err = oc.MachineConfigurationClient().MachineconfigurationV1().InternalReleaseImages().Get(context.Background(), IRIResourceName, metav1.GetOptions{})
if err != nil {
if apierrors.IsNotFound(err) {
g.Skip("InternalReleaseImage resource not found, feature not enabled")
Expand Down
2 changes: 1 addition & 1 deletion test/extended/node/node_swap_cnv.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ var (
cnvNoSwapConfigPath = exutil.FixturePath("testdata", "node", "cnv-swap", "kubelet-noswap-dropin.yaml")
)

var _ = g.Describe("[Jira:Node/Kubelet][sig-node][Serial][Disruptive][Suite:openshift/disruptive-longrunning] Kubelet LimitedSwap Drop-in Configuration for CNV", g.Ordered, func() {
var _ = g.Describe("[Jira:Node/Kubelet][sig-node][Feature:NodeSwap][Serial][Disruptive][Suite:openshift/disruptive-longrunning] Kubelet LimitedSwap Drop-in Configuration for CNV", g.Ordered, func() {
defer g.GinkgoRecover()

var oc = exutil.NewCLI("cnv-swap")
Expand Down
22 changes: 12 additions & 10 deletions test/extended/testdata/node/cnv-swap/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,24 +71,26 @@ The configuration files support the following automated tests in `node_swap_cnv.

| TC | Description |
|----|-------------|
| TC1 | Verify drop-in directory exists on all nodes with correct ownership |
| TC1 | Verify silent creation and ownership of drop-in directory on CNV nodes |
| TC2 | Verify kubelet starts normally with empty directory |
| TC3 | Apply LimitedSwap configuration from drop-in file |
| TC4 | Revert to NoSwap when drop-in file is removed |
| TC5 | Validate security and permissions of drop-in directory |
| TC6 | Verify cluster stability with LimitedSwap enabled |
| TC7 | Verify non-CNV workers have no swap configuration |
| TC8 | Apply correct precedence with multiple files |
| TC9 | Maintain consistent configuration with checksum verification across CNV nodes |
| TC10 | Handle LimitedSwap config gracefully when OS swap is disabled |
| TC11 | Work correctly with various swap sizes |
| TC12 | Expose swap metrics correctly via Prometheus |
| TC5 | Verify control plane kubelets ignore drop-in config |
| TC6 | Verify drop-in directory is auto-recreated after deletion |
| TC7 | Validate security and permissions of drop-in directory |
| TC8 | Verify cluster stability with LimitedSwap enabled |
| TC9 | Verify non-CNV workers have no swap configuration |
| TC10 | Apply correct precedence with multiple files |
| TC11 | Maintain consistent configuration with checksum verification across CNV nodes |
| TC12 | Handle LimitedSwap config gracefully when OS swap is disabled |
| TC13 | Work correctly with various swap sizes |
| TC14 | Expose swap metrics correctly via Prometheus |

## Running Tests

```bash
# Run individual test
./openshift-tests run-test "[Jira:Node/Kubelet][sig-node][Serial][Disruptive][Suite:openshift/disruptive-longrunning] Kubelet LimitedSwap Drop-in Configuration for CNV TC1: should verify drop-in directory exists on all nodes with correct ownership"
./openshift-tests run-test "[Jira:Node/Kubelet][sig-node][Feature:NodeSwap][Serial][Disruptive][Suite:openshift/nodes/cnv] Kubelet LimitedSwap Drop-in Configuration for CNV TC1: should verify silent creation and ownership of drop-in directory on CNV nodes"

# Run entire suite
./openshift-tests run openshift/nodes/cnv
Expand Down
14 changes: 7 additions & 7 deletions test/extended/util/configv1shim.go
Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,13 @@ func (c *ConfigV1ClientShim) Consoles() configv1.ConsoleInterface {
return c.configv1.Consoles()
}

func (c *ConfigV1ClientShim) CRIOCredentialProviderConfigs() configv1.CRIOCredentialProviderConfigInterface {
if c.v1Kinds["CRIOCredentialProviderConfig"] {
panic(fmt.Errorf("CRIOCredentialProviderConfig not implemented"))
}
return c.configv1.CRIOCredentialProviderConfigs()
}

func (c *ConfigV1ClientShim) DNSes() configv1.DNSInterface {
if c.v1Kinds["DNS"] {
panic(fmt.Errorf("DNS not implemented"))
Expand Down Expand Up @@ -461,13 +468,6 @@ func (c *ConfigV1ClientShim) Schedulers() configv1.SchedulerInterface {
return c.configv1.Schedulers()
}

func (c *ConfigV1ClientShim) CRIOCredentialProviderConfigs() configv1.CRIOCredentialProviderConfigInterface {
if c.v1Kinds["CRIOCredentialProviderConfig"] {
panic(fmt.Errorf("CRIOCredentialProviderConfig not implemented"))
}
return c.configv1.CRIOCredentialProviderConfigs()
}

func (c *ConfigV1ClientShim) RESTClient() rest.Interface {
return c.configv1.RESTClient()
}
Expand Down
2 changes: 2 additions & 0 deletions vendor/github.com/openshift/api/apps/.codegen.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions vendor/github.com/openshift/api/authorization/.codegen.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions vendor/github.com/openshift/api/build/.codegen.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions vendor/github.com/openshift/api/cloudnetwork/.codegen.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions vendor/github.com/openshift/api/config/v1/types_network.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading