argocd-operator
argocd-operator copied to clipboard
Delete svc.cluster.local from generated svc-routes
What type of PR is this? /kind bug
What does this PR do / why we need it:
If Kubernetes/OpenShift Cluster Name not "cluster.local" - routes by svc name like <SERVICE_NAME>.<NAMESPACE>.svc.cluster.local
- not working.
Delete .svc.cluster.local
from generated routes name.
@jomkz Can you approve this?
@vzemtsov Can you please provide some details on the issue that you are running into? The servers should be communicating over the cluster local addresses. I am pretty sure these changes will break the deployments when cluster proxy is enabled. When cluster proxy is enabled, these communication will try to go through the proxy with your changes and it will fail.
What you mean when you say "cluster proxy"? Kube-proxy? With my changes all work good. Cluster communication worked correctly.
About problem:
When you install Kubernetes Cluster, you can set ClusterName (https://kubernetes.io/docs/reference/config-api/kubeadm-config.v1beta3/). If you did this cluster domain changed from *.cluster.local
to *.<CLUSTER_NAME>
. But in argocd-operator cluster for communication use hardcode cluster-domain - *.cluster.local
.
I fix it.
(For communication in cluster you can use DNS-record without cluster-domain, like <SERVICE_NAME>.<NAMESPACE>
)
P.S. Sorry for my english
What I mean by cluster proxy is the OpenShift cluster wide proxy. https://docs.openshift.com/container-platform/4.11/networking/enable-cluster-wide-proxy.html
@jannfis please take a look to see if this PR will affect this fix.
@jannfis please take a look to see if this PR will affect this fix.
Oh. I don't see this PR from @jannfis.
May be I can add new field to CRD ArgoCD (like ClusterName
or ClusterDomain
) and set by default to cluster.local
.
If for someone (like me) needs change this, than can set this in CR
Or, if it's impossible, I can add function for read ClusterName from KubeApi. (I don't do this before, but I can try)
P.S. Sorry for my English