Skip to content

Commit 5fca1a3

Browse files
authored
migrating kubebuilder from go/v3 to go/v4 (#2388)
Signed-off-by: Daniel Fan <[email protected]>
1 parent 2c2c231 commit 5fca1a3

Some content is hidden

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

66 files changed

+79
-88
lines changed

Dockerfile

+3-3
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@ COPY go.sum go.sum
1111
RUN go mod download
1212

1313
# Copy the go source
14-
COPY main.go main.go
14+
COPY cmd/main.go cmd/main.go
1515
COPY api/ api/
16-
COPY controllers/ controllers/
16+
COPY internal/controller/ internal/controller/
1717

1818
# Build
19-
RUN CGO_ENABLED=0 GOOS=linux GO111MODULE=on go build -a -o manager main.go
19+
RUN CGO_ENABLED=0 GOOS=linux GO111MODULE=on go build -a -o manager cmd/main.go
2020

2121
# Use distroless as minimal base image to package the manager binary
2222
# Refer to https://github.com/GoogleContainerTools/distroless for more details

Makefile

+2-2
Original file line numberDiff line numberDiff line change
@@ -169,10 +169,10 @@ code-dev: ## Run the default dev commands which are the go tidy, fmt, vet then e
169169
- make check
170170

171171
build: ## Build manager binary
172-
go build -o bin/manager main.go
172+
go build -o bin/manager cmd/main.go
173173

174174
run: generate code-fmt code-vet manifests ## Run against the configured Kubernetes cluster in ~/.kube/config
175-
ENABLE_WEBHOOKS=false OPERATOR_NAMESPACE="$${OPERATOR_NAMESPACE:-ibm-common-services}" OPERATOR_NAME=ibm-common-service-operator go run ./main.go -v=2
175+
ENABLE_WEBHOOKS=false OPERATOR_NAMESPACE="$${OPERATOR_NAMESPACE:-ibm-common-services}" OPERATOR_NAME=ibm-common-service-operator go run ./cmd/main.go -v=2
176176

177177
install: manifests ## Install CRDs into a cluster
178178
$(KUSTOMIZE) build config/crd | kubectl apply -f -

PROJECT

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
domain: ibm.com
2-
layout: go.kubebuilder.io/v3
2+
layout: go.kubebuilder.io/v4
33
projectName: ibm-common-service-operator
44
repo: github.com/IBM/ibm-common-service-operator
55
resources:

api/v3/commonservice_types.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ import (
2424
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
2525
"k8s.io/apimachinery/pkg/runtime"
2626

27-
"github.com/IBM/ibm-common-service-operator/v4/controllers/constant"
27+
"github.com/IBM/ibm-common-service-operator/v4/internal/controller/constant"
2828
)
2929

3030
// EDIT THIS FILE! THIS IS SCAFFOLDING FOR YOU TO OWN!

bundle.Dockerfile

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ LABEL operators.operatorframework.io.bundle.metadata.v1=metadata/
77
LABEL operators.operatorframework.io.bundle.package.v1=ibm-common-service-operator
88
LABEL operators.operatorframework.io.bundle.channels.v1=v4.11
99
LABEL operators.operatorframework.io.bundle.channel.default.v1=v4.11
10-
LABEL operators.operatorframework.io.metrics.builder=operator-sdk-v1.31.0
10+
LABEL operators.operatorframework.io.metrics.builder=operator-sdk-v1.38.0
1111
LABEL operators.operatorframework.io.metrics.mediatype.v1=metrics+v1
12-
LABEL operators.operatorframework.io.metrics.project_layout=go.kubebuilder.io/v3
12+
LABEL operators.operatorframework.io.metrics.project_layout=go.kubebuilder.io/v4
1313

1414
# Labels for testing.
1515
LABEL operators.operatorframework.io.test.mediatype.v1=scorecard+v1

bundle/manifests/ibm-common-service-operator.clusterserviceversion.yaml

+14-23
Original file line numberDiff line numberDiff line change
@@ -23,24 +23,24 @@ metadata:
2323
capabilities: Seamless Upgrades
2424
cloudPakThemesVersion: styles4100.css
2525
containerImage: icr.io/cpopen/common-service-operator:latest
26-
createdAt: "2024-10-31T05:22:07Z"
26+
createdAt: "2025-02-13T21:51:07Z"
2727
description: The IBM Cloud Pak foundational services operator is used to deploy IBM foundational services.
28-
nss.operator.ibm.com/managed-operators: ibm-common-service-operator
29-
nss.operator.ibm.com/managed-webhooks: ""
30-
olm.skipRange: ">=3.3.0 <4.11.0"
31-
operatorChannel: v4.11
32-
operatorVersion: 4.11.0
33-
operators.openshift.io/infrastructure-features: '["disconnected"]'
34-
operators.operatorframework.io/builder: operator-sdk-v1.31.0
35-
operators.operatorframework.io/project_layout: go.kubebuilder.io/v3
36-
repository: https://github.com/IBM/ibm-common-service-operator
3728
features.operators.openshift.io/disconnected: "true"
3829
features.operators.openshift.io/fips-compliant: "true"
3930
features.operators.openshift.io/proxy-aware: "false"
4031
features.operators.openshift.io/tls-profiles: "false"
4132
features.operators.openshift.io/token-auth-aws: "false"
4233
features.operators.openshift.io/token-auth-azure: "false"
4334
features.operators.openshift.io/token-auth-gcp: "false"
35+
nss.operator.ibm.com/managed-operators: ibm-common-service-operator
36+
nss.operator.ibm.com/managed-webhooks: ""
37+
olm.skipRange: ">=3.3.0 <4.11.0"
38+
operatorChannel: v4.11
39+
operatorVersion: 4.11.0
40+
operators.openshift.io/infrastructure-features: '["disconnected"]'
41+
operators.operatorframework.io/builder: operator-sdk-v1.38.0
42+
operators.operatorframework.io/project_layout: go.kubebuilder.io/v4
43+
repository: https://github.com/IBM/ibm-common-service-operator
4444
support: IBM
4545
labels:
4646
operatorframework.io/arch.amd64: supported
@@ -381,6 +381,10 @@ spec:
381381
valueFrom:
382382
fieldRef:
383383
fieldPath: metadata.annotations['olm.targetNamespaces']
384+
- name: NO_OLM
385+
value: "true"
386+
- name: ENABLE_WEBHOOKS
387+
value: "false"
384388
- name: OPERATOR_NAME
385389
value: ibm-common-service-operator
386390
image: icr.io/cpopen/common-service-operator:latest
@@ -394,10 +398,6 @@ spec:
394398
periodSeconds: 60
395399
timeoutSeconds: 10
396400
name: ibm-common-service-operator
397-
ports:
398-
- containerPort: 9443
399-
name: webhook-server
400-
protocol: TCP
401401
readinessProbe:
402402
failureThreshold: 10
403403
httpGet:
@@ -424,17 +424,8 @@ spec:
424424
runAsNonRoot: true
425425
seccompProfile:
426426
type: RuntimeDefault
427-
volumeMounts:
428-
- mountPath: /tmp/k8s-webhook-server/serving-certs
429-
name: cert
430-
readOnly: true
431427
serviceAccountName: ibm-common-service-operator
432428
terminationGracePeriodSeconds: 10
433-
volumes:
434-
- name: cert
435-
secret:
436-
defaultMode: 420
437-
secretName: webhook-server-cert
438429
permissions:
439430
- rules:
440431
- apiGroups:

bundle/metadata/annotations.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ annotations:
66
operators.operatorframework.io.bundle.package.v1: ibm-common-service-operator
77
operators.operatorframework.io.bundle.channels.v1: v4.11
88
operators.operatorframework.io.bundle.channel.default.v1: v4.11
9-
operators.operatorframework.io.metrics.builder: operator-sdk-v1.31.0
9+
operators.operatorframework.io.metrics.builder: operator-sdk-v1.38.0
1010
operators.operatorframework.io.metrics.mediatype.v1: metrics+v1
11-
operators.operatorframework.io.metrics.project_layout: go.kubebuilder.io/v3
11+
operators.operatorframework.io.metrics.project_layout: go.kubebuilder.io/v4
1212

1313
# Annotations for testing.
1414
operators.operatorframework.io.test.mediatype.v1: scorecard+v1

main.go cmd/main.go

+8-8
Original file line numberDiff line numberDiff line change
@@ -45,14 +45,14 @@ import (
4545
certmanagerv1 "github.com/ibm/ibm-cert-manager-operator/apis/cert-manager/v1"
4646

4747
operatorv3 "github.com/IBM/ibm-common-service-operator/v4/api/v3"
48-
"github.com/IBM/ibm-common-service-operator/v4/controllers"
49-
"github.com/IBM/ibm-common-service-operator/v4/controllers/bootstrap"
50-
certmanagerv1controllers "github.com/IBM/ibm-common-service-operator/v4/controllers/cert-manager"
51-
util "github.com/IBM/ibm-common-service-operator/v4/controllers/common"
52-
"github.com/IBM/ibm-common-service-operator/v4/controllers/constant"
53-
"github.com/IBM/ibm-common-service-operator/v4/controllers/goroutines"
54-
commonservicewebhook "github.com/IBM/ibm-common-service-operator/v4/controllers/webhooks/commonservice"
55-
operandrequestwebhook "github.com/IBM/ibm-common-service-operator/v4/controllers/webhooks/operandrequest"
48+
controllers "github.com/IBM/ibm-common-service-operator/v4/internal/controller"
49+
"github.com/IBM/ibm-common-service-operator/v4/internal/controller/bootstrap"
50+
certmanagerv1controllers "github.com/IBM/ibm-common-service-operator/v4/internal/controller/cert-manager"
51+
util "github.com/IBM/ibm-common-service-operator/v4/internal/controller/common"
52+
"github.com/IBM/ibm-common-service-operator/v4/internal/controller/constant"
53+
"github.com/IBM/ibm-common-service-operator/v4/internal/controller/goroutines"
54+
commonservicewebhook "github.com/IBM/ibm-common-service-operator/v4/internal/controller/webhooks/commonservice"
55+
operandrequestwebhook "github.com/IBM/ibm-common-service-operator/v4/internal/controller/webhooks/operandrequest"
5656
// +kubebuilder:scaffold:imports
5757
)
5858

config/manifests/bases/ibm-common-service-operator.clusterserviceversion.yaml

+7-7
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,13 @@ metadata:
99
createdAt: "2020-10-19T21:38:33Z"
1010
description: The IBM Cloud Pak foundational services operator is used to deploy
1111
IBM foundational services.
12+
features.operators.openshift.io/disconnected: "true"
13+
features.operators.openshift.io/fips-compliant: "true"
14+
features.operators.openshift.io/proxy-aware: "false"
15+
features.operators.openshift.io/tls-profiles: "false"
16+
features.operators.openshift.io/token-auth-aws: "false"
17+
features.operators.openshift.io/token-auth-azure: "false"
18+
features.operators.openshift.io/token-auth-gcp: "false"
1219
nss.operator.ibm.com/managed-operators: ibm-common-service-operator
1320
nss.operator.ibm.com/managed-webhooks: ""
1421
olm.skipRange: ""
@@ -19,13 +26,6 @@ metadata:
1926
operators.operatorframework.io/project_layout: go.kubebuilder.io/v2
2027
repository: https://github.com/IBM/ibm-common-service-operator
2128
support: IBM
22-
features.operators.openshift.io/disconnected: "true"
23-
features.operators.openshift.io/fips-compliant: "true"
24-
features.operators.openshift.io/proxy-aware: "false"
25-
features.operators.openshift.io/tls-profiles: "false"
26-
features.operators.openshift.io/token-auth-aws: "false"
27-
features.operators.openshift.io/token-auth-azure: "false"
28-
features.operators.openshift.io/token-auth-gcp: "false"
2929
labels:
3030
operatorframework.io/arch.amd64: supported
3131
operatorframework.io/arch.ppc64le: supported

controllers/bootstrap/init.go internal/controller/bootstrap/init.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,9 @@ import (
5252
"sigs.k8s.io/controller-runtime/pkg/manager"
5353

5454
apiv3 "github.com/IBM/ibm-common-service-operator/v4/api/v3"
55-
util "github.com/IBM/ibm-common-service-operator/v4/controllers/common"
56-
"github.com/IBM/ibm-common-service-operator/v4/controllers/constant"
57-
"github.com/IBM/ibm-common-service-operator/v4/controllers/deploy"
55+
util "github.com/IBM/ibm-common-service-operator/v4/internal/controller/common"
56+
"github.com/IBM/ibm-common-service-operator/v4/internal/controller/constant"
57+
"github.com/IBM/ibm-common-service-operator/v4/internal/controller/deploy"
5858
nssv1 "github.com/IBM/ibm-namespace-scope-operator/v4/api/v1"
5959
ssv1 "github.com/IBM/ibm-secretshare-operator/api/v1"
6060
odlm "github.com/IBM/operand-deployment-lifecycle-manager/v4/api/v1alpha1"
File renamed without changes.

controllers/cert-manager/certificaterefresh_controller.go internal/controller/cert-manager/certificaterefresh_controller.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ import (
3333

3434
certmanagerv1 "github.com/ibm/ibm-cert-manager-operator/apis/cert-manager/v1"
3535

36-
"github.com/IBM/ibm-common-service-operator/v4/controllers/constant"
36+
"github.com/IBM/ibm-common-service-operator/v4/internal/controller/constant"
3737
)
3838

3939
var logd = log.Log.WithName("controller_certificaterefresh")

controllers/cert-manager/suite_test.go internal/controller/cert-manager/suite_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ var _ = BeforeSuite(func() {
5454

5555
By("bootstrapping test environment")
5656
testEnv = &envtest.Environment{
57-
CRDDirectoryPaths: []string{filepath.Join("..", "..", "config", "crd", "bases")},
57+
CRDDirectoryPaths: []string{filepath.Join("..", "..", "..", "config", "crd", "bases")},
5858
ErrorIfCRDPathMissing: true,
5959
}
6060

controllers/cert-manager/v1_add_label_controller.go internal/controller/cert-manager/v1_add_label_controller.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ import (
3333

3434
certmanagerv1 "github.com/ibm/ibm-cert-manager-operator/apis/cert-manager/v1"
3535

36-
"github.com/IBM/ibm-common-service-operator/v4/controllers/constant"
36+
"github.com/IBM/ibm-common-service-operator/v4/internal/controller/constant"
3737
)
3838

3939
// V1AddLabelReconciler reconciles a Certificate object
File renamed without changes.

controllers/common/util.go internal/controller/common/util.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ import (
4848
"sigs.k8s.io/controller-runtime/pkg/client"
4949

5050
apiv3 "github.com/IBM/ibm-common-service-operator/v4/api/v3"
51-
"github.com/IBM/ibm-common-service-operator/v4/controllers/constant"
51+
"github.com/IBM/ibm-common-service-operator/v4/internal/controller/constant"
5252
nssv1 "github.com/IBM/ibm-namespace-scope-operator/v4/api/v1"
5353
odlm "github.com/IBM/operand-deployment-lifecycle-manager/v4/api/v1alpha1"
5454
)
File renamed without changes.

controllers/commonservice_controller.go internal/controller/commonservice_controller.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,10 @@ import (
3939
"sigs.k8s.io/controller-runtime/pkg/source"
4040

4141
apiv3 "github.com/IBM/ibm-common-service-operator/v4/api/v3"
42-
"github.com/IBM/ibm-common-service-operator/v4/controllers/bootstrap"
43-
util "github.com/IBM/ibm-common-service-operator/v4/controllers/common"
44-
"github.com/IBM/ibm-common-service-operator/v4/controllers/configurationcollector"
45-
"github.com/IBM/ibm-common-service-operator/v4/controllers/constant"
42+
"github.com/IBM/ibm-common-service-operator/v4/internal/controller/bootstrap"
43+
util "github.com/IBM/ibm-common-service-operator/v4/internal/controller/common"
44+
"github.com/IBM/ibm-common-service-operator/v4/internal/controller/configurationcollector"
45+
"github.com/IBM/ibm-common-service-operator/v4/internal/controller/constant"
4646
odlm "github.com/IBM/operand-deployment-lifecycle-manager/v4/api/v1alpha1"
4747
)
4848

controllers/commonservice_controller_test.go internal/controller/commonservice_controller_test.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ import (
3030
"k8s.io/apimachinery/pkg/types"
3131

3232
apiv3 "github.com/IBM/ibm-common-service-operator/v4/api/v3"
33-
util "github.com/IBM/ibm-common-service-operator/v4/controllers/common"
34-
"github.com/IBM/ibm-common-service-operator/v4/controllers/constant"
33+
util "github.com/IBM/ibm-common-service-operator/v4/internal/controller/common"
34+
"github.com/IBM/ibm-common-service-operator/v4/internal/controller/constant"
3535
)
3636

3737
// +kubebuilder:docs-gen:collapse=Imports

controllers/configurationcollector/collector.go internal/controller/configurationcollector/collector.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@ import (
2727
"k8s.io/apimachinery/pkg/types"
2828
"k8s.io/klog"
2929

30-
"github.com/IBM/ibm-common-service-operator/v4/controllers/bootstrap"
31-
util "github.com/IBM/ibm-common-service-operator/v4/controllers/common"
32-
"github.com/IBM/ibm-common-service-operator/v4/controllers/constant"
30+
"github.com/IBM/ibm-common-service-operator/v4/internal/controller/bootstrap"
31+
util "github.com/IBM/ibm-common-service-operator/v4/internal/controller/common"
32+
"github.com/IBM/ibm-common-service-operator/v4/internal/controller/constant"
3333
)
3434

3535
func Buildconfig(config map[string]string, bs *bootstrap.Bootstrap) map[string]string {
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

controllers/deploy/manager.go internal/controller/deploy/manager.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ import (
3232
"sigs.k8s.io/controller-runtime/pkg/client"
3333
"sigs.k8s.io/controller-runtime/pkg/manager"
3434

35-
util "github.com/IBM/ibm-common-service-operator/v4/controllers/common"
35+
util "github.com/IBM/ibm-common-service-operator/v4/internal/controller/common"
3636
)
3737

3838
type Manager struct {

controllers/goroutines/cleanup_resources.go internal/controller/goroutines/cleanup_resources.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@ import (
2424
"k8s.io/apimachinery/pkg/types"
2525
"k8s.io/klog"
2626

27-
"github.com/IBM/ibm-common-service-operator/v4/controllers/bootstrap"
28-
util "github.com/IBM/ibm-common-service-operator/v4/controllers/common"
29-
"github.com/IBM/ibm-common-service-operator/v4/controllers/constant"
27+
"github.com/IBM/ibm-common-service-operator/v4/internal/controller/bootstrap"
28+
util "github.com/IBM/ibm-common-service-operator/v4/internal/controller/common"
29+
"github.com/IBM/ibm-common-service-operator/v4/internal/controller/constant"
3030
)
3131

3232
const (

controllers/goroutines/operator_status.go internal/controller/goroutines/operator_status.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ import (
2828
"k8s.io/klog"
2929

3030
apiv3 "github.com/IBM/ibm-common-service-operator/v4/api/v3"
31-
"github.com/IBM/ibm-common-service-operator/v4/controllers/bootstrap"
32-
"github.com/IBM/ibm-common-service-operator/v4/controllers/constant"
31+
"github.com/IBM/ibm-common-service-operator/v4/internal/controller/bootstrap"
32+
"github.com/IBM/ibm-common-service-operator/v4/internal/controller/constant"
3333
)
3434

3535
var ctx = context.Background()

controllers/goroutines/waitToCreateCsCR.go internal/controller/goroutines/waitToCreateCsCR.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ import (
2424

2525
"k8s.io/klog"
2626

27-
"github.com/IBM/ibm-common-service-operator/v4/controllers/bootstrap"
27+
"github.com/IBM/ibm-common-service-operator/v4/internal/controller/bootstrap"
2828
)
2929

3030
// WaitToCreateCsCR waits for the creation of the CommonService CR in the operator namespace.

controllers/operandconfig.go internal/controller/operandconfig.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@ import (
3131
"sigs.k8s.io/controller-runtime/pkg/client"
3232

3333
apiv3 "github.com/IBM/ibm-common-service-operator/v4/api/v3"
34-
util "github.com/IBM/ibm-common-service-operator/v4/controllers/common"
35-
"github.com/IBM/ibm-common-service-operator/v4/controllers/constant"
36-
"github.com/IBM/ibm-common-service-operator/v4/controllers/rules"
34+
util "github.com/IBM/ibm-common-service-operator/v4/internal/controller/common"
35+
"github.com/IBM/ibm-common-service-operator/v4/internal/controller/constant"
36+
"github.com/IBM/ibm-common-service-operator/v4/internal/controller/rules"
3737
)
3838

3939
var (

controllers/operatorconfig.go internal/controller/operatorconfig.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ import (
2727
"k8s.io/klog"
2828

2929
v3 "github.com/IBM/ibm-common-service-operator/v4/api/v3"
30-
util "github.com/IBM/ibm-common-service-operator/v4/controllers/common"
31-
"github.com/IBM/ibm-common-service-operator/v4/controllers/constant"
30+
util "github.com/IBM/ibm-common-service-operator/v4/internal/controller/common"
31+
"github.com/IBM/ibm-common-service-operator/v4/internal/controller/constant"
3232
odlm "github.com/IBM/operand-deployment-lifecycle-manager/v4/api/v1alpha1"
3333
)
3434

File renamed without changes.

controllers/render_template.go internal/controller/render_template.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,9 @@ import (
3030
"k8s.io/klog"
3131

3232
apiv3 "github.com/IBM/ibm-common-service-operator/v4/api/v3"
33-
util "github.com/IBM/ibm-common-service-operator/v4/controllers/common"
34-
"github.com/IBM/ibm-common-service-operator/v4/controllers/constant"
35-
"github.com/IBM/ibm-common-service-operator/v4/controllers/size"
33+
util "github.com/IBM/ibm-common-service-operator/v4/internal/controller/common"
34+
"github.com/IBM/ibm-common-service-operator/v4/internal/controller/constant"
35+
"github.com/IBM/ibm-common-service-operator/v4/internal/controller/size"
3636
)
3737

3838
func (r *CommonServiceReconciler) getNewConfigs(cs *unstructured.Unstructured) ([]interface{}, map[string]string, error) {
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

controllers/suite_test.go internal/controller/suite_test.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,9 @@ import (
3535
"sigs.k8s.io/controller-runtime/pkg/log/zap"
3636

3737
apiv3 "github.com/IBM/ibm-common-service-operator/v4/api/v3"
38-
"github.com/IBM/ibm-common-service-operator/v4/controllers/bootstrap"
39-
"github.com/IBM/ibm-common-service-operator/v4/controllers/constant"
40-
"github.com/IBM/ibm-common-service-operator/v4/controllers/deploy"
38+
"github.com/IBM/ibm-common-service-operator/v4/internal/controller/bootstrap"
39+
"github.com/IBM/ibm-common-service-operator/v4/internal/controller/constant"
40+
"github.com/IBM/ibm-common-service-operator/v4/internal/controller/deploy"
4141
// +kubebuilder:scaffold:imports
4242
)
4343

@@ -69,7 +69,7 @@ var _ = BeforeSuite(func(done Done) {
6969
By("bootstrapping test environment")
7070
testEnv = &envtest.Environment{
7171
UseExistingCluster: UseExistingCluster(),
72-
CRDDirectoryPaths: []string{filepath.Join("..", "config", "crd", "bases"), filepath.Join("..", "odlmcrds")},
72+
CRDDirectoryPaths: []string{filepath.Join("..", "..", "config", "crd", "bases"), filepath.Join("..", "odlmcrds")},
7373
}
7474

7575
var err error

controllers/webhooks/commonservice/validatingwebhook.go internal/controller/webhooks/commonservice/validatingwebhook.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@ import (
3131
"sigs.k8s.io/controller-runtime/pkg/webhook/admission"
3232

3333
operatorv3 "github.com/IBM/ibm-common-service-operator/v4/api/v3"
34-
controller "github.com/IBM/ibm-common-service-operator/v4/controllers"
35-
util "github.com/IBM/ibm-common-service-operator/v4/controllers/common"
36-
"github.com/IBM/ibm-common-service-operator/v4/controllers/constant"
34+
controller "github.com/IBM/ibm-common-service-operator/v4/internal/controller"
35+
util "github.com/IBM/ibm-common-service-operator/v4/internal/controller/common"
36+
"github.com/IBM/ibm-common-service-operator/v4/internal/controller/constant"
3737
)
3838

3939
// +kubebuilder:webhook:path=/validate-operator-ibm-com-v3-commonservice,mutating=false,failurePolicy=fail,sideEffects=None,groups=operator.ibm.com,resources=commonservices,verbs=create;update,versions=v3,name=vcommonservice.kb.io,admissionReviewVersions=v1

0 commit comments

Comments
 (0)