Skip to content

Commit 95a064d

Browse files
committed
Add vendor folder
Signed-off-by: Anatolii Bazko <abazko@redhat.com>
1 parent e4c14a2 commit 95a064d

File tree

3,987 files changed

+279849
-239052
lines changed

Some content is hidden

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

3,987 files changed

+279849
-239052
lines changed

.github/workflows/pr-check.yml

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -96,12 +96,10 @@ jobs:
9696
\( -name '*.sh' -o -name "*.go" -o -name "*.yaml" -o -name "*.yml" \))
9797
LICENSE_TEMPLATE="${GITHUB_WORKSPACE}/hack/license-header.txt"
9898
check-license-header -f "${LICENSE_TEMPLATE}" ${FILES_TO_CHECK_LICENSE}
99-
dependencies-md-validation:
99+
dependencies-validation:
100100
runs-on: ubuntu-22.04
101101
steps:
102-
- name: Checkout source code
103-
uses: actions/checkout@v3
104-
- name: Validate DEPENDENCIES.md file
105-
uses: che-incubator/dependencies-license-action@0.0.2
106-
env:
107-
EXCLUDE_DEPS: "github.com/bmizerany/assert, gotest.tools/v3, github.com/dhui/dktest, gotest.tools, github.com/golangplus/testing"
102+
- name: Checkout source code
103+
uses: actions/checkout@v3
104+
- name: Check dependencies
105+
run: build/scripts/clear-defined-test.sh

.github/workflows/release-community-operator-PRs.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,6 @@ jobs:
5151
git config --global user.email "mkuznets@redhat.com"
5252
export GITHUB_TOKEN=${{ secrets.CHE_INCUBATOR_BOT_GITHUB_TOKEN }}
5353
set -e
54-
OP_SDK_DIR=/opt/operator-sdk
55-
mkdir -p $OP_SDK_DIR
56-
make download-operator-sdk DEST="${OP_SDK_DIR}"
5754
export PATH="$PATH:$OP_SDK_DIR"
5855
export QUAY_ECLIPSE_CHE_USERNAME=${{ secrets.QUAY_USERNAME }}
5956
export QUAY_ECLIPSE_CHE_PASSWORD=${{ secrets.QUAY_PASSWORD }}

.github/workflows/release.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,10 +92,6 @@ jobs:
9292
export GITHUB_TOKEN=${{ secrets.CHE_BOT_GITHUB_TOKEN }}
9393
set -e
9494
95-
OP_SDK_DIR=/opt/operator-sdk
96-
mkdir -p $OP_SDK_DIR
97-
make download-operator-sdk DEST="${OP_SDK_DIR}"
98-
9995
go install golang.org/x/tools/cmd/goimports@latest
10096
10197
export PATH="$PATH:$OP_SDK_DIR"

.vscode/launch.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"type": "go",
1515
"request": "launch",
1616
"mode": "auto",
17-
"program": "${workspaceFolder}/main.go",
17+
"program": "${workspaceFolder}/cmd/main.go",
1818
"envFile": "/tmp/che-operator-dev/vscode.env",
1919
"cwd": "${workspaceFolder}",
2020
},

DEPENDENCIES.md

Lines changed: 0 additions & 594 deletions
This file was deleted.

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ COPY go.mod go.mod
4444
COPY go.sum go.sum
4545

4646
# Copy the go source
47-
COPY main.go main.go
47+
COPY cmd/ cmd/
4848
COPY vendor/ vendor/
4949
COPY api/ api/
5050
COPY config/ config/
@@ -56,7 +56,7 @@ COPY editors-definitions /tmp/editors-definitions
5656
# to test FIPS compliance, run https://github.com/openshift/check-payload#scan-a-container-or-operator-image against a built image
5757
RUN export ARCH="$(uname -m)" && if [[ ${ARCH} == "x86_64" ]]; then export ARCH="amd64"; elif [[ ${ARCH} == "aarch64" ]]; then export ARCH="arm64"; fi && \
5858
if [[ ${SKIP_TESTS} == "false" ]]; then export MOCK_API=true && go test -mod=vendor -v ./...; fi && \
59-
GOOS=linux GOARCH=${ARCH} GO111MODULE=on go build -mod=vendor -a -o che-operator main.go
59+
GOOS=linux GOARCH=${ARCH} GO111MODULE=on go build -mod=vendor -a -o che-operator cmd/main.go
6060

6161
# https://registry.access.redhat.com/ubi8-minimal
6262
FROM registry.access.redhat.com/ubi8-minimal:8.10-1154

Makefile

Lines changed: 29 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -124,18 +124,18 @@ help: ## Display this help.
124124
##@ Development
125125

126126
build: generate ## Build Eclipse Che operator binary
127-
go build -o bin/manager main.go
127+
go build -o bin/manager cmd/main.go
128128

129129
run: SHELL := /bin/bash
130130
run: install-che-operands genenerate-env ## Run Eclipse Che operator
131131
source $(BASH_ENV_FILE)
132-
go run ./main.go
132+
go run cmd/main.go
133133

134134
debug: SHELL := /bin/bash
135135
debug: install-che-operands genenerate-env ## Run and debug Eclipse Che operator
136136
source $(BASH_ENV_FILE)
137137
# dlv has an issue with 'Ctrl-C' termination, that's why we're doing trick with detach.
138-
dlv debug --listen=:2345 --headless=true --api-version=2 ./main.go -- &
138+
dlv debug --listen=:2345 --headless=true --api-version=2 cmd/main.go -- &
139139
DLV_PID=$!
140140
wait $${DLV_PID}
141141

@@ -366,7 +366,7 @@ install-che-operands: generate manifests download-kustomize download-gateway-res
366366
if [[ ! "$$($(K8S_CLI) get checluster eclipse-che -n $(ECLIPSE_CHE_NAMESPACE) || false )" ]]; then
367367
[[ $(PLATFORM) == "kubernetes" ]] && $(MAKE) install-certmgr
368368
$(MAKE) install-devworkspace CHANNEL="next"
369-
$(KUSTOMIZE) build config/$(PLATFORM) | $(K8S_CLI) apply -f -
369+
$(KUSTOMIZE) build config/$(PLATFORM) | $(K8S_CLI) apply --server-side -f -
370370
$(MAKE) wait-pod-running SELECTOR="app.kubernetes.io/component=che-operator" NAMESPACE=$(ECLIPSE_CHE_NAMESPACE)
371371
fi
372372

@@ -481,7 +481,7 @@ bundle: generate manifests download-kustomize download-operator-sdk ## Generate
481481
goimports -w ./api
482482
go fmt -x ./api
483483

484-
$(OPERATOR_SDK) bundle validate $${BUNDLE_PATH} --select-optional name=operatorhub --optional-values=k8s-version=1.19
484+
$(OPERATOR_SDK) bundle validate $${BUNDLE_PATH} --select-optional name="operatorhubv2" --select-optional name="good-practices" --optional-values=k8s-version=1.19
485485

486486
bundle-build: SHELL := /bin/bash
487487
bundle-build: download-opm ## Build a bundle image
@@ -575,24 +575,19 @@ bundle-version: ## Prints a bundle version for a given channel
575575
##@ Utilities
576576

577577
OPM ?= $(shell pwd)/bin/opm
578+
OPM_VERSION ?= "v1.26.2"
578579
download-opm: SHELL := /bin/bash
579580
download-opm: ## Download opm tool
580-
[[ -z "$(DEST)" ]] && dest=$(OPM) || dest=$(DEST)/opm
581581
command -v $(OPM) >/dev/null 2>&1 && exit
582582

583-
OS=$(shell go env GOOS)
584-
ARCH=$(shell go env GOARCH)
585-
OPM_VERSION=$$(yq -r '.opm' $(PROJECT_DIR)/REQUIREMENTS)
586-
587-
echo "[INFO] Downloading opm version: $${OPM_VERSION}"
588-
589-
mkdir -p $$(dirname "$${dest}")
590-
curl -sL https://github.com/operator-framework/operator-registry/releases/download/$${OPM_VERSION}/$${OS}-$${ARCH}-opm > $${dest}
591-
chmod +x $${dest}
583+
echo "[INFO] Downloading opm version: $(OPM_VERSION)"
584+
mkdir -p $$(dirname "$(OPM)")
585+
curl -sL https://github.com/operator-framework/operator-registry/releases/download/$(OPM_VERSION)/$$(go env GOOS)-$$(go env GOARCH)-opm > $(OPM)
586+
chmod +x $(OPM)
592587

593588
CONTROLLER_GEN = $(shell pwd)/bin/controller-gen
594589
download-controller-gen: ## Download controller-gen tool
595-
$(call go-get-tool,$(CONTROLLER_GEN),sigs.k8s.io/controller-tools/cmd/controller-gen@v0.14.0)
590+
$(call go-get-tool,$(CONTROLLER_GEN),sigs.k8s.io/controller-tools/cmd/controller-gen@v0.18.0)
596591

597592
KUSTOMIZE = $(shell pwd)/bin/kustomize
598593
download-kustomize: ## Download kustomize tool
@@ -602,20 +597,27 @@ ADD_LICENSE = $(shell pwd)/bin/addlicense
602597
download-addlicense: ## Download addlicense tool
603598
$(call go-get-tool,$(ADD_LICENSE),github.com/google/addlicense@99ebc9c9db7bceb8623073e894533b978d7b7c8a)
604599

600+
OPERATOR_SDK_VERSION ?= "v1.39.2"
605601
OPERATOR_SDK ?= $(shell pwd)/bin/operator-sdk
606602
download-operator-sdk: SHELL := /bin/bash
607603
download-operator-sdk: ## Downloads operator sdk tool
608-
[[ -z "$(DEST)" ]] && dest=$(OPERATOR_SDK) || dest=$(DEST)/operator-sdk
609-
command -v $${dest} >/dev/null 2>&1 && exit
610-
611-
OS=$(shell go env GOOS)
612-
ARCH=$(shell go env GOARCH)
613-
OPERATOR_SDK_VERSION=$$(yq -r '."operator-sdk"' $(PROJECT_DIR)/REQUIREMENTS)
614-
615-
echo "[INFO] Downloading operator-sdk version $${OPERATOR_SDK_VERSION} into $${dest}"
616-
mkdir -p $$(dirname "$${dest}")
617-
curl -sL https://github.com/operator-framework/operator-sdk/releases/download/$${OPERATOR_SDK_VERSION}/operator-sdk_$${OS}_$${ARCH} > $${dest}
618-
chmod +x $${dest}
604+
command -v $(OPERATOR_SDK) >/dev/null 2>&1 && exit
605+
606+
echo "[INFO] Downloading operator-sdk version $(OPERATOR_SDK_VERSION) into $(OPERATOR_SDK)"
607+
mkdir -p $$(dirname "$(OPERATOR_SDK)")
608+
curl -sL https://github.com/operator-framework/operator-sdk/releases/download/$(OPERATOR_SDK_VERSION)/operator-sdk_$$(go env GOOS)_$$(go env GOARCH) > $(OPERATOR_SDK)
609+
chmod +x $(OPERATOR_SDK)
610+
611+
KUBEBUILDER_VERSION ?= "v4.7.1"
612+
KUBEBUILDER ?= $(shell pwd)/bin/kubebuilder
613+
download-kubebuilder: SHELL := /bin/bash
614+
download-kubebuilder: ## Downloads kubebuilder tool
615+
command -v $(KUBEBUILDER) >/dev/null 2>&1 && exit
616+
617+
echo "[INFO] Downloading kubebuilder version $(KUBEBUILDER_VERSION) into $(KUBEBUILDER)"
618+
mkdir -p $$(dirname "$(KUBEBUILDER)")
619+
curl -sL https://github.com/kubernetes-sigs/kubebuilder/releases/download/$(KUBEBUILDER_VERSION)/kubebuilder_$$(go env GOOS)_$$(go env GOARCH) > $(KUBEBUILDER)
620+
chmod +x $(KUBEBUILDER)
619621

620622
# Check if all required packages are installed
621623
validate-requirements: SHELL := /bin/bash

PROJECT

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
1+
# Code generated by tool. DO NOT EDIT.
2+
# This file is used to track the info used to scaffold your project
3+
# and allow the plugins properly work.
4+
# More info: https://book.kubebuilder.io/reference/project-config.html
15
domain: eclipse.che
26
layout:
3-
- go.kubebuilder.io/v3
7+
- go.kubebuilder.io/v4
48
plugins:
59
manifests.sdk.operatorframework.io/v2: {}
610
scorecard.sdk.operatorframework.io/v2: {}

REQUIREMENTS

Lines changed: 0 additions & 2 deletions
This file was deleted.

0 commit comments

Comments
 (0)