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

Implement the modulectl create module logic #28

Closed
7 tasks
c-pius opened this issue May 23, 2024 · 2 comments · Fixed by #49
Closed
7 tasks

Implement the modulectl create module logic #28

c-pius opened this issue May 23, 2024 · 2 comments · Fixed by #49
Assignees

Comments

@c-pius
Copy link
Contributor

c-pius commented May 23, 2024

Description

Implement the service for creating modules. This should provide the same functionality as in CLI, but the implementation should be clean and follow high code quality standards.

Flags

--module-config-file string          Specifies the module configuration file
-c, --credentials string                 Basic authentication credentials for the given registry in the user:password format
--git-remote string                  Specifies the remote name of the wanted GitHub repository. For Example "origin" or "upstream" (default "origin")
--insecure                           Uses an insecure connection to access the registry.
-o, --output string                      File to write the module template if the module is uploaded to a registry. (default "template.yaml")
--registry string                    Context URL of the repository. The repository URL will be automatically added to the repository contexts in the module descriptor.
--registry-cred-selector string      Label selector to identify an externally created Secret of type "kubernetes.io/dockerconfigjson". It allows the image to be accessed in private image registries. It can be used when you push your module to a registry with authenticated access. For example, "label1=value1,label2=value2".
--sec-scanners-config string         Path to the file holding the security scan configuration. (default "sec-scanners-config.yaml")

module configuration file

type Config struct {
	Name              string                     `yaml:"name" comment:"required, the name of the Module"`
	Version           string                     `yaml:"version" comment:"required, the version of the Module"`
	Channel           string                     `yaml:"channel" comment:"required, channel that should be used in the ModuleTemplate"`
	ManifestPath      string                     `yaml:"manifest" comment:"required, relative path or remote URL to the manifests"`
	Mandatory         bool                       `yaml:"mandatory" comment:"optional, default=false, indicates whether the module is mandatory to be installed on all clusters"`
	DefaultCRPath     string                     `yaml:"defaultCR" comment:"optional, relative path or remote URL to a YAML file containing the default CR for the module"`
	ResourceName      string                     `yaml:"resourceName" comment:"optional, default={name}-{channel}, when channel is 'none', the default is {name}-{version}, the name for the ModuleTemplate that will be created"`
	Namespace         string                     `yaml:"namespace" comment:"optional, default=kcp-system, the namespace where the ModuleTemplate will be deployed"`
	Security          string                     `yaml:"security" comment:"optional, name of the security scanners config file"`
	Internal          bool                       `yaml:"internal" comment:"optional, default=false, determines whether the ModuleTemplate should have the internal flag or not"`
	Beta              bool                       `yaml:"beta" comment:"optional, default=false, determines whether the ModuleTemplate should have the beta flag or not"`
	Labels            map[string]string          `yaml:"labels" comment:"optional, additional labels for the ModuleTemplate"`
	Annotations       map[string]string          `yaml:"annotations" comment:"optional, additional annotations for the ModuleTemplate"`
}

Acceptance Criteria

Copy link

This issue has been automatically marked as stale due to the lack of recent activity. It will soon be closed if no further activity occurs.
Thank you for your contributions.

Copy link

This issue has been automatically closed due to the lack of recent activity.
/lifecycle rotten

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants