Skip to content

Commit b4d3758

Browse files
authored
feat: remove dependency on kubectl & kanctl (#45)
Remove dependency on kanctl, and therefore also kubectl, by applying deletion ActionSet as Kubernetes custom resource.
1 parent a3b6081 commit b4d3758

5 files changed

Lines changed: 384 additions & 114 deletions

File tree

Dockerfile

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,14 @@
1-
FROM --platform=linux/amd64 golang:1.18.4-alpine3.16 AS build
1+
FROM --platform=linux/amd64 golang:1.20.1-alpine3.17 AS build
22
WORKDIR /src
33
ENV CGO_ENABLED=0
44
COPY . .
55
ARG TARGETOS
66
ARG TARGETARCH
77
RUN GOOS=${TARGETOS} GOARCH=${TARGETARCH} go build -o /out/taweret .
88

9-
FROM bitnami/kubectl:1.21 AS bin
9+
FROM alpine:3.17.2 AS bin
1010
COPY --from=build /out/taweret /usr/local/bin/
1111

12-
USER root
13-
14-
RUN /bin/bash -c "curl -L https://github.com/kanisterio/kanister/releases/download/0.78.0/kanister_0.78.0_linux_amd64.tar.gz | tar xvz -C /usr/local/bin/"
15-
16-
USER 1001
17-
1812
EXPOSE 2112/tcp
1913

2014
ENV DAILY_BACKUPS=7

go.mod

Lines changed: 24 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,21 @@ go 1.18
44

55
require (
66
github.com/go-co-op/gocron v1.13.0
7-
github.com/prometheus/client_golang v1.12.2
8-
k8s.io/apimachinery v0.24.3
9-
k8s.io/client-go v0.24.3
7+
github.com/kanisterio/kanister v0.0.0-20230301071008-afe5fb3d3834
8+
github.com/prometheus/client_golang v1.14.0
9+
gopkg.in/yaml.v2 v2.4.0
10+
k8s.io/apimachinery v0.24.4
11+
k8s.io/client-go v0.24.4
1012
)
1113

1214
require (
15+
github.com/Masterminds/semver v1.5.0 // indirect
1316
github.com/PuerkitoBio/purell v1.1.1 // indirect
1417
github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 // indirect
1518
github.com/beorn7/perks v1.0.1 // indirect
16-
github.com/cespare/xxhash/v2 v2.1.2 // indirect
19+
github.com/cespare/xxhash/v2 v2.2.0 // indirect
1720
github.com/davecgh/go-spew v1.1.1 // indirect
18-
github.com/emicklei/go-restful v2.9.5+incompatible // indirect
21+
github.com/emicklei/go-restful v2.16.0+incompatible // indirect
1922
github.com/evanphx/json-patch v4.12.0+incompatible // indirect
2023
github.com/go-logr/logr v1.2.0 // indirect
2124
github.com/go-openapi/jsonpointer v0.19.5 // indirect
@@ -24,38 +27,37 @@ require (
2427
github.com/gogo/protobuf v1.3.2 // indirect
2528
github.com/golang/protobuf v1.5.2 // indirect
2629
github.com/google/gnostic v0.5.7-v3refs // indirect
27-
github.com/google/go-cmp v0.5.8 // indirect
30+
github.com/google/go-cmp v0.5.9 // indirect
2831
github.com/google/gofuzz v1.2.0 // indirect
29-
github.com/imdario/mergo v0.3.5 // indirect
3032
github.com/josharian/intern v1.0.0 // indirect
3133
github.com/json-iterator/go v1.1.12 // indirect
3234
github.com/kr/pretty v0.3.0 // indirect
35+
github.com/kr/text v0.2.0 // indirect
3336
github.com/mailru/easyjson v0.7.7 // indirect
3437
github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 // indirect
3538
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
3639
github.com/modern-go/reflect2 v1.0.2 // indirect
3740
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
3841
github.com/pkg/errors v0.9.1 // indirect
39-
github.com/prometheus/client_model v0.2.0 // indirect
40-
github.com/prometheus/common v0.33.0 // indirect
41-
github.com/prometheus/procfs v0.7.3 // indirect
42+
github.com/prometheus/client_model v0.3.0 // indirect
43+
github.com/prometheus/common v0.37.0 // indirect
44+
github.com/prometheus/procfs v0.8.0 // indirect
4245
github.com/robfig/cron/v3 v3.0.1 // indirect
43-
github.com/spf13/pflag v1.0.5 // indirect
44-
github.com/stretchr/testify v1.7.1 // indirect
45-
golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4 // indirect
46-
golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5 // indirect
47-
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c // indirect
48-
golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6 // indirect
49-
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 // indirect
50-
golang.org/x/text v0.3.7 // indirect
46+
github.com/rogpeppe/go-internal v1.6.1 // indirect
47+
golang.org/x/net v0.7.0 // indirect
48+
golang.org/x/oauth2 v0.5.0 // indirect
49+
golang.org/x/sync v0.1.0 // indirect
50+
golang.org/x/sys v0.5.0 // indirect
51+
golang.org/x/term v0.5.0 // indirect
52+
golang.org/x/text v0.7.0 // indirect
5153
golang.org/x/time v0.0.0-20220210224613-90d013bbcef8 // indirect
5254
google.golang.org/appengine v1.6.7 // indirect
53-
google.golang.org/protobuf v1.28.0 // indirect
55+
google.golang.org/protobuf v1.28.1 // indirect
5456
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect
5557
gopkg.in/inf.v0 v0.9.1 // indirect
56-
gopkg.in/yaml.v2 v2.4.0 // indirect
57-
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect
58-
k8s.io/api v0.24.3 // indirect
58+
gopkg.in/yaml.v3 v3.0.1 // indirect
59+
k8s.io/api v0.24.4 // indirect
60+
k8s.io/apiextensions-apiserver v0.24.4 // indirect
5961
k8s.io/klog/v2 v2.60.1 // indirect
6062
k8s.io/kube-openapi v0.0.0-20220328201542-3ee0da9b0b42 // indirect
6163
k8s.io/utils v0.0.0-20220210201930-3a6ce19ff2f9 // indirect

0 commit comments

Comments
 (0)