splicemachine / splicectl

GNU Affero General Public License v3.0
2 stars 2 forks source link

splicectl/api - add `get urls` returning core and database urls #18

Closed RileyMcCuen closed 3 years ago

RileyMcCuen commented 3 years ago

Description

Added a splicectl get urls command that generates urls for core and database endpoints. This is done by listing ingress resources and building paths from their specs.

Motivation and Context

This used to be done by a kurls script, but integrating it into splicectl is convenient and now it builds the urls based on the most up to date information, and not statically like the kurls script did.

See DBAAS-4212

Dependencies

How Has This Been Tested?

Manual testing was done on this functionality. No unit testing was done, as nearly all of the new functionality relies on the kubernetes api which is difficult to mock in a test environ.

Screenshots (if appropriate)

Checklist

If the pull request includes user-facing changes, extra documentation is required:

Changelog Inclusions

Additions

Changes

Fixes

Deprecated

Removed

Breaking Changes

RileyMcCuen commented 3 years ago

Example output from a test run against nonprod-gke-dev6:

Your urls are: 
Cloudmgr:                         https://nonprod-gke-dev6admin.gke.splicemachine-dev.io/
Cloudmgr:                         https://nonprod-gke-dev6.gke.splicemachine-dev.io/
Dev-Keycloak:                     https://nonprod-gke-dev6-keycloak.gke.splicemachine-dev.io/
Grafana:                          https://nonprod-gke-dev6-grafana.gke.splicemachine-dev.io/
Grafana:                          https://nonprod-gke-dev6-grafana-charts.gke.splicemachine-dev.io/
Kibana:                           https://nonprod-gke-dev6admin.gke.splicemachine-dev.io/kibana
Prometheus-Operator-Alertmanager: https://nonprod-gke-dev6-alertmgr.gke.splicemachine-dev.io/
Prometheus-Operator-Prometheus:   https://nonprod-gke-dev6-prom.gke.splicemachine-dev.io/
Splicectl-Api:                    https://nonprod-gke-dev6.gke.splicemachine-dev.io/splicectl
splicemaahs commented 3 years ago

This must have pulled in refactoring code that hasn't had a PR yet?

RileyMcCuen commented 3 years ago

This must have pulled in refactoring code that hasn't had a PR yet?

Yeah, and it looks like I have yet to write that pr up yet. I will make sure to do that shortly.

splicemaahs commented 3 years ago

Yeah, and it looks like I have yet to write that pr up yet. I will make sure to do that shortly.

Hopefully the conflicts will just disappear once we merge that one.