Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: Add new ModuleConfig fields documentation #83

Merged
merged 5 commits into from
Oct 28, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 13 additions & 2 deletions cmd/modulectl/create/long.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,21 +14,32 @@ The module config file is a YAML file used to configure the following attributes
- name: a string, required, the name of the module
- version: a string, required, the version of the module
- channel: a string, required, channel that should be used in the ModuleTemplate CR
- manifest: a string, required, reference to the manifest, must be a relative file name or URL
- manifest: a string, required, reference to the manifest, must be a URL

- defaultCR: a string, optional, reference to a YAML file containing the default CR for the module, must be a relative file name or URL
- defaultCR: a string, optional, reference to a YAML file containing the default CR for the module, must be a URL
- mandatory: a boolean, optional, default=false, indicates whether the module is mandatory to be installed on all clusters
- resourceName: a string, optional, default={NAME}-{CHANNEL}, the name for the ModuleTemplate CR that will be created
- internal: a boolean, optional, default=false, determines whether the ModuleTemplate CR should have the internal flag or not
- beta: a boolean, optional, default=false, determines whether the ModuleTemplate CR should have the beta flag or not
- security: a string, optional, name of the security scanners config file
- labels: a map with string keys and values, optional, additional labels for the generated ModuleTemplate CR
- annotations: a map with string keys and values, optional, additional annotations for the generated ModuleTemplate CR
- manager: # an object, optional, module resource that indicates the installation readiness of the module
nesmabadr marked this conversation as resolved.
Show resolved Hide resolved
name: a string, required, the name of the module resource
namespace: a string, optional, the namespace of the module resource
group: a string, required, the API group of the module resource
version: a string, required, the API version of the module resource
kind: a string, required, the API kind of the module resource
- associatedResources: a list of Group-Version-Kind(GVK), optional, resources that should be cleaned up with the module deletion
- resources: # a map wih string keys and values, optional, additional resources of the module that may be fetched
nesmabadr marked this conversation as resolved.
Show resolved Hide resolved
- name: a string, required, the name of the resource
link: a URL, required, the link to the resource
```

The **manifest** file contains all the module's resources in a single, multi-document YAML file. These resources will be created in the Kyma cluster when the module is activated.
The **defaultCR** file contains a default custom resource for the module that is installed along with the module. It is additionally schema-validated against the Custom Resource Definition.
The CRD used for the validation must exist in the set of the module's resources.
The **resources** are copied to the ModuleTemplate spec.resources. If it does not have an entry named 'raw-manifest', then the ModuleTemplate spec.resources will populate this entry from the **manifest** field specified in the moduleconfig.
nesmabadr marked this conversation as resolved.
Show resolved Hide resolved

### Modules as OCI artifacts
Modules are built and distributed as OCI artifacts.
Expand Down
15 changes: 13 additions & 2 deletions docs/gen-docs/modulectl_create.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,21 +22,32 @@ The module config file is a YAML file used to configure the following attributes
- name: a string, required, the name of the module
- version: a string, required, the version of the module
- channel: a string, required, channel that should be used in the ModuleTemplate CR
- manifest: a string, required, reference to the manifest, must be a relative file name or URL
- manifest: a string, required, reference to the manifest, must be a URL

- defaultCR: a string, optional, reference to a YAML file containing the default CR for the module, must be a relative file name or URL
- defaultCR: a string, optional, reference to a YAML file containing the default CR for the module, must be a URL
- mandatory: a boolean, optional, default=false, indicates whether the module is mandatory to be installed on all clusters
- resourceName: a string, optional, default={NAME}-{CHANNEL}, the name for the ModuleTemplate CR that will be created
- internal: a boolean, optional, default=false, determines whether the ModuleTemplate CR should have the internal flag or not
- beta: a boolean, optional, default=false, determines whether the ModuleTemplate CR should have the beta flag or not
- security: a string, optional, name of the security scanners config file
- labels: a map with string keys and values, optional, additional labels for the generated ModuleTemplate CR
- annotations: a map with string keys and values, optional, additional annotations for the generated ModuleTemplate CR
- manager: # an object, optional, module resource that indicates the installation readiness of the module
name: a string, required, the name of the module resource
namespace: a string, optional, the namespace of the module resource
group: a string, required, the API group of the module resource
version: a string, required, the API version of the module resource
kind: a string, required, the API kind of the module resource
- associatedResources: a list of Group-Version-Kind(GVK), optional, resources that should be cleaned up with the module deletion
- resources: # a map wih string keys and values, optional, additional resources of the module that may be fetched
- name: a string, required, the name of the resource
link: a URL, required, the link to the resource
```

The **manifest** file contains all the module's resources in a single, multi-document YAML file. These resources will be created in the Kyma cluster when the module is activated.
The **defaultCR** file contains a default custom resource for the module that is installed along with the module. It is additionally schema-validated against the Custom Resource Definition.
The CRD used for the validation must exist in the set of the module's resources.
The **resources** are copied to the ModuleTemplate spec.resources. If it does not have an entry named 'raw-manifest', then the ModuleTemplate spec.resources will populate this entry from the **manifest** field specified in the moduleconfig.

### Modules as OCI artifacts
Modules are built and distributed as OCI artifacts.
Expand Down
Loading