Resource (charm)
See also: SDK | Resource
See also: How to manage resources
In Juju, a charm resource is additional content that a charm can make use of, or may require, to run.
A resource can have one of two basic types – file
and oci-image
. These can be specified as follows:
-
If the resource is type ‘file’, you can specify it by providing
a. the resource revision number or
b. a path to a local file.
-
If the resource is type ‘oci-image’, you can specify it by providing
a. the resource revision number,
b. a path to a local file = private OCI image,
c. a link to a public OCI image.
If you choose to provide a path to a local file, the file can be a JSON or a YAML file with an image reference and optionally a username and a password (i.e., an OCI image resource).
Expand to view an example JSON file
{
"ImageName": "my.private.repo.com/a/b:latest",
"username": "harry",
"password": "supersecretpassword"
}
Expand to view an example YAML file
registrypath: my.private.repo.com/a/b:latest
username: harry
password: supersecretpassword
Last updated a month ago.