Skip to content

Commit 372f062

Browse files
Merge pull request #190 from tmshort/synchronize
NO-ISSUE: Synchronize From Upstream Repositories
2 parents ca679a7 + 95eec45 commit 372f062

File tree

904 files changed

+309225
-2296
lines changed

Some content is hidden

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

904 files changed

+309225
-2296
lines changed

CONTRIBUTING.md

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,35 @@ The workflow defined above implies that the community is always ready for discus
3636

3737
Please keep this workflow in mind as you read through the document.
3838

39+
## How to Build and Deploy Locally
40+
41+
After creating a fork and cloning the project locally,
42+
you can follow the steps below to test your changes:
43+
44+
1. Create the cluster:
45+
46+
```sh
47+
kind create cluster operator-controller
48+
```
49+
50+
2. Build your changes:
51+
52+
```sh
53+
make build docker-build
54+
```
55+
56+
3. Load the image locally and Deploy to Kind
57+
58+
```sh
59+
make kind-load kind-deploy
60+
```
61+
3962
### Communication Channels
4063

4164
- Email: [operator-framework-olm-dev](mailto:[email protected])
4265
- Slack: [#olm-dev](https://kubernetes.slack.com/archives/C0181L6JYQ2)
4366
- Google Group: [olm-gg](https://groups.google.com/g/operator-framework-olm-dev)
44-
- Weekly in Person Working Group Meeting: [olm-wg](https://github.com/operator-framework/community#operator-lifecycle-manager-working-group)
67+
- Weekly in Person Working Group Meeting: [olm-wg](https://github.com/operator-framework/community#operator-lifecycle-manager-working-group)
4568

4669
## How are Milestones Designed?
4770

@@ -68,7 +91,7 @@ As discussed earlier, the operator-controller adheres to a microservice architec
6891
6992
## Submitting Issues
7093
71-
Unsure where to submit an issue?
94+
Unsure where to submit an issue?
7295
7396
- [The Operator-Controller project](https://github.com/operator-framework/operator-controller/), which is the top level component allowing users to specify operators they'd like to install.
7497
- [The Catalogd project](https://github.com/operator-framework/catalogd/), which hosts operator content and helps users discover installable content.

Makefile

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -165,12 +165,16 @@ test-unit: $(SETUP_ENVTEST) #HELP Run the unit tests
165165
$(UNIT_TEST_DIRS) \
166166
-test.gocoverdir=$(ROOT_DIR)/coverage/unit
167167

168-
image-registry: ## Setup in-cluster image registry
169-
./hack/test/image-registry.sh $(E2E_REGISTRY_NAMESPACE) $(E2E_REGISTRY_NAME)
170-
171-
build-push-e2e-catalog: ## Build the testdata catalog used for e2e tests and push it to the image registry
172-
./hack/test/build-push-e2e-catalog.sh $(E2E_REGISTRY_NAMESPACE) $(LOCAL_REGISTRY_HOST)/$(E2E_TEST_CATALOG_V1)
173-
./hack/test/build-push-e2e-catalog.sh $(E2E_REGISTRY_NAMESPACE) $(LOCAL_REGISTRY_HOST)/$(E2E_TEST_CATALOG_V2)
168+
.PHONY: image-registry
169+
E2E_REGISTRY_IMAGE=localhost/e2e-test-registry:devel
170+
image-registry: export GOOS=linux
171+
image-registry: export GOARCH=amd64
172+
image-registry: ## Build the testdata catalog used for e2e tests and push it to the image registry
173+
go build $(GO_BUILD_FLAGS) -tags '$(GO_BUILD_TAGS)' -ldflags '$(GO_BUILD_LDFLAGS)' -gcflags '$(GO_BUILD_GCFLAGS)' -asmflags '$(GO_BUILD_ASMFLAGS)' -o ./testdata/registry/bin/registry ./testdata/registry/registry.go
174+
go build $(GO_BUILD_FLAGS) -tags '$(GO_BUILD_TAGS)' -ldflags '$(GO_BUILD_LDFLAGS)' -gcflags '$(GO_BUILD_GCFLAGS)' -asmflags '$(GO_BUILD_ASMFLAGS)' -o ./testdata/push/bin/push ./testdata/push/push.go
175+
$(CONTAINER_RUNTIME) build -f ./testdata/Dockerfile -t $(E2E_REGISTRY_IMAGE) ./testdata
176+
$(CONTAINER_RUNTIME) save $(E2E_REGISTRY_IMAGE) | $(KIND) load image-archive /dev/stdin --name $(KIND_CLUSTER_NAME)
177+
./testdata/build-test-registry.sh $(E2E_REGISTRY_NAMESPACE) $(E2E_REGISTRY_NAME) $(E2E_REGISTRY_IMAGE)
174178

175179
# When running the e2e suite, you can set the ARTIFACT_PATH variable to the absolute path
176180
# of the directory for the operator-controller e2e tests to store the artifacts, which
@@ -181,7 +185,7 @@ build-push-e2e-catalog: ## Build the testdata catalog used for e2e tests and pus
181185
test-e2e: KIND_CLUSTER_NAME := operator-controller-e2e
182186
test-e2e: KUSTOMIZE_BUILD_DIR := config/overlays/e2e
183187
test-e2e: GO_BUILD_FLAGS := -cover
184-
test-e2e: run image-registry build-push-e2e-catalog registry-load-bundles e2e e2e-coverage kind-clean #HELP Run e2e test suite on local kind cluster
188+
test-e2e: run image-registry e2e e2e-coverage kind-clean #HELP Run e2e test suite on local kind cluster
185189

186190
.PHONY: extension-developer-e2e
187191
extension-developer-e2e: KUSTOMIZE_BUILD_DIR := config/overlays/cert-manager
@@ -205,7 +209,7 @@ post-upgrade-checks:
205209
test-upgrade-e2e: KIND_CLUSTER_NAME := operator-controller-upgrade-e2e
206210
test-upgrade-e2e: export TEST_CLUSTER_CATALOG_NAME := test-catalog
207211
test-upgrade-e2e: export TEST_CLUSTER_EXTENSION_NAME := test-package
208-
test-upgrade-e2e: kind-cluster run-latest-release image-registry build-push-e2e-catalog registry-load-bundles pre-upgrade-setup docker-build kind-load kind-deploy post-upgrade-checks kind-clean #HELP Run upgrade e2e tests on a local kind cluster
212+
test-upgrade-e2e: kind-cluster run-latest-release image-registry pre-upgrade-setup docker-build kind-load kind-deploy post-upgrade-checks kind-clean #HELP Run upgrade e2e tests on a local kind cluster
209213

210214
.PHONY: e2e-coverage
211215
e2e-coverage:
@@ -231,12 +235,6 @@ kind-cluster: $(KIND) #EXHELP Standup a kind cluster.
231235
kind-clean: $(KIND) #EXHELP Delete the kind cluster.
232236
$(KIND) delete cluster --name $(KIND_CLUSTER_NAME)
233237

234-
registry-load-bundles: ## Load selected e2e testdata container images created in kind-load-bundles into registry
235-
testdata/bundles/registry-v1/build-push-e2e-bundle.sh ${E2E_REGISTRY_NAMESPACE} $(LOCAL_REGISTRY_HOST)/bundles/registry-v1/prometheus-operator:v1.0.0 prometheus-operator.v1.0.0 prometheus-operator.v1.0.0
236-
testdata/bundles/registry-v1/build-push-e2e-bundle.sh ${E2E_REGISTRY_NAMESPACE} $(LOCAL_REGISTRY_HOST)/bundles/registry-v1/prometheus-operator:v1.0.1 prometheus-operator.v1.0.1 prometheus-operator.v1.0.0
237-
testdata/bundles/registry-v1/build-push-e2e-bundle.sh ${E2E_REGISTRY_NAMESPACE} $(LOCAL_REGISTRY_HOST)/bundles/registry-v1/prometheus-operator:v1.2.0 prometheus-operator.v1.2.0 prometheus-operator.v1.0.0
238-
testdata/bundles/registry-v1/build-push-e2e-bundle.sh ${E2E_REGISTRY_NAMESPACE} $(LOCAL_REGISTRY_HOST)/bundles/registry-v1/prometheus-operator:v2.0.0 prometheus-operator.v2.0.0 prometheus-operator.v1.0.0
239-
240238
#SECTION Build
241239

242240
ifeq ($(origin VERSION), undefined)

PROJECT

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,15 @@ resources:
1111
domain: operatorframework.io
1212
group: olm
1313
kind: ClusterExtension
14-
path: github.com/operator-framework/operator-controller/api/v1alpha1
15-
version: v1alpha1
14+
path: github.com/operator-framework/operator-controller/api/v1
15+
version: v1
1616
- api:
1717
crdVersion: v1
1818
namespaced: true
1919
controller: true
2020
domain: operatorframework.io
2121
group: olm
2222
kind: Extension
23-
path: github.com/operator-framework/operator-controller/api/v1alpha1
24-
version: v1alpha1
23+
path: github.com/operator-framework/operator-controller/api/v1
24+
version: v1
2525
version: "3"

0 commit comments

Comments
 (0)