[英]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.