feat: display registry status in status cmd#936
Conversation
|
Verified. Do we need to use dev mode for status? It feels like the only side effect in production would be to see debug message (in else statement). |
|
Verified. Do we need to use dev mode for status? It feels like the only side effect in production would be to see debug message (in else statement). |
wtrocki
left a comment
There was a problem hiding this comment.
LGTM - minor questions asked but no need to address those
pkg/cmd/status/status.go
Outdated
| ) | ||
|
|
||
| var validServices = []string{kafkaSvcName} | ||
| var validServices = []string{kafkaSvcName, registrySvcName} |
There was a problem hiding this comment.
| var validServices = []string{kafkaSvcName, registrySvcName} | |
| var validServices = []string{kafkaSvcName} | |
| if profile.isDevEnaled() { | |
| validServices = []string{kafkaSvcName, registrySvcName} | |
| } |
craicoverflow
left a comment
There was a problem hiding this comment.
A few comments, but I think the most important one is that this should only be visible with RHOAS_DEV.
pkg/cmd/status/status.go
Outdated
| const ( | ||
| kafkaSvcName = "kafka" | ||
| kafkaSvcName = "kafka" | ||
| registrySvcName = "registry" |
There was a problem hiding this comment.
The name of the service will be known to the user as "service-registry"
pkg/cmd/status/status.go
Outdated
| ) | ||
|
|
||
| var validServices = []string{kafkaSvcName} | ||
| var validServices = []string{kafkaSvcName, registrySvcName} |
There was a problem hiding this comment.
The registry service features should currently only be visible/accessible when the RHOAS_DEV flag is enabled.
pkg/status/status.go
Outdated
| } | ||
| } | ||
|
|
||
| if stringInSlice("registry", opts.Services) { |
There was a problem hiding this comment.
This should also be wrapped in a RHOAS_DEV=true conditional.
pkg/status/status.go
Outdated
| type Status struct { | ||
| Kafka *KafkaStatus `json:"kafka,omitempty" title:"Kafka"` | ||
| Kafka *KafkaStatus `json:"kafka,omitempty" title:"Kafka"` | ||
| Registry *RegistryStatus `json:"registry,omitempty" title:"Registry"` |
There was a problem hiding this comment.
Should we call this "Service Registry"?
| Registry *RegistryStatus `json:"registry,omitempty" title:"Registry"` | |
| Registry *RegistryStatus `json:"registry,omitempty" title:"Service Registry"` |
wtrocki
left a comment
There was a problem hiding this comment.
Verified with and without dev preview
rhoas statusshould display the status of registry command if selected.Closes #902
Verification Steps
service-registryuse command.rhoas statuscommand, you should be able to see the status of registry along with kafka instance../rhoas status registryType of change
Checklist