Fix deployment

This commit is contained in:
Nikolai Rodionov 2024-07-24 17:58:07 +02:00
parent 79dd9a18d4
commit 3f5c97bf35
Signed by: allanger
GPG Key ID: 0AA46A90E25592AD
3 changed files with 7 additions and 10 deletions

View File

@ -9,7 +9,7 @@ metadata:
namespace: platform namespace: platform
spec: spec:
destination: destination:
namespace: badhouseplants-$ARGO_APP_NAMESPACE namespace: $ARGO_APP_NAMESPACE
server: https://kubernetes.default.svc server: https://kubernetes.default.svc
project: badhouseplants project: badhouseplants
source: source:

View File

@ -11,14 +11,12 @@ spec:
- '*' - '*'
destinations: destinations:
- namespace: badhouseplants-* - namespace: development
server: https://kubernetes.default.svc
name: in-cluster
- namespace: production
server: https://kubernetes.default.svc server: https://kubernetes.default.svc
name: in-cluster 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 # Allow all namespaced-scoped resources to be created, except for ResourceQuota, LimitRange, NetworkPolicy
namespaceResourceBlacklist: namespaceResourceBlacklist:

View File

@ -18,9 +18,9 @@ chomp($remark_secret);
$ENV{'ARGO_APP_CHART_VERSION'} = $chart_version; $ENV{'ARGO_APP_CHART_VERSION'} = $chart_version;
$ENV{'ARGO_APP_BRANCH'} = $git_branch; $ENV{'ARGO_APP_BRANCH'} = $git_branch;
if ($git_branch eq $main_branch) { if ($git_branch eq $main_branch) {
$ENV{'ARGO_APP_NAMESPACE'} = $git_branch; $ENV{'ARGO_APP_NAMESPACE'} = "production";
} else { } else {
$ENV{'ARGO_APP_NAMESPACE'} = "preview" $ENV{'ARGO_APP_NAMESPACE'} = "development"
} }
$ENV{'ARGO_APP_HOSTNAME'} = "$git_branch-dev.badhouseplants.net"; $ENV{'ARGO_APP_HOSTNAME'} = "$git_branch-dev.badhouseplants.net";
$ENV{'ARGO_APP_IMAGE_TAG'} = $git_commit_sha; $ENV{'ARGO_APP_IMAGE_TAG'} = $git_commit_sha;
@ -72,4 +72,3 @@ foreach my $app (@all_applications) {
} }
} }
} }