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

cyctl: implement a create method for Modules #290

Closed
siddhantprateek opened this issue May 22, 2024 · 7 comments · Fixed by #362
Closed

cyctl: implement a create method for Modules #290

siddhantprateek opened this issue May 22, 2024 · 7 comments · Fixed by #362
Labels
cyctl Issues related to the CLI go Pull requests that update Go code good first issue Good for newcomers

Comments

@siddhantprateek
Copy link
Contributor

siddhantprateek commented May 22, 2024

Is your feature request related to a problem? Please describe.
We need to implement a create method for Modules, TemplateStore, TemplateAuthRules custom resource. The command structure should be:

cyctl create module <module-name> 

required flags:
Need to be discussed...

Would you like to work on this issue?
Yes

@siddhantprateek
Copy link
Contributor Author

@petar-cvit, I've implemented a command for creating TemplateStore custom resources:

cyctl create template NAME --repo='https://github.com/cyclops-ui/templates' --path='/path' --version='main'

I’m considering adding namespace flags as well.

Currently, the --version flag defaults to main.

What are your thoughts on this?

@petar-cvit
Copy link
Collaborator

Nice! The version flag does not need to default to anything. There is already logic for defaulting when the version is not specified in the controller, so a template without a version is completely valid.

Can you split this issue into multiple smaller ones since Module creation could be a bigger chunk of work then the creation TemplateStore CR? You can open a new issue for the creation of templates and I can assign you to it

@siddhantprateek siddhantprateek changed the title cyctl: implement a create method for Modules / TemplateStore / TemplateAuthRules cyctl: implement a create method for Modules May 25, 2024
@siddhantprateek
Copy link
Contributor Author

I was wondering if we could have a command like,

cyctl create module NAME -f values.yaml

since the values are not consistent.

@petar-cvit
Copy link
Collaborator

you are thinking about values.yaml containing only the values or the whole Module? If its just the values, you need to add flags for template reference

@siddhantprateek
Copy link
Contributor Author

the values.yaml will contain this

  values:
    general:
      environment:
        ENVIRONMENT: production
      image: nginx
      version: 1.14.2
    name: nginx-app
    networking:
      expose: true
      port: 8080
    scaling:
      replicas: 2
      resources:
        cpu: 0.1
        memory: 0.01

and the complete command would look something like this

cyctl create module NAME -f values.yaml \ 
--repo 'github.com/github/demo' \
--path '/path/to/charts' \
--version 'main'

@petar-cvit
Copy link
Collaborator

petar-cvit commented Jun 16, 2024

Hey @siddhantprateek, sorry for the delay, I forgot to respond. Yeah, this looks good, except that I would leave out values from the file, but all the other parts look good!

@petar-cvit petar-cvit added go Pull requests that update Go code cyctl Issues related to the CLI good first issue Good for newcomers labels Jun 16, 2024
@siddhantprateek
Copy link
Contributor Author

Hey @siddhantprateek, sorry for the delay, I forgot to respond. Yeah, this looks good, except that I would leave out values from the file, but all the other parts look good!

No issues, i was working on cerbos authorization part until that, i'll update the suggested changes for this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cyctl Issues related to the CLI go Pull requests that update Go code good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants