Skip to content

Commit

Permalink
Merge pull request #147 from kaweezle/feature/add-buildkit
Browse files Browse the repository at this point in the history
✨ Start buildkit as part of the process
  • Loading branch information
antoinemartin authored Jun 13, 2024
2 parents 553ab1f + ecb2fe8 commit 59903ff
Show file tree
Hide file tree
Showing 8 changed files with 94 additions and 60 deletions.
2 changes: 1 addition & 1 deletion .github/actions/make-apkindex/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

FROM alpine:edge
RUN apk --update add alpine-sdk
RUN apk --update add alpine-sdk openssl
COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
ENTRYPOINT /entrypoint.sh
6 changes: 5 additions & 1 deletion .github/actions/make-apkindex/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ if [[ -z "$INPUT_SIGNATURE_KEY" ]]; then
else
signature_file="/root/$INPUT_SIGNATURE_KEY_NAME"
printf "$INPUT_SIGNATURE_KEY" > "$signature_file"
# Makes signature file trusted
openssl rsa -in $signature_file -pubout -out "/etc/apk/keys/${INPUT_SIGNATURE_KEY_NAME}.pub"
fi

if [[ -z "$INPUT_DESTINATION" ]]; then
Expand Down Expand Up @@ -76,7 +78,9 @@ echo "::group::Creating indexes"
for arch in $archs; do
arch_directory="${INPUT_DESTINATION}/$arch"
index_file="${arch_directory}/APKINDEX.tar.gz"
apk index -o "${index_file}" "${arch_directory}"/*.apk 2>/dev/null
echo "Running apk index -o ${index_file} ${arch_directory}/*.apk..."
apk index -o "${index_file}" "${arch_directory}"/*.apk
echo "Signing ${index_file} with ${signature_file}..."
abuild-sign -k "${signature_file}" "${index_file}"
done

Expand Down
5 changes: 5 additions & 0 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,9 @@ nfpms:
- git
- openssh
- util-linux-misc
- buildkit
- buildctl
- nerdctl
bindir: /sbin
contents:
- src: apk/crictl.sh
Expand All @@ -93,6 +96,8 @@ nfpms:
dst: /etc/cni/net.d/10-flannel.conflist
- src: apk/flannel/subnet.env
dst: /lib/iknite/flannel/subnet.env
- src: apk/buildkit/buildkitd.toml
dst: /etc/buildkit/buildkitd.toml
apk:
signature:
key_file: gpg_key.asc
Expand Down
8 changes: 8 additions & 0 deletions apk/buildkit/buildkitd.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
debug = false
[worker.oci]
enabled = false

[worker.containerd]
enabled = true
# namespace should be "k8s.io" for Kubernetes (including Rancher Desktop)
namespace = "k8s.io"
1 change: 1 addition & 0 deletions apk/init.d/iknite
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,5 @@ depend() {
after net
need cgroups
need containerd
want buildkitd
}
2 changes: 1 addition & 1 deletion cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ var rootCmd = &cobra.Command{
Makes the appropriate initialization of a WSL 2 Alpine distribution for running
kubernetes.`,
Example: `> iknite start`,
Version: "v0.4.1", // <---VERSION--->
Version: "v0.4.2", // <---VERSION--->
// Uncomment the following line if your bare application
// has an action associated with it:
// Run: func(cmd *cobra.Command, args []string) { },
Expand Down
37 changes: 18 additions & 19 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,17 @@ require (
github.com/spf13/afero v1.11.0
github.com/spf13/cobra v1.8.0
github.com/spf13/pflag v1.0.5
github.com/spf13/viper v1.18.2
github.com/spf13/viper v1.19.0
github.com/stretchr/testify v1.9.0
github.com/txn2/txeh v1.5.5
golang.org/x/net v0.25.0
golang.org/x/net v0.26.0
k8s.io/api v0.30.1
k8s.io/apimachinery v0.30.1
k8s.io/cli-runtime v0.30.1
k8s.io/client-go v0.30.1
k8s.io/code-generator v0.30.1
k8s.io/kubectl v0.30.1
k8s.io/kubernetes v1.30.1
k8s.io/kubernetes v1.30.2
sigs.k8s.io/kustomize/api v0.17.2
sigs.k8s.io/kustomize/kyaml v0.17.1

Expand Down Expand Up @@ -85,7 +85,7 @@ require (
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f // indirect
github.com/opencontainers/go-digest v1.0.0 // indirect
github.com/pelletier/go-toml/v2 v2.1.0 // indirect
github.com/pelletier/go-toml/v2 v2.2.2 // indirect
github.com/peterbourgon/diskv v2.0.1+incompatible // indirect
github.com/pion/logging v0.2.2 // indirect
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
Expand All @@ -101,26 +101,25 @@ require (
github.com/stretchr/objx v0.5.2 // indirect
github.com/subosito/gotenv v1.6.0 // indirect
github.com/xlab/treeprint v1.2.0 // indirect
go.etcd.io/etcd/api/v3 v3.5.10 // indirect
go.etcd.io/etcd/client/pkg/v3 v3.5.10 // indirect
go.etcd.io/etcd/client/v3 v3.5.10 // indirect
go.etcd.io/etcd/api/v3 v3.5.12 // indirect
go.etcd.io/etcd/client/pkg/v3 v3.5.12 // indirect
go.etcd.io/etcd/client/v3 v3.5.12 // indirect
go.starlark.net v0.0.0-20230525235612-a134d8f9ddca // indirect
go.uber.org/multierr v1.11.0 // indirect
go.uber.org/zap v1.26.0 // indirect
golang.org/x/exp v0.0.0-20230905200255-921286631fa9 // indirect
golang.org/x/mod v0.15.0 // indirect
golang.org/x/oauth2 v0.15.0 // indirect
golang.org/x/sync v0.6.0 // indirect
golang.org/x/sys v0.20.0 // indirect
golang.org/x/term v0.20.0 // indirect
golang.org/x/text v0.15.0 // indirect
golang.org/x/mod v0.17.0 // indirect
golang.org/x/oauth2 v0.18.0 // indirect
golang.org/x/sync v0.7.0 // indirect
golang.org/x/sys v0.21.0 // indirect
golang.org/x/term v0.21.0 // indirect
golang.org/x/text v0.16.0 // indirect
golang.org/x/time v0.5.0 // indirect
golang.org/x/tools v0.18.0 // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/genproto v0.0.0-20231106174013-bbf56f31fb17 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20231106174013-bbf56f31fb17 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20231120223509-83a465c0220f // indirect
google.golang.org/grpc v1.59.0 // indirect
golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d // indirect
google.golang.org/appengine v1.6.8 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20240311132316-a219d84964c2 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240314234333-6e1732d8331c // indirect
google.golang.org/grpc v1.62.1 // indirect
google.golang.org/protobuf v1.33.0 // indirect
gopkg.in/evanphx/json-patch.v4 v4.12.0 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
Expand Down
Loading

0 comments on commit 59903ff

Please sign in to comment.