Skip to content

Commit 76cfb73

Browse files
authored
Merge branch 'master' into master
2 parents 2cb46c3 + f2de7eb commit 76cfb73

File tree

3,893 files changed

+336748
-256421
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,893 files changed

+336748
-256421
lines changed

DOWNSTREAM_OWNERS

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
approvers:
2+
- dinhxuanvu
3+
- kevinrizza
4+
- anik120
5+
- awgreene
6+
- ankitathomas
7+
- joelanford
8+
- perdasilva
9+
- oceanc80
10+
- grokspawn
11+
- tmshort
12+
- ncdc
13+
reviewers:
14+
- dinhxuanvu
15+
- kevinrizza
16+
- anik120
17+
- awgreene
18+
- ankitathomas
19+
- joelanford
20+
- perdasilva
21+
- oceanc80
22+
- grokspawn
23+
- tmshort
24+
- ncdc
25+
component: "OLM"

Makefile

+15-11
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ bin/cpb: FORCE
105105
CGO_ENABLED=0 go build $(GO_BUILD_OPTS) -ldflags '-extldflags "-static"' -o $@ github.com/operator-framework/operator-lifecycle-manager/util/cpb
106106

107107
unit/olm: bin/kubebuilder
108-
echo "Running the OLM unit tests"
108+
@echo "Running the OLM unit tests"
109109
$(MAKE) unit WHAT=operator-lifecycle-manager
110110

111111
unit/registry:
@@ -139,15 +139,18 @@ vendor:
139139
manifests: ## Generate manifests
140140
OLM_VERSION=$(OLM_VERSION) ./scripts/generate_crds_manifests.sh
141141

142+
.PHONY: generate-manifests
143+
generate-manifests: OLM_VERSION=0.0.1-snapshot
144+
generate-manifests: manifests
145+
142146
.PHONY: diff
143147
diff:
144148
git diff --stat HEAD --ignore-submodules --exit-code
145149

146150
verify-vendor: vendor
147151
$(MAKE) diff
148152

149-
verify-manifests: OLM_VERSION=0.19.0 # set static version to avoid failing for commit based versioning
150-
verify-manifests: manifests
153+
verify-manifests: generate-manifests
151154
$(MAKE) diff
152155

153156
verify-nested-vendor:
@@ -157,32 +160,33 @@ verify-nested-vendor:
157160
verify-commits:
158161
./scripts/verify_commits.sh $(PULL_BASE_SHA) # see https://github.com/kubernetes/test-infra/blob/master/prow/jobs.md#job-environment-variables
159162

163+
# Update scripts/sync_pop_candidate.sh if anything is changed in this recipe
160164
.PHONY: verify
161165
verify:
162-
echo "Checking for unstaged root vendor changes"
166+
@echo "Checking for unstaged root vendor changes"
163167
$(MAKE) verify-vendor
164-
echo "Checking whether the CVO manifests need to be generated"
168+
@echo "Checking whether the CVO manifests need to be generated"
165169
$(MAKE) verify-manifests
166-
echo "Checking for unsynced nested [go.mod,go.sum] files"
170+
@echo "Checking for unsynced nested [go.mod,go.sum] files"
167171
$(MAKE) verify-nested-vendor
168-
echo "Checking commit integrity"
172+
@echo "Checking commit integrity"
169173
$(MAKE) verify-commits
170174

171175
.PHONY: crc-start
172176
crc-start:
173-
echo "Starting CRC"
177+
@echo "Starting CRC"
174178
./scripts/crc-start.sh
175179

176180
.PHONY: crc-build
177181
crc-build:
178-
echo "Building olm image"
182+
@echo "Building olm image"
179183
IMG="olm:test" $(MAKE) build/olm-container
180-
echo "Building opm image"
184+
@echo "Building opm image"
181185
IMG="opm:test" $(MAKE) build/registry-container
182186

183187
.PHONY: crc-deploy
184188
crc-deploy:
185-
echo "Deploying OLM"
189+
@echo "Deploying OLM"
186190
./scripts/crc-deploy.sh
187191

188192
.PHONY: crc

README.md

+14-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,16 @@
11
# operator-framework-olm
22

3-
This repository is a monorepo superset of the projects that comprises the Operator Lifecycle Manager runtime and tooling for use with Openshift.
3+
This repository is a monorepo superset of the projects that comprises the
4+
Operator Lifecycle Manager runtime and tooling for use with Openshift.
5+
6+
The upstream projects are:
7+
* [api](https://github.com/operator-framework/api)
8+
* [operator-registry](https://github.com/operator-framework/operator-registry)
9+
* [operator-lifecycle-manager](https://github.com/operator-framework/operator-lifecycle-manager)
10+
11+
These projects are located in the `staging` directory. Changes to the
12+
contents of the `staging` directory need to be made upstream first (links
13+
above), and then downstreamed to this repository.
14+
15+
Please refer to the [scripts README.md](scripts/README.md) to learn how to
16+
downstream commits from those projects to this repo.

base.Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Dockerfile to bootstrap build and test in openshift-ci
22

3-
FROM registry.ci.openshift.org/ocp/builder:rhel-8-golang-1.18-openshift-4.11
3+
FROM registry.ci.openshift.org/ocp/builder:rhel-8-golang-1.20-openshift-4.14
44

55
ARG KUBEBUILDER_RELEASE=2.3.1
66
# Install test dependencies

cmd/package-server-manager/main.go

+10-3
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import (
1313

1414
ctrl "sigs.k8s.io/controller-runtime"
1515
"sigs.k8s.io/controller-runtime/pkg/cache"
16+
"sigs.k8s.io/controller-runtime/pkg/client"
1617
"sigs.k8s.io/controller-runtime/pkg/healthz"
1718
"sigs.k8s.io/controller-runtime/pkg/log/zap"
1819
"sigs.k8s.io/controller-runtime/pkg/manager"
@@ -27,6 +28,7 @@ const (
2728
defaultNamespace = "openshift-operator-lifecycle-manager"
2829
defaultMetricsPort = "0"
2930
defaultHealthCheckPort = ":8080"
31+
defaultPprofPort = ":6060"
3032
leaderElectionConfigmapName = "packageserver-controller-lock"
3133
)
3234

@@ -56,6 +58,10 @@ func run(cmd *cobra.Command, args []string) error {
5658
if err != nil {
5759
return err
5860
}
61+
pprofAddr, err := cmd.Flags().GetString("pprof")
62+
if err != nil {
63+
return err
64+
}
5965

6066
ctrl.SetLogger(zap.New(zap.UseDevMode(true)))
6167
setupLog := ctrl.Log.WithName("setup")
@@ -75,13 +81,14 @@ func run(cmd *cobra.Command, args []string) error {
7581
RenewDeadline: &le.RenewDeadline.Duration,
7682
RetryPeriod: &le.RetryPeriod.Duration,
7783
HealthProbeBindAddress: healthCheckAddr,
78-
NewCache: cache.BuilderWithOptions(cache.Options{
79-
SelectorsByObject: cache.SelectorsByObject{
84+
PprofBindAddress: pprofAddr,
85+
Cache: cache.Options{
86+
ByObject: map[client.Object]cache.ByObject{
8087
&olmv1alpha1.ClusterServiceVersion{}: {
8188
Field: packageserverCSVFields.AsSelector(),
8289
},
8390
},
84-
}),
91+
},
8592
})
8693
if err != nil {
8794
setupLog.Error(err, "failed to setup manager instance")

cmd/package-server-manager/start.go

+1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ func newStartCmd() *cobra.Command {
1515
cmd.Flags().String("name", defaultName, "configures the metadata.name for the packageserver csv resource")
1616
cmd.Flags().String("namespace", defaultNamespace, "configures the metadata.namespace that contains the packageserver csv resource")
1717
cmd.Flags().String("health", defaultHealthCheckPort, "configures the health check port that the kubelet is configured to probe")
18+
cmd.Flags().String("pprof", defaultPprofPort, "configures the pprof port that the process exposes")
1819
cmd.Flags().Bool("disable-leader-election", false, "configures whether leader election will be disabled")
1920

2021
return cmd

0 commit comments

Comments
 (0)