We are trying to access the ArgoCD server with the istio ingress gateway but no fate. It is auto redirecting to HTTPS and the page shows the server is not reachable. We have tried various suggestions over the internet but no success yet. Below is our setup. Please help us to resolve this.
Enable istio sidecar injection
kubectl label namespace argocd istio-injection=enabled
Tells argocd-server to start in “insecure mode” refer link
apiVersion: v1
kind: ConfigMap
metadata:
name: argocd-cmd-params-cm
namespace: argocd
labels:
app.kubernetes.io/name: argocd-cmd-params-cm
app.kubernetes.io/part-of: argocd
data:
server.insecure: "true"
Patched argocd-server deployment refer link
kubectl patch deployment \
argocd-server \
--namespace argocd \
--type='json' \
-p='[{"op": "replace", "path": "/spec/template/spec/containers/0/args", "value": [
"server",
"--auth-mode=server"
]}]'
Virtualservice
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
name: argocd-virtual-service
namespace: argocd
spec:
hosts:
- argocd.lumik.com
gateways:
- argocd-gateway
http:
- route:
- destination:
host: argocd-server.argocd.svc.cluster.local
port:
number: 80
Istio gateway
apiVersion: networking.istio.io/v1alpha3
kind: Gateway
metadata:
name: argocd-gateway
namespace: argocd
spec:
selector:
istio: ingressgateway
servers:
- hosts:
- argocd.lumik.com
port:
name: https
number: 443
protocol: HTTPS
tls:
mode: SIMPLE
credentialName: argocd-secret
- hosts:
- argocd.lumik.com
port:
name: http
number: 80
protocol: HTTP
tls:
httpsRedirect: true
Istio Destination rule refer link
apiVersion: networking.istio.io/v1alpha3
kind: DestinationRule
metadata:
name: argocd-server-dtrl
namespace: istio-system
spec:
host: argocd-server.argocd.svc.cluster.local
trafficPolicy:
tls:
mode: DISABLE