From 33bce94b2b2f28b6a47723a2b983ec38f1850115 Mon Sep 17 00:00:00 2001 From: Nikolai Rodionov Date: Thu, 11 Jul 2024 12:32:44 +0200 Subject: [PATCH 1/7] Fix woodpecker --- .woodpecker.yml | 8 ++++---- kube/project.yaml | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.woodpecker.yml b/.woodpecker.yml index fb34ac6..78c6dfb 100644 --- a/.woodpecker.yml +++ b/.woodpecker.yml @@ -20,7 +20,7 @@ steps: - hugo -s ./src - name: Build and push the docker image - image: git.badhouseplants.net/badhouseplants/badhouseplants-builder:9665015b44590b7ce2139f7acbad23af6628fff3 + image: git.badhouseplants.net/badhouseplants/badhouseplants-builder:f36cd03d00ce6624d86af735a5a293b3d694e1e7 privileged: true depends_on: - Test a build @@ -44,7 +44,7 @@ steps: privileged: true - name: Sync pictures from lfs to Minio - image: git.badhouseplants.net/badhouseplants/badhouseplants-builder:9665015b44590b7ce2139f7acbad23af6628fff3 + image: git.badhouseplants.net/badhouseplants/badhouseplants-builder:f36cd03d00ce6624d86af735a5a293b3d694e1e7 depends_on: - Test a build secrets: @@ -56,7 +56,7 @@ steps: - ./scripts/upload-media.pl - name: Deploy the application - image: git.badhouseplants.net/badhouseplants/badhouseplants-builder:9665015b44590b7ce2139f7acbad23af6628fff3 + image: git.badhouseplants.net/badhouseplants/badhouseplants-builder:f36cd03d00ce6624d86af735a5a293b3d694e1e7 depends_on: - Build and push the docker image - Sync pictures from lfs to Minio @@ -71,7 +71,7 @@ steps: - ./scripts/deploy-app.pl - name: Cleanup everything - image: git.badhouseplants.net/badhouseplants/badhouseplants-builder:9665015b44590b7ce2139f7acbad23af6628fff3 + image: git.badhouseplants.net/badhouseplants/badhouseplants-builder:f36cd03d00ce6624d86af735a5a293b3d694e1e7 depends_on: - Deploy the application secrets: diff --git a/kube/project.yaml b/kube/project.yaml index fcb23c4..4b514fb 100644 --- a/kube/project.yaml +++ b/kube/project.yaml @@ -2,7 +2,7 @@ apiVersion: argoproj.io/v1alpha1 kind: AppProject metadata: name: badhouseplants - namespace: argo-system + namespace: platform finalizers: - resources-finalizer.argocd.argoproj.io spec: @@ -31,4 +31,4 @@ spec: # Enables namespace orphaned resource monitoring. orphanedResources: - warn: false \ No newline at end of file + warn: false -- 2.45.2 From f9457940bed71841adf61c197212ef3f27978e63 Mon Sep 17 00:00:00 2001 From: Nikolai Rodionov Date: Thu, 11 Jul 2024 12:35:12 +0200 Subject: [PATCH 2/7] Trigger build -- 2.45.2 From 59a0287b5e3fe30b0a4b2342e1a1b4e2ce763fb6 Mon Sep 17 00:00:00 2001 From: Nikolai Rodionov Date: Thu, 11 Jul 2024 13:18:21 +0200 Subject: [PATCH 3/7] Trigger build -- 2.45.2 From 79dd9a18d412f82457aedf5e089e33d32cdc56f0 Mon Sep 17 00:00:00 2001 From: Nikolai Rodionov Date: Thu, 11 Jul 2024 11:28:23 +0000 Subject: [PATCH 4/7] Update the app namespace --- kube/application.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kube/application.yaml b/kube/application.yaml index 6441ed5..e2b8240 100644 --- a/kube/application.yaml +++ b/kube/application.yaml @@ -6,7 +6,7 @@ metadata: branch: $ARGO_APP_BRANCH commit_sha: $ARGO_APP_IMAGE_TAG name: badhouseplants-$ARGO_APP_BRANCH - namespace: argo-system + namespace: platform spec: destination: namespace: badhouseplants-$ARGO_APP_NAMESPACE -- 2.45.2 From 3f5c97bf357ec902a1c5f25728ffa028bbc2034d Mon Sep 17 00:00:00 2001 From: Nikolai Rodionov Date: Wed, 24 Jul 2024 17:58:07 +0200 Subject: [PATCH 5/7] Fix deployment --- kube/application.yaml | 2 +- kube/project.yaml | 10 ++++------ scripts/deploy-app.pl | 5 ++--- 3 files changed, 7 insertions(+), 10 deletions(-) diff --git a/kube/application.yaml b/kube/application.yaml index e2b8240..cc41ea1 100644 --- a/kube/application.yaml +++ b/kube/application.yaml @@ -9,7 +9,7 @@ metadata: namespace: platform spec: destination: - namespace: badhouseplants-$ARGO_APP_NAMESPACE + namespace: $ARGO_APP_NAMESPACE server: https://kubernetes.default.svc project: badhouseplants source: diff --git a/kube/project.yaml b/kube/project.yaml index 4b514fb..f302767 100644 --- a/kube/project.yaml +++ b/kube/project.yaml @@ -11,14 +11,12 @@ spec: - '*' destinations: - - namespace: badhouseplants-* + - namespace: development + server: https://kubernetes.default.svc + name: in-cluster + - namespace: production server: https://kubernetes.default.svc name: in-cluster - - # Deny all cluster-scoped resources from being created, except for Namespace - clusterResourceWhitelist: - - group: '' - kind: Namespace # Allow all namespaced-scoped resources to be created, except for ResourceQuota, LimitRange, NetworkPolicy namespaceResourceBlacklist: diff --git a/scripts/deploy-app.pl b/scripts/deploy-app.pl index 4a6602b..7e53405 100755 --- a/scripts/deploy-app.pl +++ b/scripts/deploy-app.pl @@ -18,9 +18,9 @@ chomp($remark_secret); $ENV{'ARGO_APP_CHART_VERSION'} = $chart_version; $ENV{'ARGO_APP_BRANCH'} = $git_branch; if ($git_branch eq $main_branch) { - $ENV{'ARGO_APP_NAMESPACE'} = $git_branch; + $ENV{'ARGO_APP_NAMESPACE'} = "production"; } else { - $ENV{'ARGO_APP_NAMESPACE'} = "preview" + $ENV{'ARGO_APP_NAMESPACE'} = "development" } $ENV{'ARGO_APP_HOSTNAME'} = "$git_branch-dev.badhouseplants.net"; $ENV{'ARGO_APP_IMAGE_TAG'} = $git_commit_sha; @@ -72,4 +72,3 @@ foreach my $app (@all_applications) { } } } - -- 2.45.2 From d8faab209cd6b8555f74c279a10c850a2aafd067 Mon Sep 17 00:00:00 2001 From: Nikolai Rodionov Date: Wed, 24 Jul 2024 18:03:49 +0200 Subject: [PATCH 6/7] Use latest builder --- .woodpecker.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.woodpecker.yml b/.woodpecker.yml index 78c6dfb..859f399 100644 --- a/.woodpecker.yml +++ b/.woodpecker.yml @@ -20,7 +20,7 @@ steps: - hugo -s ./src - name: Build and push the docker image - image: git.badhouseplants.net/badhouseplants/badhouseplants-builder:f36cd03d00ce6624d86af735a5a293b3d694e1e7 + image: git.badhouseplants.net/badhouseplants/badhouseplants-builder:latest privileged: true depends_on: - Test a build @@ -44,7 +44,7 @@ steps: privileged: true - name: Sync pictures from lfs to Minio - image: git.badhouseplants.net/badhouseplants/badhouseplants-builder:f36cd03d00ce6624d86af735a5a293b3d694e1e7 + image: git.badhouseplants.net/badhouseplants/badhouseplants-builder:latest depends_on: - Test a build secrets: @@ -56,7 +56,7 @@ steps: - ./scripts/upload-media.pl - name: Deploy the application - image: git.badhouseplants.net/badhouseplants/badhouseplants-builder:f36cd03d00ce6624d86af735a5a293b3d694e1e7 + image: git.badhouseplants.net/badhouseplants/badhouseplants-builder:latest depends_on: - Build and push the docker image - Sync pictures from lfs to Minio @@ -71,7 +71,7 @@ steps: - ./scripts/deploy-app.pl - name: Cleanup everything - image: git.badhouseplants.net/badhouseplants/badhouseplants-builder:f36cd03d00ce6624d86af735a5a293b3d694e1e7 + image: git.badhouseplants.net/badhouseplants/badhouseplants-builder:latest depends_on: - Deploy the application secrets: -- 2.45.2 From 7a8e163973a989e4da5fb0cd83dde03c3c956ca2 Mon Sep 17 00:00:00 2001 From: Nikolai Rodionov Date: Wed, 24 Jul 2024 18:07:42 +0200 Subject: [PATCH 7/7] Use https for argocd --- .woodpecker.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.woodpecker.yml b/.woodpecker.yml index 859f399..3189887 100644 --- a/.woodpecker.yml +++ b/.woodpecker.yml @@ -66,7 +66,7 @@ steps: - argo_github_oauth_key - argo_google_oauth_key environment: - ARGOCD_SERVER: argo.badhouseplants.net:443 + ARGOCD_SERVER: https://argo.badhouseplants.net:443 commands: - ./scripts/deploy-app.pl -- 2.45.2