Skip to content

Commit

Permalink
update test bundles and catalog to a declarative config
Browse files Browse the repository at this point in the history
Signed-off-by: Per Goncalves da Silva <[email protected]>
  • Loading branch information
Per Goncalves da Silva committed Jun 27, 2024
1 parent b8fb628 commit a9d0dce
Show file tree
Hide file tree
Showing 19 changed files with 384 additions and 0 deletions.
16 changes: 16 additions & 0 deletions test/images/busybox-index/index.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# The base image is expected to contain
# /bin/opm (with a serve subcommand) and /bin/grpc_health_probe
ARG OPM_VERSION=latest
FROM quay.io/operator-framework/opm:${OPM_VERSION}

# Set DC-specific label for the location of the DC root directory
# in the image
LABEL operators.operatorframework.io.index.configs.v1=/configs

# Copy declarative config root into image at /configs and pre-populate serve cache
COPY /configs /configs
RUN ["/bin/opm", "serve", "/configs", "--cache-dir=/tmp/cache", "--cache-only"]

# Configure the entrypoint and command
ENTRYPOINT ["/bin/opm"]
CMD ["serve", "/configs", "--cache-dir=/tmp/cache"]
2 changes: 2 additions & 0 deletions test/images/busybox-index/indexv1/configs/.indexignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/expected_all.json
..*
178 changes: 178 additions & 0 deletions test/images/busybox-index/indexv1/configs/catalog.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,178 @@
{
"schema": "olm.package",
"name": "busybox",
"defaultChannel": "alpha"
}
{
"schema": "olm.channel",
"name": "alpha",
"package": "busybox",
"entries": [
{
"name": "busybox.v1.0.0"
}
]
}
{
"schema": "olm.bundle",
"name": "busybox.v1.0.0",
"package": "busybox",
"image": "quay.io/olmtest/busybox-bundle:1.0.0",
"properties": [
{
"type": "olm.gvk.required",
"value": {
"group": "olm.test.io",
"kind": "Foo",
"version": "v1"
}
},
{
"type": "olm.package",
"value": {
"packageName": "busybox",
"version": "1.0.0"
}
},
{
"type": "olm.csv.metadata",
"value": {
"apiServiceDefinitions": {},
"crdDescriptions": {
"required": [
{
"name": "foos.olm.test.io",
"version": "v1",
"kind": "Foo",
"displayName": "Foo",
"description": "Foo resources for testing dependencies"
}
]
},
"description": "A busybox CSV.\n",
"displayName": "busybox",
"installModes": [
{
"type": "OwnNamespace",
"supported": true
},
{
"type": "SingleNamespace",
"supported": true
},
{
"type": "MultiNamespace",
"supported": true
},
{
"type": "AllNamespaces",
"supported": true
}
],
"maturity": "alpha",
"provider": {
"name": "Red Hat"
}
}
}
],
"relatedImages": [
{
"name": "",
"image": "busybox"
},
{
"name": "",
"image": "quay.io/olmtest/busybox-bundle:1.0.0"
}
]
}
{
"schema": "olm.package",
"name": "busybox-dependency",
"defaultChannel": "alpha"
}
{
"schema": "olm.channel",
"name": "alpha",
"package": "busybox-dependency",
"entries": [
{
"name": "busybox-dependency.v1.0.0"
}
]
}
{
"schema": "olm.bundle",
"name": "busybox-dependency.v1.0.0",
"package": "busybox-dependency",
"image": "quay.io/olmtest/busybox-dependency-bundle:1.0.0",
"properties": [
{
"type": "olm.gvk",
"value": {
"group": "olm.test.io",
"kind": "Foo",
"version": "v1"
}
},
{
"type": "olm.package",
"value": {
"packageName": "busybox-dependency",
"version": "1.0.0"
}
},
{
"type": "olm.csv.metadata",
"value": {
"apiServiceDefinitions": {},
"crdDescriptions": {
"owned": [
{
"name": "foos.olm.test.io",
"version": "v1",
"kind": "Foo",
"displayName": "Foo",
"description": "Foo resources for testing dependencies"
}
]
},
"description": "A busybox-dependency CSV.\n",
"displayName": "busybox-dependency",
"installModes": [
{
"type": "OwnNamespace",
"supported": true
},
{
"type": "SingleNamespace",
"supported": true
},
{
"type": "MultiNamespace",
"supported": true
},
{
"type": "AllNamespaces",
"supported": true
}
],
"maturity": "alpha",
"provider": {
"name": "Red Hat"
}
}
}
],
"relatedImages": [
{
"name": "",
"image": "busybox"
},
{
"name": "",
"image": "quay.io/olmtest/busybox-dependency-bundle:1.0.0"
}
]
}
2 changes: 2 additions & 0 deletions test/images/busybox-index/indexv2/configs/.indexignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/expected_all.json
..*
186 changes: 186 additions & 0 deletions test/images/busybox-index/indexv2/configs/catalog.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,186 @@
{
"schema": "olm.package",
"name": "busybox",
"defaultChannel": "alpha"
}
{
"schema": "olm.channel",
"name": "alpha",
"package": "busybox",
"entries": [
{
"name": "busybox.v2.0.0",
"skipRange": ">=0.0.0 <2.0.0"
}
]
}
{
"schema": "olm.bundle",
"name": "busybox.v2.0.0",
"package": "busybox",
"image": "quay.io/olmtest/busybox-bundle:2.0.0",
"properties": [
{
"type": "olm.gvk.required",
"value": {
"group": "olm.test.io",
"kind": "Foo",
"version": "v1"
}
},
{
"type": "olm.package",
"value": {
"packageName": "busybox",
"version": "2.0.0"
}
},
{
"type": "olm.csv.metadata",
"value": {
"annotations": {
"olm.skipRange": ">=0.0.0 <2.0.0"
},
"apiServiceDefinitions": {},
"crdDescriptions": {
"required": [
{
"name": "foos.olm.test.io",
"version": "v1",
"kind": "Foo",
"displayName": "Foo",
"description": "Foo resources for testing dependencies"
}
]
},
"description": "A busybox CSV.\n",
"displayName": "busybox",
"installModes": [
{
"type": "OwnNamespace",
"supported": true
},
{
"type": "SingleNamespace",
"supported": true
},
{
"type": "MultiNamespace",
"supported": true
},
{
"type": "AllNamespaces",
"supported": true
}
],
"maturity": "alpha",
"provider": {
"name": "Red Hat"
}
}
}
],
"relatedImages": [
{
"name": "",
"image": "busybox"
},
{
"name": "",
"image": "quay.io/olmtest/busybox-bundle:2.0.0"
}
]
}
{
"schema": "olm.package",
"name": "busybox-dependency",
"defaultChannel": "alpha"
}
{
"schema": "olm.channel",
"name": "alpha",
"package": "busybox-dependency",
"entries": [
{
"name": "busybox-dependency.v2.0.0",
"skipRange": ">=0.0.0 <2.0.0"
}
]
}
{
"schema": "olm.bundle",
"name": "busybox-dependency.v2.0.0",
"package": "busybox-dependency",
"image": "quay.io/olmtest/busybox-dependency-bundle:2.0.0",
"properties": [
{
"type": "olm.gvk",
"value": {
"group": "olm.test.io",
"kind": "Foo",
"version": "v1"
}
},
{
"type": "olm.package",
"value": {
"packageName": "busybox-dependency",
"version": "2.0.0"
}
},
{
"type": "olm.csv.metadata",
"value": {
"annotations": {
"olm.skipRange": ">=0.0.0 <2.0.0"
},
"apiServiceDefinitions": {},
"crdDescriptions": {
"owned": [
{
"name": "foos.olm.test.io",
"version": "v1",
"kind": "Foo",
"displayName": "Foo",
"description": "Foo resources for testing dependencies"
}
]
},
"description": "A busybox-dependency CSV.\n",
"displayName": "busybox-dependency",
"installModes": [
{
"type": "OwnNamespace",
"supported": true
},
{
"type": "SingleNamespace",
"supported": true
},
{
"type": "MultiNamespace",
"supported": true
},
{
"type": "AllNamespaces",
"supported": true
}
],
"maturity": "alpha",
"provider": {
"name": "Red Hat"
}
}
}
],
"relatedImages": [
{
"name": "",
"image": "busybox"
},
{
"name": "",
"image": "quay.io/olmtest/busybox-dependency-bundle:2.0.0"
}
]
}

0 comments on commit a9d0dce

Please sign in to comment.