diff --git a/.github/workflows/kustomize-argocd.yaml b/.github/workflows/kustomize-argocd.yaml new file mode 100644 index 00000000..31f631cf --- /dev/null +++ b/.github/workflows/kustomize-argocd.yaml @@ -0,0 +1,33 @@ +name: Kustomize GitHub Actions for ArgoCD + +on: + pull_request: + paths: + - kustomize/argocd/** + - .github/workflows/kustomize-argocd.yaml +jobs: + kustomize: + name: Kustomize + 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: Kustomize Install + working-directory: /usr/local/bin/ + run: | + if [ ! -f /usr/local/bin/kustomize ]; then + curl -s "https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh" | sudo bash + fi + - name: Run Kustomize Build + run: | + kustomize build kustomize/argocd/ --enable-helm --helm-command ${{ steps.helm.outputs.helm-path }} > /tmp/rendered.yaml + - name: Return Kustomize Build + uses: actions/upload-artifact@v2 + with: + name: kustomize-argocd-artifact + path: /tmp/rendered.yaml diff --git a/kustomize/argocd/base/kustomization.yaml b/kustomize/argocd/base/kustomization.yaml new file mode 100644 index 00000000..c4474fbe --- /dev/null +++ b/kustomize/argocd/base/kustomization.yaml @@ -0,0 +1,22 @@ +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 \ No newline at end of file diff --git a/kustomize/argocd/base/namespace.yaml b/kustomize/argocd/base/namespace.yaml new file mode 100644 index 00000000..bca75abe --- /dev/null +++ b/kustomize/argocd/base/namespace.yaml @@ -0,0 +1,8 @@ +--- +apiVersion: v1 +kind: Namespace +metadata: + labels: + kubernetes.io/metadata.name: argocd + name: argocd + name: argocd \ No newline at end of file diff --git a/kustomize/argocd/base/values.yaml b/kustomize/argocd/base/values.yaml new file mode 100644 index 00000000..96b4d224 --- /dev/null +++ b/kustomize/argocd/base/values.yaml @@ -0,0 +1,39 @@ +global: + nodeSelector: + openstack-control-plane: enabled + +redis-ha: + enabled: true + nodeSelector: + openstack-control-plane: enabled + +controller: + replicas: 1 + +configs: + cm: + kustomize.buildOptions: --enable-helm + +server: + autoscaling: + enabled: true + minReplicas: 2 + ingress: + annotations: + nginx.ingress.kubernetes.io/backend-protocol: HTTPS + enabled: true + ingressClassName: "nginx-cluster" + hosts: ["argocd.dfw-ospcv2-staging.ohthree.com"] + tls: + - hosts: + - argocd.dfw-ospcv2-staging.ohthree.com + secretName: argocd-tls-public + https: true + +repoServer: + autoscaling: + enabled: true + minReplicas: 2 + +applicationSet: + replicas: 2 \ No newline at end of file diff --git a/kustomize/ingress/internal/helm/ingress-helm-overrides.yaml b/kustomize/ingress/internal/helm/ingress-helm-overrides.yaml index d1f13ff4..c196fa5f 100644 --- a/kustomize/ingress/internal/helm/ingress-helm-overrides.yaml +++ b/kustomize/ingress/internal/helm/ingress-helm-overrides.yaml @@ -1,5 +1,5 @@ deployment: - mode: namespace + mode: cluster type: Deployment cluster: class: "nginx-openstack"