Skip to content

Commit ef73e5d

Browse files
committed
Add busybox-dependencies-index image manifests
1 parent d40aa88 commit ef73e5d

File tree

16 files changed

+353
-2
lines changed

16 files changed

+353
-2
lines changed

scripts/build_test_images.sh

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#!/usr/bin/env bash
2+
3+
# Busybox Operator Index Image
4+
docker build -t quay.io/olmtest/busybox-bundle:1.0.0 ./test/images/busybox-index/busybox/1.0.0
5+
docker build -t quay.io/olmtest/busybox-bundle:2.0.0 ./test/images/busybox-index/busybox/2.0.0
6+
7+
docker build -t quay.io/olmtest/busybox-dependency-bundle:1.0.0 ./test/images/busybox-index/busybox-dependency/1.0.0
8+
docker build -t quay.io/olmtest/busybox-dependency-bundle:2.0.0 ./test/images/busybox-index/busybox-dependency/2.0.0
9+
10+
docker push quay.io/olmtest/busybox-bundle:1.0.0
11+
docker push quay.io/olmtest/busybox-bundle:2.0.0
12+
docker push quay.io/olmtest/busybox-dependency-bundle:1.0.0
13+
docker push quay.io/olmtest/busybox-dependency-bundle:2.0.0
14+
15+
opm index add --bundles quay.io/olmtest/busybox-dependency-bundle:1.0.0,quay.io/olmtest/busybox-bundle:1.0.0 --tag quay.io/olmtest/busybox-dependencies-index:1.0.0-with-ListBundles-method -c docker
16+
docker push quay.io/olmtest/busybox-dependencies-index:1.0.0-with-ListBundles-method
17+
18+
opm index add --bundles quay.io/olmtest/busybox-dependency-bundle:2.0.0,quay.io/olmtest/busybox-bundle:2.0.0 --tag quay.io/olmtest/busybox-dependencies-index:2.0.0-with-ListBundles-method --from-index quay.io/olmtest/busybox-dependencies-index:1.0.0-with-ListBundles-method -c docker
19+
docker push quay.io/olmtest/busybox-dependencies-index:2.0.0-with-ListBundles-method

test/e2e/catalog_e2e_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -974,7 +974,7 @@ var _ = Describe("Catalog", func() {
974974
},
975975
Spec: v1alpha1.CatalogSourceSpec{
976976
SourceType: v1alpha1.SourceTypeGrpc,
977-
Image: catSrcImage + ":1.0.0",
977+
Image: catSrcImage + ":1.0.0-with-ListBundles-method",
978978
},
979979
}
980980

@@ -1019,7 +1019,7 @@ var _ = Describe("Catalog", func() {
10191019
if err != nil {
10201020
return false, err
10211021
}
1022-
existingSource.Spec.Image = catSrcImage + ":2.0.0"
1022+
existingSource.Spec.Image = catSrcImage + ":2.0.0-with-ListBundles-method"
10231023

10241024
source, err = crc.OperatorsV1alpha1().CatalogSources(source.GetNamespace()).Update(context.TODO(), existingSource, metav1.UpdateOptions{})
10251025
if err == nil {
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
FROM scratch
2+
3+
# We are pushing an operator-registry bundle
4+
# that has both metadata and manifests.
5+
LABEL operators.operatorframework.io.bundle.mediatype.v1=registry+v1
6+
LABEL operators.operatorframework.io.bundle.manifests.v1=manifests/
7+
LABEL operators.operatorframework.io.bundle.metadata.v1=metadata/
8+
LABEL operators.operatorframework.io.bundle.package.v1=busybox-dependency
9+
LABEL operators.operatorframework.io.bundle.channels.v1=alpha
10+
LABEL operators.operatorframework.io.bundle.channel.default.v1=alpha
11+
12+
ADD ./manifests/*.yaml /manifests/
13+
ADD ./metadata/annotations.yaml /metadata/annotations.yaml
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
apiVersion: operators.coreos.com/v1alpha1
2+
kind: ClusterServiceVersion
3+
metadata:
4+
name: busybox-dependency.v1.0.0
5+
namespace: placeholder
6+
spec:
7+
customresourcedefinitions:
8+
owned:
9+
- description: Foo resources for testing dependencies
10+
displayName: Foo
11+
group: olm.test.io
12+
kind: Foo
13+
name: foos.olm.test.io
14+
version: v1
15+
description: |
16+
A busybox-dependency CSV.
17+
displayName: busybox-dependency
18+
install:
19+
spec:
20+
deployments:
21+
- name: busybox-dependency
22+
spec:
23+
replicas: 1
24+
selector:
25+
matchLabels:
26+
app: busybox-dependency
27+
template:
28+
metadata:
29+
labels:
30+
app: busybox-dependency
31+
spec:
32+
containers:
33+
- name: busybox-dependency
34+
image: busybox
35+
command:
36+
- sleep
37+
- "9000"
38+
strategy: deployment
39+
installModes:
40+
- supported: true
41+
type: OwnNamespace
42+
- supported: true
43+
type: SingleNamespace
44+
- supported: true
45+
type: MultiNamespace
46+
- supported: true
47+
type: AllNamespaces
48+
maturity: alpha
49+
provider:
50+
name: Red Hat
51+
version: 1.0.0
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
apiVersion: apiextensions.k8s.io/v1beta1
2+
kind: CustomResourceDefinition
3+
metadata:
4+
name: foos.olm.test.io
5+
spec:
6+
group: olm.test.io
7+
names:
8+
kind: Foo
9+
listKind: FooList
10+
plural: foos
11+
singular: foo
12+
scope: Namespaced
13+
subresources:
14+
status: {}
15+
validation:
16+
# openAPIV3Schema is the schema for validating custom objects.
17+
openAPIV3Schema:
18+
type: object
19+
version: v1
20+
versions:
21+
- name: v1
22+
served: true
23+
storage: true
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
annotations:
2+
operators.operatorframework.io.bundle.mediatype.v1: "registry+v1"
3+
operators.operatorframework.io.bundle.manifests.v1: "manifests/"
4+
operators.operatorframework.io.bundle.metadata.v1: "metadata/"
5+
operators.operatorframework.io.bundle.package.v1: "busybox-dependency"
6+
operators.operatorframework.io.bundle.channels.v1: "alpha"
7+
operators.operatorframework.io.bundle.channel.default.v1: "alpha"
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
FROM scratch
2+
3+
# We are pushing an operator-registry bundle
4+
# that has both metadata and manifests.
5+
LABEL operators.operatorframework.io.bundle.mediatype.v1=registry+v1
6+
LABEL operators.operatorframework.io.bundle.manifests.v1=manifests/
7+
LABEL operators.operatorframework.io.bundle.metadata.v1=metadata/
8+
LABEL operators.operatorframework.io.bundle.package.v1=busybox-dependency
9+
LABEL operators.operatorframework.io.bundle.channels.v1=alpha
10+
LABEL operators.operatorframework.io.bundle.channel.default.v1=alpha
11+
12+
ADD ./manifests/*.yaml /manifests/
13+
ADD ./metadata/annotations.yaml /metadata/annotations.yaml
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
apiVersion: operators.coreos.com/v1alpha1
2+
kind: ClusterServiceVersion
3+
metadata:
4+
name: busybox-dependency.v2.0.0
5+
namespace: placeholder
6+
annotations:
7+
olm.skipRange: '>=0.0.0 <2.0.0'
8+
spec:
9+
customresourcedefinitions:
10+
owned:
11+
- description: Foo resources for testing dependencies
12+
displayName: Foo
13+
group: olm.test.io
14+
kind: Foo
15+
name: foos.olm.test.io
16+
version: v1
17+
description: |
18+
A busybox-dependency CSV.
19+
displayName: busybox-dependency
20+
install:
21+
spec:
22+
deployments:
23+
- name: busybox-dependency
24+
spec:
25+
replicas: 1
26+
selector:
27+
matchLabels:
28+
app: busybox-dependency
29+
template:
30+
metadata:
31+
labels:
32+
app: busybox-dependency
33+
spec:
34+
containers:
35+
- name: busybox-dependency
36+
image: busybox
37+
command:
38+
- sleep
39+
- "9000"
40+
strategy: deployment
41+
installModes:
42+
- supported: true
43+
type: OwnNamespace
44+
- supported: true
45+
type: SingleNamespace
46+
- supported: true
47+
type: MultiNamespace
48+
- supported: true
49+
type: AllNamespaces
50+
maturity: alpha
51+
provider:
52+
name: Red Hat
53+
version: 2.0.0
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
apiVersion: apiextensions.k8s.io/v1beta1
2+
kind: CustomResourceDefinition
3+
metadata:
4+
name: foos.olm.test.io
5+
spec:
6+
group: olm.test.io
7+
names:
8+
kind: Foo
9+
listKind: FooList
10+
plural: foos
11+
singular: foo
12+
scope: Namespaced
13+
subresources:
14+
status: {}
15+
validation:
16+
# openAPIV3Schema is the schema for validating custom objects.
17+
openAPIV3Schema:
18+
type: object
19+
version: v1
20+
versions:
21+
- name: v1
22+
served: true
23+
storage: true
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
annotations:
2+
operators.operatorframework.io.bundle.mediatype.v1: "registry+v1"
3+
operators.operatorframework.io.bundle.manifests.v1: "manifests/"
4+
operators.operatorframework.io.bundle.metadata.v1: "metadata/"
5+
operators.operatorframework.io.bundle.package.v1: "busybox-dependency"
6+
operators.operatorframework.io.bundle.channels.v1: "alpha"
7+
operators.operatorframework.io.bundle.channel.default.v1: "alpha"
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
FROM scratch
2+
3+
# We are pushing an operator-registry bundle
4+
# that has both metadata and manifests.
5+
LABEL operators.operatorframework.io.bundle.mediatype.v1=registry+v1
6+
LABEL operators.operatorframework.io.bundle.manifests.v1=manifests/
7+
LABEL operators.operatorframework.io.bundle.metadata.v1=metadata/
8+
LABEL operators.operatorframework.io.bundle.package.v1=busybox
9+
LABEL operators.operatorframework.io.bundle.channels.v1=alpha
10+
LABEL operators.operatorframework.io.bundle.channel.default.v1=alpha
11+
12+
ADD ./manifests/*.yaml /manifests/
13+
ADD ./metadata/annotations.yaml /metadata/annotations.yaml
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
apiVersion: operators.coreos.com/v1alpha1
2+
kind: ClusterServiceVersion
3+
metadata:
4+
name: busybox.v1.0.0
5+
namespace: placeholder
6+
spec:
7+
customresourcedefinitions:
8+
required:
9+
- description: Foo resources for testing dependencies
10+
displayName: Foo
11+
kind: Foo
12+
name: foos.olm.test.io
13+
version: v1
14+
description: |
15+
A busybox CSV.
16+
displayName: busybox
17+
install:
18+
spec:
19+
deployments:
20+
- name: busybox
21+
spec:
22+
replicas: 1
23+
selector:
24+
matchLabels:
25+
app: busybox
26+
template:
27+
metadata:
28+
labels:
29+
app: busybox
30+
spec:
31+
containers:
32+
- name: busybox
33+
image: busybox
34+
command:
35+
- sleep
36+
- "9000"
37+
strategy: deployment
38+
installModes:
39+
- supported: true
40+
type: OwnNamespace
41+
- supported: true
42+
type: SingleNamespace
43+
- supported: true
44+
type: MultiNamespace
45+
- supported: true
46+
type: AllNamespaces
47+
maturity: alpha
48+
provider:
49+
name: Red Hat
50+
version: 1.0.0
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
annotations:
2+
operators.operatorframework.io.bundle.mediatype.v1: "registry+v1"
3+
operators.operatorframework.io.bundle.manifests.v1: "manifests/"
4+
operators.operatorframework.io.bundle.metadata.v1: "metadata/"
5+
operators.operatorframework.io.bundle.package.v1: "busybox"
6+
operators.operatorframework.io.bundle.channels.v1: "alpha"
7+
operators.operatorframework.io.bundle.channel.default.v1: "alpha"
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
FROM scratch
2+
3+
# We are pushing an operator-registry bundle
4+
# that has both metadata and manifests.
5+
LABEL operators.operatorframework.io.bundle.mediatype.v1=registry+v1
6+
LABEL operators.operatorframework.io.bundle.manifests.v1=manifests/
7+
LABEL operators.operatorframework.io.bundle.metadata.v1=metadata/
8+
LABEL operators.operatorframework.io.bundle.package.v1=busybox
9+
LABEL operators.operatorframework.io.bundle.channels.v1=alpha
10+
LABEL operators.operatorframework.io.bundle.channel.default.v1=alpha
11+
12+
ADD ./manifests/*.yaml /manifests/
13+
ADD ./metadata/annotations.yaml /metadata/annotations.yaml
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
apiVersion: operators.coreos.com/v1alpha1
2+
kind: ClusterServiceVersion
3+
metadata:
4+
name: busybox.v2.0.0
5+
namespace: placeholder
6+
annotations:
7+
olm.skipRange: '>=0.0.0 <2.0.0'
8+
spec:
9+
customresourcedefinitions:
10+
required:
11+
- description: Foo resources for testing dependencies
12+
displayName: Foo
13+
kind: Foo
14+
name: foos.olm.test.io
15+
version: v1
16+
description: |
17+
A busybox CSV.
18+
displayName: busybox
19+
install:
20+
spec:
21+
deployments:
22+
- name: busybox
23+
spec:
24+
replicas: 1
25+
selector:
26+
matchLabels:
27+
app: busybox
28+
template:
29+
metadata:
30+
labels:
31+
app: busybox
32+
spec:
33+
containers:
34+
- name: busybox
35+
image: busybox
36+
command:
37+
- sleep
38+
- "9000"
39+
strategy: deployment
40+
installModes:
41+
- supported: true
42+
type: OwnNamespace
43+
- supported: true
44+
type: SingleNamespace
45+
- supported: true
46+
type: MultiNamespace
47+
- supported: true
48+
type: AllNamespaces
49+
maturity: alpha
50+
provider:
51+
name: Red Hat
52+
version: 2.0.0
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
annotations:
2+
operators.operatorframework.io.bundle.mediatype.v1: "registry+v1"
3+
operators.operatorframework.io.bundle.manifests.v1: "manifests/"
4+
operators.operatorframework.io.bundle.metadata.v1: "metadata/"
5+
operators.operatorframework.io.bundle.package.v1: "busybox"
6+
operators.operatorframework.io.bundle.channels.v1: "alpha"
7+
operators.operatorframework.io.bundle.channel.default.v1: "alpha"

0 commit comments

Comments
 (0)