Skip to content

Commit 583a8f5

Browse files
author
Emruz Hossain
committed
Port changes from Stash Enterprise edition
Signed-off-by: Emruz Hossain <emruz@appscode.com>
1 parent d8e8f4c commit 583a8f5

File tree

327 files changed

+23310
-13668
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

327 files changed

+23310
-13668
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,9 @@ _testmain.go
2525
/.idea
2626
/dist
2727
**/junit.xml
28+
**/report.json
2829
**/.env
30+
**/.env.prod
2931
/.vscode
3032
/coverage.txt
3133

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@ unit-tests: $(BUILD_DIRS) bin/.container-$(DOTFILE_IMAGE)-TEST
291291
#
292292
# NB: -t is used to catch ctrl-c interrupt from keyboard and -t will be problematic for CI.
293293

294-
GINKGO_ARGS ?= "--flakeAttempts=2"
294+
GINKGO_ARGS ?= "--flake-attempts=2 --timeout=4h"
295295
TEST_ARGS ?=
296296

297297
.PHONY: e2e-tests

go.mod

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,10 @@ module stash.appscode.dev/stash
33
go 1.18
44

55
require (
6+
github.com/go-sql-driver/mysql v1.5.0
67
github.com/gogo/protobuf v1.3.2
78
github.com/kubernetes-csi/external-snapshotter/client/v4 v4.2.0
8-
github.com/onsi/ginkgo v1.16.5
9+
github.com/onsi/ginkgo/v2 v2.1.6
910
github.com/onsi/gomega v1.20.1
1011
github.com/pkg/errors v0.9.1
1112
github.com/spf13/cobra v1.5.0
@@ -42,7 +43,7 @@ require (
4243
kmodules.xyz/openshift v0.25.0
4344
kmodules.xyz/prober v0.25.0
4445
kmodules.xyz/webhook-runtime v0.25.0
45-
stash.appscode.dev/apimachinery v0.22.1-0.20220917042332-522f4e18711d
46+
stash.appscode.dev/apimachinery v0.22.1-0.20220926120533-92b9a652596a
4647
)
4748

4849
require (
@@ -99,19 +100,19 @@ require (
99100
github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79 // indirect
100101
github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 // indirect
101102
github.com/grpc-ecosystem/grpc-gateway v1.16.0 // indirect
102-
github.com/huandu/xstrings v1.3.1 // indirect
103+
github.com/huandu/xstrings v1.3.2 // indirect
103104
github.com/imdario/mergo v0.3.13 // indirect
104105
github.com/inconshreveable/mousetrap v1.0.0 // indirect
105106
github.com/jmespath/go-jmespath v0.4.0 // indirect
106107
github.com/josharian/intern v1.0.0 // indirect
107108
github.com/json-iterator/go v1.1.12 // indirect
108109
github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de // indirect
109-
github.com/mailru/easyjson v0.7.6 // indirect
110+
github.com/mailru/easyjson v0.7.7 // indirect
110111
github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 // indirect
111112
github.com/minio/highwayhash v1.0.2 // indirect
112-
github.com/mitchellh/copystructure v1.0.0 // indirect
113+
github.com/mitchellh/copystructure v1.2.0 // indirect
113114
github.com/mitchellh/mapstructure v1.5.0 // indirect
114-
github.com/mitchellh/reflectwalk v1.0.0 // indirect
115+
github.com/mitchellh/reflectwalk v1.0.2 // indirect
115116
github.com/moby/spdystream v0.2.0 // indirect
116117
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
117118
github.com/modern-go/reflect2 v1.0.2 // indirect
@@ -122,7 +123,6 @@ require (
122123
github.com/nats-io/nkeys v0.3.0 // indirect
123124
github.com/nats-io/nuid v1.0.1 // indirect
124125
github.com/ncw/swift v1.0.49 // indirect
125-
github.com/nxadm/tail v1.4.8 // indirect
126126
github.com/opencontainers/go-digest v1.0.0 // indirect
127127
github.com/peterbourgon/diskv v2.0.1+incompatible // indirect
128128
github.com/prometheus/client_golang v1.13.0 // indirect
@@ -142,16 +142,16 @@ require (
142142
go.etcd.io/etcd/client/v3 v3.5.4 // indirect
143143
go.opencensus.io v0.23.0 // indirect
144144
go.opentelemetry.io/contrib v0.20.0 // indirect
145-
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.20.0 // indirect
145+
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.28.0 // indirect
146146
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.20.0 // indirect
147-
go.opentelemetry.io/otel v0.20.0 // indirect
147+
go.opentelemetry.io/otel v1.3.0 // indirect
148148
go.opentelemetry.io/otel/exporters/otlp v0.20.0 // indirect
149149
go.opentelemetry.io/otel/metric v0.20.0 // indirect
150-
go.opentelemetry.io/otel/sdk v0.20.0 // indirect
150+
go.opentelemetry.io/otel/sdk v1.3.0 // indirect
151151
go.opentelemetry.io/otel/sdk/export/metric v0.20.0 // indirect
152152
go.opentelemetry.io/otel/sdk/metric v0.20.0 // indirect
153-
go.opentelemetry.io/otel/trace v0.20.0 // indirect
154-
go.opentelemetry.io/proto/otlp v0.7.0 // indirect
153+
go.opentelemetry.io/otel/trace v1.3.0 // indirect
154+
go.opentelemetry.io/proto/otlp v0.11.0 // indirect
155155
go.starlark.net v0.0.0-20200306205701-8dd3e2ee1dd5 // indirect
156156
go.uber.org/atomic v1.7.0 // indirect
157157
go.uber.org/multierr v1.6.0 // indirect
@@ -180,7 +180,6 @@ require (
180180
google.golang.org/protobuf v1.28.1 // indirect
181181
gopkg.in/inf.v0 v0.9.1 // indirect
182182
gopkg.in/natefinch/lumberjack.v2 v2.0.0 // indirect
183-
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect
184183
gopkg.in/yaml.v2 v2.4.0 // indirect
185184
gopkg.in/yaml.v3 v3.0.1 // indirect
186185
k8s.io/cli-runtime v0.25.1 // indirect

go.sum

Lines changed: 12 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -300,9 +300,9 @@ github.com/go-playground/assert/v2 v2.0.1/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvSc
300300
github.com/go-playground/locales v0.13.0/go.mod h1:taPMhCMXrRLJO55olJkUXHZBHCxTMfnGwq/HNwmWNS8=
301301
github.com/go-playground/universal-translator v0.17.0/go.mod h1:UkSxE5sNxxRwHyU+Scu5vgOQjsIJAF8j9muTVoKLVtA=
302302
github.com/go-playground/validator/v10 v10.2.0/go.mod h1:uOYAAleCW8F/7oMFd6aG0GOhaH6EGOAJShg8Id5JGkI=
303+
github.com/go-sql-driver/mysql v1.5.0 h1:ozyZYNQW3x3HtqT1jira07DN2PArx2v7/mN66gGcHOs=
303304
github.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg=
304305
github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY=
305-
github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE=
306306
github.com/gobwas/httphead v0.0.0-20180130184737-2c6c146eadee/go.mod h1:L0fX3K22YWvt/FAX9NnzrNzcI4wNYi9Yku4O0LKYflo=
307307
github.com/gobwas/pool v0.2.0/go.mod h1:q8bcK0KcYlCgd9e7WYLm9LpyS+YeLd8JVDW6WezmKEw=
308308
github.com/gobwas/ws v1.0.2/go.mod h1:szmBTxLgaFppYjEmNtny/v3w89xOydFnnZMcgRRu/EM=
@@ -452,8 +452,8 @@ github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0m
452452
github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I=
453453
github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc=
454454
github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=
455-
github.com/huandu/xstrings v1.3.1 h1:4jgBlKK6tLKFvO8u5pmYjG91cqytmDCDvGh7ECVFfFs=
456-
github.com/huandu/xstrings v1.3.1/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE=
455+
github.com/huandu/xstrings v1.3.2 h1:L18LIDzqlW6xN2rEkpdV8+oL/IXWJ1APd+vsdYy4Wdw=
456+
github.com/huandu/xstrings v1.3.2/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE=
457457
github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc=
458458
github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc=
459459
github.com/imdario/mergo v0.3.6 h1:xTNEAn+kxVO7dTZGu0CegyqKZmoWFI0rF8UxjlB2d28=
@@ -518,8 +518,9 @@ github.com/mailru/easyjson v0.0.0-20160728113105-d5b7844b561a/go.mod h1:C1wdFJiN
518518
github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc=
519519
github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc=
520520
github.com/mailru/easyjson v0.7.0/go.mod h1:KAzv3t3aY1NaHWoQz1+4F1ccyAH66Jk7yos7ldAVICs=
521-
github.com/mailru/easyjson v0.7.6 h1:8yTIVnZgCoiM1TgqoeTl+LfU5Jg6/xL3QhGQnimLYnA=
522521
github.com/mailru/easyjson v0.7.6/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc=
522+
github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0=
523+
github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc=
523524
github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU=
524525
github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA=
525526
github.com/mattn/go-ieproxy v0.0.1/go.mod h1:pYabZ6IHcRpFh7vIaLfK7rdcWgFEb3SFJ6/gNWuh88E=
@@ -533,8 +534,8 @@ github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3N
533534
github.com/minio/highwayhash v1.0.2 h1:Aak5U0nElisjDCfPSG79Tgzkn2gl66NxOMspRrKnA/g=
534535
github.com/minio/highwayhash v1.0.2/go.mod h1:BQskDq+xkJ12lmlUUi7U0M5Swg3EWR+dLTk+kldvVxY=
535536
github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc=
536-
github.com/mitchellh/copystructure v1.0.0 h1:Laisrj+bAB6b/yJwB5Bt3ITZhGJdqmxquMKeZ+mmkFQ=
537-
github.com/mitchellh/copystructure v1.0.0/go.mod h1:SNtv71yrdKgLRyLFxmLdkAbkKEFWgYaq1OVrnRcwhnw=
537+
github.com/mitchellh/copystructure v1.2.0 h1:vpKXTN4ewci03Vljg/q9QvCGUDttBOGBIa15WveJJGw=
538+
github.com/mitchellh/copystructure v1.2.0/go.mod h1:qLl+cE2AmVv+CoeAwDPye/v+N2HKCj9FbZEVFJRxO9s=
538539
github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0=
539540
github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0=
540541
github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI=
@@ -546,8 +547,8 @@ github.com/mitchellh/mapstructure v1.3.3/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RR
546547
github.com/mitchellh/mapstructure v1.4.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo=
547548
github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY=
548549
github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo=
549-
github.com/mitchellh/reflectwalk v1.0.0 h1:9D+8oIskB4VJBN5SFlmc27fSlIBZaov1Wpk/IfikLNY=
550-
github.com/mitchellh/reflectwalk v1.0.0/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw=
550+
github.com/mitchellh/reflectwalk v1.0.2 h1:G2LzWKi524PWgd3mLHV8Y5k7s6XUvT0Gef6zxSIeXaQ=
551+
github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw=
551552
github.com/moby/spdystream v0.2.0 h1:cjW1zVyyoiM0T7b6UoySUFqzXMoqRckQtXwGPiBhOM8=
552553
github.com/moby/spdystream v0.2.0/go.mod h1:f7i0iNDQJ059oMTcWxx8MA/zKFIuD/lY+0GqbN2Wy8c=
553554
github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
@@ -578,21 +579,16 @@ github.com/ncw/swift v1.0.49 h1:eQaKIjSt/PXLKfYgzg01nevmO+CMXfXGRhB1gOhDs7E=
578579
github.com/ncw/swift v1.0.49/go.mod h1:23YIA4yWVnGwv2dQlN4bB7egfYX6YLn0Yo/S6zZO/ZM=
579580
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs=
580581
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno=
581-
github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A=
582582
github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE=
583-
github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU=
584583
github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U=
585584
github.com/onsi/ginkgo v0.0.0-20170829012221-11459a886d9c/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
586585
github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
587586
github.com/onsi/ginkgo v1.11.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
588-
github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk=
589587
github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE=
590-
github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU=
591588
github.com/onsi/ginkgo/v2 v2.1.6 h1:Fx2POJZfKRQcM1pH49qSZiYeu319wji004qX+GDovrU=
589+
github.com/onsi/ginkgo/v2 v2.1.6/go.mod h1:MEH45j8TBi6u9BMogfbp0stKC5cdGjumZj5Y7AG4VIk=
592590
github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA=
593591
github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY=
594-
github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY=
595-
github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo=
596592
github.com/onsi/gomega v1.20.1 h1:PA/3qinGoukvymdIDV8pii6tiZgC8kbmJO6Z5+b002Q=
597593
github.com/onsi/gomega v1.20.1/go.mod h1:DtrZpjmvpn2mPm4YWQa0/ALMDj9v4YxLgojwPeREyVo=
598594
github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U=
@@ -856,7 +852,6 @@ golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/
856852
golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
857853
golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
858854
golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
859-
golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
860855
golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
861856
golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
862857
golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
@@ -928,13 +923,11 @@ golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7w
928923
golang.org/x/sys v0.0.0-20190616124812-15dcb6c0061f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
929924
golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
930925
golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
931-
golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
932926
golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
933927
golang.org/x/sys v0.0.0-20191002063906-3421d5a6bb1c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
934928
golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
935929
golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
936930
golang.org/x/sys v0.0.0-20191112214154-59a1497f0cea/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
937-
golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
938931
golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
939932
golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
940933
golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
@@ -962,7 +955,6 @@ golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7w
962955
golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
963956
golang.org/x/sys v0.0.0-20201202213521-69691e467435/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
964957
golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
965-
golang.org/x/sys v0.0.0-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
966958
golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
967959
golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
968960
golang.org/x/sys v0.0.0-20210220050731-9a76102bfb43/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
@@ -1070,7 +1062,6 @@ golang.org/x/tools v0.0.0-20201201161351-ac6f37ff4c2a/go.mod h1:emZCQorbCU4vsT4f
10701062
golang.org/x/tools v0.0.0-20201202200335-bef1c476418a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
10711063
golang.org/x/tools v0.0.0-20201203202102-a1a1cbeaa516/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
10721064
golang.org/x/tools v0.0.0-20201208233053-a543418bbed2/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
1073-
golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
10741065
golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
10751066
golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
10761067
golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0=
@@ -1398,5 +1389,5 @@ sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o=
13981389
sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc=
13991390
sigs.k8s.io/yaml v1.3.0 h1:a2VclLzOGrwOHDiV8EfBGhvjHvP46CtW5j6POvhYGGo=
14001391
sigs.k8s.io/yaml v1.3.0/go.mod h1:GeOyir5tyXNByN85N/dRIT9es5UQNerPYEKK56eTBm8=
1401-
stash.appscode.dev/apimachinery v0.22.1-0.20220917042332-522f4e18711d h1:nGXRD7UTu0B1ifqKeSpcRsA8RPJa6/rGdtiVYUvoIHE=
1402-
stash.appscode.dev/apimachinery v0.22.1-0.20220917042332-522f4e18711d/go.mod h1:f1yvcracYbBFRbabEdX3VFhzgXjOLER2QFvyyBNdeik=
1392+
stash.appscode.dev/apimachinery v0.22.1-0.20220926120533-92b9a652596a h1:zzD84MLej/5yUU1GstdCaWCp2Rle88bWNhIPad/nS2k=
1393+
stash.appscode.dev/apimachinery v0.22.1-0.20220926120533-92b9a652596a/go.mod h1:Tb1y/+h1r3+YdBvI5RYIC0tW1b8S+0pIb3iG0X7BOjo=

hack/dev/apiregistration.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ subsets:
3333
protocol: TCP
3434
---
3535
# register as aggregated apiserver
36-
apiVersion: apiregistration.k8s.io/v1beta1
36+
apiVersion: apiregistration.k8s.io/v1
3737
kind: APIService
3838
metadata:
3939
name: v1alpha1.admission.stash.appscode.com
@@ -50,7 +50,7 @@ spec:
5050
version: v1alpha1
5151
---
5252
# register as aggregated apiserver
53-
apiVersion: apiregistration.k8s.io/v1beta1
53+
apiVersion: apiregistration.k8s.io/v1
5454
kind: APIService
5555
metadata:
5656
name: v1alpha1.repositories.stash.appscode.com

hack/e2e.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,6 @@ TEST_ARGS=${TEST_ARGS:-}
2525
DOCKER_REGISTRY=${DOCKER_REGISTRY:-}
2626

2727
echo "Running e2e tests:"
28-
cmd="ginkgo -r --v -race --progress --trace --noisyPendings=false ${GINKGO_ARGS} test -- --docker-registry=${DOCKER_REGISTRY} ${TEST_ARGS}"
28+
cmd="ginkgo -r --vv -race --progress --trace ${GINKGO_ARGS} test -- --docker-registry=${DOCKER_REGISTRY} ${TEST_ARGS}"
2929
echo $cmd
3030
$cmd

hack/gendocs/main.go

Lines changed: 9 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -36,14 +36,14 @@ import (
3636

3737
var (
3838
tplFrontMatter = template.Must(template.New("index").Parse(`---
39-
title: Reference | Stash Operator
39+
title: Stash Operator
4040
description: Stash Operator Reference
4141
menu:
4242
docs_{{ "{{ .version }}" }}:
43-
identifier: reference-operator
43+
identifier: operator
4444
name: Stash Operator
45-
weight: 10
4645
parent: reference
46+
weight: 20
4747
menu_name: docs_{{ "{{ .version }}" }}
4848
---
4949
`))
@@ -54,32 +54,26 @@ menu:
5454
docs_{{ "{{ .version }}" }}:
5555
identifier: {{ .ID }}
5656
name: {{ .Name }}
57-
parent: reference-operator
57+
parent: operator
5858
{{- if .RootCmd }}
5959
weight: 0
6060
{{ end }}
61-
menu_name: docs_{{ "{{ .version }}" }}
61+
product_name: stash
6262
section_menu_id: reference
63+
menu_name: docs_{{ "{{ .version }}" }}
6364
{{- if .RootCmd }}
6465
url: /docs/{{ "{{ .version }}" }}/reference/operator/
6566
aliases:
66-
- /docs/{{ "{{ .version }}" }}/reference/operator/{{ .ID }}/
67-
{{- end }}
67+
- /docs/{{ "{{ .version }}" }}/reference/operator/operator/
68+
{{ end }}
6869
---
6970
`))
7071
)
7172

72-
func docsDir() string {
73-
if dir, ok := os.LookupEnv("DOCS_ROOT"); ok {
74-
return dir
75-
}
76-
return runtime.GOPath() + "/src/stash.appscode.dev/docs"
77-
}
78-
7973
// ref: https://github.com/spf13/cobra/blob/master/doc/md_docs.md
8074
func main() {
8175
rootCmd := cmds.NewRootCmd()
82-
dir := filepath.Join(docsDir(), "docs", "reference", "operator")
76+
dir := runtime.GOPath() + "/src/stash.appscode.dev/docs/docs/reference/operator"
8377
fmt.Printf("Generating cli markdown tree in: %v\n", dir)
8478
err := os.RemoveAll(dir)
8579
if err != nil {

hack/gendocs/make.sh

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,6 @@
1414
# See the License for the specific language governing permissions and
1515
# limitations under the License.
1616

17-
set -eou pipefail
18-
19-
SCRIPT_ROOT=$(realpath $(dirname "${BASH_SOURCE[0]}")/../..)
20-
SCRIPT_NAME=$(basename "${BASH_SOURCE[0]}")
21-
pushd $SCRIPT_ROOT/hack/gendocs
22-
23-
# http://redsymbol.net/articles/bash-exit-traps/
24-
function cleanup() {
25-
popd
26-
}
27-
trap cleanup EXIT
28-
17+
pushd $GOPATH/src/stash.appscode.dev/stash/hack/gendocs
2918
go run main.go
19+
popd

0 commit comments

Comments
 (0)