Skip to content

Commit

Permalink
new(tools): introduce argocd to handle applications' lifecycle
Browse files Browse the repository at this point in the history
Signed-off-by: Aldo Lacuku <[email protected]>
  • Loading branch information
alacuku committed Oct 30, 2024
1 parent d6d9789 commit fca35b4
Show file tree
Hide file tree
Showing 2 changed files with 78 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/argocd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Deploy ArgoCD

on:
push:
branches: [master]
paths: ["tools/deploy_argocd.sh"]

concurrency:
group: master-CI
cancel-in-progress: false

jobs:
deploy-argocd:
permissions:
id-token: write
contents: read
runs-on: ubuntu-22.04
steps:
- name: Checkout test-infra
uses: actions/checkout@v4

- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v2
with:
role-to-assume: "arn:aws:iam::292999226676:role/github_actions-test-infra-cluster"
aws-region: eu-west-1

- name: Install Helm
uses: azure/setup-helm@fe7b79cd5ee1e45176fcad797de68ecaf3ca4814 #v4.2.0

- name: Deploy argocd
run: |
./tools/deploy_argocd.sh
45 changes: 45 additions & 0 deletions tools/deploy_argocd.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
#!/usr/bin/env bash
# SPDX-License-Identifier: Apache-2.0
#
# Copyright (C) 2024 The Falco Authors.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

set -o errexit
set -o nounset
set -o pipefail

# Cluster variables
CLUSTER="falco-prow"
ZONE="eu-west-1"

# ArgoCD variables
NAMESPACE="argocd"
CHART_VERSION="7.6.12" # Set desired ArgoCD chart version here

# Get the kubeconfig
aws eks --region ${ZONE} update-kubeconfig --name ${CLUSTER}-test-infra

# Add ArgoCD Helm repo and update
helm repo add argo https://argoproj.github.io/argo-helm
helm repo update

# Install or upgrade ArgoCD with Helm in specified namespace, using version
helm upgrade --install argocd argo/argo-cd \
--create-namespace \
--namespace $NAMESPACE \
--version $CHART_VERSION \
--set redis-ha.enabled=true \
--set controller.replicas=1 \
--set server.replicas=2 \
--set repoServer.replicas=2 \
--set applicationSet.replicas=2

echo "ArgoCD deployment completed with Helm."

0 comments on commit fca35b4

Please sign in to comment.