Skip to content

Commit

Permalink
Bump binaries to target 1.30 k8s version
Browse files Browse the repository at this point in the history
kind updated to have default version k8s 1.30

operator-sdk v1.38.0 moves to k8s 1.30 API's and Kubebuilder v4 Scaffolding,

RBAC changed because the client-go bump start failing with error
```
  pkg/mod/k8s.io/[email protected]/tools/cache/reflector.go:232: failed to list *v1.Deployment: deployments.apps is forbidd
en: User "system:serviceaccount:metallb-system:manager-account" cannot list resource "deployments" in API group "apps" at the cluster scope
```

Signed-off-by: karampok <[email protected]>
  • Loading branch information
karampok committed Feb 7, 2025
1 parent 8013c0f commit b493713
Show file tree
Hide file tree
Showing 11 changed files with 1,648 additions and 1,253 deletions.
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,13 @@ else
GOBIN=$(shell go env GOBIN)
endif

OPERATOR_SDK_VERSION ?= v1.34.1
OPERATOR_SDK_VERSION ?= v1.38.0
OLM_VERSION ?= v0.18.3
OPM_VERSION ?= v1.23.2
KUSTOMIZE_VERSION ?= v5.0.1
KUSTOMIZE_VERSION ?= v5.5.0
KUSTOMIZE=$(shell pwd)/_cache/kustomize
KIND ?= $(shell pwd)/_cache/kind
KIND_VERSION=v0.22.0
KIND_VERSION=v0.23.0
CACHE_PATH=$(shell pwd)/_cache


Expand Down
1 change: 0 additions & 1 deletion api/v1beta1/zz_generated.deepcopy.go

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

356 changes: 340 additions & 16 deletions bin/metallb-operator.yaml

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion bundle.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ LABEL operators.operatorframework.io.bundle.manifests.v1=manifests/
LABEL operators.operatorframework.io.bundle.metadata.v1=metadata/
LABEL operators.operatorframework.io.bundle.package.v1=metallb-operator
LABEL operators.operatorframework.io.bundle.channels.v1=alpha
LABEL operators.operatorframework.io.metrics.builder=operator-sdk-v1.34.1
LABEL operators.operatorframework.io.metrics.builder=operator-sdk-v1.38.0
LABEL operators.operatorframework.io.metrics.mediatype.v1=metrics+v1
LABEL operators.operatorframework.io.metrics.project_layout=go.kubebuilder.io/v4

Expand Down
12 changes: 10 additions & 2 deletions bundle/manifests/metallb-operator.clusterserviceversion.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -432,9 +432,9 @@ metadata:
categories: Networking
certified: "false"
containerImage: quay.io/metallb/metallb-operator
createdAt: "2024-12-16T10:14:17Z"
createdAt: "2025-02-07T14:40:20Z"
description: An operator for deploying MetalLB on a kubernetes cluster.
operators.operatorframework.io/builder: operator-sdk-v1.34.1
operators.operatorframework.io/builder: operator-sdk-v1.38.0
operators.operatorframework.io/project_layout: go.kubebuilder.io/v4
repository: https://github.com/metallb/metallb-operator
support: Community
Expand Down Expand Up @@ -706,6 +706,14 @@ spec:
- get
- list
- watch
- apiGroups:
- apps
resources:
- daemonsets
- deployments
verbs:
- list
- watch
- apiGroups:
- config.openshift.io
resources:
Expand Down
348 changes: 332 additions & 16 deletions bundle/manifests/metallb.io_metallbs.yaml

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion bundle/metadata/annotations.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ annotations:
operators.operatorframework.io.bundle.metadata.v1: metadata/
operators.operatorframework.io.bundle.package.v1: metallb-operator
operators.operatorframework.io.bundle.channels.v1: alpha
operators.operatorframework.io.metrics.builder: operator-sdk-v1.34.1
operators.operatorframework.io.metrics.builder: operator-sdk-v1.38.0
operators.operatorframework.io.metrics.mediatype.v1: metrics+v1
operators.operatorframework.io.metrics.project_layout: go.kubebuilder.io/v4

Expand Down
2,162 changes: 952 additions & 1,210 deletions config/crd/bases/metallb.io_metallbs.yaml

Large diffs are not rendered by default.

10 changes: 8 additions & 2 deletions config/rbac/role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
creationTimestamp: null
name: metallb-manager-role
rules:
- apiGroups:
Expand Down Expand Up @@ -37,6 +36,14 @@ rules:
- get
- list
- watch
- apiGroups:
- apps
resources:
- daemonsets
- deployments
verbs:
- list
- watch
- apiGroups:
- config.openshift.io
resources:
Expand Down Expand Up @@ -123,7 +130,6 @@ rules:
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
creationTimestamp: null
name: metallb-manager-role
namespace: metallb-system
rules:
Expand Down
1 change: 0 additions & 1 deletion config/webhook/manifests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
apiVersion: admissionregistration.k8s.io/v1
kind: ValidatingWebhookConfiguration
metadata:
creationTimestamp: null
name: metallb-operator-webhook-configuration
webhooks:
- admissionReviewVersions:
Expand Down
1 change: 1 addition & 0 deletions controllers/metallb_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ var EmbeddedFRRK8sSupportNotAvailable = errors.New("current CNO version does not
// +kubebuilder:rbac:groups="",namespace=metallb-system,resources=configmaps,verbs=get;list;watch;create;update;patch;delete

// Cluster Scoped
// +kubebuilder:rbac:groups=apps,resources=deployments;daemonsets,verbs=list;watch
// +kubebuilder:rbac:groups=metallb.io,resources=metallbs,verbs=get;list;watch;create;update;patch;delete
// +kubebuilder:rbac:groups=metallb.io,resources=metallbs/status,verbs=get;update;patch
// +kubebuilder:rbac:groups=policy,resources=podsecuritypolicies,verbs=get;list;watch;create;update;patch;delete
Expand Down

0 comments on commit b493713

Please sign in to comment.