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
Show file tree
Hide file tree
Changes from all commits
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
29 changes: 26 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,28 @@ jobs:

# Run tests
- run: go test -v -cover -race ./...

k8s:
name: "Verify k8s build"
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
# use max/min supported Go versions
go-version: ["1.18.x"]

steps:
- name: Setup Go environment
id: setup-go
uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go-version }}

# Checks-out the repository under $GITHUB_WORKSPACE
- uses: actions/checkout@v2

# Run tests
- run: go build -tags k8s

build:
name: "Build Calculator (${{ matrix.target.os }}, ${{ matrix.go-version }})"
Expand All @@ -66,9 +88,10 @@ jobs:
- os: freebsd
- os: android
args: -app-id calc.${GITHUB_SHA}
- os: darwin
args: -app-id calc.${GITHUB_SHA}
host: macos-latest
## Not shared darwin image is available at the moment
# - os: darwin
# args: -app-id calc.${GITHUB_SHA}
# host: macos-latest
- os: web

## Currently not easily supported from GitHub actions.
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/fyne-cross
/internal/cmd/fyne-cross-s3/fyne-cross-s3
/*.dmg
/*.xip
9 changes: 8 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,14 @@ Supported targets are:

For go >= 1.16:
```
go install github.com/fyne-io/fyne-cross@latest
git clone https://github.com/fyne-io/fyne-cross.git
cd fyne-cross && go install
```

To install a fyne-cross with kubernetes engine:
```
git clone https://github.com/fyne-io/fyne-cross.git
cd fyne-cross && go install -tags k8s
```

For older go:
Expand Down
7 changes: 7 additions & 0 deletions docker/base/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,18 @@ ARG FYNE_VERSION
# Install the fyne CLI tool
RUN go install -ldflags="-w -s" -v "fyne.io/fyne/v2/cmd/fyne@${FYNE_VERSION}"

WORKDIR /src

COPY / .
WORKDIR /src/internal/cmd/fyne-cross-s3
RUN go build && go install

# Build the fyne-cross base image
FROM golang:${GO_VERSION}-buster AS base
ARG FIXUID_VERSION

COPY --from=tools /go/bin/fyne /usr/local/bin
COPY --from=tools /go/bin/fyne-cross-s3 /usr/local/bin

RUN apt-get update -qq \
&& apt-get install -y -q --no-install-recommends \
Expand Down
1 change: 1 addition & 0 deletions docker/windows/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ RUN apt-get update \
&& apt-get install -y -q --no-install-recommends \
gcc-mingw-w64 \
parallel \
zip \
&& apt-get -qy autoremove \
&& apt-get clean \
&& rm -r /var/lib/apt/lists/*;
12 changes: 10 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,16 @@ module github.com/fyne-io/fyne-cross
go 1.14

require (
github.com/BurntSushi/toml v1.0.0
github.com/BurntSushi/toml v1.1.0
github.com/Kodeworks/golang-image-ico v0.0.0-20141118225523-73f0f4cfade9
github.com/andybalholm/brotli v1.0.4 // indirect
github.com/fyne-io/fyne-cross/internal/cloud v0.0.0
github.com/golang/snappy v0.0.4 // indirect
github.com/pierrec/lz4/v4 v4.1.14 // indirect
github.com/stretchr/testify v1.7.0
golang.org/x/sys v0.0.0-20220227234510-4e6760a101f9
github.com/ulikunitz/xz v0.5.10 // indirect
github.com/urfave/cli/v2 v2.11.1
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f
)

replace github.com/fyne-io/fyne-cross/internal/cloud v0.0.0 => ./internal/cloud
674 changes: 667 additions & 7 deletions go.sum

Large diffs are not rendered by default.

56 changes: 56 additions & 0 deletions internal/cloud/go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
module fyne.io/fyne-cross/internal/cloud

go 1.18

require (
github.com/aws/aws-sdk-go v1.41.19
github.com/klauspost/compress v1.13.4
github.com/mholt/archiver/v3 v3.5.1
golang.org/x/sync v0.1.0
k8s.io/api v0.18.19
k8s.io/apimachinery v0.18.19
k8s.io/client-go v0.18.17
k8s.io/kubectl v0.18.17
)

require (
github.com/andybalholm/brotli v1.0.1 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/docker/spdystream v0.0.0-20160310174837-449fdfce4d96 // indirect
github.com/dsnet/compress v0.0.2-0.20210315054119-f66993602bf5 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/golang/snappy v0.0.3 // indirect
github.com/google/gofuzz v1.1.0 // indirect
github.com/googleapis/gnostic v0.1.0 // indirect
github.com/imdario/mergo v0.3.6 // indirect
github.com/jmespath/go-jmespath v0.4.0 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/klauspost/pgzip v1.2.5 // indirect
github.com/kr/text v0.2.0 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e // indirect
github.com/nwaples/rardecode v1.1.0 // indirect
github.com/pierrec/lz4/v4 v4.1.2 // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/stretchr/testify v1.6.1 // indirect
github.com/ulikunitz/xz v0.5.9 // indirect
github.com/xi2/xz v0.0.0-20171230120015-48954b6210f8 // indirect
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9 // indirect
golang.org/x/net v0.0.0-20210614182718-04defd469f4e // indirect
golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8 // indirect
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f // indirect
golang.org/x/text v0.3.7 // indirect
golang.org/x/time v0.0.0-20220210224613-90d013bbcef8 // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/protobuf v1.28.0 // indirect
gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
k8s.io/klog v1.0.0 // indirect
k8s.io/utils v0.0.0-20220728103510-ee6ede2d64ed // indirect
sigs.k8s.io/structured-merge-diff/v3 v3.0.1 // indirect
sigs.k8s.io/yaml v1.2.0 // indirect
)
Loading