argocd-operator icon indicating copy to clipboard operation
argocd-operator copied to clipboard

Delete svc.cluster.local from generated svc-routes

Open zvlb opened this issue 2 years ago • 6 comments

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.

zvlb avatar Jul 20 '22 07:07 zvlb

@jomkz Can you approve this?

zvlb avatar Aug 13 '22 11:08 zvlb

@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.

wtam2018 avatar Aug 14 '22 03:08 wtam2018

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

zvlb avatar Aug 14 '22 06:08 zvlb

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

wtam2018 avatar Aug 14 '22 12:08 wtam2018

@jannfis please take a look to see if this PR will affect this fix.

wtam2018 avatar Aug 14 '22 12:08 wtam2018

@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

zvlb avatar Aug 14 '22 14:08 zvlb