From d538587fd606d6ab7e6ce03949bdd766dff52fab Mon Sep 17 00:00:00 2001 From: jokestax Date: Mon, 15 Jul 2024 16:34:28 +0000 Subject: [PATCH 1/3] moved metaphor files to mgmt (civo github) --- .../registry/{environments/.gitkeep => welcome.txt} | 0 civo-github/templates/mgmt/actions-runner-controller.yaml | 2 +- civo-github/templates/mgmt/argo-workflows.yaml | 2 +- .../mgmt/components/argo-workflows/cwfts/cwft-helm.yaml | 2 +- .../templates/mgmt/components/kubefirst/console.yaml | 2 +- .../mgmt/components/metaphor}/metaphor/Chart.yaml | 0 .../mgmt/components/metaphor}/metaphor/values.yaml | 0 .../components/metaphor}/production/metaphor/Chart.yaml | 0 .../components/metaphor}/production/metaphor/values.yaml | 0 .../mgmt/components/metaphor}/staging/metaphor/Chart.yaml | 0 .../components/metaphor}/staging/metaphor/values.yaml | 0 civo-github/templates/mgmt/crossplane.yaml | 2 +- civo-github/templates/mgmt/github-runner.yaml | 2 +- .../mgmt/metaphor-development.yaml} | 8 ++++---- .../mgmt/metaphor-staging.yaml} | 7 ++++--- .../mgmt/metaphot-production.yaml} | 8 ++++---- metaphor/.argo/deploy.yaml | 2 +- metaphor/.argo/release.yaml | 2 +- metaphor/.github/workflows/main.yaml | 3 +++ 19 files changed, 23 insertions(+), 19 deletions(-) rename civo-github/registry/{environments/.gitkeep => welcome.txt} (100%) rename civo-github/{registry/environments/development => templates/mgmt/components/metaphor}/metaphor/Chart.yaml (100%) rename civo-github/{registry/environments/development => templates/mgmt/components/metaphor}/metaphor/values.yaml (100%) rename civo-github/{registry/environments => templates/mgmt/components/metaphor}/production/metaphor/Chart.yaml (100%) rename civo-github/{registry/environments => templates/mgmt/components/metaphor}/production/metaphor/values.yaml (100%) rename civo-github/{registry/environments => templates/mgmt/components/metaphor}/staging/metaphor/Chart.yaml (100%) rename civo-github/{registry/environments => templates/mgmt/components/metaphor}/staging/metaphor/values.yaml (100%) rename civo-github/{registry/environments/development/metaphor.yaml => templates/mgmt/metaphor-development.yaml} (70%) rename civo-github/{registry/environments/staging/metaphor.yaml => templates/mgmt/metaphor-staging.yaml} (75%) rename civo-github/{registry/environments/production/metaphor.yaml => templates/mgmt/metaphot-production.yaml} (70%) diff --git a/civo-github/registry/environments/.gitkeep b/civo-github/registry/welcome.txt similarity index 100% rename from civo-github/registry/environments/.gitkeep rename to civo-github/registry/welcome.txt diff --git a/civo-github/templates/mgmt/actions-runner-controller.yaml b/civo-github/templates/mgmt/actions-runner-controller.yaml index fdc2e5883..82b06ed41 100644 --- a/civo-github/templates/mgmt/actions-runner-controller.yaml +++ b/civo-github/templates/mgmt/actions-runner-controller.yaml @@ -4,7 +4,7 @@ metadata: name: actions-runner-controller-components namespace: argocd annotations: - argocd.argoproj.io/sync-wave: '50' + argocd.argoproj.io/sync-wave: '20' spec: project: default source: diff --git a/civo-github/templates/mgmt/argo-workflows.yaml b/civo-github/templates/mgmt/argo-workflows.yaml index c3b3da006..7ac02fe5e 100644 --- a/civo-github/templates/mgmt/argo-workflows.yaml +++ b/civo-github/templates/mgmt/argo-workflows.yaml @@ -4,7 +4,7 @@ metadata: name: argo-components namespace: argocd annotations: - argocd.argoproj.io/sync-wave: '50' + argocd.argoproj.io/sync-wave: '20' spec: project: default source: diff --git a/civo-github/templates/mgmt/components/argo-workflows/cwfts/cwft-helm.yaml b/civo-github/templates/mgmt/components/argo-workflows/cwfts/cwft-helm.yaml index 795309cb0..62e35cf0d 100644 --- a/civo-github/templates/mgmt/components/argo-workflows/cwfts/cwft-helm.yaml +++ b/civo-github/templates/mgmt/components/argo-workflows/cwfts/cwft-helm.yaml @@ -66,7 +66,7 @@ spec: workingDir: '/src/{{inputs.parameters.appName}}' args: - helm repo add kubefirst http://chartmuseum.chartmuseum.svc.cluster.local:8080 --username ${BASIC_AUTH_USER} --password ${BASIC_AUTH_PASS} || bash -c "sleep 10 && echo 'waiting before trying again' && exit 1"; - helm push {{inputs.parameters.chartDir}} kubefirst || bash -c "sleep 10 && echo 'waiting before trying again' && exit 1"; + helm push --force {{inputs.parameters.chartDir}} kubefirst || bash -c "sleep 10 && echo 'waiting before trying again' && exit 1"; env: - name: BASIC_AUTH_PASS valueFrom: diff --git a/civo-github/templates/mgmt/components/kubefirst/console.yaml b/civo-github/templates/mgmt/components/kubefirst/console.yaml index f0c8bf095..cb55ea267 100644 --- a/civo-github/templates/mgmt/components/kubefirst/console.yaml +++ b/civo-github/templates/mgmt/components/kubefirst/console.yaml @@ -9,7 +9,7 @@ spec: project: default source: repoURL: https://charts.kubefirst.com - targetRevision: 2.4.12-rc2 + targetRevision: 2.4.12-rc1 chart: kubefirst helm: values: |- diff --git a/civo-github/registry/environments/development/metaphor/Chart.yaml b/civo-github/templates/mgmt/components/metaphor/metaphor/Chart.yaml similarity index 100% rename from civo-github/registry/environments/development/metaphor/Chart.yaml rename to civo-github/templates/mgmt/components/metaphor/metaphor/Chart.yaml diff --git a/civo-github/registry/environments/development/metaphor/values.yaml b/civo-github/templates/mgmt/components/metaphor/metaphor/values.yaml similarity index 100% rename from civo-github/registry/environments/development/metaphor/values.yaml rename to civo-github/templates/mgmt/components/metaphor/metaphor/values.yaml diff --git a/civo-github/registry/environments/production/metaphor/Chart.yaml b/civo-github/templates/mgmt/components/metaphor/production/metaphor/Chart.yaml similarity index 100% rename from civo-github/registry/environments/production/metaphor/Chart.yaml rename to civo-github/templates/mgmt/components/metaphor/production/metaphor/Chart.yaml diff --git a/civo-github/registry/environments/production/metaphor/values.yaml b/civo-github/templates/mgmt/components/metaphor/production/metaphor/values.yaml similarity index 100% rename from civo-github/registry/environments/production/metaphor/values.yaml rename to civo-github/templates/mgmt/components/metaphor/production/metaphor/values.yaml diff --git a/civo-github/registry/environments/staging/metaphor/Chart.yaml b/civo-github/templates/mgmt/components/metaphor/staging/metaphor/Chart.yaml similarity index 100% rename from civo-github/registry/environments/staging/metaphor/Chart.yaml rename to civo-github/templates/mgmt/components/metaphor/staging/metaphor/Chart.yaml diff --git a/civo-github/registry/environments/staging/metaphor/values.yaml b/civo-github/templates/mgmt/components/metaphor/staging/metaphor/values.yaml similarity index 100% rename from civo-github/registry/environments/staging/metaphor/values.yaml rename to civo-github/templates/mgmt/components/metaphor/staging/metaphor/values.yaml diff --git a/civo-github/templates/mgmt/crossplane.yaml b/civo-github/templates/mgmt/crossplane.yaml index 2b750e840..78001d843 100644 --- a/civo-github/templates/mgmt/crossplane.yaml +++ b/civo-github/templates/mgmt/crossplane.yaml @@ -4,7 +4,7 @@ metadata: name: crossplane-components namespace: argocd annotations: - argocd.argoproj.io/sync-wave: '60' + argocd.argoproj.io/sync-wave: '10' finalizers: - resources-finalizer.argocd.argoproj.io spec: diff --git a/civo-github/templates/mgmt/github-runner.yaml b/civo-github/templates/mgmt/github-runner.yaml index 6478d6846..54233641f 100644 --- a/civo-github/templates/mgmt/github-runner.yaml +++ b/civo-github/templates/mgmt/github-runner.yaml @@ -4,7 +4,7 @@ metadata: name: github-runner-components namespace: argocd annotations: - argocd.argoproj.io/sync-wave: '60' + argocd.argoproj.io/sync-wave: '20' spec: project: default source: diff --git a/civo-github/registry/environments/development/metaphor.yaml b/civo-github/templates/mgmt/metaphor-development.yaml similarity index 70% rename from civo-github/registry/environments/development/metaphor.yaml rename to civo-github/templates/mgmt/metaphor-development.yaml index 3e812c34c..631b2236e 100644 --- a/civo-github/registry/environments/development/metaphor.yaml +++ b/civo-github/templates/mgmt/metaphor-development.yaml @@ -6,19 +6,19 @@ metadata: finalizers: - resources-finalizer.argocd.argoproj.io annotations: - argocd.argoproj.io/sync-wave: '45' + argocd.argoproj.io/sync-wave: '500' spec: project: default source: repoURL: - path: registry/environments/development/metaphor + path: registry/clusters//components/metaphor/development/metaphor targetRevision: HEAD destination: - name: + name: in-cluster namespace: development syncPolicy: automated: prune: true selfHeal: true syncOptions: - - CreateNamespace=true + - CreateNamespace=true \ No newline at end of file diff --git a/civo-github/registry/environments/staging/metaphor.yaml b/civo-github/templates/mgmt/metaphor-staging.yaml similarity index 75% rename from civo-github/registry/environments/staging/metaphor.yaml rename to civo-github/templates/mgmt/metaphor-staging.yaml index 93ee31fe5..62f04bb3b 100644 --- a/civo-github/registry/environments/staging/metaphor.yaml +++ b/civo-github/templates/mgmt/metaphor-staging.yaml @@ -6,15 +6,15 @@ metadata: finalizers: - resources-finalizer.argocd.argoproj.io annotations: - argocd.argoproj.io/sync-wave: '45' + argocd.argoproj.io/sync-wave: '500' spec: project: default source: repoURL: - path: registry/environments/staging/metaphor + path: registry/clusters//components/metaphor/staging/metaphor targetRevision: HEAD destination: - name: + name: in-cluster namespace: staging syncPolicy: automated: @@ -22,3 +22,4 @@ spec: selfHeal: true syncOptions: - CreateNamespace=true + diff --git a/civo-github/registry/environments/production/metaphor.yaml b/civo-github/templates/mgmt/metaphot-production.yaml similarity index 70% rename from civo-github/registry/environments/production/metaphor.yaml rename to civo-github/templates/mgmt/metaphot-production.yaml index f761bedf1..d57425b1a 100644 --- a/civo-github/registry/environments/production/metaphor.yaml +++ b/civo-github/templates/mgmt/metaphot-production.yaml @@ -6,19 +6,19 @@ metadata: finalizers: - resources-finalizer.argocd.argoproj.io annotations: - argocd.argoproj.io/sync-wave: '45' + argocd.argoproj.io/sync-wave: '500' spec: project: default source: repoURL: - path: registry/environments/production/metaphor + path: registry/clusters//components/metaphor/production/metaphor targetRevision: HEAD destination: - name: + name: in-cluster namespace: production syncPolicy: automated: prune: true selfHeal: true syncOptions: - - CreateNamespace=true + - CreateNamespace=true \ No newline at end of file diff --git a/metaphor/.argo/deploy.yaml b/metaphor/.argo/deploy.yaml index 7db12893d..4e3e307da 100644 --- a/metaphor/.argo/deploy.yaml +++ b/metaphor/.argo/deploy.yaml @@ -46,7 +46,7 @@ spec: from: '{{steps.checkout.outputs.artifacts.repo-source}}' parameters: - name: fullChartPath - value: 'registry/environments/{{workflow.parameters.environment}}/{{workflow.parameters.appName}}/Chart.yaml' + value: 'registry/clusters/{{workflow.parameters.clustername}}/components/{{workflow.parameters.appName}}/{{workflow.parameters.environment}}/{{workflow.parameters.appName}}/Chart.yaml' - name: chartVersion value: '{{steps.get-initial-chart-version.outputs.result}}-rc.{{workflow.parameters.shortSha}}' - name: environment diff --git a/metaphor/.argo/release.yaml b/metaphor/.argo/release.yaml index 416677f9d..284eb0f5f 100644 --- a/metaphor/.argo/release.yaml +++ b/metaphor/.argo/release.yaml @@ -76,7 +76,7 @@ spec: from: '{{steps.checkout.outputs.artifacts.repo-source}}' parameters: - name: fullChartPath - value: 'registry/environments/{{workflow.parameters.environment}}/{{workflow.parameters.appName}}/Chart.yaml' + value: 'registry/clusters/{{workflow.parameters.clustername}}/components/{{workflow.parameters.appName}}/{{workflow.parameters.environment}}/{{workflow.parameters.appName}}/Chart.yaml' - name: chartVersion value: '{{steps.get-initial-chart-version.outputs.result}}' - name: environment diff --git a/metaphor/.github/workflows/main.yaml b/metaphor/.github/workflows/main.yaml index cd5138e83..445a9343c 100644 --- a/metaphor/.github/workflows/main.yaml +++ b/metaphor/.github/workflows/main.yaml @@ -75,6 +75,7 @@ jobs: -p environment="development" \ -p gitUrlNoProtocol="${GITHUB_REPOSITORY_OWNER_PART_SLUG}" \ -p shortSha="${GITHUB_SHA_SHORT}" \ + -p clustername="" \ --wait --log - run: echo "⭐️ the kubefirst open source platform is powered by github stars. give kubefirst one today https://github.com/kubefirst/kubefirst" staging: @@ -104,6 +105,7 @@ jobs: -p environment="staging" \ -p gitUrlNoProtocol="${GITHUB_REPOSITORY_OWNER_PART_SLUG}" \ -p shortSha="${GITHUB_SHA_SHORT}" \ + -p clustername="" \ --wait --log - run: echo "⭐️ the kubefirst open source platform is powered by github stars. give kubefirst one today https://github.com/kubefirst/kubefirst" release: @@ -134,5 +136,6 @@ jobs: -p environment="production" \ -p gitUrlNoProtocol="${GITHUB_REPOSITORY_OWNER_PART_SLUG}" \ -p shortSha="${GITHUB_SHA_SHORT}" \ + -p clustername="" --wait --log - run: echo "⭐️ the kubefirst open source platform is powered by github stars. give kubefirst one today https://github.com/kubefirst/kubefirst" \ No newline at end of file From 7a102bee0135d4b46807c1be4e825df9ce664f7f Mon Sep 17 00:00:00 2001 From: jokestax Date: Tue, 16 Jul 2024 04:37:44 +0000 Subject: [PATCH 2/3] added cluster name --- civo-github/templates/mgmt/metaphor-development.yaml | 2 +- civo-github/templates/mgmt/metaphor-staging.yaml | 2 +- civo-github/templates/mgmt/metaphot-production.yaml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/civo-github/templates/mgmt/metaphor-development.yaml b/civo-github/templates/mgmt/metaphor-development.yaml index 631b2236e..ba8c855df 100644 --- a/civo-github/templates/mgmt/metaphor-development.yaml +++ b/civo-github/templates/mgmt/metaphor-development.yaml @@ -11,7 +11,7 @@ spec: project: default source: repoURL: - path: registry/clusters//components/metaphor/development/metaphor + path: registry/clusters//components/metaphor/development/metaphor targetRevision: HEAD destination: name: in-cluster diff --git a/civo-github/templates/mgmt/metaphor-staging.yaml b/civo-github/templates/mgmt/metaphor-staging.yaml index 62f04bb3b..0acd9d889 100644 --- a/civo-github/templates/mgmt/metaphor-staging.yaml +++ b/civo-github/templates/mgmt/metaphor-staging.yaml @@ -11,7 +11,7 @@ spec: project: default source: repoURL: - path: registry/clusters//components/metaphor/staging/metaphor + path: registry/clusters//components/metaphor/staging/metaphor targetRevision: HEAD destination: name: in-cluster diff --git a/civo-github/templates/mgmt/metaphot-production.yaml b/civo-github/templates/mgmt/metaphot-production.yaml index d57425b1a..b1b457a56 100644 --- a/civo-github/templates/mgmt/metaphot-production.yaml +++ b/civo-github/templates/mgmt/metaphot-production.yaml @@ -11,7 +11,7 @@ spec: project: default source: repoURL: - path: registry/clusters//components/metaphor/production/metaphor + path: registry/clusters//components/metaphor/production/metaphor targetRevision: HEAD destination: name: in-cluster From e0280ec5ae7d5e5aef0609ed59b838263b82780c Mon Sep 17 00:00:00 2001 From: jokestax Date: Tue, 16 Jul 2024 06:32:46 +0000 Subject: [PATCH 3/3] change sync number --- civo-github/templates/mgmt/actions-runner-controller.yaml | 2 +- civo-github/templates/mgmt/argo-workflows.yaml | 2 +- civo-github/templates/mgmt/crossplane.yaml | 2 +- civo-github/templates/mgmt/github-runner.yaml | 2 +- civo-github/templates/mgmt/metaphor-development.yaml | 2 +- civo-github/templates/mgmt/metaphor-staging.yaml | 2 +- civo-github/templates/mgmt/metaphot-production.yaml | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/civo-github/templates/mgmt/actions-runner-controller.yaml b/civo-github/templates/mgmt/actions-runner-controller.yaml index 82b06ed41..fdc2e5883 100644 --- a/civo-github/templates/mgmt/actions-runner-controller.yaml +++ b/civo-github/templates/mgmt/actions-runner-controller.yaml @@ -4,7 +4,7 @@ metadata: name: actions-runner-controller-components namespace: argocd annotations: - argocd.argoproj.io/sync-wave: '20' + argocd.argoproj.io/sync-wave: '50' spec: project: default source: diff --git a/civo-github/templates/mgmt/argo-workflows.yaml b/civo-github/templates/mgmt/argo-workflows.yaml index 7ac02fe5e..c3b3da006 100644 --- a/civo-github/templates/mgmt/argo-workflows.yaml +++ b/civo-github/templates/mgmt/argo-workflows.yaml @@ -4,7 +4,7 @@ metadata: name: argo-components namespace: argocd annotations: - argocd.argoproj.io/sync-wave: '20' + argocd.argoproj.io/sync-wave: '50' spec: project: default source: diff --git a/civo-github/templates/mgmt/crossplane.yaml b/civo-github/templates/mgmt/crossplane.yaml index 78001d843..2b750e840 100644 --- a/civo-github/templates/mgmt/crossplane.yaml +++ b/civo-github/templates/mgmt/crossplane.yaml @@ -4,7 +4,7 @@ metadata: name: crossplane-components namespace: argocd annotations: - argocd.argoproj.io/sync-wave: '10' + argocd.argoproj.io/sync-wave: '60' finalizers: - resources-finalizer.argocd.argoproj.io spec: diff --git a/civo-github/templates/mgmt/github-runner.yaml b/civo-github/templates/mgmt/github-runner.yaml index 54233641f..6478d6846 100644 --- a/civo-github/templates/mgmt/github-runner.yaml +++ b/civo-github/templates/mgmt/github-runner.yaml @@ -4,7 +4,7 @@ metadata: name: github-runner-components namespace: argocd annotations: - argocd.argoproj.io/sync-wave: '20' + argocd.argoproj.io/sync-wave: '60' spec: project: default source: diff --git a/civo-github/templates/mgmt/metaphor-development.yaml b/civo-github/templates/mgmt/metaphor-development.yaml index ba8c855df..6fda934bb 100644 --- a/civo-github/templates/mgmt/metaphor-development.yaml +++ b/civo-github/templates/mgmt/metaphor-development.yaml @@ -6,7 +6,7 @@ metadata: finalizers: - resources-finalizer.argocd.argoproj.io annotations: - argocd.argoproj.io/sync-wave: '500' + argocd.argoproj.io/sync-wave: '999' spec: project: default source: diff --git a/civo-github/templates/mgmt/metaphor-staging.yaml b/civo-github/templates/mgmt/metaphor-staging.yaml index 0acd9d889..c3a44dc04 100644 --- a/civo-github/templates/mgmt/metaphor-staging.yaml +++ b/civo-github/templates/mgmt/metaphor-staging.yaml @@ -6,7 +6,7 @@ metadata: finalizers: - resources-finalizer.argocd.argoproj.io annotations: - argocd.argoproj.io/sync-wave: '500' + argocd.argoproj.io/sync-wave: '998' spec: project: default source: diff --git a/civo-github/templates/mgmt/metaphot-production.yaml b/civo-github/templates/mgmt/metaphot-production.yaml index b1b457a56..49e0ad6a0 100644 --- a/civo-github/templates/mgmt/metaphot-production.yaml +++ b/civo-github/templates/mgmt/metaphot-production.yaml @@ -6,7 +6,7 @@ metadata: finalizers: - resources-finalizer.argocd.argoproj.io annotations: - argocd.argoproj.io/sync-wave: '500' + argocd.argoproj.io/sync-wave: '997' spec: project: default source: