Procedure
To add a plug-in:
-
Get the name of the Kubernetes pod that hosts the plug-in registry container. To do this, filter the
app=che-plugin-registrylabel:$ PLUGIN_REG_POD=$(kubectl get -o custom-columns=NAME:.metadata.name \ --no-headers -l app=che-plugin-registry pod)
-
Create the new plug-in directory in the plug-in registry container, if it does not exist:
$ ORG="my-org" $ PLUGIN="my-plugin" $ VERSION="1.0.1" $ kubectl exec $\{PLUGIN_REG_POD} -i -t -- \ mkdir -p /var/www/html/v3/plugins/$\{ORG}/$\{PLUGIN}/$\{VERSION} -
Copy the
meta.yamlfile in the container:LOCAL_META="$(PWD)/meta.yaml" $ kubectl cp "$\{LOCAL_META}" \ $\{PLUGIN_REG_POD}:/var/www/html/v3/plugins/$\{ORG}/$\{PLUGIN}/$\{VERSION} -
Update the
index.jsonfile of the registry:$ kubectl exec $\{PLUGIN_REG_POD} -i -t -- \ /var/www/html/index_v2.sh v3 > /var/www/html/v3/plugins/index.json -
The new plug-in can now be used from a Che instance.