Skip to content

Commit 4d6bb6c

Browse files
Merge pull request #752 from njhale/change-upstream-base
refactor(images): use operator-framework namespace for all olm images
2 parents da201ca + a017baa commit 4d6bb6c

File tree

18 files changed

+83
-92
lines changed

18 files changed

+83
-92
lines changed

Documentation/design/developing.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* Make any config customizations by editing `example-values.yaml`
77
* Deploy a namespaced copy of OLM
88
```sh
9-
./scripts/package-release.sh 1.0.0-custom custom-olm ./Documentation/install/example-values.yaml
9+
./scripts/package_release.sh 1.0.0-custom custom-olm ./Documentation/install/example-values.yaml
1010
kubectl create ns olm-testing
1111
kubectl get secrets -n tectonic-system -o yaml coreos-pull-secret | sed 's/tectonic-system/olm-testing/g' | kubectl create -f -
1212
kubectl apply -f ./custom-olm
@@ -58,7 +58,7 @@ kubectl apply -f ./custom-olm
5858
* either apply the new configmap on it's own and restart catalog or, easier, just run:
5959

6060
```sh
61-
./scripts/package-release.sh 1.0.0-custom custom-olm ./Documentation/install/example-values.yaml
61+
./scripts/package_release.sh 1.0.0-custom custom-olm ./Documentation/install/example-values.yaml
6262
kubectl apply -f ./custom-olm
6363
```
6464

Documentation/install/install.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ olm:
5555
replicaCount: 1
5656
# The image to run. If not building a local image, use sha256 image references
5757
image:
58-
ref: quay.io/coreos/olm:local
58+
ref: quay.io/operator-framework/olm:local
5959
pullPolicy: IfNotPresent
6060
service:
6161
# port for readiness/liveness probes
@@ -67,7 +67,7 @@ catalog:
6767
replicaCount: 1
6868
# The image to run. If not building a local image, use sha256 image references
6969
image:
70-
ref: quay.io/coreos/catalog:local
70+
ref: quay.io/operator-framework/olm:local
7171
pullPolicy: IfNotPresent
7272
service:
7373
# port for readiness/liveness probes
@@ -77,13 +77,13 @@ catalog:
7777
To configure a release of OLM for installation in a cluster:
7878
7979
1. Create a `my-values.yaml` like the example above with the desired configuration or choose an existing one from this repository. The latest production values can be found in [deploy/tectonic-alm-operator/values.yaml](../../deploy/tectonic-alm-operator/values.yaml).
80-
1. Generate deployment files from the templates and the `my-values.yaml` using `package-release.sh`
80+
1. Generate deployment files from the templates and the `my-values.yaml` using `package_release.sh`
8181

8282
```bash
8383
# first arg must be a semver-compatible version string
8484
# second arg is the output directory
8585
# third arg is the values.yaml file
86-
./scripts/package-release.sh 1.0.0-myolm ./my-olm-deployment my-values.yaml
86+
./scripts/package_release.sh 1.0.0-myolm ./my-olm-deployment my-values.yaml
8787
```
8888

8989
1. Deploy to kubernetes: `kubectl apply -f ./my-olm-deployment/templates/`

Documentation/install/local-values.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,26 +8,26 @@ debug: true
88
olm:
99
replicaCount: 1
1010
image:
11-
ref: quay.io/coreos/olm:local
11+
ref: quay.io/operator-framework/olm:local
1212
pullPolicy: IfNotPresent
1313
service:
1414
internalPort: 8080
1515

1616
catalog:
1717
replicaCount: 1
1818
image:
19-
ref: quay.io/coreos/olm:local
19+
ref: quay.io/operator-framework/olm:local
2020
pullPolicy: IfNotPresent
2121
service:
2222
internalPort: 8080
2323

2424
package:
2525
replicaCount: 1
2626
image:
27-
ref: quay.io/coreos/olm:local
27+
ref: quay.io/operator-framework/olm:local
2828
pullPolicy: IfNotPresent
2929
service:
3030
internalPort: 5443
3131

3232
catalog_sources:
33-
- rh-operators
33+
- rh-operators

Makefile

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,16 @@
44

55
SHELL := /bin/bash
66
PKG := github.com/operator-framework/operator-lifecycle-manager
7-
CMDS := $(addprefix bin/, $(shell go list ./cmd/... | xargs -I{} basename {}))
7+
MOD_FLAGS := $(shell (go version | grep -q -E "1\.(11|12)") && echo -mod=vendor)
8+
CMDS := $(addprefix bin/, $(shell go list $(MOD_FLAGS) ./cmd/... | xargs -I{} basename {}))
89
CODEGEN := ./vendor/k8s.io/code-generator/generate_groups.sh
910
MOCKGEN := ./scripts/generate_mocks.sh
1011
counterfeiter := $(GOBIN)/counterfeiter
1112
mockgen := $(GOBIN)/mockgen
12-
IMAGE_REPO := quay.io/coreos/olm
13+
IMAGE_REPO := quay.io/operator-framework/olm
1314
IMAGE_TAG ?= "dev"
1415
KUBE_DEPS := api apiextensions-apiserver apimachinery code-generator kube-aggregator kubernetes
1516
KUBE_RELEASE := release-1.11
16-
MOD_FLAGS := $(shell (go version | grep -q 1.11) && echo -mod=vendor)
1717

1818
.PHONY: build test run clean vendor schema-check \
1919
vendor-update coverage coverage-html e2e .FORCE
@@ -51,13 +51,13 @@ $(CMDS):
5151
run-local:
5252
. ./scripts/build_local.sh
5353
mkdir -p build/resources
54-
. ./scripts/package-release.sh 1.0.0 build/resources Documentation/install/local-values.yaml
54+
. ./scripts/package_release.sh 1.0.0 build/resources Documentation/install/local-values.yaml
5555
. ./scripts/install_local.sh local build/resources
5656
rm -rf build
5757

5858
deploy-local:
5959
mkdir -p build/resources
60-
. ./scripts/package-release.sh 1.0.0 build/resources Documentation/install/local-values.yaml
60+
. ./scripts/package_release.sh 1.0.0 build/resources Documentation/install/local-values.yaml
6161
. ./scripts/install_local.sh local build/resources
6262
rm -rf build
6363

@@ -67,7 +67,7 @@ e2e.namespace:
6767
# useful if running e2e directly with `go test -tags=bare`
6868
setup-bare: clean e2e.namespace
6969
. ./scripts/build_bare.sh
70-
. ./scripts/package-release.sh 1.0.0 test/e2e/resources test/e2e/e2e-bare-values.yaml
70+
. ./scripts/package_release.sh 1.0.0 test/e2e/resources test/e2e/e2e-bare-values.yaml
7171
. ./scripts/install_bare.sh $(shell cat ./e2e.namespace) test/e2e/resources
7272

7373
e2e:
@@ -161,8 +161,8 @@ gen-all: gen-ci container-codegen container-mockgen
161161
# then tag those builds in quay with the version in OLM_VERSION
162162
release: ver=$(shell cat OLM_VERSION)
163163
release:
164-
docker pull quay.io/coreos/olm:$(ver)
165-
$(MAKE) target=upstream ver=$(ver) package
164+
docker pull quay.io/operator-framework/olm:$(ver)
165+
$(MAKE) target=upstream ver=$(ver) quickstart=true package
166166
$(MAKE) target=okd ver=$(ver) package
167167
$(MAKE) target=ocp ver=$(ver) package
168168
rm -rf manifests
@@ -171,7 +171,7 @@ release:
171171
find ./manifests -type f -exec sed -i "/^#/d" {} \;
172172
find ./manifests -type f -exec sed -i "1{/---/d}" {} \;
173173

174-
package: olmref=$(shell docker inspect --format='{{index .RepoDigests 0}}' quay.io/coreos/olm:$(ver))
174+
package: olmref=$(shell docker inspect --format='{{index .RepoDigests 0}}' quay.io/operator-framework/olm:$(ver))
175175
package:
176176
ifndef target
177177
$(error target is undefined)
@@ -182,5 +182,8 @@ endif
182182
yq w -i deploy/$(target)/values.yaml olm.image.ref $(olmref)
183183
yq w -i deploy/$(target)/values.yaml catalog.image.ref $(olmref)
184184
yq w -i deploy/$(target)/values.yaml package.image.ref $(olmref)
185-
./scripts/package-release.sh $(ver) deploy/$(target)/manifests/$(ver) deploy/$(target)/values.yaml
185+
./scripts/package_release.sh $(ver) deploy/$(target)/manifests/$(ver) deploy/$(target)/values.yaml
186186
ln -sfFn ./$(ver) deploy/$(target)/manifests/latest
187+
ifeq ($(quickstart), true)
188+
./scripts/package_quickstart.sh deploy/$(target)/manifests/$(ver) deploy/$(target)/manifests/quickstart/olm.yaml
189+
endif

deploy/chart/values.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ debug: false
99
olm:
1010
replicaCount: 1
1111
image:
12-
ref: quay.io/coreos/olm:master
12+
ref: quay.io/operator-framework/olm:master
1313
pullPolicy: Always
1414
service:
1515
internalPort: 8080
@@ -20,7 +20,7 @@ catalog:
2020
replicaCount: 1
2121
commandArgs: -configmapServerImage=quay.io/operatorframework/configmap-operator-registry:latest
2222
image:
23-
ref: quay.io/coreos/olm:master
23+
ref: quay.io/operator-framework/olm:master
2424
pullPolicy: Always
2525
service:
2626
internalPort: 8080
@@ -30,7 +30,7 @@ catalog:
3030
package:
3131
replicaCount: 2
3232
image:
33-
ref: quay.io/coreos/olm:master
33+
ref: quay.io/operator-framework/olm:master
3434
pullPolicy: Always
3535
service:
3636
internalPort: 5443

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ module github.com/operator-framework/operator-lifecycle-manager
22

33
require (
44
github.com/coreos/bbolt v1.3.2 // indirect
5-
github.com/coreos/etcd v3.3.11+incompatible // indirect
5+
github.com/coreos/etcd v3.3.12+incompatible // indirect
66
github.com/coreos/go-semver v0.2.0
77
github.com/coreos/go-systemd v0.0.0-20190204112023-081494f7ee4f // indirect
88
github.com/docker/distribution v2.7.1+incompatible // indirect

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ github.com/coreos/bbolt v1.3.2 h1:wZwiHHUieZCquLkDL0B8UhzreNWsPHooDAG3q34zk0s=
2222
github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk=
2323
github.com/coreos/etcd v3.3.9+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE=
2424
github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE=
25-
github.com/coreos/etcd v3.3.11+incompatible h1:0gCnqKsq7XxMi69JsnbmMc1o+RJH3XH64sV9aiTTYko=
26-
github.com/coreos/etcd v3.3.11+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE=
25+
github.com/coreos/etcd v3.3.12+incompatible h1:5k8nkcBSvltjOO5RLflnXevOJXndlKIMbvVnMTX+cUU=
26+
github.com/coreos/etcd v3.3.12+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE=
2727
github.com/coreos/go-semver v0.2.0 h1:3Jm3tLmsgAYcjC+4Up7hJrFBPr+n7rAqYeSw/SZazuY=
2828
github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk=
2929
github.com/coreos/go-systemd v0.0.0-20180511133405-39ca1b05acc7/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4=

scripts/build_local.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,6 @@ if [ -z "$NO_MINIKUBE" ]; then
1010
eval $(minikube docker-env) || { echo 'Cannot switch to minikube docker'; exit 1; }
1111
kubectl config use-context minikube
1212
fi
13-
docker build -f e2e.Dockerfile .
14-
docker tag $(docker images --filter 'label=stage=olm' --format '{{.CreatedAt}}\t{{.ID}}' | sort -nr | head -n 1 | cut -f2) quay.io/coreos/olm:local
15-
docker tag $(docker images --filter 'label=stage=builder' --format '{{.CreatedAt}}\t{{.ID}}' | sort -nr | head -n 1 | cut -f2) quay.io/coreos/olm-e2e:local
13+
docker build -f upstream.Dockerfile .
14+
docker tag $(docker images --filter 'label=stage=olm' --format '{{.CreatedAt}}\t{{.ID}}' | sort -nr | head -n 1 | cut -f2) quay.io/operator-framework/olm:local
15+
docker tag $(docker images --filter 'label=stage=builder' --format '{{.CreatedAt}}\t{{.ID}}' | sort -nr | head -n 1 | cut -f2) quay.io/operator-framework/olm-e2e:local

scripts/package-quickstart.sh

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

scripts/package_quickstart.sh

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/usr/bin/env bash
2+
3+
if [[ ${#@} < 2 ]]; then
4+
echo "Usage: $0 concatenate OLM's Kubernetes manifests into a single YAML stream and writes the result to a file"
5+
echo "* dir: the input directory that contains OLM's Kubernetes manifests"
6+
echo "* out: the output file for the combined OLM Kubernetes manifest"
7+
exit 1
8+
fi
9+
10+
dir=$1
11+
out=$2
12+
13+
awk 'NR==1 && !/^---*/ {print "---"} !/^[[:space:]]*#/ {print}' ${dir}/*.yaml > ${out} && \
14+
echo "Wrote manifest to ${out}"
15+

0 commit comments

Comments
 (0)