简体   繁体   English

如何通过密钥管理器包含 IBM CloudEngine 创建/更新任务的环境变量(keyValue 密钥值)

[英]How to include the environment variables for IBM CloudEngine create/update task via secret Manager (keyValue Secret value)

After successfully creating Secret Manager instance in IBMcloud.在 IBMcloud 中成功创建 Secret Manager 实例之后。 I have created a key-value secret in default secret-group, this secret contains the default set of environment variables which will be used for CodeEngine deployment.我在默认密钥组中创建了一个键值密钥,该密钥包含将用于 CodeEngine 部署的默认环境变量集。 However, I am now continuously facing issues with trying to deploy the app, i use the below command to deploy, let me know if there is anything wrong here但是,我现在不断面临尝试部署应用程序的问题,我使用以下命令进行部署,让我知道这里是否有任何问题

ibmcloud ce application create --name ce-sample-app --image IMAGE_NAME --cpu 1 --env-from-secret sample-portal-ce-app-env-variables --registry-secret xyxyxyxyxyxy

The secrets that you reference in the Code Engine commands, are secrets managed in Code Engine directly rather than in a separate Secret Manager service instance.您在代码引擎命令中引用的机密是直接在代码引擎中管理的机密,而不是在单独的机密管理器服务实例中管理的机密。

Here is the documentation about secrets in Code Engine: https://cloud.ibm.com/docs/codeengine?topic=codeengine-configmap-secret以下是代码引擎中有关机密的文档: https://cloud.ibm.com/docs/codeengine?topic=codeengine-configmap-secret

Basically you would need to create your secret like this:基本上你需要像这样创建你的秘密:

ibmcloud ce secret create --name sample-portal-ce-app-env-variables --from-literal ENVVAR1=value1 --from-literal "ENVVAR2=value with space"

There are also options to import all environment variables from a file into a secret.还有一些选项可以将文件中的所有环境变量导入机密。 To see all options, run:要查看所有选项,请运行:

ibmcloud ce secret create --help

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 IBM Cloud Code Engine:如何在 cron 调用的作业运行中覆盖环境变量? - IBM Cloud Code Engine: How to overwrite environment variable in cron-invoked job run? IBM Cloud:尝试创建 Code Engine 项目时出错 - IBM Cloud: Error trying to create Code Engine project IBM Cloud Functions:如何运行Docker函数? - IBM Cloud Functions: How to run a Docker function? IBM Cloud Code Engine:如何从环境中确定应用程序 URL? - IBM Cloud Code Engine: How to determine app URL from environment? 需要 CLI 指令以将示例应用程序部署到 IBM Code Engine - Require CLI instructions for deploying a sample app to IBM Code Engine IBM Cloud Code Engine:构建在步骤“step-build-and-push”中失败,错误为 UNAUTHORIZED - IBM Cloud Code Engine: Build fails in step “step-build-and-push” with error UNAUTHORIZED IBM Cloud:需要更新代码引擎应用程序的服务 ID 的最低权限? - IBM Cloud: Least privileges for service ID that needs to update a Code Engine app? IBM Cloud Code Engine:如何在 ping 订阅中传递非 JSON 数据? - IBM Cloud Code Engine: How to pass non-JSON data in ping subscription? IBM Cloud Code Engine 无法为私有存储库构建 - IBM Cloud Code Engine fails to build for private repo IBM Cloud Code Engine:有状态应用程序和粘性会话、扩展问题 - IBM Cloud Code Engine: Stateful Apps and Sticky Sessions, Scaling Issues
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM