redhat-developer / app-services-cli

Command Line Interface for RHOAS
https://redhat-developer.github.io/app-services-website/
Apache License 2.0
41 stars 72 forks source link

fix(dedicated): attempts to correctly parse the cluster ingress dns name #1806

Closed machi1990 closed 1 year ago

machi1990 commented 1 year ago

This is so that "apps." prefix is always included and required by KFM when it is running under certain configuration

Related to https://github.com/bf2fc6cc711aee1a0c2a/kas-installer/issues/266#issuecomment-1424156487

Verification Steps

  1. make binary
  2. ./rhoas dedicated register-cluster -v and observe that the KFM cluster registration payload now contains a valid cluster_ingress_dns_name field i.e with apps. prefix in it.

Type of change

machi1990 commented 1 year ago

hey @dimakis can you've a look as well? Thanks

Might be good to have another release of the CLI afterward.

dimakis commented 1 year ago

hey @dimakis can you've a look as well? Thanks

Might be good to have another release of the CLI afterward.

@machi1990 I've tested it, and LGTM however, I do not know enough about when "CNAME registration is not used". There are multiple ways for a DNS to be obtained? and is .apps. always in the DNS name itself?

machi1990 commented 1 year ago

@machi1990 I've tested it, and LGTM

Thanks @dimakis

I do not know enough about when "CNAME registration is not used".

That's a KFM configuration that among other things, controls how Kafka URLs are generated. When CNAME is not activated, the URLs are based of the cluster dns. And it is in this particular scenario (usually under development or testing environments setups) where a missing apps. was going to be problematic for those Kafkas. Once that happens, the Kafka is more or less not usabled.

are multiple ways for a DNS to be obtained?

Yes. Another alternative is to directly grab the value from the clusters/<cluster-id>/ingress endpoints - but that only works for public accessible clusters.

and is .apps. always in the DNS name itself?

Yes, apps is always going to be there. That's the default ingress in OpenShift.

machi1990 commented 1 year ago

@dimakis once this is merged, please proceed with a new alpha release as QE might be looking to start testing this using kas-installer.

dimakis commented 1 year ago

LGTM