Skip to content

Commit

Permalink
Merge pull request #10 from mindwm/argocd-loadbalancer
Browse files Browse the repository at this point in the history
Argocd loadbalancer
  • Loading branch information
metacoma committed May 28, 2024
2 parents 85786f8 + 16c9725 commit b941884
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 28 deletions.
16 changes: 10 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
.PHONY: argocd

ARGOCD_HOST_PORT := 38080


#helm upgrade --install --namespace argocd --create-namespace argocd argocd/argo-cd --set global.image.tag=v2.9.12 --set repoServer.extraArguments[0]="--repo-cache-expiration=1m",repoServer.extraArguments[1]="--default-cache-expiration=1m",repoServer.extraArguments[2]="--repo-server-timeout-seconds=240s" --wait --timeout 5m && \
fix_dns_upstream:
Expand Down Expand Up @@ -32,18 +35,19 @@ cluster: deinstall
argocd:
helm repo add argocd https://argoproj.github.io/argo-helm && \
helm repo update argocd && \
helm upgrade --install --namespace argocd --create-namespace argocd argocd/argo-cd -f ./argocd_values.yaml --wait --timeout 5m && \
helm upgrade --install --namespace argocd --create-namespace argocd argocd/argo-cd -f ./argocd_values.yaml --set server.service.servicePortHttp=$(ARGOCD_HOST_PORT) --wait --timeout 5m && \
kubectl apply -f ./kcl-cmp.yaml && \
kubectl -n argocd patch deploy/argocd-repo-server -p "`cat ./patch-argocd-repo-server.yaml`" && \
kubectl wait --for=condition=ready pod -n argocd -l app.kubernetes.io/name=argocd-repo-server --timeout=600s

kcl_tini:
docker build -t metacoma/kcl-tini:latest -f kcl_tini.Dockerfile .

.PHONY: kubectl_proxy
kubectl_proxy:
pkill -9 -f "^kubectl port-forward service/argocd-server -n argocd 8080:443";\
kubectl port-forward service/argocd-server -n argocd 8080:443 &
#.PHONY: kubectl_proxy
#kubectl_proxy:
# pkill -9 -f "^kubectl port-forward service/argocd-server -n argocd 8080:443";\
# kubectl port-forward service/argocd-server -n argocd 8080:443 &

kcl_plugin_context:
kubectl -n argocd exec -it `kubectl -n argocd get pod -l app.kubernetes.io/component=repo-server -o name` -c my-plugin -- /bin/bash
kcl_log:
Expand Down Expand Up @@ -73,7 +77,7 @@ argocd_password:
echo $(ARGOCD_PASSWORD)

#.PHONY: argocd_login
argocd_login: kubectl_proxy argocd_password
argocd_login: argocd_password
argocd login --insecure --username admin --password $(ARGOCD_PASSWORD) localhost:8080

argocd_app_run_and_wait: argocd_password
Expand Down
25 changes: 3 additions & 22 deletions argocd_values.yaml
Original file line number Diff line number Diff line change
@@ -1,15 +1,7 @@
global:
image:
tag: "v2.11.1"
controller:
extraArgs:
- --repo-server-timeout-seconds=600
- --request-timeout=0
repoServer:
extraArgs:
- --repo-cache-expiration=30m
- --default-cache-expiration=30m
- --loglevel=debug
env:
- name: ARGOCD_EXEC_TIMEOUT
value: 10m
Expand All @@ -20,17 +12,6 @@ repoServer:
configs:
params:
server.insecure: true
cm:
timeout.reconciliation: 10m
timeout.hard.reconciliation: 0s
server.repo.server.timeout.seconds: 600
controller.repo.server.timeout.seconds: 600
# oci repo
# https://github.com/argoproj/argo-cd/discussions/11053
# repositories:
# flux:
# url: "ghcr.io/fluxcd-community/charts/flux2"
# type: "helm"
# name: "flux"
# enableOCI: "true"

server:
service:
type: 'LoadBalancer'

0 comments on commit b941884

Please sign in to comment.