Skip to content

Commit 8011376

Browse files
committed
Updated to generate plain manifests from an SDK project with kustomize;Restructed code to have a single It block in a describe block;Updated the README
Signed-off-by: jubittajohn <[email protected]>
1 parent b6e8d9b commit 8011376

File tree

12 files changed

+446
-372
lines changed

12 files changed

+446
-372
lines changed

Makefile

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ e2e: run kind-load-test-artifacts test-e2e e2e-coverage kind-cluster-cleanup ##
117117

118118
.PHONY: operator-developer-e2e
119119
operator-developer-e2e: KIND_CLUSTER_NAME=operator-controller-op-dev-e2e ## Run operator-developer e2e on local kind cluster
120-
operator-developer-e2e: run setup-op-dev-e2e deploy-local-registry test-op-dev-e2e stop-local-registry remove-local-registry kind-cluster-cleanup
120+
operator-developer-e2e: run $(OPM) $(OPERATOR_SDK) $(KUSTOMIZE) deploy-local-registry test-op-dev-e2e stop-local-registry remove-local-registry kind-cluster-cleanup
121121

122122
.PHONY: e2e-coverage
123123
e2e-coverage:
@@ -151,7 +151,7 @@ kind-load-test-artifacts: $(KIND) ## Load the e2e testdata container images into
151151

152152
.PHONY: deploy-local-registry
153153
deploy-local-registry: ## Deploy local docker registry
154-
$(CONTAINER_RUNTIME) run -d -p 5000:5000 --restart=always --name local-registry registry:2
154+
$(CONTAINER_RUNTIME) run -d -p 5001:5000 --restart=always --name local-registry registry:2
155155

156156
.PHONY: stop-local-registry
157157
stop-local-registry: ## Stop local registry
@@ -161,15 +161,15 @@ stop-local-registry: ## Stop local registry
161161
remove-local-registry: ## Remove local registry
162162
$(CONTAINER_RUNTIME) container rm -v local-registry
163163

164-
.PHONY: setup-op-dev-e2e
165-
setup-op-dev-e2e: $(OPM) $(OPERATOR_SDK)
166-
167164
opm: $(OPM)
168165
$(OPM) $(OPM_ARGS)
169166

170167
operator-sdk: $(OPERATOR_SDK)
171168
(cd $(OPERATOR_SDK_PROJECT_PATH) && $(OPERATOR_SDK) $(OPERATOR_SDK_ARGS))
172169

170+
kustomize: $(KUSTOMIZE)
171+
(cd $(OPERATOR_SDK_PROJECT_PATH) && $(KUSTOMIZE) $(KUSTOMIZE_ARGS))
172+
173173
##@ Build
174174

175175
export VERSION ?= $(shell git describe --tags --always --dirty)

go.mod

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,20 @@ require (
77
github.com/go-logr/logr v1.2.4
88
github.com/onsi/ginkgo/v2 v2.11.0
99
github.com/onsi/gomega v1.27.10
10+
github.com/operator-framework/api v0.17.4-0.20230223191600-0131a6301e42
1011
github.com/operator-framework/catalogd v0.4.1
1112
github.com/operator-framework/deppy v0.0.0-20230629133131-bb7b6ae7b266
1213
github.com/operator-framework/operator-registry v1.27.1
1314
github.com/operator-framework/rukpak v0.13.0
1415
github.com/spf13/pflag v1.0.5
1516
github.com/stretchr/testify v1.8.4
1617
go.uber.org/zap v1.25.0
18+
k8s.io/apiextensions-apiserver v0.26.1
1719
k8s.io/apimachinery v0.26.1
1820
k8s.io/client-go v0.26.1
1921
k8s.io/component-base v0.26.1
2022
k8s.io/utils v0.0.0-20221128185143-99ec85e7a448
2123
sigs.k8s.io/controller-runtime v0.14.4
22-
sigs.k8s.io/yaml v1.3.0
2324
)
2425

2526
require (
@@ -82,7 +83,6 @@ require (
8283
github.com/josharian/intern v1.0.0 // indirect
8384
github.com/json-iterator/go v1.1.12 // indirect
8485
github.com/klauspost/compress v1.12.3 // indirect
85-
github.com/kr/pretty v0.3.1 // indirect
8686
github.com/mailru/easyjson v0.7.6 // indirect
8787
github.com/mattn/go-sqlite3 v1.14.10 // indirect
8888
github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect
@@ -96,15 +96,13 @@ require (
9696
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
9797
github.com/opencontainers/go-digest v1.0.0 // indirect
9898
github.com/opencontainers/image-spec v1.1.0-rc2 // indirect
99-
github.com/operator-framework/api v0.17.4-0.20230223191600-0131a6301e42 // indirect
10099
github.com/otiai10/copy v1.2.0 // indirect
101100
github.com/pkg/errors v0.9.1 // indirect
102101
github.com/pmezard/go-difflib v1.0.0 // indirect
103102
github.com/prometheus/client_golang v1.14.0 // indirect
104103
github.com/prometheus/client_model v0.3.0 // indirect
105104
github.com/prometheus/common v0.37.0 // indirect
106105
github.com/prometheus/procfs v0.8.0 // indirect
107-
github.com/rogpeppe/go-internal v1.10.1-0.20230524175051-ec119421bb97 // indirect
108106
github.com/sirupsen/logrus v1.9.0 // indirect
109107
github.com/stoewer/go-strcase v1.2.0 // indirect
110108
go.etcd.io/bbolt v1.3.6 // indirect
@@ -120,13 +118,12 @@ require (
120118
go.opentelemetry.io/proto/otlp v0.19.0 // indirect
121119
go.uber.org/multierr v1.10.0 // indirect
122120
go4.org v0.0.0-20230225012048-214862532bf5 // indirect
123-
golang.org/x/mod v0.12.0 // indirect
124-
golang.org/x/net v0.10.0 // indirect
121+
golang.org/x/net v0.12.0 // indirect
125122
golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5 // indirect
126-
golang.org/x/sync v0.3.0 // indirect
123+
golang.org/x/sync v0.2.0 // indirect
127124
golang.org/x/sys v0.10.0 // indirect
128125
golang.org/x/term v0.10.0 // indirect
129-
golang.org/x/text v0.9.0 // indirect
126+
golang.org/x/text v0.11.0 // indirect
130127
golang.org/x/time v0.3.0 // indirect
131128
golang.org/x/tools v0.9.3 // indirect
132129
gomodules.xyz/jsonpatch/v2 v2.2.0 // indirect
@@ -139,12 +136,12 @@ require (
139136
gopkg.in/yaml.v2 v2.4.0 // indirect
140137
gopkg.in/yaml.v3 v3.0.1 // indirect
141138
k8s.io/api v0.26.1 // indirect
142-
k8s.io/apiextensions-apiserver v0.26.1 // indirect
143139
k8s.io/apiserver v0.26.1 // indirect
144140
k8s.io/klog/v2 v2.80.1 // indirect
145141
k8s.io/kube-openapi v0.0.0-20221012153701-172d655c2280 // indirect
146142
rsc.io/letsencrypt v0.0.3 // indirect
147143
sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.35 // indirect
148144
sigs.k8s.io/json v0.0.0-20220713155537-f223a00ba0e2 // indirect
149145
sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect
146+
sigs.k8s.io/yaml v1.3.0 // indirect
150147
)

go.sum

Lines changed: 8 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,6 @@ github.com/asaskevich/govalidator v0.0.0-20200428143746-21a406dcc535 h1:4daAzAu0
106106
github.com/asaskevich/govalidator v0.0.0-20200428143746-21a406dcc535/go.mod h1:oGkLhpf+kjZl6xBf758TQhh5XrAeiJv/7FRz/2spLIg=
107107
github.com/aws/aws-sdk-go v1.15.11/go.mod h1:mFuSZ37Z9YOHbQEwBWztmVzqXrEkub65tZoCYDt7FT0=
108108
github.com/aws/aws-sdk-go v1.17.7/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo=
109-
github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLju8=
110109
github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA=
111110
github.com/benbjohnson/clock v1.3.0 h1:ip6w0uFQkncKQ979AypyG0ER7mqUSBdKLOgAle/AT8A=
112111
github.com/beorn7/perks v0.0.0-20160804104726-4c0e84591b9a/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q=
@@ -632,9 +631,8 @@ github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxv
632631
github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc=
633632
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
634633
github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI=
634+
github.com/kr/pretty v0.2.1 h1:Fmg33tUaq4/8ym9TJN1x7sLJnHVwhP33CNkpYV/7rwI=
635635
github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI=
636-
github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE=
637-
github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk=
638636
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
639637
github.com/kr/pty v1.1.5/go.mod h1:9r2w37qlBe7rQ6e1fg1S/9xpWHSnaqNdHD3WcMdbPDA=
640638
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
@@ -726,8 +724,8 @@ github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1Cpa
726724
github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY=
727725
github.com/onsi/gomega v1.9.0/go.mod h1:Ho0h+IUsWyvy1OpqCwxlQ/21gkhVunqlU8fDGcoTdcA=
728726
github.com/onsi/gomega v1.10.3/go.mod h1:V9xEwhxec5O8UDM77eCW8vLymOMltsqPVYWrpDsH8xc=
729-
github.com/onsi/gomega v1.27.7 h1:fVih9JD6ogIiHUN6ePK7HJidyEDpWGVB5mzM7cWNXoU=
730-
github.com/onsi/gomega v1.27.7/go.mod h1:1p8OOlwo2iUUDsHnOrjE5UKYJ+e3W8eQ3qSlRahPmr4=
727+
github.com/onsi/gomega v1.27.10 h1:naR28SdDFlqrG6kScpT8VWpu1xWY5nJRCF3XaYyBjhI=
728+
github.com/onsi/gomega v1.27.10/go.mod h1:RsS8tutOdbdgzbPtzzATp12yT7kM5I5aElG3evPbQ0M=
731729
github.com/opencontainers/go-digest v0.0.0-20170106003457-a6d0ee40d420/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s=
732730
github.com/opencontainers/go-digest v0.0.0-20180430190053-c9281466c8b2/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s=
733731
github.com/opencontainers/go-digest v1.0.0-rc1/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s=
@@ -778,7 +776,6 @@ github.com/pelletier/go-toml v1.8.1/go.mod h1:T2/BmBdy8dvIRq1a/8aqjN41wvWlN4lrap
778776
github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU=
779777
github.com/phayes/freeport v0.0.0-20180830031419-95f893ade6f2 h1:JhzVVoYvbOACxoUmOs6V/G4D5nPVUW73rKvXxP4XUJc=
780778
github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY=
781-
github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA=
782779
github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
783780
github.com/pkg/errors v0.8.1-0.20171018195549-f15c970de5b7/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
784781
github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
@@ -837,9 +834,6 @@ github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqn
837834
github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg=
838835
github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ=
839836
github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=
840-
github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs=
841-
github.com/rogpeppe/go-internal v1.10.1-0.20230524175051-ec119421bb97 h1:3RPlVWzZ/PDqmVuf/FKHARG5EMid/tl7cv54Sw/QRVY=
842-
github.com/rogpeppe/go-internal v1.10.1-0.20230524175051-ec119421bb97/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA=
843837
github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
844838
github.com/rwcarlsen/goexif v0.0.0-20190401172101-9e8deecbddbd/go.mod h1:hPqNNc0+uJM6H+SuU8sEs5K5IQeKccPqeSjfgcKGgPk=
845839
github.com/safchain/ethtool v0.0.0-20190326074333-42ed695e3de8/go.mod h1:Z0q5wiBQGYcxhMZ6gUqHn6pYNLypFAvaL3UvgZLR0U4=
@@ -892,10 +886,8 @@ github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81P
892886
github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA=
893887
github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
894888
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
895-
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
896-
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
897-
github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk=
898-
github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
889+
github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk=
890+
github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
899891
github.com/syndtr/gocapability v0.0.0-20170704070218-db04d3cc01c8/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww=
900892
github.com/syndtr/gocapability v0.0.0-20180916011248-d98352740cb2/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww=
901893
github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww=
@@ -1038,8 +1030,7 @@ golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
10381030
golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
10391031
golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
10401032
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
1041-
golang.org/x/mod v0.12.0 h1:rmsUpXtvNzj340zd98LZ4KntptpfRHwpFOHG188oHXc=
1042-
golang.org/x/mod v0.12.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
1033+
golang.org/x/mod v0.10.0 h1:lFO9qtOdlre5W1jxS3r/4szv2/6iXxScdzjoBMXNhYk=
10431034
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
10441035
golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
10451036
golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
@@ -1118,8 +1109,8 @@ golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJ
11181109
golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
11191110
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
11201111
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
1121-
golang.org/x/sync v0.3.0 h1:ftCYgMx6zT/asHUrPw8BLLscYtGznsLAnjq5RH9P66E=
1122-
golang.org/x/sync v0.3.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y=
1112+
golang.org/x/sync v0.2.0 h1:PUR+T4wwASmuSTYdKjYHI5TD22Wy5ogLU5qZCOLxBrI=
1113+
golang.org/x/sync v0.2.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
11231114
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
11241115
golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
11251116
golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=

test/operator-framework-e2e/README.md

Lines changed: 31 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,26 @@
11
# Cross-component E2E for operator framework
22

33
This is a cross-component demo with all OLM v1 repositories. The ginkgo test does the following:
4-
- Automates the creation of `plain+v0` bundles and FBCs for a set of bundle manifest directories.
4+
- Uses operator-sdk and kustomize to build `plain+v0` bundles and create catalogs to include the bundles.
55
- Installs, upgrades and deletes a `plain+v0` operator.
66
- Uses operator-sdk to build `registry+v1` bundles and create catalogs to include the bundles.
77
- Installs, upgrades and deletes a `registry+v1` operator.
88

9+
The steps in the ginkgo test can be summarized as follows:
10+
11+
1. start with an empty directory
12+
2. call operator-sdk to initialize and generate an operator
13+
3. generate a bundle directory
14+
4. build/push/kind load bundle images from the bundle directories
15+
5. repeat steps 2-4 as necessary to get bundles for multiple operator versions
16+
6. generate a catalog directory
17+
7. build/push/kind load the catalog
18+
8. create a Catalog CR (with kubectl operator)
19+
9. create an Operator CR (with kubectl operator)
20+
10. trigger Operator upgrades (with kubectl operator)
21+
11. delete the Operator CR (with kubectl operator)
22+
12. delete the Catalog CR (with kubectl operator)
23+
13. repeat steps 2-12 for each bundle format (e.g. registry+v1 and plain+v0)
924
## Objective
1025
- Development on OLM v1 is split across multiple repositories, and the list of relevant repositories may grow over time. While we have demos showing improvements in functionality of components over time, it can be difficult to have a picture of the state of OLM v1 at any given time for someone not following its development closely. Having a single source to look for OLM v1 behavior can provide more clarity about the state of the project.
1126
- With the scale of the OLM v1 project, it is useful to have a means to test components in the operator development + lifecycle pipeline together to create a more cohesive experience for all users.
@@ -14,10 +29,9 @@ This is a cross-component demo with all OLM v1 repositories. The ginkgo test doe
1429

1530
- Building operator-controller, deploying it into the cluster and rest of the configuration is done in the `MakeFile` of this repo under the target `operator-developer-e2e`. This includes:
1631

17-
- Setting up a kind cluster.
32+
- Setting up a kind cluster named `operator-controller-op-dev-e2e`.
1833
- Installing the operator controller onto the cluster.
19-
- Downloading the opm tool.
20-
- Installing the operator-sdk.
34+
- Setting up `opm`, `operator-sdk` and `kustomize` using bingo.
2135
- Setting up a local registry server for building and loading images.
2236

2337
- The following structs defined are required as input for both plain+v0 and registry+v1 bundles:
@@ -34,11 +48,11 @@ This is a cross-component demo with all OLM v1 repositories. The ginkgo test doe
3448
imageRef string
3549
}
3650
```
37-
- `baseFolderPath` - Base path of the folder for the specific bundle type input data.
51+
- `baseFolderPath` - Base/root path of the folder for the specific bundle type input data.[path to plain-v0 or registry-v1 bundles testdata]
3852
- `bundles` - Stores the data relevant to different versions of the bundle.
3953
- `bInputDir` - The input directory containing the specific version of the bundle data.
4054
- `bundleVersion` - The specific version of the bundle data.
41-
- `imageRef` - This is formed. Stores the bundle image reference which will be of the format `localhost:5000/<operator_name>-bundle:v.<bundleVersion>`
55+
- `imageRef` - This is formed. Stores the bundle image reference which will be of the format `localhost:5001/<operator_name>-bundle:v.<bundleVersion>`
4256
- For getting catalog related inputs:
4357
```
4458
type CatalogDInfo struct {
@@ -50,11 +64,11 @@ This is a cross-component demo with all OLM v1 repositories. The ginkgo test doe
5064
fbcFileName string
5165
}
5266
```
53-
- `baseFolderPath` - Base path of the folder for the catalogs.
67+
- `baseFolderPath` - Base/root path of the folder for the catalogs.
5468
- `operatorName` - Name of the operator to be installed from the bundles.
5569
- `desiredChannelName` - Desired channel name for the operator.
5670
- `catalogDir` - This is formed. The directory to store the FBC. The formed value will be of the format: `<operator-name>-catalog`
57-
- `imageRef` - This is formed. Stores the FBC image reference which will be of the format: `localhost:5000/<username>/<catalogDir>:test`
71+
- `imageRef` - This is formed. Stores the FBC image reference which will be of the format: `localhost:5001/<username>/<catalogDir>:test`
5872
- `fbcFileName` - Name of the FBC file. This is hard-coded as `catalog.yaml`.
5973
- For getting information related to the install/upgrade action for operators:
6074
```
@@ -67,20 +81,17 @@ This is a cross-component demo with all OLM v1 repositories. The ginkgo test doe
6781
- `upgradeVersion` - Version of the operator to be upgraded on the cluster.
6882
6983
### Plain bundles
70-
- Plain bundle manifests are taken as input.
71-
72-
- The plain bundle manifest directory taken as input should follow the below directory structure:
84+
- The plain+v0 bundles are formed using `operator-sdk` and `kustomize`.
85+
- The below input is used to form the bundle using operator-sdk.
7386
```
74-
bundles/
75-
└── plain-v0/
76-
├── plain.v<version>/
77-
│ ├── manifests
78-
│ └── Dockerfile
79-
└── plain.v<version>/
80-
├── manifests
81-
└── Dockerfile
87+
type SdkProjectInfo struct {
88+
projectName string
89+
domainName string
90+
group string
91+
version string
92+
kind string
93+
}
8294
```
83-
- The bundles should be present in the testdata folder.
8495
8596
- After the bundle image is created and loaded, the FBC is formed by a custom routine by using the operatorName, desiredChannelName, bundle imageRefs and bundleVersions.
8697

test/operator-framework-e2e/create_fbc_helper.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,8 +125,8 @@ func WriteFBC(fbc declcfg.DeclarativeConfig, fbcFilePath, fbcFileName string) er
125125
return err
126126
}
127127

128-
// Generates the semver using the bundle images passed
129-
func generateOLMSemverFile(semverFileName string, bundleImages []string) error {
128+
// Forms the semver using the bundle images passed
129+
func formOLMSemverFile(semverFileName string, bundleImages []string) error {
130130
images := make([]string, 0, len(bundleImages))
131131
for _, bundleImage := range bundleImages {
132132
images = append(images, fmt.Sprintf(" - image: %s", bundleImage))

0 commit comments

Comments
 (0)