Skip to content

Commit cf406ea

Browse files
Merge pull request #18157 from juanvallejo/jvallejo/update-openapi-ext-gvk-parsing
Automatic merge from submit-queue. UPSTREAM: 58466: tolerate more than one gvklist item Fixes #17872 Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1536845 Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1529447 Origin resources, like deployment configs, are part of two api groups - the legacy "empty" group, and, in cases like deploymentconfigs, the "apps.openshift.io" group. **Before** ``` $ oc explain dc error: Couldn't find resource for "/v1, Kind=DeploymentConfig" ``` **After** ``` $ oc explain dc DESCRIPTION: Deployment Configs define the template for a pod and manages deploying new images or configuration changes. A single deployment configuration is usually analogous to a single micro-service. Can support many different deployment patterns, including full restart, customizable rolling updates, ... ``` cc @deads2k @soltysh
2 parents db27648 + 2e29c9c commit cf406ea

File tree

2 files changed

+64
-33
lines changed

2 files changed

+64
-33
lines changed

test/cmd/explain.sh

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
#!/bin/bash
2+
source "$(dirname "${BASH_SOURCE}")/../../hack/lib/init.sh"
3+
trap os::test::junit::reconcile_output EXIT
4+
5+
# Cleanup cluster resources created by this test
6+
(
7+
set +e
8+
oc delete all,templates --all
9+
exit 0
10+
) &>/dev/null
11+
12+
13+
os::test::junit::declare_suite_start "cmd/explain"
14+
# This test validates that the explain command works with openshift resources
15+
16+
os::cmd::expect_success 'oc explain dc'
17+
os::cmd::expect_success_and_text 'oc explain dc.status.replicas' 'FIELD\: replicas'
18+
19+
os::cmd::expect_success 'oc explain routes'
20+
os::cmd::expect_success_and_text 'oc explain route.metadata.name' 'string'
21+
22+
os::cmd::expect_success 'oc explain bc'
23+
os::cmd::expect_success 'oc explain image'
24+
os::cmd::expect_success 'oc explain is'
25+
26+
echo "explain: ok"
27+
os::test::junit::declare_suite_end
28+

vendor/k8s.io/kubernetes/pkg/kubectl/cmd/util/openapi/openapi.go

+36-33
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)