{ "$defs": { "AnalysisConfig": { "additionalProperties": false, "description": "Definition of `analysis` configuration.", "properties": { "ignore": { "$ref": "#/$defs/Ignore", "default": { "attributes": [], "linters": [] } } }, "title": "AnalysisConfig", "type": "object" }, "Base": { "additionalProperties": false, "description": "Represents a base.", "properties": { "name": { "title": "Name", "type": "string" }, "channel": { "title": "Channel", "type": "string" }, "architectures": { "default": [ "amd64" ], "items": { "type": "string" }, "title": "Architectures", "type": "array" } }, "required": [ "name", "channel" ], "title": "Base", "type": "object" }, "BasesCharm": { "additionalProperties": false, "description": "A charm using the deprecated ``bases`` keyword.\n\nThis type of charm only supports the following bases:\n - Ubuntu 18.04\n - Ubuntu 20.04\n - Ubuntu 22.04\n - Alma Linux 9", "properties": { "name": { "description": "The name of the project on Charmhub.\n\nThis value will be used both in the URL of the charm on Charmhub and when\ndeploying the charm with juju.\n\nCharms should follow the\n`charm naming guidelines `_.", "examples": [ "mysql", "mysql-k8s" ], "maxLength": 40, "minLength": 1, "title": "Project Name", "type": "string" }, "title": { "anyOf": [ { "description": "A human-readable title.", "examples": [ "Ubuntu Linux", "Jupyter Lab Desktop", "LXD", "DigiKam", "Apache Kafka", "MySQL Router K8s charm" ], "maxLength": 40, "minLength": 2, "title": "Title", "type": "string" }, { "type": "null" } ], "default": null, "title": "Title" }, "summary": { "description": "A brief (one-line) summary of your charm.", "maxLength": 200, "title": "Summary", "type": "string" }, "description": { "description": "A multi-line summary of your charm.", "title": "Description", "type": "string" }, "base": { "default": null, "title": "Base", "type": "null" }, "build-base": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Build-Base" }, "adopt-info": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Selects a part to inherit metadata from.", "examples": [ "foo-part" ], "title": "Adopt-Info" }, "parts": { "additionalProperties": { "additionalProperties": true, "type": "object" }, "default": { "charm": { "plugin": "charm", "source": "." } }, "description": "Configures the various mechanisms to obtain, process and prepare data from\ndifferent sources that end up being a part of the final charm.\n\nKeys are user-defined part names. The value of each key is a map where keys\nare part names.\n\nExample::\n\n parts:\n libs:\n plugin: dump\n source: /usr/local/lib/\n organize:\n \"libxxx.so*\": lib/\n prime:\n - lib/", "title": "Parts", "type": "object" }, "package-repositories": { "anyOf": [ { "items": { "additionalProperties": true, "type": "object" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "The package repositories to use for build and stage packages.", "examples": [ "[{type: apt, components: [main], suites: [xenial], key-id: 78E1918602959B9C59103100F1831DDAFC42E99D, url: http://ppa.launchpad.net/snappy-dev/snapcraft-daily/ubuntu}]" ], "title": "Package-Repositories" }, "type": { "const": "charm", "title": "Type", "type": "string" }, "analysis": { "anyOf": [ { "$ref": "#/$defs/AnalysisConfig" }, { "type": "null" } ], "default": null, "description": "How analysis done on the charm will behave.\n\nCurrently the only options are to ignore attributes or linters." }, "charmhub": { "anyOf": [ { "$ref": "#/$defs/Charmhub" }, { "type": "null" } ], "default": null, "deprecated": true, "description": "(DEPRECATED): Configuration for accessing charmhub." }, "charm-libs": { "items": { "$ref": "#/$defs/CharmLib" }, "title": "List of libraries to use for this charm", "type": "array" }, "actions": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "default": null, "description": "Defines one or more actions.\n\nThis key is equivalent to the\n`actions.yaml file `_.", "title": "Actions" }, "assumes": { "anyOf": [ { "items": { "anyOf": [ { "type": "string" }, { "additionalProperties": { "anyOf": [ { "items": {}, "type": "array" }, { "additionalProperties": true, "type": "object" } ] }, "type": "object" } ] }, "type": "array" }, { "type": "null" } ], "default": null, "description": "Explicitly state features a Juju model must be able to provide for a\nsuccessful deployment of this charm. When a charm includes such\nrequirements, Juju performs a pre-deployment check and displays\nuser-friendly error messages if a feature requirement cannot be met by the\nmodel that the user is trying to deploy the charm to. If the assumes\nsection of the charm metadata is omitted, Juju will make a best-effort\nattempt to deploy the charm, and users must rely on the output of\n``juju status`` to figure out whether the deployment was successful.\n\nThe key consists of a list of features that can be given either directly\nor, depending on the complexity of the condition you want to enforce,\nnested under one or both of the boolean expressions any-of or all-of,\nas shown below. In order for a charm to be deployed, all entries in the\nassumes block must be satisfied.\n\nStructure::\n\n assumes:\n - \n - any-of:\n - \n - \n - all-of:\n - \n - \n\nJuju version requirements can be specified with a string such as\n``juju >= 3.5`` or ``juju < 4.0``. A full list of supported features\ncan be found in the\n`Juju documentation `_.\n", "title": "Assumes" }, "charm-user": { "anyOf": [ { "enum": [ "root", "sudoer", "non-root" ], "type": "string" }, { "type": "null" } ], "default": null, "description": "Specifies that the charm code does not need to be run as root. Possible\nvalues are:\n\n- ``root``: the charm will run as root\n- ``sudoer``: the charm will run as a non-root user with access to root\n privileges using ``sudo``.\n- ``non-root``: the charm will run as a non-root user without ``sudo``.\n\nOnly affects Kubernetes charms on Juju 3.6.0 or later. If not specified,\nJuju will use\n`its default behaviour `_.\n", "title": "Charm-User" }, "containers": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "default": null, "description": "Define a map of containers to be created adjacent to the charm (as a\nsidecar, in the same pod).\n\nThis is required for Kubernetes charms.\n\nThis key consists of a dictionary mapping container names to their\nspecifications. Each container can be specified in terms of ``resource``,\n``bases`` and ``mounts``, where one of either the ``resource`` or the\n``bases`` subkeys must be defined and ``mounts`` is optional.\n\n- ``resource`` is the name of an OCI image resource used to create the\n container (that you will then define further in the resources block).\n- ``bases`` is a list of bases to be used for resolving a container image,\n in descending order of preference. To use it, specify a base name (for\n example, ``ubuntu`` or ``almalinux``), a ``channel`` and an\n ``architecture``.\n- ``mounts`` is a list of mounted storage volumes for this container. To\n use it, specify the name of the storage to mount from the charm\n storage and, optionally, the location where to mount the storage.\n\nStructure::\n\n containers:\n :\n resource: \n bases:\n - name: \n channel: \n architectures:\n - \n mounts:\n - storage: \n location: ", "examples": [ { "super-app": { "mounts": [ { "location": "/logs", "storage": "logs" } ], "resource": "super-app-image" } } ], "title": "Containers" }, "devices": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "default": null, "description": "Devices the charm needs.\n\nStructure::\n\n devices:\n :\n type: gpu | nvidia.com/gpu | amd.com/gpu\n description: \n countmin: \n countmax: ", "examples": [ { "amd-gpu": { "countmax": 100, "countmin": 1, "description": "Some sweet AMD GPU", "type": "amd.com/gpu" }, "nvidia-gpu": { "countmin": 20, "description": "Some NVIDIA GPUs", "type": "nvidia.com/gpu" } }, { "gpus": { "countmax": 40, "countmin": 2, "description": "A bunch of GPUs", "type": "gpu" } } ], "title": "Devices" }, "extra-bindings": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "default": null, "description": "A key-only mapping representing extra bindings needed.", "title": "Extra-Bindings" }, "peers": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "default": null, "description": "A map of peer relations.\n\nStructure::\n\n peers:\n :\n interface: \n limit: \n scope: <\"global\" or \"container\" - the relation scope.>\n\nFor more information, see\n`the Juju documentation `_.", "examples": [ { "friend": { "interface": "life", "limit": 150, "optional": true, "scope": "container" } } ], "title": "Peers" }, "provides": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "default": null, "description": "A map of interfaces this charm provides.\n\nStructure::\n\n provides:\n :\n interface: \n limit: \n scope: <\"global\" or \"container\" - the relation scope.>\n\nFor more information, see\n`the Juju documentation `_.", "examples": [ { "self": { "interface": "identity" } } ], "title": "Provides" }, "requires": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "default": null, "description": "A map of relations this charm requires.\n\nStructure::\n\n requires:\n :\n interface: \n limit: \n scope: <\"global\" or \"container\" - the relation scope.>\n\nFor more information, see\n`the Juju documentation `_.", "examples": [ { "parent": { "interface": "birth", "limit": 2, "optional": false, "scope": "global" } } ], "title": "Requires" }, "resources": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "default": null, "description": "A mapping of resources that accompany the charm.\n\nSee first: `Juju | Charm resource `_\n\nEach resource is made available when the charm is deployed. NOTE:\nKubernetes charms must declare an ``oci-image`` type resource for each\ncontainer declared in ``containers``.\n\nStructure::\n\n # (Optional) Additional resources that accompany the charm\n resources:\n :\n # (Required) The type of the resource\n type: file | oci-image\n\n # (Optional) Description of the resource and its purpose\n description: \n\n # (Required: when type:file) The filename of the resource as it\n # should appear in the filesystem.\n filename: ", "examples": [ { "water": { "filename": "/dev/h2o", "type": "file" } }, { "super-app-image": { "description": "My app!", "type": "oci-image" } } ], "title": "Resources" }, "storage": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "default": null, "description": "Storage devices requested by the charm.\n\nStructure::\n\n storage:\n # Each key represents the name of the storage\n :\n\n # (Required) Type of the requested storage\n type: filesystem | block\n\n # (Optional) Description of the storage requested\n description: \n\n # (Optional) The mount location for filesystem stores. For\n # multi-stores the location acts as the parent directory for each\n # mounted store.\n location: \n\n # Indicates if the storage should be made read-only (where\n # possible). Defaults to false\n read-only: true | false\n\n # (Optional) The number of storage instances to be requested\n multiple:\n range: | - | - | +\n\n # (Optional) Minimum size of requested storage in forms G, GiB, GB.\n # Size multipliers are M, G, T, P, E, Z or Y. With no multiplier\n # supplied, M is implied.\n minimum-size: | \n\n # (Optional) List of properties, only supported value is \"transient\"\n properties:\n - transient\n", "examples": [ { "jbod": { "description": "A block storage to use as swap space", "properties": [ "transient" ], "type": "block" } } ], "title": "Storage" }, "subordinate": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": null, "description": "Optional boolean to declare the charm subordinate.", "examples": [ true ], "title": "Subordinate" }, "terms": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "A list of terms to which the user agree by using the charm.\nThese terms are not enforced by the charm, Juju or Canonical.", "examples": [ "Post cat pictures on Mastodon", "Tag your cat pictures with #caturday" ], "title": "Terms" }, "links": { "anyOf": [ { "$ref": "#/$defs/Links" }, { "type": "null" } ], "default": null, "description": "(Recommended) Links to various additional information used by Charmhub.", "examples": [ { "contact": "Please send your answer to Old Pink, care of the Funny Farm, Chalfont", "documentation": "https://discourse.charmhub.io/t/traefik-k8s-docs-index/10778", "issues": "https://github.com/canonical/traefik-k8s-operator/issues", "source": "https://github.com/canonical/traefik-k8s-operator", "website": "https://charmed-kubeflow.io/" } ] }, "config": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "default": null, "description": "One or more configuration options for your charm.\n\nStructure::\n\n config:\n options:\n # Each option name is the name by which the charm will query the option.\n