Skip to content

Commit 132b19d

Browse files
author
cfsdocs
committed
Frances Overby: Merge pull request #3408 from coligo/fmo-upd-16Feb24-a
1 parent 5888d77 commit 132b19d

File tree

5 files changed

+38
-7
lines changed

5 files changed

+38
-7
lines changed

envvar-autoinject.md

+21-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
copyright:
44
years: 2020, 2024
5-
lastupdated: "2024-02-15"
5+
lastupdated: "2024-02-16"
66

77
keywords: applications in code engine, apps in code engine, http requests in code engine, deploy apps in code engine, app workloads in code engine, deploying workloads in code engine, application, app, memory, cpu, environment variables
88

@@ -68,6 +68,26 @@ Note that each job run instance gets its own index from the array of indices tha
6868

6969
While the job itself doesn't have a URL associated with it, the `CE_DOMAIN` and `CE_SUBDOMAIN` values might be useful if you need to reference an application that is running in the same project. The full external URL of this application is `appName.CE_SUBDOMAIN.CE_DOMAIN`. To reference the private URL of an application, use `appName.CE_SUBDOMAIN`.
7070

71+
## Automatically injected environment variables for functions
72+
{: #inside-env-vars-fun}
73+
74+
When you deploy an function, {{site.data.keyword.codeengineshort}} automatically injects certain environment variables into the function. The following table lists automatically injected environment variables into each instance of your deployed function.
75+
76+
The environment variables, `CE_FUNCTION`, `CE_DOMAIN`, and `CE_SUBDOMAIN` are used to construct the URL of a function, `https://CE_FUNCTION.CE_SUBDOMAIN.CE_DOMAIN`. For example, if `CE_FUNCTION=myfunc`, `CE_SUBDOMAIN=01234567-abcd` and `CE_DOMAIN=us-south.codeengine.dev.appdomain.cloud`, your function external URL is `https://myfunc.01234567-abcd.us-south.codeengine.dev.appdomain.cloud`. The private URL of your application is `CE_FUNCTION.CE_SUBDOMAIN.private.CE_DOMAIN`, or `myfunc.01234567-abcd.private.us-south.codeengine.appdomain.cloud`.
77+
78+
| Environment variable | Description | Example |
79+
|--------------------|-------------------------------------------------------|--------------|
80+
| `CE_ALLOW_CONCURRENT`| This internal boolean setting is used by the {{site.data.keyword.codeengineshort}} function controller to indicate if the runtime supports concurrent invocations of the same function instance, and can be ignored. | `CE_ALLOW_CONCURRENT=true` |
81+
| `CE_DOMAIN` | The domain name portion of the URL of the function (and project). | `CE_DOMAIN=us-south.codeengine.dev.appdomain.cloud` |
82+
| `CE_EXECUTION_ENV` | The managed runtime type and its release version. | `CE_EXECUTION_ENV=ibm/action-python-v3.11` This example specifies to use Python v3.11. |
83+
| `CE_FUNCTION` | The name of the function. | `CE_APP=myfunc` |
84+
| `CE_SUBDOMAIN` | The subdomain portion of the URL associated with the function (and project). If you are familiar with Kubernetes, `CE_SUBDOMAIN` maps to the Kubernetes namespace associated with your project. | `CE_SUBDOMAIN=01234567-abcd` |
85+
| `HOME` | The home directory of the runtime container for the function. | `HOME=/root` |
86+
| `LC_CTYPE` | The locale that is used by the `ctype` and `multibyte` operating system API. Available only with Python runtimes. | `LC_CTYPE=C.UTF-8` |
87+
| `PATH` | The current setting of the PATH variable, which lists the directories in which the system looks for executables. | `PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin` |
88+
| `PYTHONIOENCODING` | The standard encoding that is used by standard input, standard output, and standard error streams. This variable only applies to a Python runtime. | `PYTHONIOENCODING=UTF-8` |
89+
| `PWD` | The current working directory. | `PWD=/` |
90+
{: caption="Automatically injected environment variables when deploying {{site.data.keyword.codeengineshort}} functions"}
7191

7292

7393

landing.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"title": "Code Engine",
3-
"lastupdated": "2024-02-15",
3+
"lastupdated": "2024-02-16",
44
"introduction": "Find out how you can use Code Engine to run your containerized workloads",
55
"section_devtools": {
66
"api": "/apidocs/codeengine/v2",

release-notes.md

+4-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
copyright:
44
years: 2020, 2024
5-
lastupdated: "2024-02-15"
5+
lastupdated: "2024-02-16"
66

77
keywords: release notes for code engine, updates in code engine, what's new in code engine, document changes in code engine, updates, release notes
88

@@ -32,8 +32,10 @@ Updated the user experience for working with jobs and job runs in the console
3232
: {{site.data.keyword.codeengineshort}} has enhanced the user experience to simplify working with jobs and job runs in the console. A consolidated list of job runs is now provided. See [Accessing job details from the console](/docs/codeengine?topic=codeengine-access-job-details#access-jobdetails-ui).
3333

3434
Added more information about functions in {{site.data.keyword.codeengineshort}}
35-
: - See [Options for visibility for a {{site.data.keyword.codeengineshort}} function](/docs/codeengine?topic=codeengine-fun-work#optionsvisibilityfun).
35+
: - See [Automatically injected environment variables for functions](/docs/codeengine?topic=codeengine-inside-env-vars#inside-env-vars-fun).
3636
: - See [Function pricing](/docs/codeengine?topic=codeengine-pricing#functions-pricing).
37+
: - See [Options for visibility for a {{site.data.keyword.codeengineshort}} function](/docs/codeengine?topic=codeengine-fun-work#optionsvisibilityfun).
38+
: - See [Verifying the code bundle reference for my function](/docs/codeengine?topic=codeengine-troubleshoot-function#ts-function-verifyimageg).
3739

3840
Updated behavior change for image builds that are built with Cloud Native Buildpacks
3941
: Introduced a behavior change for {{site.data.keyword.codeengineshort}} image builds that are built with Buildpacks. Images that are built using Buildlpacks no longer use the neutral timestamp of `Jan, 1st 1980` as their image creation timestamp. The timestamp of the input source is now used. See [Choosing a build strategy - Cloud Native Buildpacks](/docs/codeengine?topic=codeengine-plan-build#build-buildpack-strat).

sitemap.md

+5-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
copyright:
44
years: 2024
5-
lastupdated: "2024-02-15"
5+
lastupdated: "2024-02-16"
66

77
keywords: sitemap, code engine, about, tutorial, project, app, job, configmaps, secret, event, log, monitor, cli, api, troubleshoot, support, source code, faq, memory, cpu, commands, arguments, release notes
88

@@ -3881,6 +3881,8 @@ Find what you are looking for in the compilation of {{site.data.keyword.codeengi
38813881

38823882
* [Automatically injected environment variables for jobs](/docs/codeengine?topic=codeengine-inside-env-vars#inside-env-vars-jobs)
38833883

3884+
* [Automatically injected environment variables for functions](/docs/codeengine?topic=codeengine-inside-env-vars#inside-env-vars-fun)
3885+
38843886

38853887
## Defining commands and arguments for your workloads
38863888
{: #sitemap_defining_commands_and_arguments_for_your_workloads}
@@ -4270,6 +4272,8 @@ Find what you are looking for in the compilation of {{site.data.keyword.codeengi
42704272

42714273
* [Keep your runtime and CLI versions up to date](/docs/codeengine?topic=codeengine-troubleshoot-function#ts-function-uptodate)
42724274

4275+
* [Verifying the code bundle reference for my function](/docs/codeengine?topic=codeengine-troubleshoot-function#ts-function-verifyimage)
4276+
42734277
* [Additional topics](/docs/codeengine?topic=codeengine-troubleshoot-function#ts-function-topics)
42744278

42754279
[How can I add my {{site.data.keyword.codeengineshort}} function to an allowlist?](/docs/codeengine?topic=codeengine-ts-allowlist-function#ts-allowlist-function)

troubleshoot-function.md

+7-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
copyright:
44
years: 2023, 2024
5-
lastupdated: "2024-02-01"
5+
lastupdated: "2024-02-16"
66

77
keywords: troubleshooting for code engine, troubleshooting functions in code engine, function in code engine, function
88

@@ -94,9 +94,14 @@ When you view logs from the console, you must create an {{site.data.keyword.la_f
9494

9595
Verify that your runtime is supported. See [Runtimes](/docs/codeengine?topic=codeengine-fun-runtime).
9696

97+
## Verifying the code bundle reference for my function
98+
{: #ts-function-verifyimage}
9799

100+
A code bundle is a collection of files that represents your function code. This code bundle is injected into the runtime container. Your code bundle is created by {{site.data.keyword.codeengineshort}} and is stored in container registry or inline with the function. A code bundle is not a Open Container Initiative (OCI) standard container image. ``
101+
102+
When you work with {{site.data.keyword.codeengineshort}} functions, you must specify a code bundle reference and a registry secret to access the image. For the function to work correctly, the code bundle reference and its access properties must remain valid for the life of the function.
98103

99-
104+
Because code bundles and images are similar, you can verify your code bundle in the same ways that you verify an image. See [How can I verify my image reference](/docs/codeengine?topic=codeengine-ts-build-verify-image)?
100105

101106

102107
## Additional topics

0 commit comments

Comments
 (0)