Skip to content

Merge pull request #203 from suxess-it/renovate/argo-cd-7.x #186

Merge pull request #203 from suxess-it/renovate/argo-cd-7.x

Merge pull request #203 from suxess-it/renovate/argo-cd-7.x #186

Workflow file for this run

# This is a basic workflow to help you get started with Actions
name: test sx-cnp-oss k3d stack on kind cluster
# Controls when the workflow will run
on:
# at he moment this action only works when pushed to main because all references in the scripts and argocd apps use the main branch
push:
branches: [ "main" ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
create-cluster:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Create k8s Kind Cluster
uses: helm/kind-action@v1
with:
cluster_name: sx-cnp-oss-cluster
config: ${{ github.workspace }}/.github/kind-config.yaml
- name: temp-sc
shell: bash
run: |
kubectl get storageclass -o yaml
- name: install mkcert
shell: bash
run: |
curl -JLO "https://dl.filippo.io/mkcert/latest?for=linux/amd64"
chmod +x mkcert-v*-linux-amd64
sudo cp mkcert-v*-linux-amd64 /usr/local/bin/mkcert
- name: install k8sgpt
shell: bash
run: |
curl -LO https://github.com/k8sgpt-ai/k8sgpt/releases/download/v0.3.30/k8sgpt_amd64.deb
sudo dpkg -i k8sgpt_amd64.deb
k8sgpt analyze
- name: install sx-cnp-oss stack
env:
TARGET_TYPE: "KIND"
GITHUB_CLIENTSECRET: "dummy"
GITHUB_CLIENTID: "dummy"
GITHUB_TOKEN: "dummy"
shell: bash
run: |
curl -L https://raw.githubusercontent.com/suxess-it/sx-cnp-oss/main/install-platform.sh | bash
- name: argocd show diff
if: always()
env:
APPS: "argocd sx-backstage sx-loki sx-kubecost sx-keycloak sx-promtail sx-tempo sx-crossplane sx-bootstrap-app sx-kargo approved-application-team-app sx-cert-manager sx-argo-rollouts sx-external-secrets sx-kyverno sx-kube-prometheus-stack"
shell: bash
run: |
pwd
curl -kL -o argocd https://argocd-127-0-0-1.nip.io/download/argocd-linux-amd64
chmod u+x argocd
ls -l
./argocd login argocd-127-0-0-1.nip.io --grpc-web --insecure --username admin --password admin
for app in ${APPS} ; do echo "$app diff" ; ./argocd app diff $app --grpc-web ; done
- name: analyze with k8sgpt
if: always()
shell: bash
run: |
k8sgpt analyze
- name: mustgather data for troubleshooting
if: ${{ failure() }}
shell: bash
run: |
echo "===== node describe ======"
kubectl describe node sx-cnp-oss-cluster-control-plane
echo "===== node top ======"
kubectl top node
echo "===== node yaml ======"
kubectl get nodes -o yaml
echo "===== yaml output of all applications ======"
kubectl get application -n argocd -o yaml
- name: mustgather logs for troubleshooting
if: ${{ failure() }}
shell: bash
run: |
kubectl logs -n argocd statefulset/argocd-application-controller
kubectl logs -n argocd deployment/argocd-repo-server