【发布时间】:2022-01-18 08:38:09
【问题描述】:
我正在尝试在安装 rpm 文件时在其中运行 helm 脚本。 helm 安装在该机器中。同样的命令在 shell 中运行时也能正常工作。但是在rpm安装期间 我收到“helm: command not found”错误。
这些是帖子部分中的命令。
helm init
helm list
helm install app_name helm_folder_location
helm uninstall app_name
这是 rpmspec 文件中 %post 部分的格式。
%post
#some pre-functions like image loading
is_kube_installed=$(helm list|grep app_name)
if[ ! -z "is_kube_installed" ];then
helm uninstall app_name
fi
helm install app_name helm_folder_location
这是错误
> /var/tmp/rpm-tmp.jzqB04: line 4: helm: command not found
> /var/tmp/rpm-tmp.jzqB04: line 4: helm: command not found
> /var/tmp/rpm-tmp.jzqB04: line 4: helm: command not found
会有什么问题?如何解决?
【问题讨论】:
标签: kubernetes-helm rpm rpmbuild rpm-spec