Skip to content

bettercodepaul/gitops-argocd-environment

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Local Argo CD Test Environment

Key facts

Quick Start

The start.sh script contains all commands to setup the test envrionment.

sh ./start.sh

Single Commands

Install kind
brew install kind
Start Kubernetes locally
kind create cluster --config kind-config.yaml
Install Ingress Controller
kubectl apply -f install-ingress-nginx.yaml
Install Argo CD
kubectl create namespace argocd

kubectl apply -n argocd -f install-argocd.yaml

kubectl apply -n argocd -f ingress.yaml
Get default password
kubectl -n argocd get secret argocd-initial-admin-secret -o jsonpath="{.data.password}" | base64 -d; echo
Stop Kubernetes
kind delete cluster  --name argo-cd
All in one
kind delete cluster  --name argo-cd && \
kind create cluster --config kind-config.yaml && \
kubectl apply -f install-ingress-nginx.yaml && \
kubectl wait -n ingress-nginx \
  --for=condition=ready pod \
  --selector=app.kubernetes.io/component=controller \
  --timeout=90s && \
kubectl create namespace argocd && \
kubectl apply -n argocd -f install-argocd.yaml && \
kubectl apply -n argocd -f ingress.yaml && \
kubectl wait -n argocd \
  --for=condition=ready pod \
  --selector=app.kubernetes.io/name=argocd-server \
  --timeout=90s && \
echo ------------------- && \
echo Initial Argo CD credentails: && \
echo User: admin && \
echo Password: $(kubectl -n argocd get secret argocd-initial-admin-secret -o jsonpath="{.data.password}" | base64 -d; echo) && \
open http://localhost/argocd

Patches

Add --insecure and --rootpath /argocd --basehref /argocd flags to argocd-server command.

install-argocd.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  ...
  name: argocd-server
spec:
  ...
  template:
    ...
    spec:
      ...
      containers:
      - command:
        - argocd-server
        - --insecure
        - --rootpath
        - /argocd
        - --basehref
        - /argocd

Add --enable-ssl-passthrough flag to /nginx-ingress-controller command.

install-argocd.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: ingress-nginx-controller
  ...
spec:
  ...
  template:
    ...
    spec:
      containers:
      - args:
        - /nginx-ingress-controller
        - ...
        - --enable-ssl-passthrough

About

Argo CD test environment

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages