Skip to content

Commit

Permalink
chore:update operator-sdk and kubebuilder
Browse files Browse the repository at this point in the history
Signed-off-by: Rizwana777 <rizwananaaz177@gmail.com>
  • Loading branch information
Rizwana777 authored and jgwest committed Aug 7, 2024
1 parent 07d3485 commit 9f8e349
Show file tree
Hide file tree
Showing 32 changed files with 26 additions and 26 deletions.
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,16 @@ COPY go.sum go.sum
RUN go mod download

# Copy the go source
COPY main.go main.go
COPY cmd/main.go cmd/main.go
COPY api/ api/
COPY controllers/ controllers/
COPY internal/controller/ internal/controller/

# Build
# the GOARCH has not a default value to allow the binary be built according to the host where the command
# was called. For example, if we call make docker-build in a local env which has the Apple Silicon M1 SO
# the docker BUILDPLATFORM arg will be linux/arm64 when for Apple x86 it will be linux/amd64. Therefore,
# by leaving it empty we can ensure that the container and binary shipped on it will have the same platform.
RUN CGO_ENABLED=0 GOOS=${TARGETOS:-linux} GOARCH=${TARGETARCH} go build -a -o manager main.go
RUN CGO_ENABLED=0 GOOS=${TARGETOS:-linux} GOARCH=${TARGETARCH} go build -a -o manager cmd/main.go

# Use distroless as minimal base image to package the manager binary
# Refer to https://github.com/GoogleContainerTools/distroless for more details
Expand Down
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -155,11 +155,11 @@ start-test-e2e-all: start-e2e-namespace-scoped-bg test-e2e-namespace-scoped star

.PHONY: build
build: manifests generate fmt vet ## Build manager binary.
go build -o bin/manager main.go
go build -o bin/manager cmd/main.go

.PHONY: run
run: manifests generate fmt vet ## Run a controller from your host.
NAMESPACE_SCOPED_ARGO_ROLLOUTS=$(NAMESPACE_SCOPED_ARGO_ROLLOUTS) go run ./main.go
NAMESPACE_SCOPED_ARGO_ROLLOUTS=$(NAMESPACE_SCOPED_ARGO_ROLLOUTS) go run ./cmd/main.go

# If you wish built the manager image targeting other platforms you can use the --platform flag.
# (i.e. docker build --platform linux/arm64 ). However, you must enable docker buildKit for it.
Expand Down Expand Up @@ -227,7 +227,7 @@ ENVTEST ?= $(LOCALBIN)/setup-envtest
## Tool Versions
KUSTOMIZE_VERSION ?= v3.8.7
CONTROLLER_TOOLS_VERSION ?= v0.14.0
OPERATOR_SDK_VERSION ?= v1.28.0
OPERATOR_SDK_VERSION ?= v1.35.0

KUSTOMIZE_INSTALL_SCRIPT ?= "https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh"
.PHONY: kustomize
Expand Down
2 changes: 1 addition & 1 deletion PROJECT
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# and allow the plugins properly work.
# More info: https://book.kubebuilder.io/reference/project-config.html
layout:
- go.kubebuilder.io/v3
- go.kubebuilder.io/v4
plugins:
manifests.sdk.operatorframework.io/v2: {}
scorecard.sdk.operatorframework.io/v2: {}
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Not all planned features are completed. The API, spec, status and other user fac

A Kubernetes operator for managing [Argo Rollouts](https://github.com/argoproj/argo-rollouts/). This operator provides an easy way to install, upgrade and manage the lifecycle of Argo Rollouts.

This operator is built using `operator-sdk`, version - `v1.28.0`.
This operator is built using `operator-sdk`, version - `v1.35.0`.

## Documentation

Expand Down
4 changes: 2 additions & 2 deletions bundle.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ LABEL operators.operatorframework.io.bundle.manifests.v1=manifests/
LABEL operators.operatorframework.io.bundle.metadata.v1=metadata/
LABEL operators.operatorframework.io.bundle.package.v1=argo-rollouts-manager
LABEL operators.operatorframework.io.bundle.channels.v1=alpha
LABEL operators.operatorframework.io.metrics.builder=operator-sdk-v1.28.0
LABEL operators.operatorframework.io.metrics.builder=operator-sdk-v1.35.0
LABEL operators.operatorframework.io.metrics.mediatype.v1=metrics+v1
LABEL operators.operatorframework.io.metrics.project_layout=go.kubebuilder.io/v3
LABEL operators.operatorframework.io.metrics.project_layout=go.kubebuilder.io/v4

# Labels for testing.
LABEL operators.operatorframework.io.test.mediatype.v1=scorecard+v1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ metadata:
}
]
capabilities: Basic Install
createdAt: "2024-06-14T22:33:48Z"
operators.operatorframework.io/builder: operator-sdk-v1.28.0
operators.operatorframework.io/project_layout: go.kubebuilder.io/v3
createdAt: "2024-07-29T13:09:50Z"
operators.operatorframework.io/builder: operator-sdk-v1.35.0
operators.operatorframework.io/project_layout: go.kubebuilder.io/v4
name: argo-rollouts-manager.v0.0.1
namespace: placeholder
spec:
Expand Down
4 changes: 2 additions & 2 deletions bundle/metadata/annotations.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ annotations:
operators.operatorframework.io.bundle.metadata.v1: metadata/
operators.operatorframework.io.bundle.package.v1: argo-rollouts-manager
operators.operatorframework.io.bundle.channels.v1: alpha
operators.operatorframework.io.metrics.builder: operator-sdk-v1.28.0
operators.operatorframework.io.metrics.builder: operator-sdk-v1.35.0
operators.operatorframework.io.metrics.mediatype.v1: metrics+v1
operators.operatorframework.io.metrics.project_layout: go.kubebuilder.io/v3
operators.operatorframework.io.metrics.project_layout: go.kubebuilder.io/v4

# Annotations for testing.
operators.operatorframework.io.test.mediatype.v1: scorecard+v1
Expand Down
2 changes: 1 addition & 1 deletion main.go → cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ import (

rolloutsmanagerv1alpha1 "github.com/argoproj-labs/argo-rollouts-manager/api/v1alpha1"

controllers "github.com/argoproj-labs/argo-rollouts-manager/controllers"
controllers "github.com/argoproj-labs/argo-rollouts-manager/internal/controller"
monitoringv1 "github.com/coreos/prometheus-operator/pkg/apis/monitoring/v1"
crdv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1"
//+kubebuilder:scaffold:imports
Expand Down
2 changes: 1 addition & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Not all planned features are completed. The API, spec, status and other user fac

A Kubernetes operator for managing [Argo Rollouts](https://github.com/argoproj/argo-rollouts/). This operator provides an easy way to install, upgrade and manage the lifecycle of Argo Rollouts.

This operator is built using `operator-sdk`, version - `v1.28.0`.
This operator is built using ``, version - `v1.35.0`.

## What exactly the operator does ?

Expand Down
2 changes: 1 addition & 1 deletion hack/run-upstream-argo-rollouts-e2e-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ if [ -z "$SKIP_RUN_STEP" ]; then
set +e

rm -f /tmp/e2e-operator-run.log || true
go run ./main.go 2>&1 | tee /tmp/e2e-operator-run.log &
go run ./cmd/main.go 2>&1 | tee /tmp/e2e-operator-run.log &

set -e
fi
Expand Down
4 changes: 2 additions & 2 deletions hack/start-rollouts-manager-for-e2e-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ set -ex
make install generate fmt vet

if [ "$RUN_IN_BACKGROUND" == "true" ]; then
go run ./main.go 2>&1 | tee /tmp/e2e-operator-run.log &
go run ./cmd/main.go 2>&1 | tee /tmp/e2e-operator-run.log &
else
go run ./main.go 2>&1 | tee /tmp/e2e-operator-run.log
go run ./cmd/main.go 2>&1 | tee /tmp/e2e-operator-run.log
fi
2 changes: 1 addition & 1 deletion hack/upgrade-rollouts-script/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ The Go code and script this in this directory will automatically open a pull req
### Prerequisites
- GitHub CLI (_gh_) installed and on PATH
- Go installed an on PATH
- [Operator-sdk v1.28.0](https://github.com/operator-framework/operator-sdk/releases/tag/v1.28.0) installed (as of January 2024), and on PATH
- [Operator-sdk v1.35.0](https://github.com/operator-framework/operator-sdk/releases/tag/v1.35.0) installed (as of January 2024), and on PATH
- You must have your own fork of the [argo-rollouts-manager](https://github.com/argoproj-labs/argo-rollouts-manager) repository (example: `jgwest/argo-rollouts-manager`)
- Your local SSH key registered (e.g. `~/.ssh/id_rsa.pub`) with GitHub to allow git clone via SSH

Expand Down
2 changes: 1 addition & 1 deletion hack/upgrade-rollouts-script/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ const (
argoprojlabsRepoOrg = "argoproj-labs"
argoRolloutsManagerRepoName = "argo-rollouts-manager"

controllersDefaultGo = "controllers/default.go"
controllersDefaultGo = "internal/controller/default.go"
)

func main() {
Expand Down
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.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion tests/e2e/cluster-scoped/cluster_scoped_rollouts_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (

rmv1alpha1 "github.com/argoproj-labs/argo-rollouts-manager/api/v1alpha1"

controllers "github.com/argoproj-labs/argo-rollouts-manager/controllers"
controllers "github.com/argoproj-labs/argo-rollouts-manager/internal/controller"

corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import (

rmv1alpha1 "github.com/argoproj-labs/argo-rollouts-manager/api/v1alpha1"

controllers "github.com/argoproj-labs/argo-rollouts-manager/controllers"
controllers "github.com/argoproj-labs/argo-rollouts-manager/internal/controller"
appsv1 "k8s.io/api/apps/v1"
corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
Expand Down
2 changes: 1 addition & 1 deletion tests/e2e/rollout_tests_all.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import (

rolloutsmanagerv1alpha1 "github.com/argoproj-labs/argo-rollouts-manager/api/v1alpha1"

controllers "github.com/argoproj-labs/argo-rollouts-manager/controllers"
controllers "github.com/argoproj-labs/argo-rollouts-manager/internal/controller"

appsv1 "k8s.io/api/apps/v1"
corev1 "k8s.io/api/core/v1"
Expand Down
2 changes: 1 addition & 1 deletion tests/e2e/test_utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import (

rmv1alpha1 "github.com/argoproj-labs/argo-rollouts-manager/api/v1alpha1"

controllers "github.com/argoproj-labs/argo-rollouts-manager/controllers"
controllers "github.com/argoproj-labs/argo-rollouts-manager/internal/controller"

appsv1 "k8s.io/api/apps/v1"
corev1 "k8s.io/api/core/v1"
Expand Down

0 comments on commit 9f8e349

Please sign in to comment.