-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathplugin.yaml
34 lines (30 loc) · 1.13 KB
/
plugin.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
name: "quix-manager"
version: "0.1.1"
usage: "helm quix-manager update --release-name quixplatform-manager --repo quixcontainerregistry.azurecr.io/helm/quixplatform-manager:1.5.4"
description: |-
A helm plugin to install quix.
ignoreFlags: false
useTunnel: true
command: "$HELM_PLUGIN_DIR/venv/bin/python $HELM_PLUGIN_DIR/quix_install_command.py"
hooks:
install: |
#!/bin/bash
set -e
# Check for Python 3
if command -v python3 &>/dev/null; then
PYTHON_CMD=python3
elif command -v python &>/dev/null; then
PYTHON_CMD=python
else
echo "Python 3 is required for this plugin. Please install Python 3."
exit 1
fi
# Verify that the Python command is version 3
if ! $PYTHON_CMD -c 'import sys; exit(0) if sys.version_info[0] == 3 else exit(1)'; then
echo "Detected Python version is not 3. Please use Python 3."
exit 1
fi
# Create a virtual environment in the plugin directory
$PYTHON_CMD -m venv "$HELM_PLUGIN_DIR/venv"
# Activate the virtual environment and install pip requirements
"$HELM_PLUGIN_DIR/venv/bin/pip" install -r "$HELM_PLUGIN_DIR/src/requirements.txt"