Skip to content

Commit

Permalink
Fix VSCode syntax highlighting for install scripts
Browse files Browse the repository at this point in the history
Rewrite code to add root CA certificate to Helm values files.

Fixes longstanding issue where VSCode does not syntax highlight subsequent
lines properly:
microsoft/vscode#77675
  • Loading branch information
sei-mkaar committed Aug 17, 2022
1 parent c11e8e8 commit 8463ba9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion foundry/common/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ helm repo add kubernetes-dashboard https://kubernetes.github.io/dashboard/
helm install -f kubernetes-dashboard.values.yaml kubernetes-dashboard kubernetes-dashboard/kubernetes-dashboard

# Add root CA to chart values
ed -s mkdocs-material.values.yaml <<< $'/cacert:/s/\"\"/|-/\n/cacert:/r !sed "s/^/ /" ../certs/root-ca.pem\nw'
cat ../certs/root-ca.pem | sed 's/^/ /' | sed -i -re 's/(cacert:).*/\1 |-/' -e '/cacert:/ r /dev/stdin' mkdocs-material.values.yaml
cp ../certs/root-ca.pem ../../mkdocs/docs/root-ca.crt

# Install Gitea
Expand Down
4 changes: 2 additions & 2 deletions foundry/topomojo/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ kubectl config set-context --current --namespace=topomojo
kubectl create secret tls appliance-cert --key ../certs/host-key.pem --cert <( cat ../certs/host.pem ../certs/int-ca.pem )

# Add root CA to chart values
ed -s gameboard.values.yaml <<< $'/cacert:/s/\"\"/|-/\n/cacert:/r !sed "s/^/ /" ../certs/root-ca.pem\nw'
ed -s topomojo.values.yaml <<< $'/cacert.crt:/s/\"\"/|-/\n/cacert.crt:/r !sed "s/^/ /" ../certs/root-ca.pem\nw'
cat ../certs/root-ca.pem | sed 's/^/ /' | sed -i -re 's/(cacert:).*/\1 |-/' -e '/cacert:/ r /dev/stdin' gameboard.values.yaml
cat ../certs/root-ca.pem | sed 's/^/ /' | sed -i -re 's/(cacert.crt:).*/\1 |-/' -e '/cacert.crt:/ r /dev/stdin' topomojo.values.yaml

# Install TopoMojo
kubectl apply -f topomojo-pvc.yaml
Expand Down

0 comments on commit 8463ba9

Please sign in to comment.