Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 45 additions & 0 deletions .github/workflows/helm-argocd.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Helm GitHub Actions for argocd

on:
pull_request:
paths:
- base-kustomize/argocd/**
- base-helm-configs/argocd/**
- .github/workflows/helm-argocd.yaml
jobs:
helm:
strategy:
matrix:
overlays:
- base
name: Helm
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: azure/setup-helm@v3
with:
version: latest
token: "${{ secrets.GITHUB_TOKEN }}"
id: helm
- name: Kubectl Install
working-directory: /usr/local/bin/
run: |
if [ ! -f /usr/local/bin/kubectl ]; then
curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"
chmod +x ./kubectl
fi
- name: Run Helm Template
run: |
${{ steps.helm.outputs.helm-path }} template argocd oci://registry-1.docker.io/bitnamicharts/argo-cd \
--namespace=argocd \
--wait \
--timeout 120m \
-f ${{ github.workspace }}/base-helm-configs/argocd/helm-argocd-overrides.yaml \
--post-renderer ${{ github.workspace }}/base-kustomize/kustomize.sh \
--post-renderer-args argocd/${{ matrix.overlays }} > /tmp/rendered.yaml
- name: Return helm Build
uses: actions/upload-artifact@v4
with:
name: helm-argocd-artifact-${{ matrix.overlays }}
path: /tmp/rendered.yaml
37 changes: 0 additions & 37 deletions .github/workflows/kustomize-argocd.yaml

This file was deleted.

1 change: 1 addition & 0 deletions base-helm-configs/argocd/helm-argocd-overrides.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
---
20 changes: 1 addition & 19 deletions base-kustomize/argocd/base/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,4 @@ sortOptions:
resources:
- namespace.yaml

namespace: argocd1
helmGlobals:
chartHome: ../charts/
helmCharts:
- name: argo-cd
includeCRDs: true
valuesFile: values.yaml
releaseName: argocd
version: 5.51.5
repo: https://argoproj.github.io/argo-helm
patches:
- target:
kind: Pod
patch: |-
$patch: delete
apiVersion: v1
kind: Pod
metadata:
name: argocd-redis-ha-service-test
namespace: argocd
39 changes: 0 additions & 39 deletions base-kustomize/argocd/base/values.yaml

This file was deleted.

28 changes: 28 additions & 0 deletions bin/install-argocd.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#!/bin/bash

# Default parameter value
TARGET=${1:-base}

# Directory to check for YAML files
CONFIG_DIR="/etc/genestack/helm-configs/argocd"

# Helm command setup
HELM_CMD="helm upgrade --install argocd oci://registry-1.docker.io/bitnamicharts/argo-cd \
--namespace=argocd \
--timeout 120m \
--post-renderer /etc/genestack/kustomize/kustomize.sh \
--post-renderer-args argocd/${TARGET} \
-f /opt/genestack/base-helm-configs/argocd/argocd-helm-overrides.yaml"

# Check if YAML files exist in the specified directory
if compgen -G "${CONFIG_DIR}/*.yaml" > /dev/null; then
# Add all YAML files from the directory to the helm command
for yaml_file in "${CONFIG_DIR}"/*.yaml; do
HELM_CMD+=" -f ${yaml_file}"
done
fi

# Run the helm command
echo "Executing Helm command:"
echo "${HELM_CMD}"
eval "${HELM_CMD}"
16 changes: 16 additions & 0 deletions docs/infrastructure-argocd.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Deploy a argocd

## Install Argocd

!!! example "Run the argocd deployment Script `bin/install-argocd.sh`"

``` shell
--8<-- "bin/install-argocd.sh"
```


## Verify readiness with the following command.

``` shell
kubectl --namespace argocd get horizontalpodautoscaler.autoscaling argocd -w
```
Loading