rancher / rio

Application Deployment Engine for Kubernetes
https://rio.io
Apache License 2.0
2.27k stars 228 forks source link

Need help on changing RDNS endpoint #976

Open yuregir opened 4 years ago

yuregir commented 4 years ago

Hello,

Im running my own Rdns server and also configured external-dns for syncing dns records, all working good, I need to point Rio to update my Rdns endpoint, so I found it hardcoded in RDNSURL="https://api.on-rio.io/v1" at constants.go

My question is: Need a way to change the endpoint without touching the source, I especially need to use Rio's version of Certmanager in cluster, because it is working with Rdns to issue certs, I couldnt find any documentation about how to make certmanager v0.12 - Dns01 to work with Rdns.

PS:Loved Rio <3

Thanks, Yuregir

rancher-max commented 4 years ago

Hi @yuregir, glad you're enjoying rio! Check out the last question here: https://github.com/rancher/rio/blob/master/docs/faq.md to see if it helps you:

Q: How to configure custom domain instead of xxxxxx.on-rio.io?

There also might be some related historical information in #700 that could be helpful.

yuregir commented 4 years ago

Hi @rancher-max,

Thanks for the reference, But my project requires minimal external dependencies (like on-rio.io service) where wildcard CNAME to FQDN is not acceptable. So I decided to run my own Rdns server locally, now just need to configure the rdns client to update my local rdns server api endpoint, not in-rio api endpoint.

Thanks Happy new year!

StrongMonkey commented 4 years ago

@yuregir Unfortunately this part is hard-coded so without changing the source or build script it is impossible to change that value. You can do the following option:

  1. Change the source code to be the address of your custom RDNS server or change the build scripts to change constants during build time. you can insert this line LINKFLAGS="-X github.com/rancher/rio/pkg/constants.RDNSURL=${URL} $LINKFLAGS" into here to dynamically change the value in build time.

  2. Run make. You should be able to get a docker image after command has finished. Replace rio-controller image in rio-system namespace with the image you just built.

StrongMonkey commented 4 years ago

We can use your issue to track the work. It should be minimal effort to put it into configmap and make it configurable. If you are interested in contributing, let us know.

yuregir commented 4 years ago

@StrongMonkey Thanks for the answer, I will go this route:

change constants during build time

I wish to contribute but unfortunately its beyond my go knowledge, I hope someone with go knowledge will need this feature.