Skip to content
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

missing parameters in odo catalog describe service output #4916

Closed
kadel opened this issue Jul 15, 2021 · 8 comments
Closed

missing parameters in odo catalog describe service output #4916

kadel opened this issue Jul 15, 2021 · 8 comments
Labels
kind/bug Categorizes issue or PR as related to a bug. priority/Medium Nice to have issue. Getting it done before priority changes would be great. triage/needs-information Indicates an issue needs more information in order to work on it. v2 Issue or PR that applies to the v2 of odo

Comments

@kadel
Copy link
Member

kadel commented Jul 15, 2021

/kind bug
/area service
/area service-operators

What versions of software are you using?

using minikube

Output of odo version:

▶ odo version
odo v2.2.3 (9237d8d21)

How did you run odo exactly?

installed olm and Crunchy PostgreSQL (https://operatorhub.io/operator/postgresql)

apiVersion: v1
kind: Namespace
metadata:
  name: my-postgresql
---
apiVersion: operators.coreos.com/v1
kind: OperatorGroup
metadata:
  name: operatorgroup
  namespace: my-postgresql
spec:
  targetNamespaces:
  - petclinic
---
apiVersion: operators.coreos.com/v1alpha1
kind: Subscription
metadata:
  name: my-postgresql
  namespace: my-postgresql
spec:
  channel: stable
  name: postgresql
  source: operatorhubio-catalog
  sourceNamespace: olm
▶ odo catalog describe service postgresoperator.v4.7.0/Pgcluster

Actual behavior

Kind: Pgcluster
Version: v1
Description: Represents a Postgres primary cluster member
Parameters:

 PATH                         DISPLAYNAME                     DESCRIPTION                    

 ccpimage                     PostgreSQL Image                The Crunchy PostgreSQL image   
                                                              to use. Possible values are    
                                                              "crunchy-postgres-ha" and      
                                                              "crunchy-postgres-gis-ha"      
 ccpimagetag                  PostgreSQL Image Tag            The tag of the PostgreSQL      
                                                              image to use. Example is       
                                                              "centos8-13.3-4.7.0"           
 clustername                  PostgreSQL Cluster name         The name that is assigned      
                                                              to this specific PostgreSQL    
                                                              cluster                        
 database                     Initial PostgreSQL database     The name of the initial        
                              name                            database to be created inside  
                                                              of the PostgreSQL cluster,     
                                                              e.g. "hippo"                   
 exporterport                 PostgreSQL Monitor Port         The port to use for the        
                                                              PostgreSQL metrics exporter    
                                                              used for cluster monitoring,   
                                                              e.g. "9187"                    
 name                         PostgreSQL CRD name             The name of the CRD entry.     
                                                              Should match the PostgreSQL    
                                                              Cluster name                   
 pgbadgerport                 pgBadger Port                   The port to use for the        
                                                              pgBadger PostgreSQL query      
                                                              analysis service, e.g. "10000" 
 port                         PostgreSQL Port                 The port to use for the        
                                                              PostgreSQL cluster, e.g.       
                                                              "5432"                         
 PrimaryStorage               PostgreSQL Primary Storage      Attributes that help set       
                                                              the primary storage of a       
                                                              PostgreSQL cluster             
 PrimaryStorage.name          PostgreSQL Primary Storage      Contains the name of the       
                              Name                            PostgreSQL cluster to          
                                                              associate with this storage.   
                                                              Should match the Cluster name  
 PrimaryStorage.storageclass  PostgreSQL Primary              Contains the storage           
                              StorageClass                    class used for the primary     
                                                              PostgreSQL instance of the     
                                                              cluster                        
 PrimaryStorage.accessmode    PostgreSQL Primary              The access mode for            
                              StorageClass Access Mode        the storage class, e.g.        
                                                              "ReadWriteOnce"                
 PrimaryStorage.size          PostgreSQL Primary Data PVC     The size of the PVC that will  
                              Size                            store the data for the primary 
                                                              PostgreSQL instance, e.g. "1G" 
 status                       Deprecated                      Deprecated                     
 userlabels                   User defined labels             A set of labels that help the  
                                                              PostgreSQL Operator manage a   
                                                              PostgreSQL cluster      

Expected behavior

show all possible parameters.

If I check example on https://operatorhub.io/operator/postgresql I can see that there are fields in CR that don't show up in parameter list above. For example user is parameter is not there

apiVersion: crunchydata.com/v1
kind: Pgcluster
metadata:
  annotations:
    current-primary: hippo
  name: hippo
  labels:
    crunchy-pgha-scope: hippo
    deployment-name: hippo
    name: hippo
    namespace: pgo
    pg-cluster: hippo
    pgo-version: 4.7.0
spec:
  name: hippo
  namespace: pgo
  clustername: hippo
  ccpimage: crunchy-postgres-ha
  ccpimagetag: centos8-13.3-4.7.0
  BackrestStorage:
    accessmode: ReadWriteMany
    matchLabels: ''
    name: ''
    size: 5Gi
    storageclass: ''
    storagetype: dynamic
    supplementalgroups: ''
  PrimaryStorage:
    accessmode: ReadWriteMany
    matchLabels: ''
    name: hippo
    size: 5Gi
    storageclass: ''
    storagetype: dynamic
    supplementalgroups: ''
  ReplicaStorage:
    accessmode: ReadWriteMany
    matchLabels: ''
    name: ''
    size: 5Gi
    storageclass: ''
    storagetype: dynamic
    supplementalgroups: ''
  database: hippo
  exporterport: '9187'
  pgbadgerport: '10000'
  podAntiAffinity:
    default: preferred
  port: '5432'
  user: hippo
  userlabels:
    pgo-version: 4.7.0

Related issue: #4850

@openshift-ci openshift-ci bot added kind/bug Categorizes issue or PR as related to a bug. area/service labels Jul 15, 2021
@kadel kadel added the priority/Medium Nice to have issue. Getting it done before priority changes would be great. label Jul 15, 2021
@kadel
Copy link
Member Author

kadel commented Jul 15, 2021

Because the parameter is missing I'm I can't set its value via command line.

▶ odo service create postgresoperator.v4.7.0/Pgcluster mypg -p name=mypg -p database=mydb -p clustername=mypg -p user=user1
 ✗  the parameter user is not present in the Operand Schema

@dharmit
Copy link
Member

dharmit commented Jul 22, 2021

See if the missing user field is available in the swagger.json. If yes, see if the parameters currently being shown are also available in swagger.json. If yes, use swagger.json as single source of truth instead of relying on x-descriptors as well.

@dharmit dharmit added the triage/needs-information Indicates an issue needs more information in order to work on it. label Jul 29, 2021
@openshift-bot
Copy link

Issues go stale after 90d of inactivity.

Mark the issue as fresh by commenting /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.
Exclude this issue from closing by commenting /lifecycle frozen.

If this issue is safe to close now please do so with /close.

/lifecycle stale

@openshift-ci openshift-ci bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Oct 27, 2021
@dharmit
Copy link
Member

dharmit commented Oct 28, 2021

@feloy can you please check if this issue persists after your work on swagger/OpenAPI?

@feloy
Copy link
Contributor

feloy commented Oct 28, 2021

@dharmit I can see the problem still appears on postgresoperator.v4.7.0, because all fields are not described in CRD.

I wonder if we could add a --no-validate flag to this command, to not block the user on such particular cases.

@dharmit
Copy link
Member

dharmit commented Oct 28, 2021

/unassign
/remove-lifecycle stale

@openshift-ci openshift-ci bot removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Oct 28, 2021
@rm3l rm3l moved this to To Do 📝 in odo Project Oct 3, 2022
@rm3l rm3l added this to odo Project Oct 3, 2022
@rm3l rm3l removed the status in odo Project Oct 3, 2022
@kadel
Copy link
Member Author

kadel commented Feb 8, 2023

we don't have catalog in odo v3
/close
tagging #5523 for future references

@openshift-ci
Copy link

openshift-ci bot commented Feb 8, 2023

@kadel: Closing this issue.

In response to this:

we don't have catalog in odo v3
/close
tagging #5523 for future references

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@openshift-ci openshift-ci bot closed this as completed Feb 8, 2023
@github-project-automation github-project-automation bot moved this to Done ✅ in odo Project Feb 8, 2023
@rm3l rm3l added the v2 Issue or PR that applies to the v2 of odo label Jun 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug. priority/Medium Nice to have issue. Getting it done before priority changes would be great. triage/needs-information Indicates an issue needs more information in order to work on it. v2 Issue or PR that applies to the v2 of odo
Projects
Archived in project
Development

No branches or pull requests

6 participants