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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
2 changes: 1 addition & 1 deletion .ci-operator.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
build_root_image:
name: release
namespace: openshift
tag: rhel-9-release-golang-1.24-openshift-4.22
tag: rhel-9-release-golang-1.25-openshift-4.22
7 changes: 5 additions & 2 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
---
version: "2"
Comment thread
dkhater-redhat marked this conversation as resolved.
run:
concurrency: 6
deadline: 15m
Expand All @@ -7,6 +8,10 @@ run:
- "lib/.*"
cache:
enabled: true
formatters:
enable:
- gofmt
- goimports
linters:
disable-all: true
enable:
Expand All @@ -16,8 +21,6 @@ linters:
#- gochecknoinits
- goconst
- gocritic
- gofmt
- goimports
- revive
- gosec
- govet
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# Use RHEL 9 as the primary builder base for the Machine Config Operator
FROM registry.ci.openshift.org/ocp/builder:rhel-9-golang-1.24-openshift-4.22 AS rhel9-builder
FROM registry.ci.openshift.org/ocp/builder:rhel-9-golang-1.25-openshift-4.22 AS rhel9-builder
ARG TAGS=""
WORKDIR /go/src/github.com/openshift/machine-config-operator
COPY . .
RUN make install DESTDIR=./instroot-rhel9

# Add a RHEL 8 builder to compile the RHEL 8 compatible binaries
FROM registry.ci.openshift.org/ocp/builder:rhel-8-golang-1.24-openshift-4.22 AS rhel8-builder
FROM registry.ci.openshift.org/ocp/builder:rhel-8-golang-1.25-openshift-4.22 AS rhel8-builder
ARG TAGS=""
WORKDIR /go/src/github.com/openshift/machine-config-operator
# Copy the RHEL 8 machine-config-daemon binary and rename
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile.rhel7
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# THIS FILE IS GENERATED FROM Dockerfile DO NOT EDIT
# Use RHEL 9 as the primary builder base for the Machine Config Operator
FROM registry.ci.openshift.org/ocp/builder:rhel-9-golang-1.24-openshift-4.22 AS rhel9-builder
FROM registry.ci.openshift.org/ocp/builder:rhel-9-golang-1.25-openshift-4.22 AS rhel9-builder
ARG TAGS=""
WORKDIR /go/src/github.com/openshift/machine-config-operator
COPY . .
RUN make install DESTDIR=./instroot-rhel9

# Add a RHEL 8 builder to compile the RHEL 8 compatible binaries
FROM registry.ci.openshift.org/ocp/builder:rhel-8-golang-1.24-openshift-4.22 AS rhel8-builder
FROM registry.ci.openshift.org/ocp/builder:rhel-8-golang-1.25-openshift-4.22 AS rhel8-builder
ARG TAGS=""
WORKDIR /go/src/github.com/openshift/machine-config-operator
# Copy the RHEL 8 machine-config-daemon binary and rename
Expand Down
204 changes: 102 additions & 102 deletions go.mod

Large diffs are not rendered by default.

335 changes: 177 additions & 158 deletions go.sum

Large diffs are not rendered by default.

14 changes: 7 additions & 7 deletions pkg/controller/build/fixtures/fixtures.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ import (
)

func GetEmptyClientsForTest(t *testing.T) (*fakecorev1client.Clientset, *fakeclientmachineconfigv1.Clientset, *testhelpers.Assertions) {
kubeclient := fakecorev1client.NewSimpleClientset()
mcfgclient := fakeclientmachineconfigv1.NewSimpleClientset()
imageclient := fakeclientimagev1.NewSimpleClientset()
kubeclient := fakecorev1client.NewClientset()
mcfgclient := fakeclientmachineconfigv1.NewClientset()
imageclient := fakeclientimagev1.NewClientset()
return kubeclient, mcfgclient, testhelpers.Assert(t, kubeclient, mcfgclient, imageclient)
}

Expand All @@ -41,10 +41,10 @@ func GetClientsForTestWithAdditionalObjects(t *testing.T, addlKubeObjects, addlM

addlKubeObjects = append(defaultKubeObjects(), addlKubeObjects...)

kubeclient := fakecorev1client.NewSimpleClientset(addlKubeObjects...)
mcfgclient := fakeclientmachineconfigv1.NewSimpleClientset(mcfgObjects...)
imageclient := fakeclientimagev1.NewSimpleClientset()
routeclient := fakeclientroutev1.NewSimpleClientset()
kubeclient := fakecorev1client.NewClientset(addlKubeObjects...)
mcfgclient := fakeclientmachineconfigv1.NewClientset(mcfgObjects...)
imageclient := fakeclientimagev1.NewClientset()
routeclient := fakeclientroutev1.NewClientset()

return kubeclient, mcfgclient, imageclient, routeclient, &obj, testhelpers.Assert(t, kubeclient, mcfgclient, imageclient)
}
18 changes: 9 additions & 9 deletions pkg/controller/common/controller_context.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,20 +90,20 @@ func CreateControllerContext(ctx context.Context, cb *clients.Builder) *Controll
machineClient := cb.MachineClientOrDie("machine-shared-informer")
sharedInformers := mcfginformers.NewSharedInformerFactory(client, resyncPeriod()())
sharedTechPreviewInformers := mcfginformers.NewSharedInformerFactory(client, resyncPeriod()())
sharedNamespacedInformers := mcfginformers.NewFilteredSharedInformerFactory(client, resyncPeriod()(), MCONamespace, nil)
sharedNamespacedInformers := mcfginformers.NewSharedInformerFactoryWithOptions(client, resyncPeriod()(), mcfginformers.WithNamespace(MCONamespace))
kubeSharedInformer := informers.NewSharedInformerFactory(kubeClient, resyncPeriod()())
kubeNamespacedSharedInformer := informers.NewFilteredSharedInformerFactory(kubeClient, resyncPeriod()(), MCONamespace, nil)
openShiftConfigKubeNamespacedSharedInformer := informers.NewFilteredSharedInformerFactory(kubeClient, resyncPeriod()(), OpenshiftConfigNamespace, nil)
openShiftConfigManagedKubeNamespacedSharedInformer := informers.NewFilteredSharedInformerFactory(kubeClient, resyncPeriod()(), OpenshiftConfigManagedNamespace, nil)
openShiftKubeAPIServerKubeNamespacedSharedInformer := informers.NewFilteredSharedInformerFactory(kubeClient,
kubeNamespacedSharedInformer := informers.NewSharedInformerFactoryWithOptions(kubeClient, resyncPeriod()(), informers.WithNamespace(MCONamespace))
openShiftConfigKubeNamespacedSharedInformer := informers.NewSharedInformerFactoryWithOptions(kubeClient, resyncPeriod()(), informers.WithNamespace(OpenshiftConfigNamespace))
openShiftConfigManagedKubeNamespacedSharedInformer := informers.NewSharedInformerFactoryWithOptions(kubeClient, resyncPeriod()(), informers.WithNamespace(OpenshiftConfigManagedNamespace))
openShiftKubeAPIServerKubeNamespacedSharedInformer := informers.NewSharedInformerFactoryWithOptions(kubeClient,
resyncPeriod()(),
"openshift-kube-apiserver-operator",
func(opt *metav1.ListOptions) {
informers.WithNamespace("openshift-kube-apiserver-operator"),
informers.WithTweakListOptions(func(opt *metav1.ListOptions) {
opt.FieldSelector = fields.OneTermEqualSelector("metadata.name", "kube-apiserver-to-kubelet-client-ca").String()
},
}),
)
// this is needed to listen for changes in MAO user data secrets to re-apply the ones we define in the MCO (since we manage them)
kubeMAOSharedInformer := informers.NewFilteredSharedInformerFactory(kubeClient, resyncPeriod()(), "openshift-machine-api", nil)
kubeMAOSharedInformer := informers.NewSharedInformerFactoryWithOptions(kubeClient, resyncPeriod()(), informers.WithNamespace("openshift-machine-api"))
imageSharedInformer := imageinformers.NewSharedInformerFactory(imageClient, resyncPeriod()())
routeSharedInformer := routeinformers.NewSharedInformerFactory(routeClient, resyncPeriod()())

Expand Down
2 changes: 1 addition & 1 deletion pkg/operator/sync_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ func TestMachineOSBuilderSecretReconciliation(t *testing.T) {

// Create MCO specific clients
mcfgClient := fakeclientmachineconfigv1.NewSimpleClientset()
mcfgInformerFactory := mcfginformers.NewFilteredSharedInformerFactory(mcfgClient, 0, ctrlcommon.MCONamespace, nil)
mcfgInformerFactory := mcfginformers.NewSharedInformerFactoryWithOptions(mcfgClient, 0, mcfginformers.WithNamespace(ctrlcommon.MCONamespace))
mcpInformer := mcfgInformerFactory.Machineconfiguration().V1().MachineConfigPools()

// Add all pools to mcpInformer
Expand Down
2 changes: 1 addition & 1 deletion pkg/server/cluster_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ func NewClusterServer(kubeConfig, apiserverURL string) (Server, error) {
kubeClient := clientsBuilder.KubeClientOrDie("kube-client-shared-informer")
routeClient := clientsBuilder.RouteClientOrDie("route-client")
sharedInformerFactory := mcfginformers.NewSharedInformerFactory(machineConfigClient, resyncPeriod()())
kubeNamespacedSharedInformer := informers.NewFilteredSharedInformerFactory(kubeClient, resyncPeriod()(), "openshift-machine-config-operator", nil)
kubeNamespacedSharedInformer := informers.NewSharedInformerFactoryWithOptions(kubeClient, resyncPeriod()(), informers.WithNamespace("openshift-machine-config-operator"))

mcpInformer, mcInformer, ccInformer, cmInformer, moscInformer, mosbInformer :=
sharedInformerFactory.Machineconfiguration().V1().MachineConfigPools(),
Expand Down
9 changes: 8 additions & 1 deletion test/e2e-bootstrap/bootstrap_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import (

ign3types "github.com/coreos/ignition/v2/config/v3_2/types"

"github.com/blang/semver/v4"
"github.com/ghodss/yaml"
configv1 "github.com/openshift/api/config/v1"
_ "github.com/openshift/api/config/v1/zz_generated.crd-manifests"
Expand Down Expand Up @@ -689,7 +690,13 @@ func ensureFeatureGate(t *testing.T, clientSet *framework.ClientSet, objs ...run
if err != nil {
t.Fatalf("Error retrieving current feature gates: %v", err)
}
featureGateStatus, err := features.FeatureSets(features.ClusterProfileName(SelfManaged), currentFeatureSet)

// Parse the release version to get the major version (e.g., "4.22.0" -> 4)
releaseVersion, err := semver.ParseTolerant(version.ReleaseVersion)
if err != nil {
t.Fatalf("Error parsing release version %s: %v", version.ReleaseVersion, err)
}
featureGateStatus := features.FeatureSets(releaseVersion.Major, features.ClusterProfileName(SelfManaged), currentFeatureSet)

require.NoError(t, err)
currentDetails := featuregatescontroller.FeaturesGateDetailsFromFeatureSets(featureGateStatus, controllerConfig.Spec.ReleaseImage)
Expand Down
43 changes: 43 additions & 0 deletions vendor/cyphar.com/go-pathrs/.golangci.yml

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

Loading