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

Feature/kubernetes #120

Merged
merged 54 commits into from
Oct 21, 2022
Merged
Changes from 1 commit
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
63cfbf9
Copy the icon in the right place from within the container.
Apr 13, 2022
4042c3b
Add ability to return an error when creating a containerEngine.
Jun 23, 2022
558d9b9
Return a path that can be accessed by the container when finalizing.
Apr 13, 2022
44c34ca
Actually zip inside the container as we can't assume file to be local…
Apr 13, 2022
71a64bb
Properly target the container path and allow the shell to expand *
May 10, 2022
6fc9744
Add a name attached to the mounting point.
Apr 8, 2022
45bc3b0
Add logic to cleanly Close an image at the end of build even in case …
Apr 13, 2022
4d75b6a
Add s3 upload/download infrastructure.
Apr 4, 2022
396aa07
Add kubernetes helper to internal cloud utility.
Apr 8, 2022
d46daa4
Switch to use os instead of fs in an attempt to be compatible with go…
Apr 13, 2022
e872d7c
Execute command in the container and avoid guessing local is the same…
May 10, 2022
17efa4f
Add flags and context for Kubernete engine.
Apr 5, 2022
0c15ba0
Make Cmd a private function to docker/podman engine only.
Jun 23, 2022
0411db3
Add kubernetes support.
Apr 5, 2022
0fbb7f4
Disable local file system access when not uploading data.
Apr 13, 2022
dc134d6
Add ability to specify MacOS X SDK.
Jun 28, 2022
5aa8728
Merge branch 'develop' into feature/kubernetes
Jul 29, 2022
110e874
Correct function prototype after merge develop.
Jul 29, 2022
4c4fb34
Add randomness to pod name to allow more than one pod at a time in a …
Jul 29, 2022
9ea77c6
Only automatically use Kubernetes if the namespace is not empty or th…
Jul 29, 2022
d2ec236
Move to archiver v3 in hope on compiling with go 1.14
Aug 1, 2022
0019274
Downgrade compress to be to a time it supported go1.14.
Aug 2, 2022
2a78611
Use os.Fileinfo instead of fs.Fileinfo
Aug 2, 2022
8a1c8d7
Copy should be happening in a goroutine to not block the system.
Aug 2, 2022
e60d49f
Switch to older kubernetes module supporting go 1.14
Aug 2, 2022
70f1426
Add fyne-cross-s3 back.
Aug 2, 2022
5cf7e1b
Report error when the bucket is not specified.
Aug 3, 2022
43433f4
Correctly handle s3 <-> compress <-> tar pipe.
Aug 3, 2022
760ff44
Rename use of kubernetes api to follow more Fyne coding style.
Aug 3, 2022
edc943e
Try a slightly older version of kubernetes module that might use an o…
Aug 3, 2022
d167ef0
Try an older version of aws-sdk-go.
Aug 3, 2022
14d7e9c
Switch to older crypto.
Aug 3, 2022
414118b
Avoid running more than one fyne-cross per node.
Aug 18, 2022
6334a35
Properly shutdown the pod when fyne-cross is interrupted.
Aug 18, 2022
a1e79ec
Buffering os.Signal channel
Bluebugs Aug 19, 2022
2cc4a7b
Remove darwin from github action
Bluebugs Aug 20, 2022
d123abb
Move kubernetes use into the cloud module.
Sep 8, 2022
0f961df
Use build tag top enable Kubernetes support.
Sep 8, 2022
ce3e957
Use go sub module strategy to avoid download of kubernetes modules.
Sep 8, 2022
1052277
Add an action covering build of kubernetes engine.
Sep 8, 2022
941661d
Correct version after migrating to sub go.mod.
Sep 8, 2022
48486ee
Forgot to also update the kubernetes module to match older version.
Sep 8, 2022
03677c3
Need to apply go mod download and tidy to the upper go.mod
Sep 8, 2022
f03fe6a
Somehow go mod kept the wrong version of x/net
Sep 8, 2022
fee94f5
Reorder build step to match what other system do.
Sep 9, 2022
9cc7592
Correctly lookup for default icon value after using container command.
Sep 9, 2022
faefe7f
Use a temporary file when uploading directory.
Sep 10, 2022
b21ac68
Only store executable at the root of the zip file.
Sep 12, 2022
fa60341
Correctly Close encoder when uploading directory.
Oct 14, 2022
a7d3460
Use error group to propagate error back from Copy.
Oct 17, 2022
e6959ff
Move k8s flags to be visible only when building with k8s.
Oct 17, 2022
f974d2d
Make sure the flag used by kubernetes reference kubernetes in its doc…
Oct 18, 2022
372662a
Update go install command for older go.
Oct 19, 2022
8ecdf39
Add information on how to build with kubernetes engine.
Oct 20, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 18 additions & 3 deletions internal/cloud/s3.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,32 +113,43 @@ func (a *AWSSession) UploadCompressedDirectory(localDirectoy string, s3FilePath
extension := strings.ToLower(filepath.Ext(s3FilePath))

var compression archiver.Writer
var enc *zstd.Encoder
var wg sync.WaitGroup
var closer io.Closer

switch extension {
case ".xz":

compression = archiver.NewTarXz()
err := compression.Create(file)
if err != nil {
return err
}
case ".zstd":
inZstd, outTar := io.Pipe()
closer = outTar

compression = archiver.NewTar()
err := compression.Create(outTar)
if err != nil {
return err
}

enc, err = zstd.NewWriter(file)
enc, err := zstd.NewWriter(file)
if err != nil {
return err
}

wg.Add(1)

go func() {
io.Copy(enc, inZstd)
_, err := io.Copy(enc, inZstd)
if err != nil {
log.Println(err)
}

inZstd.Close()
enc.Close()
wg.Done()
}()
default:
return fmt.Errorf("unknown extension for %v", s3FilePath)
Expand Down Expand Up @@ -189,6 +200,10 @@ func (a *AWSSession) UploadCompressedDirectory(localDirectoy string, s3FilePath
}

compression.Close()
if closer != nil {
closer.Close()
}
wg.Wait()

uploader := s3manager.NewUploader(a.s)

Expand Down