Skip to content

Commit aa89837

Browse files
committed
MCO-2296: OSImageStreams v1 promotion
This change replaces the v1alpha types of OSImageStreams with the GAed ones that use regular v1 apiVersion. Signed-off-by: Pablo Rodriguez Nava <git@amail.pablintino.eu>
1 parent 8c50bc4 commit aa89837

131 files changed

Lines changed: 7987 additions & 439 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

go.mod

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ require (
6565
github.com/opencontainers/go-digest v1.0.0
6666
github.com/openshift-eng/openshift-tests-extension v0.0.0-20260127124016-0fed2b824818
6767
github.com/openshift-kni/commatrix v0.0.5-0.20251111204857-e5a931eff73f
68-
github.com/openshift/api v0.0.0-20260327065519-582dc3d316b7
68+
github.com/openshift/api v0.0.0-20260511191110-9b69e5fa27e9
6969
github.com/openshift/apiserver-library-go v0.0.0-20260303173613-cd3676268d31
7070
github.com/openshift/build-machinery-go v0.0.0-20250530140348-dc5b2804eeee
7171
github.com/openshift/client-go v0.0.0-20260330134249-7e1499aaacd7
@@ -465,3 +465,8 @@ replace (
465465
k8s.io/sample-cli-plugin => github.com/openshift/kubernetes/staging/src/k8s.io/sample-cli-plugin v0.0.0-20260305123649-d18f3f005eaa
466466
k8s.io/sample-controller => github.com/openshift/kubernetes/staging/src/k8s.io/sample-controller v0.0.0-20260305123649-d18f3f005eaa
467467
)
468+
469+
replace (
470+
github.com/openshift/api => github.com/pablintino/api v0.0.0-20260528074109-71b14e62c33b
471+
github.com/openshift/client-go => github.com/pablintino/client-go v0.0.0-20260602163508-784018048305
472+
)

go.sum

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -878,14 +878,10 @@ github.com/openshift-eng/openshift-tests-extension v0.0.0-20260127124016-0fed2b8
878878
github.com/openshift-eng/openshift-tests-extension v0.0.0-20260127124016-0fed2b824818/go.mod h1:6gkP5f2HL0meusT0Aim8icAspcD1cG055xxBZ9yC68M=
879879
github.com/openshift-kni/commatrix v0.0.5-0.20251111204857-e5a931eff73f h1:E72Zoc+JImPehBrXkgaCbIDbSFuItvyX6RCaZ0FQE5k=
880880
github.com/openshift-kni/commatrix v0.0.5-0.20251111204857-e5a931eff73f/go.mod h1:cDVdp0eda7EHE6tLuSeo4IqPWdAX/KJK+ogBirIGtsI=
881-
github.com/openshift/api v0.0.0-20260327065519-582dc3d316b7 h1:7AmoMSqTryaZu65nij6EACe8+DmlMlmR1giaUx5S5sQ=
882-
github.com/openshift/api v0.0.0-20260327065519-582dc3d316b7/go.mod h1:pyVjK0nZ4sRs4fuQVQ4rubsJdahI1PB94LnQ8sGdvxo=
883881
github.com/openshift/apiserver-library-go v0.0.0-20260303173613-cd3676268d31 h1:oYPQMrkzyk002L5aN8I2tkUHTEu9lsVrc1qiJmHJdXU=
884882
github.com/openshift/apiserver-library-go v0.0.0-20260303173613-cd3676268d31/go.mod h1:mnTsMMTtXSPBQzqBp5HXBjLvliveKenRADFQy9m5jc0=
885883
github.com/openshift/build-machinery-go v0.0.0-20250530140348-dc5b2804eeee h1:+Sp5GGnjHDhT/a/nQ1xdp43UscBMr7G5wxsYotyhzJ4=
886884
github.com/openshift/build-machinery-go v0.0.0-20250530140348-dc5b2804eeee/go.mod h1:8jcm8UPtg2mCAsxfqKil1xrmRMI3a+XU2TZ9fF8A7TE=
887-
github.com/openshift/client-go v0.0.0-20260330134249-7e1499aaacd7 h1:5GSoQlywIwYsRCw3qN+ZDmN6HrXTMZfI33bdRNm2jRQ=
888-
github.com/openshift/client-go v0.0.0-20260330134249-7e1499aaacd7/go.mod h1:HhXTUIMhgzxR3Ln/zEkr4QjTL0NN7A+t9Py/we9j2ug=
889885
github.com/openshift/kubernetes v0.0.0-20260305123649-d18f3f005eaa h1:4TK07egSJrny442x0Kl0HgzXgt2lnCKTKHF3sbL2U3E=
890886
github.com/openshift/kubernetes v0.0.0-20260305123649-d18f3f005eaa/go.mod h1:1r2FIoYrPU0110cjYlWAwNcbiqRPLWAgmZK4d0YeEZw=
891887
github.com/openshift/kubernetes/staging/src/k8s.io/api v0.0.0-20260305123649-d18f3f005eaa h1:ifOqAFthJWnT1HS6Sq2AcLQWNSJ1+XEiyA9eo+PIcR0=
@@ -951,6 +947,10 @@ github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYr
951947
github.com/orisano/pixelmatch v0.0.0-20220722002657-fb0b55479cde/go.mod h1:nZgzbfBr3hhjoZnS66nKrHmduYNpc34ny7RK4z5/HM0=
952948
github.com/ovn-org/ovn-kubernetes/go-controller v0.0.0-20250118001652-a8b9c3c31417 h1:7k+dokKFfpICbkpX5TvvpFbKTFsl/6YQd46EpY2JNhc=
953949
github.com/ovn-org/ovn-kubernetes/go-controller v0.0.0-20250118001652-a8b9c3c31417/go.mod h1:9LxDV3rAHlGHAYtVrT62y/fqfIxc5RrDiYi9RVeD0gg=
950+
github.com/pablintino/api v0.0.0-20260528074109-71b14e62c33b h1:VNoqZTWcS74TUI4TeUIdbevP+1ZhvHNk9E/3N79wxzg=
951+
github.com/pablintino/api v0.0.0-20260528074109-71b14e62c33b/go.mod h1:pyVjK0nZ4sRs4fuQVQ4rubsJdahI1PB94LnQ8sGdvxo=
952+
github.com/pablintino/client-go v0.0.0-20260602163508-784018048305 h1:Y/KH/7YB3XGNakXjSD6exhu4ehDlmo8T6tTFPDv2B9s=
953+
github.com/pablintino/client-go v0.0.0-20260602163508-784018048305/go.mod h1:B30HmrKXy/2nTJ3GS5QJMPxpOyhvH68T1Lm03cXswXs=
954954
github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc=
955955
github.com/pborman/uuid v1.2.0 h1:J7Q5mO4ysT1dv8hyrUGHb9+ooztCXu1D8MY8DZYsu3g=
956956
github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k=

pkg/monitortestlibrary/platformidentification/types.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ func getOSImageStreams(mc machineconfigclient.Interface) (OSImageStreams, error)
197197
var osImageStreams OSImageStreams
198198
var errs []error
199199

200-
osImageStream, err := mc.MachineconfigurationV1alpha1().OSImageStreams().Get(context.TODO(), "cluster", metav1.GetOptions{})
200+
osImageStream, err := mc.MachineconfigurationV1().OSImageStreams().Get(context.TODO(), "cluster", metav1.GetOptions{})
201201
if err != nil {
202202
if !kapierrs.IsNotFound(err) {
203203
errs = append(errs, fmt.Errorf("error getting OSImageStream singleton: %v", err))

pkg/monitortestlibrary/platformidentification/types_test.go

Lines changed: 12 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,8 @@ import (
66
"testing"
77

88
mcapiv1 "github.com/openshift/api/machineconfiguration/v1"
9-
mcapiv1alpha1 "github.com/openshift/api/machineconfiguration/v1alpha1"
109
machineconfigclient "github.com/openshift/client-go/machineconfiguration/clientset/versioned"
1110
mcv1 "github.com/openshift/client-go/machineconfiguration/clientset/versioned/typed/machineconfiguration/v1"
12-
mcv1alpha1 "github.com/openshift/client-go/machineconfiguration/clientset/versioned/typed/machineconfiguration/v1alpha1"
1311
kapierrs "k8s.io/apimachinery/pkg/api/errors"
1412
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
1513
"k8s.io/apimachinery/pkg/runtime/schema"
@@ -22,32 +20,24 @@ import (
2220

2321
type fakeMCClient struct {
2422
machineconfigclient.Interface
25-
v1 *fakeMCv1
26-
v1alpha1 *fakeMCv1alpha1
23+
v1 *fakeMCv1
2724
}
2825

2926
func (f *fakeMCClient) MachineconfigurationV1() mcv1.MachineconfigurationV1Interface {
3027
return f.v1
3128
}
32-
func (f *fakeMCClient) MachineconfigurationV1alpha1() mcv1alpha1.MachineconfigurationV1alpha1Interface {
33-
return f.v1alpha1
34-
}
3529

3630
type fakeMCv1 struct {
3731
mcv1.MachineconfigurationV1Interface
38-
pools *fakeMCPools
32+
pools *fakeMCPools
33+
streams *fakeOSImageStreams
3934
}
4035

4136
func (f *fakeMCv1) MachineConfigPools() mcv1.MachineConfigPoolInterface {
4237
return f.pools
4338
}
4439

45-
type fakeMCv1alpha1 struct {
46-
mcv1alpha1.MachineconfigurationV1alpha1Interface
47-
streams *fakeOSImageStreams
48-
}
49-
50-
func (f *fakeMCv1alpha1) OSImageStreams() mcv1alpha1.OSImageStreamInterface {
40+
func (f *fakeMCv1) OSImageStreams() mcv1.OSImageStreamInterface {
5141
return f.streams
5242
}
5343

@@ -62,21 +52,19 @@ func (f *fakeMCPools) List(_ context.Context, _ metav1.ListOptions) (*mcapiv1.Ma
6252
}
6353

6454
type fakeOSImageStreams struct {
65-
mcv1alpha1.OSImageStreamInterface
66-
obj *mcapiv1alpha1.OSImageStream
55+
mcv1.OSImageStreamInterface
56+
obj *mcapiv1.OSImageStream
6757
err error
6858
}
6959

70-
func (f *fakeOSImageStreams) Get(_ context.Context, _ string, _ metav1.GetOptions) (*mcapiv1alpha1.OSImageStream, error) {
60+
func (f *fakeOSImageStreams) Get(_ context.Context, _ string, _ metav1.GetOptions) (*mcapiv1.OSImageStream, error) {
7161
return f.obj, f.err
7262
}
7363

74-
func newFakeMCClient(osImageStream *mcapiv1alpha1.OSImageStream, osImageStreamErr error, mcpList *mcapiv1.MachineConfigPoolList, mcpErr error) *fakeMCClient {
64+
func newFakeMCClient(osImageStream *mcapiv1.OSImageStream, osImageStreamErr error, mcpList *mcapiv1.MachineConfigPoolList, mcpErr error) *fakeMCClient {
7565
return &fakeMCClient{
7666
v1: &fakeMCv1{
77-
pools: &fakeMCPools{list: mcpList, err: mcpErr},
78-
},
79-
v1alpha1: &fakeMCv1alpha1{
67+
pools: &fakeMCPools{list: mcpList, err: mcpErr},
8068
streams: &fakeOSImageStreams{obj: osImageStream, err: osImageStreamErr},
8169
},
8270
}
@@ -95,10 +83,10 @@ func mcpList(pools ...mcapiv1.MachineConfigPool) *mcapiv1.MachineConfigPoolList
9583
return &mcapiv1.MachineConfigPoolList{Items: pools}
9684
}
9785

98-
func osImageStreamSingleton(defaultStream string) *mcapiv1alpha1.OSImageStream {
99-
return &mcapiv1alpha1.OSImageStream{
86+
func osImageStreamSingleton(defaultStream string) *mcapiv1.OSImageStream {
87+
return &mcapiv1.OSImageStream{
10088
ObjectMeta: metav1.ObjectMeta{Name: "cluster"},
101-
Status: mcapiv1alpha1.OSImageStreamStatus{
89+
Status: mcapiv1.OSImageStreamStatus{
10290
DefaultStream: defaultStream,
10391
},
10492
}

test/extended/ci/job_names.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ func isRHCOS10(machineConfigClient mcv1client.Interface) bool {
239239
return mcp.Spec.OSImageStream.Name == "rhel-10"
240240
}
241241

242-
osImageStream, err := machineConfigClient.MachineconfigurationV1alpha1().OSImageStreams().Get(context.TODO(), "cluster", metav1.GetOptions{})
242+
osImageStream, err := machineConfigClient.MachineconfigurationV1().OSImageStreams().Get(context.TODO(), "cluster", metav1.GetOptions{})
243243
if kapierrs.IsNotFound(err) {
244244
return false
245245
}

vendor/github.com/openshift/api/.golangci.yaml

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/github.com/openshift/api/config/v1/types.go

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/github.com/openshift/api/config/v1/types_apiserver.go

Lines changed: 3 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)