Skip to content

Commit 219f5f7

Browse files
Merge pull request #408 from tmshort/synchronize
OPRUN-4017: Synchronize From Upstream Repositories
2 parents 7f00e53 + 6531aa0 commit 219f5f7

File tree

427 files changed

+1446
-63293
lines changed

Some content is hidden

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

427 files changed

+1446
-63293
lines changed

Makefile

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -142,18 +142,23 @@ tidy:
142142

143143
.PHONY: manifests
144144
KUSTOMIZE_CATD_RBAC_DIR := config/base/catalogd/rbac
145-
KUSTOMIZE_CATD_WEBHOOKS_DIR := config/base/catalogd/manager/webhook
145+
KUSTOMIZE_CATD_WEBHOOKS_DIR := config/base/catalogd/webhook
146146
KUSTOMIZE_OPCON_RBAC_DIR := config/base/operator-controller/rbac
147147
# Due to https://github.com/kubernetes-sigs/controller-tools/issues/837 we can't specify individual files
148148
# So we have to generate them together and then move them into place
149149
manifests: $(CONTROLLER_GEN) $(KUSTOMIZE) #EXHELP Generate WebhookConfiguration, ClusterRole, and CustomResourceDefinition objects.
150150
# Generate CRDs via our own generator
151151
hack/tools/update-crds.sh
152-
# Generate the remaining operator-controller manifests
153-
$(CONTROLLER_GEN) --load-build-tags=$(GO_BUILD_TAGS) rbac:roleName=manager-role paths="./internal/operator-controller/..." output:rbac:artifacts:config=$(KUSTOMIZE_OPCON_RBAC_DIR)
154-
# Generate the remaining catalogd manifests
155-
$(CONTROLLER_GEN) --load-build-tags=$(GO_BUILD_TAGS) rbac:roleName=manager-role paths="./internal/catalogd/..." output:rbac:artifacts:config=$(KUSTOMIZE_CATD_RBAC_DIR)
156-
$(CONTROLLER_GEN) --load-build-tags=$(GO_BUILD_TAGS) webhook paths="./internal/catalogd/..." output:webhook:artifacts:config=$(KUSTOMIZE_CATD_WEBHOOKS_DIR)
152+
# Generate the remaining operator-controller standard manifests
153+
$(CONTROLLER_GEN) --load-build-tags=$(GO_BUILD_TAGS),standard rbac:roleName=manager-role paths="./internal/operator-controller/..." output:rbac:artifacts:config=$(KUSTOMIZE_OPCON_RBAC_DIR)/standard
154+
# Generate the remaining operator-controller experimental manifests
155+
$(CONTROLLER_GEN) --load-build-tags=$(GO_BUILD_TAGS) rbac:roleName=manager-role paths="./internal/operator-controller/..." output:rbac:artifacts:config=$(KUSTOMIZE_OPCON_RBAC_DIR)/experimental
156+
# Generate the remaining catalogd standard manifests
157+
$(CONTROLLER_GEN) --load-build-tags=$(GO_BUILD_TAGS),standard rbac:roleName=manager-role paths="./internal/catalogd/..." output:rbac:artifacts:config=$(KUSTOMIZE_CATD_RBAC_DIR)/standard
158+
$(CONTROLLER_GEN) --load-build-tags=$(GO_BUILD_TAGS),standard webhook paths="./internal/catalogd/..." output:webhook:artifacts:config=$(KUSTOMIZE_CATD_WEBHOOKS_DIR)/standard
159+
# Generate the remaining catalogd experimental manifests
160+
$(CONTROLLER_GEN) --load-build-tags=$(GO_BUILD_TAGS) rbac:roleName=manager-role paths="./internal/catalogd/..." output:rbac:artifacts:config=$(KUSTOMIZE_CATD_RBAC_DIR)/experimental
161+
$(CONTROLLER_GEN) --load-build-tags=$(GO_BUILD_TAGS) webhook paths="./internal/catalogd/..." output:webhook:artifacts:config=$(KUSTOMIZE_CATD_WEBHOOKS_DIR)/experimental
157162
# Generate manifests stored in source-control
158163
mkdir -p $(MANIFEST_HOME)
159164
$(KUSTOMIZE) build $(KUSTOMIZE_STANDARD_OVERLAY) > $(STANDARD_MANIFEST)
@@ -278,18 +283,13 @@ test-experimental-e2e: run image-registry prometheus experimental-e2e e2e e2e-me
278283
prometheus: PROMETHEUS_NAMESPACE := olmv1-system
279284
prometheus: PROMETHEUS_VERSION := v0.83.0
280285
prometheus: #EXHELP Deploy Prometheus into specified namespace
281-
./hack/test/setup-monitoring.sh $(PROMETHEUS_NAMESPACE) $(PROMETHEUS_VERSION) $(KUSTOMIZE)
286+
./hack/test/install-prometheus.sh $(PROMETHEUS_NAMESPACE) $(PROMETHEUS_VERSION) $(KUSTOMIZE) $(VERSION)
282287

283-
# The metrics.out file contains raw json data of the metrics collected during a test run.
284-
# In an upcoming PR, this query will be replaced with one that checks for alerts from
285-
# prometheus. Prometheus will gather metrics we currently query for over the test run,
286-
# and provide alerts from the metrics based on the rules that we set.
288+
# The output alerts.out file contains any alerts, pending or firing, collected during a test run in json format.
287289
.PHONY: e2e-metrics
290+
e2e-metrics: ALERTS_FILE_PATH := $(if $(ARTIFACT_PATH),$(ARTIFACT_PATH),.)/alerts.out
288291
e2e-metrics: #EXHELP Request metrics from prometheus; place in ARTIFACT_PATH if set
289-
curl -X POST \
290-
-H "Content-Type: application/x-www-form-urlencoded" \
291-
--data 'query={pod=~"operator-controller-controller-manager-.*|catalogd-controller-manager-.*"}' \
292-
http://localhost:30900/api/v1/query > $(if $(ARTIFACT_PATH),$(ARTIFACT_PATH),.)/metrics.out
292+
curl -X GET http://localhost:30900/api/v1/alerts | jq 'if (.data.alerts | length) > 0 then .data.alerts.[] else empty end' > $(ALERTS_FILE_PATH)
293293

294294
.PHONY: extension-developer-e2e
295295
extension-developer-e2e: KIND_CLUSTER_NAME := operator-controller-ext-dev-e2e

codecov.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,16 @@ coverage:
1010
default:
1111
target: auto
1212
threshold: 2%
13+
paths:
14+
- "api/"
15+
- "cmd/"
16+
- "internal/"
1317
patch:
1418
default:
1519
target: auto
1620
threshold: 1%
17-
paths:
18-
- "api/"
19-
- "cmd/"
20-
- "internal/"
21+
paths:
22+
- "api/"
23+
- "cmd/"
24+
- "internal/"
2125

commitchecker.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
expectedMergeBase: 36809b312a523019c98655a9fda396e0f1588318
1+
expectedMergeBase: 850e4a128012f99f95fea9b521be5c6edf1d0d86
22
upstreamBranch: main
33
upstreamOrg: operator-framework
44
upstreamRepo: operator-controller

config/README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,14 @@ This provides additional configuration support for end-to-end testing, including
2727

2828
This configuration is used to generate `manifests/standard-e2e.yaml`.
2929

30+
## config/overlays/prometheus
31+
32+
Overlay containing manifest files which enable prometheus scraping of the catalogd and operator-controller pods. Used during e2e runs to measure performance over the lifetime of the test.
33+
34+
These manifests will not end up in the `manifests/` folder, as they must be applied in two distinct steps to avoid issues with applying prometheus CRDs and CRs simultaneously.
35+
36+
Performance alert settings can be found in: `config/overlays/prometheus/prometheus_rule.yaml`
37+
3038
## config/overlays/experimental
3139

3240
This provides additional configuration used to support experimental features, including CRDs. This configuration requires cert-manager.
Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
# Does not include the CRD, which must be added separately (it's non-namespaced)
22
apiVersion: kustomize.config.k8s.io/v1beta1
33
kind: Kustomization
4-
namespace: olmv1-system
54
namePrefix: catalogd-
65
resources:
7-
- rbac
86
- manager

config/base/catalogd/manager/kustomization.yaml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,9 @@ resources:
22
- manager.yaml
33
- service.yaml
44
- network_policy.yaml
5-
- webhook/manifests.yaml
65
apiVersion: kustomize.config.k8s.io/v1beta1
76
kind: Kustomization
87
images:
98
- name: controller
109
newName: quay.io/operator-framework/catalogd
1110
newTag: devel
12-
patches:
13-
- path: webhook/patch.yaml
14-
target:
15-
group: admissionregistration.k8s.io
16-
kind: MutatingWebhookConfiguration
17-
name: mutating-webhook-configuration
18-
version: v1

config/base/catalogd/manager/manager.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ apiVersion: apps/v1
22
kind: Deployment
33
metadata:
44
name: controller-manager
5-
namespace: system
5+
namespace: olmv1-system
66
annotations:
77
kubectl.kubernetes.io/default-logs-container: manager
88
labels:

config/base/catalogd/manager/network_policy.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ apiVersion: networking.k8s.io/v1
22
kind: NetworkPolicy
33
metadata:
44
name: controller-manager
5-
namespace: system
5+
namespace: olmv1-system
66
spec:
77
podSelector:
88
matchLabels:

config/base/catalogd/manager/service.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ metadata:
55
app.kubernetes.io/part-of: olm
66
app.kubernetes.io/name: catalogd
77
name: service
8-
namespace: system
8+
namespace: olmv1-system
99
spec:
1010
selector:
1111
control-plane: catalogd-controller-manager

0 commit comments

Comments
 (0)