Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

install script tries to copy from a resources directory that doesn't exist #2

Open
ecimin0 opened this issue Nov 11, 2023 · 0 comments

Comments

@ecimin0
Copy link

ecimin0 commented Nov 11, 2023

First off thank you Remington and Leonardo and everybody else who contributed for the awesome talk at Kubecon a few days ago.

I made an extension-installer container from the install.sh script and added an initContainer to run it. When it gets to the copy stage, there is this resources/ directory that it tries to copy out of, but that directory doesn't exist.

My volumeMounts are configured with /tmp/extensions/ as in the readme. Wondering if I'm I missing a step somewhere.

...
UI extension downloaded successfully
Installing the UI extension...
+ '['  '!='  ]
+ echo 'UI extension downloaded 
+ install_extension
+ echo 'Installing the UI extension...'
+ cd /tmp/extension-HNnhil
+ file --mime-type hello-world
+ awk '{print $2}'
+ local 'mime_type=application/gzip'
+ '[' application/gzip '=' application/gzip ]
+ tar -zxf hello-world
   tar: removing leading '../' from member names
+ '[' '!' -d /tmp/extensions/resources ]
+ mkdir -p /tmp/extensions/resources
+ cp -Rf 'resources/*' /tmp/extensions/resources/
   cp: can't stat 'resources/*': No such file or directory
+ finalizer
...

I made a small change on my end and made a new image, which seems to work:

15:45:09 ❯ git diff
diff --git a/install.sh b/install.sh
index 290cddd..1ebd884 100755
--- a/install.sh
+++ b/install.sh
@@ -62,7 +62,7 @@ install_extension() {
     if [ ! -d "/tmp/extensions/resources" ]; then
         mkdir -p /tmp/extensions/resources
     fi
-    cp -Rf resources/* /tmp/extensions/resources/
+    cp -Rf ./* /tmp/extensions/resources/
     echo "UI extension installed successfully"
 }
...
+ '['  '!='  ]
+ echo 'UI extension downloaded successfully'
+ install_extension
UI extension downloaded successfully
Installing the UI extension...
+ echo 'Installing the UI extension...'
+ cd /tmp/extension-jImIge
+ file --mime-type hello-world
+ awk '{print $2}'
+ local 'mime_type=application/gzip'
+ '[' application/gzip '=' application/gzip ]
+ tar -zxf hello-world
tar: removing leading '../' from member names
+ '[' '!' -d /tmp/extensions/resources ]
+ mkdir -p /tmp/extensions/resources
+ cp -Rf ./argocd-extensions ./hello-world /tmp/extensions/resources/
UI extension installed successfully
+ echo 'UI extension installed successfully'
+ finalizer
+ local 'dl=/tmp/extension-jImIge'
+ '[' -d /tmp/extension-jImIge ]
+ rm -rf /tmp/extension-jImIge
+ code=0
+ '[' 0 -ne 0 ]
+ uptime_ms
+ read up rest
+ echo 3445266610
+ end_time=3445266610
+ elapsed=340
+ echo 'Elapsed Time: 340 ms'
+ exit 0
Elapsed Time: 340 ms
Stream closed EOF for argocd/argocd-server-c54bf9d4-9m9s4 (extensions-installer)
jsolana pushed a commit to jsolana/argocd-extension-installer that referenced this issue Jan 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant