Skip to content
This repository has been archived by the owner on Aug 25, 2021. It is now read-only.

use non-root folder to create apply-license script #880

Merged
merged 1 commit into from Mar 31, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 4 additions & 3 deletions templates/enterprise-license-job.yaml
Expand Up @@ -77,7 +77,8 @@ spec:
- "-c"
- |
# Create a script that we can execute with the timeout command.
cat > apply-license.sh << 'EOF'
mkdir -p /tmp/scripts/
cat > /tmp/scripts/apply-license.sh << 'EOF'
#!/bin/sh
while true; do
echo "Applying license..."
Expand All @@ -89,10 +90,10 @@ spec:
sleep 2
done
EOF
chmod +x ./apply-license.sh
chmod +x /tmp/scripts/apply-license.sh

# Time out after 20 minutes. Use || to support new timeout versions that don't accept -t
timeout -t 1200 ./apply-license.sh 2> /dev/null || timeout 1200 ./apply-license.sh 2> /dev/null
timeout -t 1200 /tmp/scripts/apply-license.sh 2> /dev/null || timeout 1200 /tmp/scripts/apply-license.sh 2> /dev/null
{{- if .Values.global.tls.enabled }}
volumeMounts:
- name: consul-ca-cert
Expand Down