From 72b37163bcd5c17572bfb6a552cc8b9cacd545b9 Mon Sep 17 00:00:00 2001 From: Doug Goldstein Date: Wed, 28 Aug 2024 16:38:50 -0500 Subject: [PATCH 1/2] chore(argocd): split argo install into components Break off the understack specifics into a kustomize component so that we can install argo without these bits. But update the argocd installation to use that kustomize component so the result should be no change. --- apps/appsets/components.yaml | 2 + components/argo/kustomization.yaml | 34 --------------- .../external-secret-argo-sso.yaml | 0 components/argo/{ => understack}/ingress.yaml | 0 components/argo/understack/kustomization.yaml | 42 +++++++++++++++++++ .../argo/{sso => understack/sso-config} | 0 6 files changed, 44 insertions(+), 34 deletions(-) rename components/argo/{ => understack}/external-secret-argo-sso.yaml (100%) rename components/argo/{ => understack}/ingress.yaml (100%) create mode 100644 components/argo/understack/kustomization.yaml rename components/argo/{sso => understack/sso-config} (100%) diff --git a/apps/appsets/components.yaml b/apps/appsets/components.yaml index 89279dbb..10573055 100644 --- a/apps/appsets/components.yaml +++ b/apps/appsets/components.yaml @@ -108,6 +108,8 @@ spec: targetRevision: '{{index .metadata.annotations "uc_repo_ref"}}' path: 'components/argo' kustomize: + components: + - understack patches: - target: kind: ConfigMap diff --git a/components/argo/kustomization.yaml b/components/argo/kustomization.yaml index 31371a9a..8e904f7e 100644 --- a/components/argo/kustomization.yaml +++ b/components/argo/kustomization.yaml @@ -4,41 +4,8 @@ kind: Kustomization resources: - https://github.com/argoproj/argo-workflows/releases/download/v3.5.10/namespace-install.yaml - - ingress.yaml - - # external secret for SSO auth - - external-secret-argo-sso.yaml patches: -- target: # configure argo-server to use sso and client auth and monitor argo-events namespace - group: apps - version: v1 - kind: Deployment - name: argo-server - patch: |- - - op: replace - path: /spec/template/spec/containers/0/args - value: - - server - - --auth-mode=sso - - --auth-mode=client - - --namespaced - - --managed-namespace - - argo-events - -- target: # configure the workflow controller to monitor the argo-events namespace - group: apps - version: v1 - kind: Deployment - name: workflow-controller - patch: |- - - op: replace - path: /spec/template/spec/containers/0/args - value: - - --namespaced - - --managed-namespace - - argo-events - - target: group: rbac.authorization.k8s.io version: v1 @@ -64,5 +31,4 @@ configMapGenerator: - name: workflow-controller-configmap behavior: merge files: - - sso - workflowDefaults=workflow-defaults diff --git a/components/argo/external-secret-argo-sso.yaml b/components/argo/understack/external-secret-argo-sso.yaml similarity index 100% rename from components/argo/external-secret-argo-sso.yaml rename to components/argo/understack/external-secret-argo-sso.yaml diff --git a/components/argo/ingress.yaml b/components/argo/understack/ingress.yaml similarity index 100% rename from components/argo/ingress.yaml rename to components/argo/understack/ingress.yaml diff --git a/components/argo/understack/kustomization.yaml b/components/argo/understack/kustomization.yaml new file mode 100644 index 00000000..269cfa02 --- /dev/null +++ b/components/argo/understack/kustomization.yaml @@ -0,0 +1,42 @@ +apiVersion: kustomize.config.k8s.io/v1alpha1 +kind: Component + +resources: + - ingress.yaml + - external-secret-argo-sso.yaml + +patches: +- target: # configure argo-server to use sso and client auth and monitor argo-events namespace + group: apps + version: v1 + kind: Deployment + name: argo-server + patch: |- + - op: replace + path: /spec/template/spec/containers/0/args + value: + - server + - --auth-mode=sso + - --auth-mode=client + - --namespaced + - --managed-namespace + - argo-events + +- target: # configure the workflow controller to monitor the argo-events namespace + group: apps + version: v1 + kind: Deployment + name: workflow-controller + patch: |- + - op: replace + path: /spec/template/spec/containers/0/args + value: + - --namespaced + - --managed-namespace + - argo-events + +configMapGenerator: + - name: workflow-controller-configmap + behavior: merge + files: + - sso=sso-config diff --git a/components/argo/sso b/components/argo/understack/sso-config similarity index 100% rename from components/argo/sso rename to components/argo/understack/sso-config From ec5e8e2b29bfe12a83eaad9708cdab9d3e3d7949 Mon Sep 17 00:00:00 2001 From: Doug Goldstein Date: Wed, 28 Aug 2024 16:46:38 -0500 Subject: [PATCH 2/2] ci: run Argo to test our workflows Stand up a kind cluster and install Argo to test our workflows. --- .github/workflows/argo.yaml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 .github/workflows/argo.yaml diff --git a/.github/workflows/argo.yaml b/.github/workflows/argo.yaml new file mode 100644 index 00000000..e103c8a4 --- /dev/null +++ b/.github/workflows/argo.yaml @@ -0,0 +1,15 @@ +name: kind cluster + +on: + push: + pull_request: + workflow_dispatch: + +jobs: + argo: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: helm/kind-action@v1 + - run: | + kubectl apply -k components/argo