Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1684456 - There are duplicate content in the output of command "oc api-resources"
Summary: There are duplicate content in the output of command "oc api-resources"
Keywords:
Status: CLOSED DUPLICATE of bug 1684470
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Command Line Interface
Version: 4.1
Hardware: Unspecified
OS: Unspecified
medium
low
Target Milestone: ---
: 4.1.0
Assignee: Maciej Szulik
QA Contact: Xingxing Xia
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-03-01 10:21 UTC by Liang Xia
Modified: 2019-03-12 14:26 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-03-08 15:04:35 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description Liang Xia 2019-03-01 10:21:18 UTC
Description of problem:
Check the output of command "oc api-resources", there are duplicate contents.

Version-Release number of selected component (if applicable):
$ oc version
Client Version: version.Info{Major:"4", Minor:"0+", GitVersion:"v4.0.6", GitCommit:"5dc94f3fda", GitTreeState:"", BuildDate:"2019-02-27T22:55:04Z", GoVersion:"", Compiler:"", Platform:""}
Server Version: version.Info{Major:"1", Minor:"12+", GitVersion:"v1.12.4+1796acc", GitCommit:"1796acc", GitTreeState:"clean", BuildDate:"2019-02-28T06:51:53Z", GoVersion:"go1.10.3", Compiler:"gc", Platform:"linux/amd64"}


How reproducible:
Always

Steps to Reproduce:
1. oc api-resources -o wide --no-headers | sort


Actual results:
$ oc api-resources -o wide --no-headers | sort
alertmanagers                                          monitoring.coreos.com                   true    Alertmanager                         [delete deletecollection get list patch create update watch]
apiservers                                             config.openshift.io                     false   APIServer                            [delete deletecollection get list patch create update watch]
apiservices                                            apiregistration.k8s.io                  false   APIService                           [create delete deletecollection get list patch update watch]
appliedclusterresourcequotas                           quota.openshift.io                      true    AppliedClusterResourceQuota          [get list]
authentications                                        config.openshift.io                     false   Authentication                       [delete deletecollection get list patch create update watch]
authentications                                        operator.openshift.io                   false   Authentication                       [delete deletecollection get list patch create update watch]
bindings                                                                                       true    Binding                              [create]
brokertemplateinstances                                template.openshift.io                   false   BrokerTemplateInstance               [create delete deletecollection get list patch update watch]
buildconfigs                          bc               build.openshift.io                      true    BuildConfig                          [create delete deletecollection get list patch update watch]
builds                                                 build.openshift.io                      true    Build                                [create delete deletecollection get list patch update watch]
builds                                                 config.openshift.io                     false   Build                                [delete deletecollection get list patch create update watch]
catalogsourceconfigs                  csc              marketplace.redhat.com                  true    CatalogSourceConfig                  [delete deletecollection get list patch create update watch]
catalogsources                        catsrc           operators.coreos.com                    true    CatalogSource                        [delete deletecollection get list patch create update watch]
certificatesigningrequests            csr              certificates.k8s.io                     false   CertificateSigningRequest            [create delete deletecollection get list patch update watch]
clusterautoscalers                                     autoscaling.openshift.io                false   ClusterAutoscaler                    [delete deletecollection get list patch create update watch]
clusterdnses                                           dns.openshift.io                        false   ClusterDNS                           [delete deletecollection get list patch create update watch]
clusteringresses                                       ingress.openshift.io                    true    ClusterIngress                       [delete deletecollection get list patch create update watch]
clusternetworks                                        network.openshift.io                    false   ClusterNetwork                       [delete deletecollection get list patch create update watch]
clusteroperators                      co               config.openshift.io                     false   ClusterOperator                      [delete deletecollection get list patch create update watch]
clusteroperators                                       operatorstatus.openshift.io             true    ClusterOperator                      [delete deletecollection get list patch create update watch]
clusterresourcequotas                 clusterquota     quota.openshift.io                      false   ClusterResourceQuota                 [create delete deletecollection get list patch update watch]
clusterrolebindings                                    authorization.openshift.io              false   ClusterRoleBinding                   [create delete get list patch update]
clusterrolebindings                                    rbac.authorization.k8s.io               false   ClusterRoleBinding                   [create delete deletecollection get list patch update watch]
clusterroles                                           authorization.openshift.io              false   ClusterRole                          [create delete get list patch update]
clusterroles                                           rbac.authorization.k8s.io               false   ClusterRole                          [create delete deletecollection get list patch update watch]
clusterserviceversions                csv,csvs         operators.coreos.com                    true    ClusterServiceVersion                [delete deletecollection get list patch create update watch]
clusters                                               machine.openshift.io                    true    Cluster                              [delete deletecollection get list patch create update watch]
clusterversions                                        config.openshift.io                     false   ClusterVersion                       [delete deletecollection get list patch create update watch]
componentstatuses                     cs                                                       false   ComponentStatus                      [get list]
configmaps                            cm                                                       true    ConfigMap                            [create delete deletecollection get list patch update watch]
configs                                                imageregistry.operator.openshift.io     false   Config                               [delete deletecollection get list patch create update watch]
configs                                                samples.operator.openshift.io           false   Config                               [delete deletecollection get list patch create update watch]
consoles                                               config.openshift.io                     false   Console                              [delete deletecollection get list patch create update watch]
consoles                                               operator.openshift.io                   false   Console                              [delete deletecollection get list patch create update watch]
containerruntimeconfigs               ctrcfg           machineconfiguration.openshift.io       false   ContainerRuntimeConfig               [delete deletecollection get list patch create update watch]
controllerconfigs                                      machineconfiguration.openshift.io       false   ControllerConfig                     [delete deletecollection get list patch create update watch]
controllerrevisions                                    apps                                    true    ControllerRevision                   [create delete deletecollection get list patch update watch]
credentialsrequests                                    cloudcredential.openshift.io            true    CredentialsRequest                   [delete deletecollection get list patch create update watch]
cronjobs                              cj               batch                                   true    CronJob                              [create delete deletecollection get list patch update watch]
customresourcedefinitions             crd,crds         apiextensions.k8s.io                    false   CustomResourceDefinition             [create delete deletecollection get list patch update watch]
daemonsets                            ds               apps                                    true    DaemonSet                            [create delete deletecollection get list patch update watch]
daemonsets                            ds               extensions                              true    DaemonSet                            [create delete deletecollection get list patch update watch]
deploymentconfigs                     dc               apps.openshift.io                       true    DeploymentConfig                     [create delete deletecollection get list patch update watch]
deployments                           deploy           apps                                    true    Deployment                           [create delete deletecollection get list patch update watch]
deployments                           deploy           extensions                              true    Deployment                           [create delete deletecollection get list patch update watch]
dnses                                                  config.openshift.io                     false   DNS                                  [delete deletecollection get list patch create update watch]
egressnetworkpolicies                                  network.openshift.io                    true    EgressNetworkPolicy                  [delete deletecollection get list patch create update watch]
endpoints                             ep                                                       true    Endpoints                            [create delete deletecollection get list patch update watch]
events                                ev               events.k8s.io                           true    Event                                [create delete deletecollection get list patch update watch]
events                                ev                                                       true    Event                                [create delete deletecollection get list patch update watch]
features                                               config.openshift.io                     false   Feature                              [delete deletecollection get list patch create update watch]
groups                                                 user.openshift.io                       false   Group                                [create delete deletecollection get list patch update watch]
horizontalpodautoscalers              hpa              autoscaling                             true    HorizontalPodAutoscaler              [create delete deletecollection get list patch update watch]
hostsubnets                                            network.openshift.io                    false   HostSubnet                           [delete deletecollection get list patch create update watch]
identities                                             user.openshift.io                       false   Identity                             [create delete deletecollection get list patch update watch]
images                                                 config.openshift.io                     false   Image                                [delete deletecollection get list patch create update watch]
imagesignatures                                        image.openshift.io                      false   ImageSignature                       [create delete]
images                                                 image.openshift.io                      false   Image                                [create delete deletecollection get list patch update watch]
imagestreamimages                     isimage          image.openshift.io                      true    ImageStreamImage                     [get]
imagestreamimports                                     image.openshift.io                      true    ImageStreamImport                    [create]
imagestreammappings                                    image.openshift.io                      true    ImageStreamMapping                   [create]
imagestreams                          is               image.openshift.io                      true    ImageStream                          [create delete deletecollection get list patch update watch]
imagestreamtags                       istag            image.openshift.io                      true    ImageStreamTag                       [create delete get list patch update]
infrastructures                                        config.openshift.io                     false   Infrastructure                       [delete deletecollection get list patch create update watch]
ingresses                                              config.openshift.io                     false   Ingress                              [delete deletecollection get list patch create update watch]
ingresses                             ing              extensions                              true    Ingress                              [create delete deletecollection get list patch update watch]
installplans                          ip               operators.coreos.com                    true    InstallPlan                          [delete deletecollection get list patch create update watch]
jobs                                                   batch                                   true    Job                                  [create delete deletecollection get list patch update watch]
kubeapiservers                                         operator.openshift.io                   false   KubeAPIServer                        [delete deletecollection get list patch create update watch]
kubecontrollermanagers                                 operator.openshift.io                   false   KubeControllerManager                [delete deletecollection get list patch create update watch]
kubeletconfigs                                         machineconfiguration.openshift.io       false   KubeletConfig                        [delete deletecollection get list patch create update watch]
kubeschedulers                                         operator.openshift.io                   false   KubeScheduler                        [delete deletecollection get list patch create update watch]
leases                                                 coordination.k8s.io                     true    Lease                                [create delete deletecollection get list patch update watch]
limitranges                           limits                                                   true    LimitRange                           [create delete deletecollection get list patch update watch]
localresourceaccessreviews                             authorization.openshift.io              true    LocalResourceAccessReview            [create]
localsubjectaccessreviews                              authorization.k8s.io                    true    LocalSubjectAccessReview             [create]
localsubjectaccessreviews                              authorization.openshift.io              true    LocalSubjectAccessReview             [create]
machineautoscalers                                     autoscaling.openshift.io                true    MachineAutoscaler                    [delete deletecollection get list patch create update watch]
machineclasses                                         machine.openshift.io                    true    MachineClass                         [delete deletecollection get list patch create update watch]
machineconfigpools                                     machineconfiguration.openshift.io       false   MachineConfigPool                    [delete deletecollection get list patch create update watch]
machineconfigs                                         machineconfiguration.openshift.io       false   MachineConfig                        [delete deletecollection get list patch create update watch]
machinedeployments                                     machine.openshift.io                    true    MachineDeployment                    [delete deletecollection get list patch create update watch]
machinehealthchecks                                    healthchecking.openshift.io             true    MachineHealthCheck                   [delete deletecollection get list patch create update watch]
machinesets                                            machine.openshift.io                    true    MachineSet                           [delete deletecollection get list patch create update watch]
machines                                               machine.openshift.io                    true    Machine                              [delete deletecollection get list patch create update watch]
mcoconfigs                                             machineconfiguration.openshift.io       true    MCOConfig                            [delete deletecollection get list patch create update watch]
mutatingwebhookconfigurations                          admissionregistration.k8s.io            false   MutatingWebhookConfiguration         [create delete deletecollection get list patch update watch]
namespaces                            ns                                                       false   Namespace                            [create delete get list patch update watch]
netnamespaces                                          network.openshift.io                    false   NetNamespace                         [delete deletecollection get list patch create update watch]
network-attachment-definitions        net-attach-def   k8s.cni.cncf.io                         true    NetworkAttachmentDefinition          [delete deletecollection get list patch create update watch]
networkconfigs                                         networkoperator.openshift.io            false   NetworkConfig                        [delete deletecollection get list patch create update watch]
networkpolicies                       netpol           extensions                              true    NetworkPolicy                        [create delete deletecollection get list patch update watch]
networkpolicies                       netpol           networking.k8s.io                       true    NetworkPolicy                        [create delete deletecollection get list patch update watch]
networks                                               config.openshift.io                     false   Network                              [delete deletecollection get list patch create update watch]
nodes                                                  metrics.k8s.io                          false   NodeMetrics                          [get list]
nodes                                 no                                                       false   Node                                 [create delete deletecollection get list patch update watch]
oauthaccesstokens                                      oauth.openshift.io                      false   OAuthAccessToken                     [create delete deletecollection get list patch update watch]
oauthauthorizetokens                                   oauth.openshift.io                      false   OAuthAuthorizeToken                  [create delete deletecollection get list patch update watch]
oauthclientauthorizations                              oauth.openshift.io                      false   OAuthClientAuthorization             [create delete deletecollection get list patch update watch]
oauthclients                                           oauth.openshift.io                      false   OAuthClient                          [create delete deletecollection get list patch update watch]
oauths                                                 config.openshift.io                     false   OAuth                                [delete deletecollection get list patch create update watch]
openshiftapiservers                                    operator.openshift.io                   false   OpenShiftAPIServer                   [delete deletecollection get list patch create update watch]
openshiftcontrollermanagers                            operator.openshift.io                   false   OpenShiftControllerManager           [delete deletecollection get list patch create update watch]
operatorgroups                        og               operators.coreos.com                    true    OperatorGroup                        [delete deletecollection get list patch create update watch]
operatorsources                       opsrc            marketplace.redhat.com                  true    OperatorSource                       [delete deletecollection get list patch create update watch]
packagemanifests                                       packages.apps.redhat.com                true    PackageManifest                      [get list]
persistentvolumeclaims                pvc                                                      true    PersistentVolumeClaim                [create delete deletecollection get list patch update watch]
persistentvolumes                     pv                                                       false   PersistentVolume                     [create delete deletecollection get list patch update watch]
poddisruptionbudgets                  pdb              policy                                  true    PodDisruptionBudget                  [create delete deletecollection get list patch update watch]
podsecuritypolicies                   psp              extensions                              false   PodSecurityPolicy                    [create delete deletecollection get list patch update watch]
podsecuritypolicies                   psp              policy                                  false   PodSecurityPolicy                    [create delete deletecollection get list patch update watch]
podsecuritypolicyreviews                               security.openshift.io                   true    PodSecurityPolicyReview              [create]
podsecuritypolicyselfsubjectreviews                    security.openshift.io                   true    PodSecurityPolicySelfSubjectReview   [create]
podsecuritypolicysubjectreviews                        security.openshift.io                   true    PodSecurityPolicySubjectReview       [create]
pods                                                   metrics.k8s.io                          true    PodMetrics                           [get list]
pods                                  po                                                       true    Pod                                  [create delete deletecollection get list patch update watch]
podtemplates                                                                                   true    PodTemplate                          [create delete deletecollection get list patch update watch]
priorityclasses                       pc               scheduling.k8s.io                       false   PriorityClass                        [create delete deletecollection get list patch update watch]
processedtemplates                                     template.openshift.io                   true    Template                             [create]
projectrequests                                        project.openshift.io                    false   ProjectRequest                       [create list]
projects                                               config.openshift.io                     false   Project                              [delete deletecollection get list patch create update watch]
projects                                               project.openshift.io                    false   Project                              [create delete get list patch update watch]
prometheuses                                           monitoring.coreos.com                   true    Prometheus                           [delete deletecollection get list patch create update watch]
prometheusrules                                        monitoring.coreos.com                   true    PrometheusRule                       [delete deletecollection get list patch create update watch]
rangeallocations                                       security.openshift.io                   false   RangeAllocation                      [create delete deletecollection get list patch update watch]
registries                                             config.openshift.io                     false   Registry                             [delete deletecollection get list patch create update watch]
replicasets                           rs               apps                                    true    ReplicaSet                           [create delete deletecollection get list patch update watch]
replicasets                           rs               extensions                              true    ReplicaSet                           [create delete deletecollection get list patch update watch]
replicationcontrollers                rc                                                       true    ReplicationController                [create delete deletecollection get list patch update watch]
resourceaccessreviews                                  authorization.openshift.io              false   ResourceAccessReview                 [create]
resourcequotas                        quota                                                    true    ResourceQuota                        [create delete deletecollection get list patch update watch]
rolebindingrestrictions                                authorization.openshift.io              true    RoleBindingRestriction               [create delete deletecollection get list patch update watch]
rolebindings                                           authorization.openshift.io              true    RoleBinding                          [create delete get list patch update]
rolebindings                                           rbac.authorization.k8s.io               true    RoleBinding                          [create delete deletecollection get list patch update watch]
roles                                                  authorization.openshift.io              true    Role                                 [create delete get list patch update]
roles                                                  rbac.authorization.k8s.io               true    Role                                 [create delete deletecollection get list patch update watch]
routes                                                 route.openshift.io                      true    Route                                [create delete deletecollection get list patch update watch]
secrets                                                                                        true    Secret                               [create delete deletecollection get list patch update watch]
securitycontextconstraints            scc              security.openshift.io                   false   SecurityContextConstraints           [create delete deletecollection get list patch update watch]
selfsubjectaccessreviews                               authorization.k8s.io                    false   SelfSubjectAccessReview              [create]
selfsubjectrulesreviews                                authorization.k8s.io                    false   SelfSubjectRulesReview               [create]
selfsubjectrulesreviews                                authorization.openshift.io              true    SelfSubjectRulesReview               [create]
serviceaccounts                       sa                                                       true    ServiceAccount                       [create delete deletecollection get list patch update watch]
servicecas                                             operator.openshift.io                   false   ServiceCA                            [delete deletecollection get list patch create update watch]
servicecatalogapiservers                               operator.openshift.io                   false   ServiceCatalogAPIServer              [delete deletecollection get list patch create update watch]
servicecatalogcontrollermanagers                       operator.openshift.io                   false   ServiceCatalogControllerManager      [delete deletecollection get list patch create update watch]
servicecertsigneroperatorconfigs                       servicecertsigner.config.openshift.io   false   ServiceCertSignerOperatorConfig      [delete deletecollection get list patch create update watch]
servicemonitors                                        monitoring.coreos.com                   true    ServiceMonitor                       [delete deletecollection get list patch create update watch]
services                              svc                                                      true    Service                              [create delete get list patch update watch]
statefulsets                          sts              apps                                    true    StatefulSet                          [create delete deletecollection get list patch update watch]
storageclasses                        sc               storage.k8s.io                          false   StorageClass                         [create delete deletecollection get list patch update watch]
subjectaccessreviews                                   authorization.k8s.io                    false   SubjectAccessReview                  [create]
subjectaccessreviews                                   authorization.openshift.io              false   SubjectAccessReview                  [create]
subjectrulesreviews                                    authorization.openshift.io              true    SubjectRulesReview                   [create]
subscriptions                         sub,subs         operators.coreos.com                    true    Subscription                         [delete deletecollection get list patch create update watch]
templateinstances                                      template.openshift.io                   true    TemplateInstance                     [create delete deletecollection get list patch update watch]
templates                                              template.openshift.io                   true    Template                             [create delete deletecollection get list patch update watch]
tokenreviews                                           authentication.k8s.io                   false   TokenReview                          [create]
tuneds                                                 tuned.openshift.io                      true    Tuned                                [delete deletecollection get list patch create update watch]
useridentitymappings                                   user.openshift.io                       false   UserIdentityMapping                  [create delete get patch update]
users                                                  user.openshift.io                       false   User                                 [create delete deletecollection get list patch update watch]
validatingwebhookconfigurations                        admissionregistration.k8s.io            false   ValidatingWebhookConfiguration       [create delete deletecollection get list patch update watch]
volumeattachments                                      storage.k8s.io                          false   VolumeAttachment                     [create delete deletecollection get list patch update watch]


Expected results:
We should remove the duplicate content.

Additional info:

Comment 1 Maciej Szulik 2019-03-08 15:04:35 UTC

*** This bug has been marked as a duplicate of bug 1684470 ***


Note You need to log in before you can comment on or make changes to this bug.