-
Notifications
You must be signed in to change notification settings - Fork 21
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 hybrid mode content #450
Changes from all commits
4bae84e
7e5dd13
d45fc31
d6644af
e1b7af4
fddf73c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -509,6 +509,31 @@ metadata: | |
custom.label/dev: "true" | ||
``` | ||
|
||
#### mode (string, optional) | ||
|
||
Defines how `okteto up` will setup the development container and behave within the cluster. | ||
|
||
Currently two options are available: | ||
|
||
- `sync`: (default) Sync & run your code in a remote development container. | ||
- `hybrid`: Run your code on your local computer instead of in a remote development container, while rest of your service components runs in your remote cluster. | ||
|
||
| | `sync` (default) | `hybrid` | | ||
| :---------------- | :--------------- | :------- | | ||
| Source code | Source code is edited locally and synchronizes bidirectionally (via Syncthing) with a copy of the source code in the remote development container. | Source code is edited locally for a chosen set of microservices. | | ||
| App location | The application exists entirely within the remote development container. | Your application is split between your local environment and the remote development container based on your configuration. | | ||
| `command` context | CLI commands run in the remote development container. | CLI commands run on your local machine, so traffic need to be rerouted to/from the cluster, e.g. using the reverse option | | ||
|
||
```yaml | ||
dev: | ||
frontend: | ||
mode: hybrid | ||
reverse: | ||
- 3000:8080 | ||
workdir: ./frontend | ||
command: ["npx webpack watch --mode development"] | ||
``` | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. With the new Example:
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @rlamana Ah yes. I think that's a good and important clarification to add. Are those the only two exceptions or do we need to compile a complete list? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No, we have to take into account all of them. The list is compiled in the spec doc here: https://www.notion.so/okteto/Okteto-CLI-3-0-7fbd3a6a566145d3a4930d3c15fc642d?pvs=4#37aeeb1c05824203ac5f8132caf76e1f And also the work done here: okteto/okteto#3808 @andreafalzetti @teresaromero you might have more context if that table there is updated after the work done there or is there anything we need to change? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @omnomagonz @rlamana the following might require a bit of polishing but should include almost everything: These are the fields that are supported in
These fields work in both modes:
These fields work in
This field exists in code but not documented and not sure if it should be supported:
Should work in both but deprecated:
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks a lot @andreafalzetti for the updated list. We will need to clarify those that we are not sure:
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Resolving this conversation; please see latest commit: d45fc31 and add additional comments :) I left out some of the nuanced details like "deprecated but works in both" and "exists in code but not documented". We can iterate to add more clarity on these but I didn't want to get blocked on nuance for now There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @omnomagonz "not sure if they make sense for hybrid" meant that we are still deciding if the will fall under the "ignored/unsupported" fields or if we will implement it in both modes. But there will be a final resolution for all those so that the final list will only have "supported or not supported" for each mode. @andreafalzetti what is the current status of those fields? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In my opinion, besides adding a table I will still add a "hint" on every single parameter. It is common to just go and check a parameter in the docs to learn about it. If the user doesn't have that info there (and assuming they are aware of these two modes and know there is a table for it), users will have to go to look for the table and see if the parameter is there, and then maybe go back to the parameter description to continue reading about it. I find the table less important since you usually go seeking for documentation on a particular item. It is pretty common to see this type of support descriptions in docs of this kind. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @rlamana for these two work:
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @andreafalzetti So after our daily today, I think |
||
#### nodeSelector (map[string]string, optional) | ||
|
||
List of labels that the node must have to include the development container on it. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we have the same table in
cloud/okteto-cli
. Should we link that table here instead of repeating it?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My vote would be to repeat it because I think it's important in both sections and is succinct.
If the content was more verbose then I'd say link to it, but since this is fairly concise I think it's worth saving the user a trip to another doc page so they can stay in the same context.
Happy to hear contrary opinion though 😄