Skip to content

Commit d6d18be

Browse files
authored
chore: upgrade operator-sdk to 1.35 (#748)
* chore: upgrade operator-sdk to 1.35 Signed-off-by: Anand Kumar Singh <[email protected]> * chore: use latest argocd-operator changes Signed-off-by: Anand Kumar Singh <[email protected]> * update Dockerfile file to pint to new main.go location Signed-off-by: Anand Kumar Singh <[email protected]> --------- Signed-off-by: Anand Kumar Singh <[email protected]>
1 parent ef35961 commit d6d18be

14 files changed

+18632
-18636
lines changed

Dockerfile

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@ COPY go.sum go.sum
1010
RUN go mod download
1111

1212
# Copy the go source
13-
COPY main.go main.go
13+
COPY cmd/main.go cmd/main.go
1414
COPY api/ api/
1515
COPY controllers/ controllers/
1616
COPY common/ common/
1717
COPY version/ version/
1818

1919
# Build
20-
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -a -o manager main.go
20+
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -a -o manager ./cmd/main.go
2121

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

Makefile

+3-3
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ IMG ?= $(IMAGE):$(VERSION)
5656

5757
# Set the Operator SDK version to use.
5858
# This is useful for CI or a project to utilize a specific version of the operator-sdk toolkit.
59-
OPERATOR_SDK_VERSION ?= v1.32.0
59+
OPERATOR_SDK_VERSION ?= v1.35.0
6060

6161

6262
# Get the currently used golang install path (in GOPATH/bin, unless GOBIN is set)
@@ -171,11 +171,11 @@ e2e-non-olm-tests-all:
171171

172172
.PHONY: build
173173
build: generate fmt vet ## Build manager binary.
174-
go build -o bin/manager main.go
174+
go build -o bin/manager ./cmd/main.go
175175

176176
.PHONY: run
177177
run: manifests generate fmt vet ## Run a controller from your host.
178-
REDIS_CONFIG_PATH="build/redis" go run ./main.go
178+
REDIS_CONFIG_PATH="build/redis" go run ./cmd/main.go
179179

180180
.PHONY: docker-build
181181
docker-build: test ## Build docker image with the manager.

PROJECT

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
domain: openshift.io
22
layout:
3-
- go.kubebuilder.io/v3
3+
- go.kubebuilder.io/v4
44
plugins:
55
manifests.sdk.operatorframework.io/v2: {}
66
scorecard.sdk.operatorframework.io/v2: {}

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=gitops-operator
88
LABEL operators.operatorframework.io.bundle.channels.v1=latest,gitops-1.8
99
LABEL operators.operatorframework.io.bundle.channel.default.v1=latest
10-
LABEL operators.operatorframework.io.metrics.builder=operator-sdk-v1.32.0
10+
LABEL operators.operatorframework.io.metrics.builder=operator-sdk-v1.35.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/argoproj.io_argocds.yaml

+5,081-4,917
Large diffs are not rendered by default.

bundle/manifests/argoproj.io_notificationsconfigurations.yaml

+20-15
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ apiVersion: apiextensions.k8s.io/v1
22
kind: CustomResourceDefinition
33
metadata:
44
annotations:
5-
controller-gen.kubebuilder.io/version: v0.6.1
5+
controller-gen.kubebuilder.io/version: v0.14.0
66
creationTimestamp: null
77
name: notificationsconfigurations.argoproj.io
88
spec:
@@ -21,20 +21,26 @@ spec:
2121
API
2222
properties:
2323
apiVersion:
24-
description: 'APIVersion defines the versioned schema of this representation
25-
of an object. Servers should convert recognized schemas to the latest
26-
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
24+
description: |-
25+
APIVersion defines the versioned schema of this representation of an object.
26+
Servers should convert recognized schemas to the latest internal value, and
27+
may reject unrecognized values.
28+
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
2729
type: string
2830
kind:
29-
description: 'Kind is a string value representing the REST resource this
30-
object represents. Servers may infer this from the endpoint the client
31-
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
31+
description: |-
32+
Kind is a string value representing the REST resource this object represents.
33+
Servers may infer this from the endpoint the client submits requests to.
34+
Cannot be updated.
35+
In CamelCase.
36+
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
3237
type: string
3338
metadata:
3439
type: object
3540
spec:
36-
description: NotificationsConfigurationSpec allows users to define the
37-
triggers, templates, services, context and subscriptions for the notifications
41+
description: |-
42+
NotificationsConfigurationSpec allows users to define the triggers, templates, services, context and
43+
subscriptions for the notifications
3844
properties:
3945
context:
4046
additionalProperties:
@@ -62,10 +68,9 @@ spec:
6268
triggers:
6369
additionalProperties:
6470
type: string
65-
description: Triggers define the condition when the notification should
66-
be sent and list of templates required to generate the message Recipients
67-
can subscribe to the trigger and specify the required message template
68-
and destination notification service.
71+
description: |-
72+
Triggers define the condition when the notification should be sent and list of templates required to generate the message
73+
Recipients can subscribe to the trigger and specify the required message template and destination notification service.
6974
type: object
7075
type: object
7176
type: object
@@ -77,5 +82,5 @@ status:
7782
acceptedNames:
7883
kind: ""
7984
plural: ""
80-
conditions: []
81-
storedVersions: []
85+
conditions: null
86+
storedVersions: null

bundle/manifests/gitops-operator.clusterserviceversion.yaml

+3-3
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ metadata:
164164
capabilities: Deep Insights
165165
console.openshift.io/plugins: '["gitops-plugin"]'
166166
containerImage: quay.io/redhat-developer/gitops-operator
167-
createdAt: "2024-07-15T07:28:44Z"
167+
createdAt: "2024-07-17T05:12:50Z"
168168
description: Enables teams to adopt GitOps principles for managing cluster configurations
169169
and application delivery across hybrid multi-cluster Kubernetes environments.
170170
features.operators.openshift.io/disconnected: "true"
@@ -177,8 +177,8 @@ metadata:
177177
operatorframework.io/cluster-monitoring: "true"
178178
operatorframework.io/suggested-namespace: openshift-gitops-operator
179179
operators.openshift.io/infrastructure-features: '["disconnected"]'
180-
operators.operatorframework.io/builder: operator-sdk-v1.32.0
181-
operators.operatorframework.io/project_layout: go.kubebuilder.io/v3
180+
operators.operatorframework.io/builder: operator-sdk-v1.35.0
181+
operators.operatorframework.io/project_layout: go.kubebuilder.io/v4
182182
repository: https://github.com/redhat-developer/gitops-operator
183183
support: Red Hat
184184
name: gitops-operator.v1.8.0

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: gitops-operator
77
operators.operatorframework.io.bundle.channels.v1: latest,gitops-1.8
88
operators.operatorframework.io.bundle.channel.default.v1: latest
9-
operators.operatorframework.io.metrics.builder: operator-sdk-v1.32.0
9+
operators.operatorframework.io.metrics.builder: operator-sdk-v1.35.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 renamed to cmd/main.go

File renamed without changes.

0 commit comments

Comments
 (0)