Skip to content

Commit b54296a

Browse files
authored
Helm upgrade to v3.11.1 for CVE-2023-25165 (#2933)
* Update Helm to v3.11.1 Updatate go.mod, go.sum, and vendor directory. Signed-off-by: Todd Short <[email protected]> * Run go fmt Plus some manual edits. Signed-off-by: Todd Short <[email protected]> * Update from make verify Signed-off-by: Todd Short <[email protected]> * Fix golangci-lint issues Signed-off-by: Todd Short <[email protected]> * Client updates due to controller-runtime Status is now updated using SubResource methods and options Signed-off-by: Todd Short <[email protected]> --------- Signed-off-by: Todd Short <[email protected]>
1 parent 4634317 commit b54296a

File tree

1,647 files changed

+131184
-83924
lines changed

Some content is hidden

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

1,647 files changed

+131184
-83924
lines changed

go.mod

+76-98
Large diffs are not rendered by default.

go.sum

+178-217
Large diffs are not rendered by default.

pkg/api/client/clientset/versioned/clientset.go

+1-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/api/client/clientset/versioned/fake/decorator.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Licensed under the Apache License, Version 2.0 (the "License");
55
you may not use this file except in compliance with the License.
66
You may obtain a copy of the License at
77
8-
http://www.apache.org/licenses/LICENSE-2.0
8+
http://www.apache.org/licenses/LICENSE-2.0
99
1010
Unless required by applicable law or agreed to in writing, software
1111
distributed under the License is distributed on an "AS IS" BASIS,

pkg/api/client/informers/externalversions/factory.go

+75-4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/controller/install/deployment.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ func (i *StrategyDeploymentInstaller) deploymentForSpec(name string, spec appsv1
175175
// By default, each deployment created by OLM could spawn up to 10 replicaSets.
176176
// By setting the deployments revisionHistoryLimit to 1, OLM will only create up
177177
// to 2 ReplicaSets per deployment it manages, saving memory.
178-
dep.Spec.RevisionHistoryLimit = pointer.Int32Ptr(1)
178+
dep.Spec.RevisionHistoryLimit = pointer.Int32(1)
179179

180180
hash = HashDeploymentSpec(dep.Spec)
181181
dep.Labels[DeploymentSpecHashLabelKey] = hash

pkg/controller/operators/catalog/operator_test.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -1333,7 +1333,8 @@ func TestCompetingCRDOwnersExist(t *testing.T) {
13331333
expectedResult: true,
13341334
},
13351335
}
1336-
for _, tt := range tests {
1336+
for _, xt := range tests {
1337+
tt := xt
13371338
t.Run(tt.name, func(t *testing.T) {
13381339
t.Parallel()
13391340

pkg/controller/operators/olm/operator_test.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -3852,7 +3852,8 @@ func TestUpdates(t *testing.T) {
38523852
in: []*v1alpha1.ClusterServiceVersion{c, a, b},
38533853
},
38543854
}
3855-
for _, tt := range tests {
3855+
for _, xt := range tests {
3856+
tt := xt
38563857
t.Run(tt.name, func(t *testing.T) {
38573858
t.Parallel()
38583859

pkg/lib/catalogsource/catalogsource_update.go

+8-4
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ import (
1212
"github.com/operator-framework/operator-lifecycle-manager/pkg/api/client/clientset/versioned"
1313
)
1414

15-
/* UpdateStatus can be used to update the status of the provided catalog source. Note that
15+
/*
16+
UpdateStatus can be used to update the status of the provided catalog source. Note that
1617
the caller is responsible for ensuring accurate status values in the catsrc argument (i.e.
1718
the status is used as-is).
1819
@@ -34,7 +35,8 @@ func UpdateStatus(logger *logrus.Entry, client versioned.Interface, catsrc *v1al
3435
return nil
3536
}
3637

37-
/* UpdateStatusWithConditions can be used to update the status conditions for the provided catalog source.
38+
/*
39+
UpdateStatusWithConditions can be used to update the status conditions for the provided catalog source.
3840
This function will make no changes to the other status fields (those fields will be used as-is).
3941
If the provided conditions do not result in any status condition changes, then the API server will not be updated.
4042
Note that the caller is responsible for ensuring accurate status values for all other fields.
@@ -71,7 +73,8 @@ func UpdateStatusWithConditions(logger *logrus.Entry, client versioned.Interface
7173
return nil
7274
}
7375

74-
/* UpdateSpecAndStatusConditions can be used to update the catalog source with the provided status conditions.
76+
/*
77+
UpdateSpecAndStatusConditions can be used to update the catalog source with the provided status conditions.
7578
This will update the spec and status portions of the catalog source. Calls to the API server will occur
7679
even if the provided conditions result in no changes.
7780
@@ -98,7 +101,8 @@ func UpdateSpecAndStatusConditions(logger *logrus.Entry, client versioned.Interf
98101
return nil
99102
}
100103

101-
/* RemoveStatusConditions can be used to remove the status conditions for the provided catalog source.
104+
/*
105+
RemoveStatusConditions can be used to remove the status conditions for the provided catalog source.
102106
This function will make no changes to the other status fields (those fields will be used as-is).
103107
If the provided conditions do not result in any status condition changes, then the API server will not be updated.
104108
Note that the caller is responsible for ensuring accurate status values for all other fields.

pkg/lib/controller-runtime/client/fake_ssa.go

+1-2
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,7 @@ type fakeStatusWriter struct {
3535
k8scontrollerclient.StatusWriter
3636
}
3737

38-
func (c fakeStatusWriter) Patch(ctx context.Context, obj k8scontrollerclient.Object, patch k8scontrollerclient.Patch, opts ...k8scontrollerclient.PatchOption) error {
39-
patch, opts = convertApplyToMergePatch(patch, opts...)
38+
func (c fakeStatusWriter) Patch(ctx context.Context, obj k8scontrollerclient.Object, patch k8scontrollerclient.Patch, opts ...k8scontrollerclient.SubResourcePatchOption) error {
4039
return c.StatusWriter.Patch(ctx, obj, patch, opts...)
4140
}
4241

pkg/lib/controller-runtime/client/ssa.go

+9-5
Original file line numberDiff line numberDiff line change
@@ -90,10 +90,11 @@ type ServerSideApplier struct {
9090
// plan := &InstallPlan{}
9191
// plan.SetNamespace("ns")
9292
// plan.SetName("install-123def")
93-
// Eventually(c.Apply(plan, func(p *v1alpha1.InstallPlan) error {
94-
// p.Spec.Approved = true
95-
// return nil
96-
// })).Should(Succeed())
93+
//
94+
// Eventually(c.Apply(plan, func(p *v1alpha1.InstallPlan) error {
95+
// p.Spec.Approved = true
96+
// return nil
97+
// })).Should(Succeed())
9798
func (c *ServerSideApplier) Apply(ctx context.Context, obj Object, changeFunc interface{}) func() error {
9899
// Ensure given object is a pointer
99100
objType := reflect.TypeOf(obj)
@@ -182,7 +183,10 @@ func (c *ServerSideApplier) Apply(ctx context.Context, obj Object, changeFunc in
182183
return err
183184
}
184185

185-
if err := c.client.Status().Patch(ctx, cp, k8scontrollerclient.Apply, k8scontrollerclient.ForceOwnership, c.Owner); err != nil {
186+
pos := &k8scontrollerclient.SubResourcePatchOptions{}
187+
k8scontrollerclient.ForceOwnership.ApplyToPatch(&pos.PatchOptions)
188+
189+
if err := c.client.Status().Patch(ctx, cp, k8scontrollerclient.Apply, pos, c.Owner); err != nil {
186190
fmt.Printf("second patch error: %s\n", err)
187191
return err
188192
}

pkg/lib/kubernetes/pkg/apis/rbac/v1/zz_generated.conversion.go

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/lib/kubernetes/pkg/apis/rbac/v1/zz_generated.deepcopy.go

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/lib/kubernetes/pkg/apis/rbac/v1/zz_generated.defaults.go

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/lib/kubernetes/pkg/apis/rbac/zz_generated.deepcopy.go

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/lib/kubernetes/pkg/printers/tablegenerator.go

+3-1
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,9 @@ func (h *HumanReadableGenerator) TableHandler(columnDefinitions []metav1beta1.Ta
150150
// ValidateRowPrintHandlerFunc validates print handler signature.
151151
// printFunc is the function that will be called to print an object.
152152
// It must be of the following type:
153-
// func printFunc(object ObjectType, options GenerateOptions) ([]metav1beta1.TableRow, error)
153+
//
154+
// func printFunc(object ObjectType, options GenerateOptions) ([]metav1beta1.TableRow, error)
155+
//
154156
// where ObjectType is the type of the object that will be printed, and the first
155157
// return value is an array of rows, with each row containing a number of cells that
156158
// match the number of columns defined for that printer function.

pkg/lib/operatorlister/lister.go

+1
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ import (
2828
//go:generate go run github.com/maxbrunsfeld/counterfeiter/v6 -o ./operatorlisterfakes/fake_clusterserviceversion_v1alpha1_namespace_lister.go ../../api/client/listers/operators/v1alpha1.ClusterServiceVersionNamespaceLister
2929

3030
// OperatorLister is a union of versioned informer listers
31+
//
3132
//go:generate go run github.com/maxbrunsfeld/counterfeiter/v6 . OperatorLister
3233
type OperatorLister interface {
3334
AppsV1() AppsV1Lister

pkg/lib/operatorstatus/csv_handler.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,8 @@ type handler struct {
8686
// OnAddOrUpdate is invoked when a CSV has been added or edited. We tap into
8787
// this notification and do the following:
8888
//
89-
// a. Make sure this is the CSV related to the cluster operator resource we are
90-
// tracking. Otherwise, do nothing.
89+
// a. Make sure this is the CSV related to the cluster operator resource we are tracking. Otherwise, do nothing.
90+
//
9191
// b. If this is the right CSV then send it to the monitor.
9292
func (h *handler) OnAddOrUpdate(in *v1alpha1.ClusterServiceVersion) {
9393
h.onNotification(in, false)
@@ -96,8 +96,8 @@ func (h *handler) OnAddOrUpdate(in *v1alpha1.ClusterServiceVersion) {
9696
// OnDelete is invoked when a CSV has been deleted. We tap into
9797
// this notification and do the following:
9898
//
99-
// a. Make sure this is the CSV related to the cluster operator resource we are
100-
// tracking. Otherwise, do nothing.
99+
// a. Make sure this is the CSV related to the cluster operator resource we are tracking. Otherwise, do nothing.
100+
//
101101
// b. If this is the right CSV then send it to the monitor.
102102
func (h *handler) OnDelete(in *v1alpha1.ClusterServiceVersion) {
103103
h.onNotification(in, true)

pkg/lib/proxy/overridden.go

+3-2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,9 @@ import (
66

77
// IsOverridden returns true if the given container overrides proxy env variable(s).
88
// We apply the following rule:
9-
// If a container already defines any of the proxy env variable then it
10-
// overrides all of these.
9+
//
10+
// If a container already defines any of the proxy env variable then it
11+
// overrides all of these.
1112
func IsOverridden(envVar []corev1.EnvVar) (overrides bool) {
1213
for _, envVarName := range allProxyEnvVarNames {
1314
_, found := find(envVar, envVarName)

pkg/package-server/client/clientset/internalversion/clientset.go

+1-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/package-server/client/clientset/versioned/clientset.go

+1-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)