Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
EOLE
OpenNebula
k3s-cluster-app
Commits
c9325fcb
Commit
c9325fcb
authored
Dec 01, 2022
by
Laurent Gourvénec
Browse files
feat(appliance): add kubectl and helm completion for bash on the leader
parent
f5fa88d2
Pipeline
#23694
passed with stage
in 9 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
one-appliance/service.d/appliance.sh
View file @
c9325fcb
...
...
@@ -63,6 +63,7 @@ DEP_PKGS="
dnsmasq
pwgen
open-iscsi
bash-completion
"
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
...
...
one-appliance/service.d/postdeploy.sh
View file @
c9325fcb
...
...
@@ -444,6 +444,14 @@ setupNgninxIgress() {
helm
install
ingress-controller ingress-nginx/ingress-nginx
--namespace
ingress
--create-namespace
}
# Install completion for kubectl and helm
installCompletion
()
{
echo
"[INFO] Installing completion for kubectl and helm"
kubectl completion bash
>
/usr/share/bash-completion/completions/kubectl
helm completion bash
>
/usr/share/bash-completion/completions/helm
}
INGRESS_PROVIDER
=
$(
onegate vm show
--json
| jq
-cr
.VM.USER_TEMPLATE.INGRESS_PROVIDER
)
_start_log
${
ONE_SERVICE_LOGDIR
}
/postdeploy.log
...
...
@@ -545,5 +553,11 @@ fi
# exit 7
#fi
if
!
installCompletion
;
then
echo
"[ERROR] Autocompletion setup failed !"
_end_log
exit
2
fi
_end_log
exit
0
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment