Aleksandr Melnikov
a28b5101fd
Renaming import alias per feedback.
2020-09-17 14:53:09 -07:00
Aleksandr Melnikov
49e19eb135
Merge branch 'master' into feat/core.581-pod.anti.affinity.to.schedule
2020-09-17 09:21:04 -07:00
Aleksandr Melnikov
3343f2f74b
Changing the affinity label key per feedback.
2020-09-16 17:26:00 -07:00
Aleksandr Melnikov
837291a52a
Implementing pod antiAffinity, so that a node will have only one
...
workspace scheduled on it.
2020-09-16 17:23:50 -07:00
Aleksandr Melnikov
0b6a6e0af3
Fixing the search location of the nodeSelector.
2020-09-15 16:57:50 -07:00
Aleksandr Melnikov
ba3c2e22a9
Adding support for amd gpus.
2020-09-15 16:57:35 -07:00
Aleksandr Melnikov
2093b565eb
Adding code to pull the capacity that can be allocated for the selected
...
node.
We then request 90% of this capacity, so the node schedules properly.
Gotcha: Note that this requires the node to be already running.
If there are no nodes running and have to be scaled up, our code
cannot get the capacity information for that node at this time.
2020-09-15 12:54:13 -07:00
Andrey Melnikov
8f12351761
clean: removed debugging comment
2020-09-11 13:11:19 -07:00
Aleksandr Melnikov
a84d74d256
Fixing the constant used for injecting the extra container.
2020-09-10 22:50:37 -07:00
Aleksandr Melnikov
a78138c562
Adding nvidia resource example.
...
- Note that the request and limit are both necessary.
2020-09-10 15:53:28 -07:00
Aleksandr Melnikov
6167d5ef65
Using a constant instead of a hard-coded string.
2020-09-10 15:53:05 -07:00
Aleksandr Melnikov
ed54cb9a3f
Adding proof of concept resource request to Workspace template.
...
- An extra container is added to a given workspace.
This container has the resource requests assigned to it.
Note that the container sleeps forever in a while-loop, so
that the workspace notes it's ready.
- If the container does not sleep, it goes into a crash loop of restarting.
The container exits successfully, and gets restarted.
2020-09-10 13:48:31 -07:00
Andrey Melnikov
fc7ef5ffac
feat: added retry last action support for workspaces and new failure states
2020-09-10 12:30:18 -07:00
Andrey Melnikov
90ce50a9ac
fix: issue where creating a workspace with no template caused a panic
2020-08-13 14:51:38 -07:00
Andrey Melnikov
8586639a6c
update: cron workflows to use new labels
2020-08-09 16:15:05 -07:00
Andrey Melnikov
55eeb90e2a
update: workspace labels during creation, listing, and getting to use new method
2020-08-09 13:57:33 -07:00
Andrey Melnikov
640c7b54f5
test: fixed issue where Updating the workspace status did not correctly detect a not-found condition and added tests for it.
2020-07-02 16:22:23 -07:00
Andrey Melnikov
655020b54b
clean: removed unnecessary generation of uid in "injectWorkspaceSystemParameters" function.
...
Updated time tests to compare against time.Time{} because nanosecond difference comparison doesn't always work.
2020-07-02 15:46:46 -07:00
Andrey Melnikov
5117c8b34e
tests: separated out logic to convert workspace status to a field map and added tests for it
2020-07-02 15:41:54 -07:00
Andrey Melnikov
045912fe5c
tests: added more tests surround workspace templates and workspaces
2020-07-02 13:21:11 -07:00
Andrey Melnikov
d7db598cc6
clean: removed unused methods
2020-07-02 12:19:15 -07:00
Andrey Melnikov
ed621633df
update: updated tests to have method calls for particular cases. Added more tests.
2020-07-01 16:07:20 -07:00
Andrey Melnikov
3d5dcb632a
docs: for various types and some variable name updates per go conventions
2020-06-22 13:43:17 -07:00
Andrey Melnikov
8cf8436afc
fix: issue where archiving workspace template was breaking because it attempted to do so for every version, but there was no logical difference since it used the template
2020-06-22 12:11:55 -07:00
rushtehrani
817ec61bdf
fix workspace termination
2020-06-21 13:27:12 -07:00
rushtehrani
c56a1c0e96
inject runtime params into Argo workflow as well
2020-06-21 11:08:45 -07:00
rushtehrani
441722a8ba
runtime params with only arguments.parameters changes
2020-06-21 01:03:41 -07:00
Andrey Melnikov
9f5b12da69
update: moved sqlutil to util/sql
2020-06-20 13:18:52 -07:00
Andrey Melnikov
017c3ca899
update: CreateWorkflowExecution now takes in a WorkflowTemplate so it can be more easily configured. Workspaces do this by injecting runtime variables.
2020-06-20 13:18:52 -07:00
Andrey Melnikov
d209423100
clean:
...
* updated method names to fit go conventions of uppercase. Db -> DB
* updated some method calls to use updated column select functions to remove extraneous empty string
* updated methods to use new label function that does nothing if no labels are passed in, this simplifies the code.
* updated some methods to use new Selectx function, reducing code in caller.
2020-06-20 13:18:52 -07:00
Andrey Melnikov
49c1c6a0cd
fix: issue where getting workspace did not have the runtime parameters
2020-06-18 15:23:25 -07:00
Andrey Melnikov
8684e44632
update: added logic to inject runtime variables in Workspace templates
2020-06-18 12:40:08 -07:00
Andrey Melnikov
8c8d4e237a
fix: removed db reference to workspace url
2020-06-18 12:36:20 -07:00
Andrey Melnikov
0e2eb1580e
fix: removed reference to workspace.url
2020-06-18 12:36:20 -07:00
Aleksandr Melnikov
7c72a36e8b
Fixing parameter to fix convention.
2020-06-04 09:12:16 -07:00
Aleksandr Melnikov
8d4989d2db
Commenting more functions per codacy.
2020-06-04 09:08:37 -07:00
Aleksandr Melnikov
2de59c22cf
Fixing "Id" in function name.
2020-06-04 09:05:13 -07:00
Aleksandr Melnikov
8b26a84162
Updated ArchiveWorkspaceTemplate.
...
- Fixed various error message responses
- Added code to grab the WorkspaceTemplate versions
Then, code will run through these versions and grab workspaces that use
that version.
Then, code will try to Archive those workspaces (delete k8s resources,
archive database entries).
Finally, code cleans up the related WorkflowTemplate.
- Updated method docs
2020-06-03 12:46:33 -07:00
Aleksandr Melnikov
05ad9ca2cc
Added code to handle a case where there are no workspaces returned.
...
- This is if there are no workspaces in the database.
2020-06-02 17:06:15 -07:00
Aleksandr Melnikov
35aef3819f
Changing migrations to use ArchiveWorkspaceTemplate.
...
Ref: https://github.com/onepanelio/core/pull/286#discussion_r432901056
2020-06-01 10:59:47 -07:00
Andrey Melnikov
29e1550446
fix: added labels to list workspace method
2020-05-27 22:44:39 -07:00
rushtehrani
06ada8ff95
use uid in host
2020-05-22 19:38:58 -07:00
Andrey Melnikov
0eaa2b5ea2
fix: added is_archived = false to getting a workspace template, otherwise we get non-archived versions and a crash.
2020-05-22 16:44:47 -07:00
Andrey Melnikov
756010958d
fix: GetWorkflowExecution now gets the same columns as List.
...
Also minor cleanup with method calls.
2020-05-18 12:47:04 -07:00
Andrey Melnikov
21099b7627
update: Added template parameters to a workspace.
...
This is so we can get the options from a workflow template version, since the parameters for a workspace do not store options.
2020-05-14 16:45:48 -07:00
Andrey Melnikov
b5e5cbf2c6
fix: workspace count did not exclude terminated workspaces.
2020-05-13 12:38:52 -07:00
rushtehrani
23a70de39b
exclude terminated workspaces from list
2020-05-12 19:54:51 -07:00
rushtehrani
dac2029969
update workspace params
2020-05-12 19:41:32 -07:00
rushtehrani
356459a011
started => launching
2020-05-12 18:17:37 -07:00
rushtehrani
7ef68ade48
workspace update
2020-05-12 16:04:35 -07:00