-
Notifications
You must be signed in to change notification settings - Fork 350
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
Add an .devspacerc file #1068
Comments
@blairham thanks for opening this issue! In general I like the idea, however I'm not sure how the .devspacerc should look like, did you try the
With the next devspace version, you are then also able to use variables for commands, which could be a good alternative as well. |
I think we could address this using defaultFlags for CLI commands that users can specify in devspace.yaml as suggested here: #977 |
@FabianKramm yes, I have to switch both context and namespace each time or provide them on the CLI every time. So when I'm working on project A I would have to change, then I have to do something on project B I would again switch, then going back to project A, I would have to switch back yet again so on and so on. I think either one of the solutions would be equivalent and would make it easier. However, one thing to keep in mind is there typically get checked in so how would we identify a user's space if they are all different? |
@blairham |
I think that might actually do what I'm thinking, yes. |
@blairham this should now be possible with the latest release. Create a file DEVSPACE_FLAGS=-s More info here: https://devspace.sh/cli/docs/configuration/env-file |
I afraid it's not working as intended: in project 1: in project 2: back to project 1: |
it looks like I need to update the cli, which I had installed with brew. let me update that and retry |
Yes, you will need the latest stable version v4.12 for this to work. |
I'm seeing this error: |
@blairham seems like the -s is working. The error you see below appears because devspace tries to create a namespace. Do you have any namespaces hard-coded inside your devspace.yaml? |
I don't, if I remove the env var, and run it with
(deleted env var)
|
Can you run |
|
@blairham thanks for the information, I found the issue: the problem is that the |
Looks like this is working as intended now. Thank you. |
Is your feature request related to a problem?
No
Which solution do you suggest?
adding a .devspacerc file where you can put in things like namespace or context so you don't have to type it out on the CLI every time
Which alternative solutions exist?
the global flag --namespace and the --switch-context
Additional context
This would be very useful when working in multiple contexts at the same time and not have to constantly type this switches out.
/kind feature
The text was updated successfully, but these errors were encountered: