Skip to content

Commit

Permalink
Fix objects for Go 1.21
Browse files Browse the repository at this point in the history
This changes fixes the ResourceRequirements which is now VolumeResourceRequirements,
along with satisfying pre-commit by allocating blank identifiers for unused
function args

Signed-off-by: Brendan Shephard <[email protected]>
  • Loading branch information
bshephar committed Sep 17, 2024
1 parent f2cb5ab commit 273b5f5
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion controllers/swiftproxy_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -743,7 +743,7 @@ func (r *SwiftProxyReconciler) SetupWithManager(mgr ctrl.Manager) error {
return err
}

memcachedFn := func(ctx context.Context, o client.Object) []reconcile.Request {
memcachedFn := func(_ context.Context, o client.Object) []reconcile.Request {
result := []reconcile.Request{}

// get all SwiftProxy CRs
Expand Down
2 changes: 1 addition & 1 deletion controllers/swiftring_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ func (r *SwiftRingReconciler) reconcileDelete(ctx context.Context, instance *swi

// SetupWithManager sets up the controller with the Manager.
func (r *SwiftRingReconciler) SetupWithManager(mgr ctrl.Manager) error {
swiftRingFilter := func(ctx context.Context, o client.Object) []reconcile.Request {
swiftRingFilter := func(_ context.Context, o client.Object) []reconcile.Request {
result := []reconcile.Request{}
swiftRings := &swiftv1beta1.SwiftRingList{}
listOpts := []client.ListOption{client.InNamespace(o.GetNamespace())}
Expand Down
2 changes: 1 addition & 1 deletion controllers/swiftstorage_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,7 @@ func (r *SwiftStorageReconciler) Reconcile(ctx context.Context, req ctrl.Request
func (r *SwiftStorageReconciler) SetupWithManager(mgr ctrl.Manager) error {
logger := mgr.GetLogger()

memcachedFn := func(ctx context.Context, o client.Object) []reconcile.Request {
memcachedFn := func(_ context.Context, o client.Object) []reconcile.Request {
result := []reconcile.Request{}

// get all SwiftStorage CRs
Expand Down
6 changes: 3 additions & 3 deletions pkg/swiftstorage/statefulset.go
Original file line number Diff line number Diff line change
Expand Up @@ -197,8 +197,8 @@ func getStorageContainers(swiftstorage *swiftv1beta1.SwiftStorage, env []corev1.
}

func StatefulSet(
swiftstorage *swiftv1beta1.SwiftStorage, labels map[string]string, annotations map[string]string, configHash string) (*appsv1.StatefulSet, error) {

swiftstorage *swiftv1beta1.SwiftStorage, labels map[string]string, annotations map[string]string, configHash string,
) (*appsv1.StatefulSet, error) {
trueVal := true
OnRootMismatch := corev1.FSGroupChangeOnRootMismatch
user := int64(swift.RunAsUser)
Expand Down Expand Up @@ -259,7 +259,7 @@ func StatefulSet(
AccessModes: []corev1.PersistentVolumeAccessMode{
corev1.ReadWriteOnce,
},
Resources: corev1.ResourceRequirements{
Resources: corev1.VolumeResourceRequirements{
Requests: corev1.ResourceList{
corev1.ResourceStorage: pvcSize,
},
Expand Down

0 comments on commit 273b5f5

Please sign in to comment.