1620 Commits

Author SHA1 Message Date
Eric Promislow
1f8b720203 Remove the imageProcessor.install and .isInstallValid methods
kim needed to be installed, but nerdctl (and future processors) won't

Signed-off-by: Eric Promislow <epromislow@suse.com>
2021-10-06 12:35:00 -07:00
Eric Promislow
587dfbd5d3 Use json output for nerdctl images output
Signed-off-by: Eric Promislow <epromislow@suse.com>
2021-10-06 12:35:00 -07:00
Eric Promislow
365215bf06 Ensure that the namespace list is displayed in the UI at start
- make the default namespace `k8s.io` so images show up on first run
- include a namespace called 'default' because that's the default namespace on the command-line
- remove the `supportsNamespace` and `imageProvider` fields from the UI,
  because there's only one image provider, and it supports namespaces
- ignore `nerdctl images` error messages complaining about inability to calculate a size. If
  the image with the incalculable size is an unnamed SHA256:X image, it won't be displayed.
  Otherwise, the size will appear as a blank field.

Signed-off-by: Eric Promislow <epromislow@suse.com>
2021-10-06 12:35:00 -07:00
Eric Promislow
b403e5c6af Remove the Kim ImageProcessor
Signed-off-by: Eric Promislow <epromislow@suse.com>
2021-10-06 12:35:00 -07:00
Eric Promislow
d234762c1b Rename main/kim.ts to main/imageEvents.ts
Signed-off-by: Eric Promislow <epromislow@suse.com>
2021-10-06 12:35:00 -07:00
Eric Promislow
7d2571a259 fix typo
Signed-off-by: Eric Promislow <epromislow@suse.com>
2021-10-06 12:34:59 -07:00
Eric Promislow
1647354ec2 Fix incorrect comment - this is Kim the binary
Signed-off-by: Eric Promislow <epromislow@suse.com>
2021-10-06 12:34:59 -07:00
Eric Promislow
0c53cfe9f7 Support the show-all-images checkbox for the k8s.io namespace
Signed-off-by: Eric Promislow <epromislow@suse.com>
2021-10-06 12:34:59 -07:00
Eric Promislow
21801740fd Add a nerdctl-based front-end with choice of namespace
- The namespace is stored in prefs: .images.namespace
- Currently it's hardwired to using nerdctl, but all the kim code is there.

Signed-off-by: Eric Promislow <epromislow@suse.com>
2021-10-06 12:34:57 -07:00
Eric Promislow
f5dd8ec9b8 Switch to the nerdctl image processor.
Currently hardwired to the default namespace.

Signed-off-by: Eric Promislow <epromislow@suse.com>
2021-10-06 12:34:19 -07:00
Eric Promislow
4d3eafef11 Replace the interface with an abstract base class.
I didn't find a suitable place for the event definitions though.

Signed-off-by: Eric Promislow <epromislow@suse.com>
2021-10-06 12:34:19 -07:00
Eric Promislow
e1e3441335 Factory-ize choice of image processor. Still hardwired to kim
Signed-off-by: Eric Promislow <epromislow@suse.com>
2021-10-06 12:34:19 -07:00
Eric Promislow
a5ac83b952 Rename the Nerdctl image processor class
Signed-off-by: Eric Promislow <epromislow@suse.com>
2021-10-06 12:34:19 -07:00
Eric Promislow
a51464cfc1 more generalization from 'kim' to 'image'
Signed-off-by: Eric Promislow <epromislow@suse.com>
2021-10-06 12:34:19 -07:00
Eric Promislow
2ed24299bc Refactor ks8-engine/kim into a replaceable module
Signed-off-by: Eric Promislow <epromislow@suse.com>
2021-10-06 12:34:16 -07:00
Matt Farina
8d847923a2 Merge pull request #706 from mook-as/wsl-error-logging
WSL: More consistently log when child processes fail.
2021-10-06 15:10:01 -04:00
Mark Yen
aead717374 Address review comments.
https://github.com/rancher-sandbox/rancher-desktop/pull/706#discussion_r722582869
https://github.com/rancher-sandbox/rancher-desktop/pull/706#discussion_r722600499

Signed-off-by: Mark Yen <mark.yen@suse.com>
2021-10-06 09:36:38 -07:00
Mark Yen
7884f7764f WSL: Don't mount data volume repeatedly.
Signed-off-by: Mark Yen <mark.yen@suse.com>
2021-10-06 09:36:38 -07:00
Mark Yen
ebd1f49070 ChildProcess: allow stdio to be a Log.
This makes it easier to do the typical thing (long output to file, ignore
all input).

Signed-off-by: Mark Yen <mark.yen@suse.com>
2021-10-06 09:36:32 -07:00
Mark Yen
c2bb1fb48c Logging: Make log consumers use Log as Console.
Log now implements an API that is similar to Console, so we can use it
directly instead of constructing a new Console instance each time.

Signed-off-by: Mark Yen <mark.yen@suse.com>
2021-10-06 09:33:11 -07:00
Mark Yen
1b42fd9ced Logging: change API.
It turns out that we actually only ended up using a subset of the logging
API:
- Get the stream, make a Console out of it.
- Get the stream, use it for child_process (a lot).
- Get the stream, use it for a sync exec (for migration)

We can make the code a lot cleaner if we satisfy just those cases instead;
in partcular, we can remove support for:
- Calling the module as a function - this was never used.
- Calling the log as a function - we always used console.log instead.

Note that, even though we make the Log class implement a Console-like
API, we can't have it extend Console directly; in the render process,
Nuxt defaults to compiling things down to JS without class support,
which is incompatible with extending native classes (like Console).

Signed-off-by: Mark Yen <mark.yen@suse.com>
2021-10-06 09:33:10 -07:00
Mark Yen
5bd9b2a01e utils/childProcess: Allow streams to be Log
This makes it easier on consumers.

Signed-off-by: Mark Yen <mark.yen@suse.com>
2021-10-06 09:33:10 -07:00
Mark Yen
07a2e7d45c WSL: More consistently log when chlid processes fail.
Signed-off-by: Mark Yen <mark.yen@suse.com>
2021-10-06 09:33:09 -07:00
Matt Farina
0b6d176b53 Merge pull request #730 from rancher-sandbox/bump-lima-and-qemu
Move to latest lima-and-qemu package and latest Alpine iso
2021-10-06 12:27:58 -04:00
Matt Farina
756e6fb8b4 Merge pull request #606 from davidcassany/rancher_desktop_for_linux
Adding linux support for Rancher Desktop
2021-10-06 11:27:16 -04:00
Phillip Rak
f6e7e87065 Merge pull request #734 from rak-phillip/bugfix/729-scrolling
Resolve issue with overflow when expanding Reset Kubernetes button
2021-10-06 08:08:38 -07:00
David Cassany
6086825851 Do not show Integrations on Linux
Signed-off-by: David Cassany <dcassany@suse.com>
2021-10-06 13:57:07 +02:00
David Cassany Viladomat
641ea3d82b Apply suggestions from code review
Co-authored-by: Mark Yen <3977982+mook-as@users.noreply.github.com>
Signed-off-by: David Cassany <dcassany@suse.com>
2021-10-06 13:55:48 +02:00
David Cassany
9603007223 Ensure availMemoryInGB is as an integer
Signed-off-by: David Cassany <dcassany@suse.com>
2021-10-06 13:55:48 +02:00
David Cassany
f13976e8bd Fix system tray on KDE
Signed-off-by: David Cassany <dcassany@suse.com>
2021-10-06 13:55:48 +02:00
David Cassany
2811dff565 Close app on window close on Linux
Signed-off-by: David Cassany <dcassany@suse.com>
2021-10-06 13:55:48 +02:00
David Cassany
8116e0131f Do not call process.kill(0) on exit
Signed-off-by: David Cassany <dcassany@suse.com>
2021-10-06 13:55:47 +02:00
David Cassany
eb8cb2e552 Make use of nerdctl under linux
Signed-off-by: David Cassany <dcassany@suse.com>
2021-10-06 13:55:47 +02:00
David Cassany
68697abf14 Adding icons, desktop file and appdata xml
This commit adds the desktop files that flatpak expects for a proper
desktop integration according to the FreeDesktop specs.

Signed-off-by: David Cassany <dcassany@suse.com>
2021-10-06 13:55:47 +02:00
David Cassany
cf0150272e Add linux certificates management
Signed-off-by: David Cassany <dcassany@suse.com>
2021-10-06 13:55:47 +02:00
David Cassany
374f15e9f5 Do not create a tarball if no certs are fetched
Signed-off-by: David Cassany <dcassany@suse.com>
2021-10-06 13:55:47 +02:00
David Cassany
3e7be298c4 Adding linux support for Rancher Desktop
Rancher Desktop support for linux is currently based on flatpak.

Signed-off-by: David Cassany <dcassany@suse.com>
2021-10-06 13:55:41 +02:00
Phillip Rak
bccd86aacd Scroll the main tag
Signed-off-by: Phillip Rak <rak.phillip@gmail.com>
2021-10-06 09:42:47 +02:00
Jan Dubois
d7c973715b Move to latest lima-and-qemu package and latest Alpine iso
Always copy newer files from /etc and /var/lib to the data volume,
even when /etc/os-release is unchanged: some files get modified by
the boot script before the data volume is mounted (e.g. /etc/environment),
and those changes need to be copied over every time.

Lima adds hostagent based DNS resolver and automatically sets proxy
environment variables.

ISO adds support for /etc/environment in ssh sessions, and network
access in provisioning scripts.

Update nerdctl to 0.12.1.

Add BUILD_ID and VARIANT_ID to /etc/os-version.

Signed-off-by: Jan Dubois <jan.dubois@suse.com>
2021-10-05 23:47:37 -07:00
Phillip Rak
def2a71d31 Remove extra margin from title
Signed-off-by: Phillip Rak <rak.phillip@gmail.com>
2021-10-05 16:05:02 -07:00
Matt Farina
07aeb0994f Merge pull request #732 from rak-phillip/bugfix/731-images-scrolling
Resolve regression with scrolling for images page
2021-10-05 18:05:09 -04:00
Matt Farina
1b5642f820 Merge pull request #727 from mattfarina/bump-0.6
Incrementing to 0.6 and marking as beta
2021-10-05 17:46:41 -04:00
Phillip Rak
10aab37354 Remove overflow from notifications
Signed-off-by: Phillip Rak <rak.phillip@gmail.com>
2021-10-05 14:27:34 -07:00
Phillip Rak
55deded266 Fill remaining height of container
Signed-off-by: Phillip Rak <rak.phillip@gmail.com>
2021-10-05 14:20:14 -07:00
Phillip Rak
1abee3faa8 Scroll the main tag
Signed-off-by: Phillip Rak <rak.phillip@gmail.com>
2021-10-05 14:06:43 -07:00
Matt Farina
b9918f6360 Incrementing to 0.6 and marking as beta
Signed-off-by: Matt Farina <matt.farina@suse.com>
2021-10-05 14:21:31 -04:00
Matt Farina
5ed9d7b6ad Merge pull request #724 from mook-as/lima-reset-no-image
Lima: limit reset to deleting data.
2021-10-05 12:29:57 -04:00
Matt Farina
c62ca3a7bc Merge pull request #718 from rak-phillip/feature/686-supporting-utilites
Separate integrations from images
2021-10-05 12:10:16 -04:00
Matt Farina
ecc7d54702 Merge pull request #725 from rak-phillip/feature/resetting-kubernetes-message
Add some space between Reset Kubernetes button and label
2021-10-05 10:23:09 -04:00
Eric Promislow
648034bffa Merge pull request #723 from rancher-sandbox/705-rebuild-missing-kubeconfig
Allow for a missing <$HOME>/config file
2021-10-04 17:17:50 -07:00