Skip to content

Commit

Permalink
render-cd: fix hard-coded output dir
Browse files Browse the repository at this point in the history
  • Loading branch information
zugwan committed Jun 22, 2022
1 parent 2fae312 commit ba5ce7f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/render-cd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ GITHUB_IMAGE_REPO="ghcr.io"
outputdir="output"

rm -rf decapod-base-yaml
site_list=$(ls -d */ | sed 's/\///g' | grep -v 'docs' | grep -v 'output' | grep -v 'offline')
site_list=$(ls -d */ | sed 's/\///g' | grep -v 'docs' | grep -v $outputdir | grep -v 'offline')

function usage {
echo -e "\nUsage: $0 [--site TARGET_SITE] [--base_url DECAPOD_BASE_URL] [--registry REGISTRY_URL]"
Expand Down Expand Up @@ -78,11 +78,11 @@ do
# Action1. change the namespace for cluster-resouces from argo to cluster-name
echo "Almost finished: changing namespace for cluster-resouces from argo to cluster-name.."
sudo sed -i "s/ namespace: argo/ namespace: $site/g" $(pwd)/$outputdir/$site/tks-cluster-aws/cluster-api-aws/*
sudo sed -i "s/ - argo/ - $site/g" $(pwd)/output/$site/tks-cluster-aws/cluster-api-aws/*
sudo sed -i "s/ - argo/ - $site/g" $(pwd)/$outputdir/$site/tks-cluster-aws/cluster-api-aws/*
sudo sed -i "s/ namespace: argo/ namespace: $site/g" $(pwd)/$outputdir/$site/tks-cluster-byoh/cluster-api-byoh/*
sudo sed -i "s/ - argo/ - $site/g" $(pwd)/output/$site/tks-cluster-byoh/cluster-api-byoh/*
sudo sed -i "s/ - argo/ - $site/g" $(pwd)/$outputdir/$site/tks-cluster-byoh/cluster-api-byoh/*
# It's possible besides of two above but very tricky!!
# sudo sed -i "s/ argo$/ $site/g" $(pwd)/output/$site/tks-cluster-aws/cluster-api-aws/*
# sudo sed -i "s/ argo$/ $site/g" $(pwd)/$outputdir/$site/tks-cluster-aws/cluster-api-aws/*
echo "---
apiVersion: v1
kind: Namespace
Expand All @@ -93,8 +93,8 @@ metadata:
# It bring the secret 'dacapod-argocd-config' using kubed
decapod-argocd-config: enabled
" > Namespace_aws_rc.yaml
sudo cp Namespace_aws_rc.yaml $(pwd)/output/$site/tks-cluster-aws/cluster-api-aws/
sudo cp Namespace_aws_rc.yaml $(pwd)/output/$site/tks-cluster-byoh/cluster-api-byoh/
sudo cp Namespace_aws_rc.yaml $(pwd)/$outputdir/$site/tks-cluster-aws/cluster-api-aws/
sudo cp Namespace_aws_rc.yaml $(pwd)/$outputdir/$site/tks-cluster-byoh/cluster-api-byoh/
# End of Post process
done

Expand Down
4 changes: 4 additions & 0 deletions decapod-reference/tks-cluster-common/site-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ charts:
annotations:
service.beta.kubernetes.io/aws-load-balancer-type: "nlb"
externalTrafficPolicy: Local
annotations:
service.beta.kubernetes.io/aws-load-balancer-name: "taco-ingress-nlb"
service.beta.kubernetes.io/aws-load-balancer-type: "nlb"
service.beta.kubernetes.io/aws-load-balancer-proxy-protocol: "*"
type: LoadBalancer
config:
enable-underscores-in-headers: "true"
Expand Down

0 comments on commit ba5ce7f

Please sign in to comment.