-
Notifications
You must be signed in to change notification settings - Fork 109
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
new(tools): introduce argocd to handle applications' lifecycle
Signed-off-by: Aldo Lacuku <[email protected]>
- Loading branch information
Showing
2 changed files
with
78 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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." |