Argocd: Difference between revisions

From Essential
Jump to navigation Jump to search
(Created page with " == ARGOCD INSTALL == <syntaxhighlight lang="bash"> #https://www.opsmx.com/blog/argo-cd-installation-into-kubernetes-using-helm-or-manifest/ hostDomain=argocd.infocepo.com na...")
 
Line 14: Line 14:


#create custom ingress with argocd-server:443
#create custom ingress with argocd-server:443
kubectl -n ${nameSpace} get secret argocd-initial-admin-secret -o jsonpath="{.data.password}" | base64 -d


serviceName=${nameSpace}-server
serviceName=${nameSpace}-server
Line 52: Line 50:
)
)


echo Password :
kubectl -n ${nameSpace} get secret argocd-initial-admin-secret -o jsonpath="{.data.password}" | base64 -d
</syntaxhighlight>
</syntaxhighlight>

Revision as of 13:35, 2 February 2023

ARGOCD INSTALL

#https://www.opsmx.com/blog/argo-cd-installation-into-kubernetes-using-helm-or-manifest/
hostDomain=argocd.infocepo.com

nameSpace=argocd
git clone https://github.com/argoproj/argo-helm.git
cd argo-helm/charts/argo-cd/
kubectl create ns ${nameSpace}
helm dependency up
helm uninstall ${nameSpace} -n ${nameSpace}
helm install ${nameSpace} -n ${nameSpace} . -f values.yaml

#create custom ingress with argocd-server:443

serviceName=${nameSpace}-server
sslBol=true
NODE_PORT=443

[ -z "${serviceName}" ] &&serviceName=${nameSpace}
[ -z "${hostDomain}" ] &&hostDomain=${nameSpace}.${ROOT_URL}
[ -z "${NODE_PORT}" ] &&NODE_PORT=$(kubectl get --namespace ${nameSpace} -o jsonpath="{.spec.ports[0].port}" services ${serviceName})
kubectl get ingress/${nameSpace} --namespace ${nameSpace} ||(
cat <<EOF |kubectl apply -f -
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: ${nameSpace}
  namespace: ${nameSpace}
$([ $sslBol ] &&echo '  annotations:
    kubernetes.io/ingress.class: public
    nginx.ingress.kubernetes.io/backend-protocol: HTTPS
    nginx.ingress.kubernetes.io/force-ssl-redirect: "true"
    nginx.ingress.kubernetes.io/ssl-passthrough: "true"' )
spec:
  rules:
  - host: ${hostDomain}
    http:
      paths:
      - backend:
          service:
            name: ${serviceName}
            port:
              number: ${NODE_PORT}
        path: /
        pathType: Prefix
EOF
kubectl get ingress/${nameSpace} --namespace ${nameSpace}
)

echo Password :
kubectl -n ${nameSpace} get secret argocd-initial-admin-secret -o jsonpath="{.data.password}" | base64 -d