Skip to content
Closed
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
5 changes: 3 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ require (
golang.org/x/oauth2 v0.23.0
golang.org/x/sync v0.12.0
gonum.org/v1/plot v0.14.0
google.golang.org/grpc v1.65.0
google.golang.org/grpc v1.66.2
gopkg.in/ini.v1 v1.62.0
gopkg.in/src-d/go-git.v4 v4.13.1
gopkg.in/yaml.v2 v2.4.0
Expand All @@ -81,6 +81,7 @@ require (
k8s.io/pod-security-admission v0.32.3
k8s.io/utils v0.0.0-20241210054802-24370beab758
sigs.k8s.io/cloud-provider-azure v1.30.4
sigs.k8s.io/gateway-api v1.2.1
sigs.k8s.io/kustomize/kyaml v0.18.1
sigs.k8s.io/structured-merge-diff/v4 v4.6.0
sigs.k8s.io/yaml v1.4.0
Expand Down Expand Up @@ -178,7 +179,7 @@ require (
github.com/google/pprof v0.0.0-20241029153458-d1b30febd7db // indirect
github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect
github.com/gopherjs/gopherjs v0.0.0-20200217142428-fce0ec30dd00 // indirect
github.com/gorilla/websocket v1.5.0 // indirect
github.com/gorilla/websocket v1.5.1 // indirect
github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79 // indirect
github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 // indirect
github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 // indirect
Expand Down
10 changes: 6 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -417,8 +417,8 @@ github.com/gopherjs/gopherjs v0.0.0-20200217142428-fce0ec30dd00/go.mod h1:wJfORR
github.com/gorilla/mux v1.8.1 h1:TuBL49tXwgrFYWhqrNgrUNEY92u81SPhu7sTdzQEiWY=
github.com/gorilla/mux v1.8.1/go.mod h1:AKf9I4AEqPTmMytcMc0KkNouC66V3BtZ4qD5fmWSiMQ=
github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc=
github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
github.com/gorilla/websocket v1.5.1 h1:gmztn0JnHVt9JZquRuzLw3g4wouNVzKL15iLr/zn/QY=
github.com/gorilla/websocket v1.5.1/go.mod h1:x3kM2JMyaluk02fnUJpQuwD2dCS5NDG2ZHL0uE0tcaY=
github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79 h1:+ngKgrYPPJrOjhax5N+uePQ0Fh1Z7PheYoUI/0nzkPA=
github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA=
github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 h1:+9834+KizmvFV7pXQGSXQTsaWhq2GjuNUt0aUU0YBYw=
Expand Down Expand Up @@ -1247,8 +1247,8 @@ google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAG
google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU=
google.golang.org/grpc v1.36.1/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU=
google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM=
google.golang.org/grpc v1.65.0 h1:bs/cUb4lp1G5iImFFd3u5ixQzweKizoZJAwBNLR42lc=
google.golang.org/grpc v1.65.0/go.mod h1:WgYC2ypjlB0EiQi6wdKixMqukr6lBc0Vo+oOgjrM5ZQ=
google.golang.org/grpc v1.66.2 h1:3QdXkuq3Bkh7w+ywLdLvM56cmGvQHUMZpiCzt6Rqaoo=
google.golang.org/grpc v1.66.2/go.mod h1:s3/l6xSSCURdVfAnL+TqCNMyTDAGN6+lZeVxnZR128Y=
google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8=
google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0=
google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM=
Expand Down Expand Up @@ -1332,6 +1332,8 @@ sigs.k8s.io/cloud-provider-azure/pkg/azclient/configloader v0.0.16 h1:Fm/Yjv4nXj
sigs.k8s.io/cloud-provider-azure/pkg/azclient/configloader v0.0.16/go.mod h1:+kl90flu4+WCP6HBGVYbKVQR+5ztDzUNrWJz8rsnvRU=
sigs.k8s.io/controller-runtime v0.19.0 h1:nWVM7aq+Il2ABxwiCizrVDSlmDcshi9llbaFbC0ji/Q=
sigs.k8s.io/controller-runtime v0.19.0/go.mod h1:iRmWllt8IlaLjvTTDLhRBXIEtkCK6hwVBJJsYS9Ajf4=
sigs.k8s.io/gateway-api v1.2.1 h1:fZZ/+RyRb+Y5tGkwxFKuYuSRQHu9dZtbjenblleOLHM=
sigs.k8s.io/gateway-api v1.2.1/go.mod h1:EpNfEXNjiYfUJypf0eZ0P5iXA9ekSGWaS1WgPaM42X0=
sigs.k8s.io/json v0.0.0-20241014173422-cfa47c3a1cc8 h1:gBQPwqORJ8d8/YNZWEjoZs7npUVDpVXUUOFfW6CgAqE=
sigs.k8s.io/json v0.0.0-20241014173422-cfa47c3a1cc8/go.mod h1:mdzfpAEoE6DHQEN0uh9ZbOCuHbLK5wOm7dK4ctXE9Tg=
sigs.k8s.io/kube-storage-version-migrator v0.0.6-0.20230721195810-5c8923c5ff96 h1:PFWFSkpArPNJxFX4ZKWAk9NSeRoZaXschn+ULa4xVek=
Expand Down
11 changes: 11 additions & 0 deletions test/extended/operators/resources.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,10 @@ var _ = g.Describe("[sig-arch] Managed cluster", func() {
"batch/v1/Job/openshift-monitoring/<batch_job>/container/osd-rebalance-infra-nodes/request[cpu]": "https://issues.redhat.com/browse/OSD-21708",
"batch/v1/Job/openshift-monitoring/<batch_job>/container/osd-rebalance-infra-nodes/request[memory]": "https://issues.redhat.com/browse/OSD-21708",

// Istio pods
"apps/v1/Deployment/openshift-ingress/gateway/container/istio-proxy/limit[cpu]": "https://issues.redhat.com/browse/OCPBUGS-55050",
"apps/v1/Deployment/openshift-ingress/gateway/container/istio-proxy/limit[memory]": "https://issues.redhat.com/browse/OCPBUGS-55050",

// ovn pods
"apps/v1/DaemonSet/openshift-multus/cni-sysctl-allowlist-ds/container/kube-multus-additional-cni-plugins/request[cpu]": "https://issues.redhat.com/browse/TRT-1871",
"apps/v1/DaemonSet/openshift-multus/cni-sysctl-allowlist-ds/container/kube-multus-additional-cni-plugins/request[memory]": "https://issues.redhat.com/browse/TRT-1871",
Expand Down Expand Up @@ -125,6 +129,13 @@ var _ = g.Describe("[sig-arch] Managed cluster", func() {
name := ref.Name[0:i]
if deploy, err := oc.KubeFramework().ClientSet.AppsV1().Deployments(pod.Namespace).Get(context.Background(), name, metav1.GetOptions{}); err == nil {
ref.Name = deploy.Name
if pod.Namespace == "openshift-ingress" && strings.HasPrefix(ref.Name, "gateway-") {
// The gateway deployment's name contains a hash, which
// must be removed in order to be able to define an
// exception. Remove this if block when the
// corresponding exception is removed.
ref.Name = "gateway"
}
ref.Kind = "Deployment"
ref.APIVersion = "apps/v1"
}
Expand Down
7 changes: 7 additions & 0 deletions test/extended/pods/priorityclasses.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,13 @@ var excludedPriorityClassPods = map[string][]string{
"configure-alertmanager-operator",
"osd-cluster-ready",
},

// OLM does not provide an option to set priority class on pods created
// by subscription. https://issues.redhat.com/browse/OCPBUGS-54879
// tracks removing this exclusion.
"openshift-operators": {
"servicemesh-operator3-",
},
}

var _ = Describe("[sig-arch] Managed cluster should", func() {
Expand Down
51 changes: 50 additions & 1 deletion test/extended/quota/clusterquota.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,56 @@ var _ = g.Describe("[sig-api-machinery][Feature:ClusterResourceQuota]", func() {
configmap := &corev1.ConfigMap{}
configmap.GenerateName = "test"
if _, err := clusterAdminKubeClient.CoreV1().ConfigMaps(firstProjectName).Create(context.Background(), configmap, metav1.CreateOptions{}); err != nil {
t.Fatalf("unexpected error: %v", err)
// Istio sometimes create an additional configmap in each namespace, so account for it
// and retry.
//
// Note that the tests that install Istio run in parallel with this test, so we cannot
// assume that it has or has not created the configmap when we create the quota. Thus
// we must check here whether the reason we got an error was because this configmap
// put us over the quota.
//
// TODO: Remove the following const and if/else block when we bump to OSSM 3.0.1, which
// ships a version of Istio that has been patched not to create these configmaps.
outerErr := err
const istioConfigmapName = "istio-ca-root-cert"
if _, err := clusterAdminKubeClient.CoreV1().ConfigMaps(firstProjectName).Get(context.Background(), istioConfigmapName, metav1.GetOptions{}); err != nil {
if !apierrors.IsNotFound(err) {
t.Fatalf("unexpected error: %v", err)
}
// The Istio configmap doesn't exist, and therefore The Create must have failed
// for some other reason; fail on the outer err.
t.Fatalf("unexpected error: %v", outerErr)
}

// As the Istio configmap exists in this project, assume that it exists in all
// projects, and adjust the clusterquota accordingly.
namespaceInitialCMCount++
adjustedMandatoryCMQuantity := resource.NewQuantity(int64(namespaceInitialCMCount)*2, resource.DecimalSI)
if quota, err := clusterAdminQuotaClient.QuotaV1().ClusterResourceQuotas().Get(context.Background(), cq.Name, metav1.GetOptions{}); err != nil {
t.Fatalf("unexpected error: %v", err)
} else {
cq = quota
}
q := cq.Spec.Quota.Hard[corev1.ResourceConfigMaps]
q.Sub(*mandatoryCMQuantity)
q.Add(*adjustedMandatoryCMQuantity)
cq.Spec.Quota.Hard[corev1.ResourceConfigMaps] = q
if _, err := clusterAdminQuotaClient.QuotaV1().ClusterResourceQuotas().Update(context.Background(), cq, metav1.UpdateOptions{}); err != nil {
t.Fatalf("unexpected error: %v", err)
}
if err := waitForQuotaStatus(clusterAdminQuotaClient, cq.Name, func(quota *quotav1.ClusterResourceQuota) error {
if !equality.Semantic.DeepEqual(quota.Spec.Quota.Hard, quota.Status.Total.Hard) {
return fmt.Errorf("%#v != %#v", quota.Spec.Quota.Hard, quota.Status.Total.Hard)
}
return nil
}); err != nil {
t.Fatalf("unexpected error: %v", err)
}

// Retry creating the configmap with the quota adjusted for the Istio configmap.
if _, err := clusterAdminKubeClient.CoreV1().ConfigMaps(firstProjectName).Create(context.Background(), configmap, metav1.CreateOptions{}); err != nil {
t.Fatalf("unexpected error: %v", err)
}
}
if err := waitForQuotaStatus(clusterAdminQuotaClient, cq.Name, func(quota *quotav1.ClusterResourceQuota) error {
expectedCount := int64(2*namespaceInitialCMCount + 1)
Expand Down
Loading