-
Notifications
You must be signed in to change notification settings - Fork 49
NO-ISSUE: Synchronize From Upstream Repositories #738
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
openshift-bot
wants to merge
105
commits into
openshift:main
Choose a base branch
from
openshift-bot:synchronize-upstream
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
105 commits
Select commit
Hold shift + click to select a range
52e1e92
:seedling: Bump actions/stale from 10 to 10.2.0 (#2719)
dependabot[bot] bf99dec
:seedling: Bump github.com/containerd/containerd from 1.7.31 to 1.7.3…
dependabot[bot] 254bfe0
:seedling: Bump docker/login-action from 4 to 4.1.0 (#2721)
dependabot[bot] 860f575
:seedling: Bump golang.org/x/tools from 0.44.0 to 0.45.0 (#2723)
dependabot[bot] afa2e7a
:seedling: Bump requests from 2.33.1 to 2.34.0 (#2724)
dependabot[bot] 67f22c2
:seedling: Bump regex from 2026.4.4 to 2026.5.9 (#2725)
dependabot[bot] 1416535
:sparkles: graphql service endpoint for catalogd (#2100)
grokspawn 45e7cc8
Merge branch 'main' into synchronize
f341bea
UPSTREAM: <carry>: Add OpenShift specific files
dtfranz e456536
UPSTREAM: <carry>: Add new tests for single/own namespaces install modes
camilamacedo86 f9eab76
UPSTREAM: <carry>: Upgrade OCP image from 4.20 to 4.21
camilamacedo86 303e21b
UPSTREAM: <carry>: [Default Catalog Tests] - Change logic to get ocp …
camilamacedo86 3b73748
UPSTREAM: <carry>: Update OCP catalogs to v4.21
tmshort 4735697
UPSTREAM: <carry>: support singleown cases in disconnected
kuiwang02 35938be
UPSTREAM: <carry>: fix cases 81696 and 74618 for product code changes
kuiwang02 efcc214
UPSTREAM: <carry>: Define Default timeouts and apply their usage accr…
camilamacedo86 aa7cf3c
UPSTREAM: <carry>: Update to new feature-gate options in helm
tmshort ed72470
UPSTREAM: <carry>: Fix flake for single/own ns tests by ensuring uniq…
camilamacedo86 e9856aa
UPSTREAM: <carry>: [OTE]: Enhance single/own ns based on review comme…
camilamacedo86 6994b3b
UPSTREAM: <carry>: Update OwnSingle template to use spec.config.inlin…
kuiwang02 2d604e8
UPSTREAM: <carry>: [OTE]: Add webhook cleanup validation on extension…
camilamacedo86 c0a8b9f
UPSTREAM: <carry>: Add [OTP] to migrated cases
kuiwang02 020e1b3
UPSTREAM: <carry>: [OTE]: Upgrade dependencies used
camilamacedo86 fe27e84
UPSTREAM: <carry>: fix(OTE): fix OpenShift Kubernetes replace version…
camilamacedo86 b337f9e
UPSTREAM: <carry>: [Default Catalog Tests] Upgrade go 1.24.6 and depe…
camilamacedo86 121da90
UPSTREAM: <carry>: add disconnected environment support with custom p…
kuiwang02 917a7a1
UPSTREAM: <carry>: migrate jiazha test cases to OTE
jianzhangbjz 6986297
UPSTREAM: <carry>: migrate clustercatalog case to ote
Xia-Zhao-rh e9be72e
UPSTREAM: <carry>: migrate olmv1 QE stress cases
kuiwang02 3acb7e6
UPSTREAM: <carry>: Use busybox/httpd to simulate probes
tmshort 815d9de
UPSTREAM: <carry>: migrate olmv1 QE cases
Xia-Zhao-rh 67ec0cf
UPSTREAM: <carry>: add agent for olmv1 qe cases
kuiwang02 302ae31
UPSTREAM: <carry>: Disable upstream PodDisruptionBudget
tmshort 9e19d5e
UPSTREAM: <carry>: Add AGENTS.md for AI code contributions
rashmigottipati 71551c1
UPSTREAM: <carry>: address review comments through addl prompts
rashmigottipati b2ee71b
UPSTREAM: <carry>: addressing some more review comments
rashmigottipati 238f9c3
UPSTREAM: <carry>: remove DCO line
rashmigottipati 3d131da
UPSTREAM: <carry>: migrate bandrade test cases to OTE
bandrade 60bb7ea
UPSTREAM: <carry>: update metadata
bandrade 82c9af4
UPSTREAM: <carry>: remove originalName
bandrade e38254f
UPSTREAM: <carry>: update 80458's timeout to 180s
jianzhangbjz 1a46cfc
UPSTREAM: <carry>: update 83026 to specify the clustercatalog
jianzhangbjz 544b251
UPSTREAM: <carry>: Update to golang 1.25 and ocp 4.22
oceanc80 c2e4302
UPSTREAM: <carry>: Use oc client for running e2e tests
pedjak 77b5eff
UPSTREAM: <carry>: Run upstream e2e tests tagged with `@catalogd-update`
pedjak 91419c1
UPSTREAM: <carry>: enhance case to make it more stable
kuiwang02 fbc3c45
UPSTREAM: <carry>: add service account to curl job
ehearne-redhat ed645ea
UPSTREAM: <carry>: move sa creation out of buildCurlJob()
ehearne-redhat 02621f9
UPSTREAM: <carry>: comment out delete service account
ehearne-redhat 264df3c
UPSTREAM: <carry>: move defercleanup for sa for LIFO
ehearne-redhat 4adc83b
UPSTREAM: <carry>: add polling so job fully deleted before proceed
ehearne-redhat 90a7a6c
UPSTREAM: <carry>: Revert "Merge pull request #594 from ehearne-redha…
sosiouxme d8ef74b
UPSTREAM: <carry>: Remove openshift-redhat-marketplace catalog tests
camilamacedo86 8d597d0
UPSTREAM: <carry>: config watchnamespace cases
kuiwang02 e841f78
UPSTREAM: <carry>: enhance ocp-79770
Xia-Zhao-rh a631edd
UPSTREAM: <carry>: upgrade version support case
kuiwang02 7826e7f
UPSTREAM: <carry>: Remove installed condition check from auth preflig…
849ef67
UPSTREAM: <carry>: Add openshift/api dependency
15d354b
UPSTREAM: <carry>: Add boxcutter specific preflight auth test
c683782
UPSTREAM: <carry>: adjust watchnamespace case based on change
kuiwang02 dcf92a5
UPSTREAM: <carry>: fix(ote): Use as operator-controller dep from root…
camilamacedo86 1c9c192
UPSTREAM: <carry>: add 83979 automation
bandrade e3bb502
UPSTREAM: <carry>: add 85889 automation
bandrade 914cdab
UPSTREAM: <carry>: Update test-operator startup script to fix pod pro…
5272428
UPSTREAM: <carry>: Fix up own-namespace invalid configuration test
523a1f6
UPSTREAM: <carry>: Preflight tests use in-cluster catalog and bundles…
camilamacedo86 a787f2f
UPSTREAM: <carry>: adjust sa and permission test cases per new change…
kuiwang02 dcee88c
UPSTREAM: <carry>: Update OCP catalogs to v4.22
camilamacedo86 f512b7c
UPSTREAM: <carry>: chore(OTE and Default Catalog Tests) Update go and…
camilamacedo86 ca1b025
UPSTREAM: <carry>: fix 83026 for TP cluster
jianzhangbjz fe63550
UPSTREAM: <carry>: serviceAccount validation unified across all runtimes
kuiwang02 ae74ad5
UPSTREAM: <carry>: Fix OLMv1 test operator to listen on IPv6
stbenjam 1b9813f
UPSTREAM: <carry>: Increase install timeout and add diagnostic loggin…
camilamacedo86 60928be
UPSTREAM: <carry>: add service account to curl job
ehearne-redhat 0a766a3
UPSTREAM: <carry>: update OCP-75441 to support multi-arch
jianzhangbjz 54ff14c
UPSTREAM: <carry>: deployment config cases
kuiwang02 0045d49
UPSTREAM: <carry>: Add OTE tests for OLMv1 DeploymentConfig support
tmshort d263102
UPSTREAM: <carry>: Update openshift/api and client-go
tmshort a14e611
UPSTREAM: <carry>: Add boxcutter tests
camilamacedo86 8e99ca6
UPSTREAM: <carry>: enhance QE cases
Xia-Zhao-rh 64795db
UPSTREAM: <carry>: Update quay-operator version to one containing arm…
dtfranz 605b4de
UPSTREAM: <carry>: verify volume/volumeMount override
kuiwang02 1e3f06e
UPSTREAM: <carry>: Add long-duration test script and documents
jianzhangbjz de98fda
UPSTREAM: <carry>: Update grpc in default-catalog-consistency tests
tmshort 12c5715
UPSTREAM: <carry>: Rename ClusterExtensionRevision to ClusterObjectSe…
camilamacedo86 5c72e6e
UPSTREAM: <carry>: Skip incompatible operator test when Boxcutter use…
camilamacedo86 a0870d7
UPSTREAM: <carry>: add ocp-87557
bandrade dd43c49
UPSTREAM: <carry>: Add fgiudici as reviewer
fgiudici 8758569
UPSTREAM: <carry>: Remove skip for incompatible operator check after …
camilamacedo86 08a6654
UPSTREAM: <carry>: Test empty affinity erasure and cleanup
kuiwang02 de97d70
UPSTREAM: <carry>: Fix boxcutter finalizer ResourceNames in prefligh…
camilamacedo86 89a143a
UPSTREAM: <carry>: Expand OTE docs with more comprehensive details
camilamacedo86 8b36b3b
UPSTREAM: <carry>: Disable upstream TLSProfile tests
tmshort cc14c48
UPSTREAM: <carry>: OTE: Simplify by remove option to configure tests …
camilamacedo86 15dffb0
UPSTREAM: <carry>: OTE - Make OTE local output easier to read
camilamacedo86 099bd3d
UPSTREAM: <carry>: remove dead e2e registry push job and related vari…
joelanford d83003a
UPSTREAM: <carry>: OCPBUGS-62517: Set replicas=1, PDB, and pod anti-a…
tmshort 6aa0a57
UPSTREAM: <carry>: fix(test): drop blocking namespace-deletion wait b…
tmshort 0084df8
UPSTREAM: <carry>: Fix downstream e2e test invocation
tmshort 61125b3
UPSTREAM: <carry>: Delete openshift/registry.Dockerfile
joelanford 60e1f60
UPSTREAM: <carry>: Remove test-experimenal-e2e
tmshort 8952773
UPSTREAM: <carry>: Update readme Default Catalog Tests
camilamacedo86 297a627
UPSTREAM: <drop>: go mod vendor
9b1eee1
UPSTREAM: <drop>: remove upstream GitHub configuration
4582578
UPSTREAM: <drop>: configure the commit-checker
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,212 @@ | ||
| # Catalog queries using GraphQL | ||
|
|
||
| !!! warning "Alpha Feature" | ||
| The GraphQL endpoint is an **alpha feature** controlled by the `GraphQLCatalogQueries` feature gate. | ||
| The API and behavior may change in future releases. | ||
|
|
||
| After you [add a catalog of extensions](../../tutorials/add-catalog.md) to your cluster, you can query the catalog using GraphQL for flexible, structured queries with precise field selection. | ||
|
|
||
| ## Prerequisites | ||
|
|
||
| * You have added a ClusterCatalog of extensions, such as [OperatorHub.io](https://operatorhub.io), to your cluster. | ||
| * The `GraphQLCatalogQueries` feature gate is enabled in catalogd. | ||
|
|
||
| !!! note | ||
| By default, Catalogd is installed with TLS enabled for the catalog webserver. | ||
| The following examples will show this default behavior, but for simplicity's sake will ignore TLS verification in the curl commands using the `-k` flag. | ||
|
|
||
| You also need to port forward the catalog server service: | ||
|
|
||
| ``` terminal | ||
| kubectl -n olmv1-system port-forward svc/catalogd-service 8443:443 | ||
| ``` | ||
|
|
||
| ## GraphQL Endpoint | ||
|
|
||
| The GraphQL endpoint is available at: | ||
|
|
||
| ``` | ||
| https://localhost:8443/catalogs/<catalog-name>/api/v1/graphql | ||
| ``` | ||
|
|
||
| All queries must be sent as **HTTP POST** requests with a JSON body containing a `query` field. | ||
|
|
||
| ## Understanding GraphQL Field Names | ||
|
|
||
| **IMPORTANT**: GraphQL field names are automatically generated from catalog schema names. | ||
|
|
||
| ### Naming Convention | ||
|
|
||
| Schema names are converted to GraphQL field names using this process: | ||
|
|
||
| 1. Remove dots and special characters: `olm.bundle` → `olmbundle` | ||
| 2. Convert to lowercase: `OLM.Bundle` → `olmbundle` | ||
| 3. Append 's' for pluralization: `olmbundle` → `olmbundles` | ||
|
|
||
| **Examples:** | ||
|
|
||
| | Schema Name | GraphQL Field Name | | ||
| |-------------|-------------------| | ||
| | `olm.bundle` | `olmbundles` | | ||
| | `olm.package` | `olmpackages` | | ||
| | `olm.channel` | `olmchannels` | | ||
| | `helm.chart` | `helmcharts` | | ||
|
|
||
| ### Discovering Available Fields | ||
|
|
||
| To find the exact field names available for your catalog, use GraphQL introspection: | ||
|
|
||
| ``` terminal | ||
| curl -k -X POST 'https://localhost:8443/catalogs/operatorhubio/api/v1/graphql' \ | ||
| -H "Content-Type: application/json" \ | ||
| -d '{ | ||
| "query": "{ __schema { queryType { fields { name description } } } }" | ||
| }' | jq | ||
| ``` | ||
|
|
||
| This returns all available query fields for the catalog, including the automatically generated schema-based fields. | ||
|
|
||
| !!! warning "Pluralization Limitations" | ||
| The current implementation appends 's' to schema names for pluralization. This may not produce grammatically correct English plurals in all cases (e.g., `index` → `indexs` instead of `indices`). When creating custom schemas, use singular nouns that pluralize well with a simple 's' suffix. | ||
|
|
||
| ## Basic Queries | ||
|
|
||
| ### Catalog Summary | ||
|
|
||
| Get an overview of schemas and object counts in the catalog: | ||
|
|
||
| ``` terminal | ||
| curl -k -X POST 'https://localhost:8443/catalogs/operatorhubio/api/v1/graphql' \ | ||
| -H "Content-Type: application/json" \ | ||
| -d '{ | ||
| "query": "{ summary { totalSchemas schemas { name totalObjects totalFields } } }" | ||
| }' | jq | ||
| ``` | ||
|
|
||
| ### Query Bundles | ||
|
|
||
| List bundles with specific fields: | ||
|
|
||
| ``` terminal | ||
| curl -k -X POST 'https://localhost:8443/catalogs/operatorhubio/api/v1/graphql' \ | ||
| -H "Content-Type: application/json" \ | ||
| -d '{ | ||
| "query": "{ olmbundles(limit: 5, offset: 0) { name package image } }" | ||
| }' | jq | ||
| ``` | ||
|
|
||
| ### Query Packages | ||
|
|
||
| List packages with metadata: | ||
|
|
||
| ``` terminal | ||
| curl -k -X POST 'https://localhost:8443/catalogs/operatorhubio/api/v1/graphql' \ | ||
| -H "Content-Type: application/json" \ | ||
| -d '{ | ||
| "query": "{ olmpackages(limit: 10) { name description defaultChannel } }" | ||
| }' | jq | ||
| ``` | ||
|
|
||
| ### Query Channels | ||
|
|
||
| List channels: | ||
|
|
||
| ``` terminal | ||
| curl -k -X POST 'https://localhost:8443/catalogs/operatorhubio/api/v1/graphql' \ | ||
| -H "Content-Type: application/json" \ | ||
| -d '{ | ||
| "query": "{ olmchannels { name package entries } }" | ||
| }' | jq | ||
| ``` | ||
|
|
||
| ## Advanced Queries | ||
|
|
||
| ### Pagination | ||
|
|
||
| All schema-based queries support pagination via `limit` and `offset` arguments: | ||
|
|
||
| ``` terminal | ||
| curl -k -X POST 'https://localhost:8443/catalogs/operatorhubio/api/v1/graphql' \ | ||
| -H "Content-Type: application/json" \ | ||
| -d '{ | ||
| "query": "{ olmbundles(limit: 10, offset: 20) { name } }" | ||
| }' | jq | ||
| ``` | ||
|
|
||
| ### Nested Field Selection | ||
|
|
||
| Select only the fields you need, including array-nested objects: | ||
|
|
||
| ``` terminal | ||
| curl -k -X POST 'https://localhost:8443/catalogs/operatorhubio/api/v1/graphql' \ | ||
| -H "Content-Type: application/json" \ | ||
| -d '{ | ||
| "query": "{ olmpackages { name channels { name entries { name } } } }" | ||
| }' | jq | ||
| ``` | ||
|
|
||
| **Note:** Non-array nested fields (like `icon`) are returned as JSON strings. To access their data, request the field as a scalar and parse the JSON: | ||
|
|
||
| ``` terminal | ||
| curl -k -X POST 'https://localhost:8443/catalogs/operatorhubio/api/v1/graphql' \ | ||
| -H "Content-Type: application/json" \ | ||
| -d '{ | ||
| "query": "{ olmpackages { name icon } }" | ||
| }' | jq '.data.olmpackages[] | .icon | fromjson' | ||
| ``` | ||
|
|
||
| ### Complex Bundle Properties | ||
|
|
||
| Query bundle properties with their type and value fields: | ||
|
|
||
| ``` terminal | ||
| curl -k -X POST 'https://localhost:8443/catalogs/operatorhubio/api/v1/graphql' \ | ||
| -H "Content-Type: application/json" \ | ||
| -d '{ | ||
| "query": "{ olmbundles(limit: 5) { name properties { type value } } }" | ||
| }' | jq | ||
| ``` | ||
|
|
||
| **Note:** The `properties` field contains an array of objects, each with a `type` string and a `value` field that can contain complex nested data. GraphQL will return the full JSON structure for the `value` field. | ||
|
|
||
| ## Comparing GraphQL vs Metas Endpoint | ||
|
|
||
| | Feature | GraphQL (`/api/v1/graphql`) | Metas (`/api/v1/metas`) | | ||
| |---------|---------------------------|------------------------| | ||
| | Field selection | Precise - request only needed fields | All fields always returned | | ||
| | Query complexity | Rich queries with nested objects | Simple parameter-based filtering | | ||
| | Response size | Minimal - only requested data | Full objects always returned | | ||
| | Schema discovery | Introspection built-in | External documentation needed | | ||
| | Pagination | Built-in `limit` and `offset` | Manual implementation required | | ||
| | HTTP Method | POST only | GET supported | | ||
| | Feature status | Alpha (feature gate required) | Stable | | ||
|
|
||
| **When to use GraphQL:** | ||
| - You need specific fields from large objects | ||
| - You want to query related data in a single request | ||
| - You need structured, typed responses | ||
| - You're building a UI or client that benefits from precise data fetching | ||
|
|
||
| **When to use Metas endpoint:** | ||
| - You need simple, stable API | ||
| - You're doing basic filtering by schema/package/name | ||
| - You want to use GET requests for caching | ||
| - You need guaranteed API stability | ||
|
|
||
| ## Limitations | ||
|
|
||
| 1. **Pluralization**: Schema names are pluralized by appending 's', which may not be grammatically correct for all words | ||
| 2. **Schema naming**: Full schema names (including namespace/prefix) are preserved in field names (`olm.bundle` → `olmbundles`, not `bundles`) | ||
| 3. **POST only**: GraphQL endpoint only accepts POST requests, unlike the metas endpoint which supports GET | ||
| 4. **Alpha stability**: API may change in future releases while in alpha | ||
|
|
||
| ## Enabling the GraphQL Feature | ||
|
|
||
| The GraphQL endpoint is controlled by the `GraphQLCatalogQueries` feature gate. To enable it: | ||
|
|
||
| ``` yaml | ||
| args: | ||
| - --feature-gates=GraphQLCatalogQueries=true | ||
| ``` | ||
|
|
||
| See [enable webhook support](enable-webhook-support.md) for more details on configuring feature gates. | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a language identifier to the fenced endpoint code block.
This fence is missing a language tag and will trip markdown lint (
MD040).Suggested fix
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In
@docs/draft/howto/catalog-queries-graphql-endpoint.mdaround lines 28 - 30,The fenced code block showing the GraphQL endpoint URL is missing a language
identifier which triggers MD040; update the fence around the URL snippet (the
triple-backtick block containing
"https://localhost:8443/catalogs//api/v1/graphql") to include a
language tag such as "text" (i.e., change the opening
totext) so themarkdown linter treats it correctly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a nit. If we consider it actionable, it will be during the phase where we promote docs from the draft phase.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@grokspawn, understood — happy to defer this until the doc graduates from draft. Would you like me to open a follow-up issue to track this (and any other lint/polish items) for when the docs are promoted?