Browse Source

Merge "Set permissions of kube config like airskiff.yaml"

tags/v1.4
Zuul 3 months ago
parent
commit
390f98784a
1 changed files with 10 additions and 2 deletions
  1. +10
    -2
      tools/deployment/airskiff/developer/030-armada-bootstrap.sh

+ 10
- 2
tools/deployment/airskiff/developer/030-armada-bootstrap.sh View File

@@ -25,10 +25,17 @@ set -xe
# Render documents
${PEGLEG} site -r . render "${PL_SITE}" -o airskiff.yaml

# Set permissions o+r, beacause it need to be readable
# Set permissions o+r, beacause these files need to be readable
# for Armada in the container
AIRSKIFF_PERMISSIONS=$(stat --format '%a' airskiff.yaml)
KUBE_CONFIG_PERMISSIONS=$(stat --format '%a' ~/.kube/config)

sudo chmod 0644 airskiff.yaml
sudo chmod 0644 ~/.kube/config

# In the event that this docker command fails, we want to continue the script
# and reset the file permissions.
set +e

# Download latest Armada image and deploy Airship components
docker run --rm --net host -p 8000:8000 --name armada \
@@ -38,5 +45,6 @@ docker run --rm --net host -p 8000:8000 --name armada \
quay.io/airshipit/armada:latest \
apply /airskiff.yaml --target-manifest $TARGET_MANIFEST

# Set back permissions of the file
# Set back permissions of the files
sudo chmod "${AIRSKIFF_PERMISSIONS}" airskiff.yaml
sudo chmod "${KUBE_CONFIG_PERMISSIONS}" ~/.kube/config

Loading…
Cancel
Save