[bitnami/grafana] Replace deprecated grafana command usage (#52257)

Replace deprecated grafana command usage

Replaces 'grafana-cli' and 'grafana-server' with
'grafana cli' and 'grafana server', respectively,
per the warnings logged in the image during build and run.

fixes #52256

Signed-off-by: Ben Foster <bpfoster@gmail.com>
This commit is contained in:
Ben Foster 2023-11-06 05:13:20 -05:00 committed by GitHub
parent 209b6f0bfd
commit 7602e1055f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 7 additions and 6 deletions

View File

@ -4,7 +4,7 @@
command:
check-grafana-plugins:
exit-status: 0
exec: grafana-cli --pluginsDir /opt/bitnami/grafana/default-plugins/ plugins ls
exec: grafana cli --pluginsDir /opt/bitnami/grafana/default-plugins/ plugins ls
stdout:
{{ range $plugin := .Vars.plugins }}
- "{{ $plugin }}"

View File

@ -1,6 +1,5 @@
binaries:
- grafana
- grafana-cli
root_dir: /opt/bitnami
version:
bin_name: grafana

View File

@ -63,7 +63,7 @@ grafana_plugin_list=(
)
for plugin in "${grafana_plugin_list[@]}"; do
info "Installing ${plugin} plugin"
grafana-cli --pluginsDir "$(grafana_env_var_value PATHS_PLUGINS)" plugins install "$plugin"
grafana cli --pluginsDir "$(grafana_env_var_value PATHS_PLUGINS)" plugins install "$plugin"
done
# The Grafana Helm chart mounts the data directory at "/opt/bitnami/grafana/data"

View File

@ -16,8 +16,9 @@ set -o pipefail
. /opt/bitnami/scripts/libos.sh
. /opt/bitnami/scripts/liblog.sh
declare cmd="grafana-server"
declare cmd="grafana"
declare -a args=(
"server"
# Based on https://github.com/grafana/grafana/blob/v8.2.5/packaging/docker/run.sh
"--homepath=${GF_PATHS_HOME}"
"--config=${GF_PATHS_CONFIG}"

View File

@ -223,8 +223,9 @@ EOF
# None
#########################
grafana_start_bg() {
local cmd="grafana-server"
local cmd="grafana"
local -a args=(
"server"
# Based on https://github.com/grafana/grafana/blob/v8.2.5/packaging/docker/run.sh
"--homepath=${GF_PATHS_HOME}"
"--config=${GF_PATHS_CONFIG}"
@ -339,7 +340,7 @@ grafana_install_plugins() {
if [[ -n "$plugin_version" ]]; then
grafana_plugin_install_args+=("$plugin_version")
fi
grafana-cli "${grafana_plugin_install_args[@]}"
grafana cli "${grafana_plugin_install_args[@]}"
done
}