Skip to content

Commit 337faf8

Browse files
1gtmtamalsaha
andauthored
[cherry-pick] Use restic 0.10.0 (#435) (#466)
/cherry-pick Signed-off-by: Tamal Saha <tamal@appscode.com> Co-authored-by: Tamal Saha <tamal@appscode.com>
1 parent 6d9af4e commit 337faf8

File tree

17 files changed

+221
-183
lines changed

17 files changed

+221
-183
lines changed

Dockerfile.dbg

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,21 +21,18 @@ RUN set -x \
2121
&& apt-get update \
2222
&& apt-get install -y --no-install-recommends apt-transport-https ca-certificates curl bzip2
2323

24-
RUN set -x \
25-
&& curl -fsSL -o restic.bz2 https://github.com/restic/restic/releases/download/v{RESTIC_VER}/restic_{RESTIC_VER}_{ARG_OS}_{ARG_ARCH}.bz2 \
26-
&& bzip2 -d restic.bz2 \
27-
&& chmod 755 restic \
28-
&& curl -fsSL -o restic_{NEW_RESTIC_VER}.bz2 https://github.com/restic/restic/releases/download/v{NEW_RESTIC_VER}/restic_{NEW_RESTIC_VER}_{ARG_OS}_{ARG_ARCH}.bz2 \
29-
&& bzip2 -d restic_{NEW_RESTIC_VER}.bz2 \
30-
&& chmod 755 restic_{NEW_RESTIC_VER}
24+
RUN set -x \
25+
&& curl -fsSL -o restic.bz2 https://github.com/restic/restic/releases/download/v{RESTIC_VER}/restic_{RESTIC_VER}_{ARG_OS}_{ARG_ARCH}.bz2 \
26+
&& bzip2 -d restic.bz2 \
27+
&& chmod 755 restic
3128

3229

3330

3431
FROM {ARG_FROM}
3532

3633
LABEL org.opencontainers.image.source https://github.com/stashed/mongodb
3734

38-
COPY --from=0 restic_{NEW_RESTIC_VER} /bin/restic_{NEW_RESTIC_VER}
35+
COPY --from=0 restic /bin/restic
3936
COPY bin/{ARG_OS}_{ARG_ARCH}/{ARG_BIN} /{ARG_BIN}
4037

4138
ENTRYPOINT ["/{ARG_BIN}"]

Dockerfile.in

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,21 +21,18 @@ RUN set -x \
2121
&& apt-get update \
2222
&& apt-get install -y --no-install-recommends apt-transport-https ca-certificates curl bzip2
2323

24-
RUN set -x \
25-
&& curl -fsSL -o restic.bz2 https://github.com/restic/restic/releases/download/v{RESTIC_VER}/restic_{RESTIC_VER}_{ARG_OS}_{ARG_ARCH}.bz2 \
26-
&& bzip2 -d restic.bz2 \
27-
&& chmod 755 restic \
28-
&& curl -fsSL -o restic_{NEW_RESTIC_VER}.bz2 https://github.com/restic/restic/releases/download/v{NEW_RESTIC_VER}/restic_{NEW_RESTIC_VER}_{ARG_OS}_{ARG_ARCH}.bz2 \
29-
&& bzip2 -d restic_{NEW_RESTIC_VER}.bz2 \
30-
&& chmod 755 restic_{NEW_RESTIC_VER}
24+
RUN set -x \
25+
&& curl -fsSL -o restic.bz2 https://github.com/restic/restic/releases/download/v{RESTIC_VER}/restic_{RESTIC_VER}_{ARG_OS}_{ARG_ARCH}.bz2 \
26+
&& bzip2 -d restic.bz2 \
27+
&& chmod 755 restic
3128

3229

3330

3431
FROM {ARG_FROM}
3532

3633
LABEL org.opencontainers.image.source https://github.com/stashed/mongodb
3734

38-
COPY --from=0 /restic_{NEW_RESTIC_VER} /bin/restic_{NEW_RESTIC_VER}
35+
COPY --from=0 /restic /bin/restic
3936
COPY bin/{ARG_OS}_{ARG_ARCH}/{ARG_BIN} /{ARG_BIN}
4037

4138
USER nobody:nobody

Makefile

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,7 @@ else
4848
endif
4949
endif
5050

51-
RESTIC_VER := 0.8.3
52-
# also update in restic wrapper library
53-
NEW_RESTIC_VER := 0.9.6
51+
RESTIC_VER := 0.10.0
5452

5553
###
5654
### These variables should not need tweaking.
@@ -405,7 +403,6 @@ bin/.container-$(DOTFILE_IMAGE)-%: bin/$(OS)_$(ARCH)/$(BIN) $(DOCKERFILE_%)
405403
-e 's|{ARG_OS}|$(OS)|g' \
406404
-e 's|{ARG_FROM}|$(BASEIMAGE_$*)|g' \
407405
-e 's|{RESTIC_VER}|$(RESTIC_VER)|g' \
408-
-e 's|{NEW_RESTIC_VER}|$(NEW_RESTIC_VER)|g' \
409406
$(DOCKERFILE_$*) > bin/.dockerfile-$*-$(OS)_$(ARCH)
410407
@DOCKER_CLI_EXPERIMENTAL=enabled docker buildx build --platform $(OS)/$(ARCH) --load --pull -t $(IMAGE):$(TAG_$*) -f bin/.dockerfile-$*-$(OS)_$(ARCH) .
411408
@docker images -q $(IMAGE):$(TAG_$*) > $@

go.mod

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,13 @@ require (
1818
k8s.io/apimachinery v0.18.9
1919
k8s.io/client-go v12.0.0+incompatible
2020
k8s.io/kube-openapi v0.0.0-20200410145947-61e04a5be9a6
21-
k8s.io/kubernetes v1.18.9 // indirect
22-
kmodules.xyz/client-go v0.0.0-20201008164401-74d81f261ec5
21+
kmodules.xyz/client-go v0.0.0-20201011221802-3180ab67d845
2322
kmodules.xyz/crd-schema-fuzz v0.0.0-20200922204806-c1426cd7fcf4
2423
kmodules.xyz/custom-resources v0.0.0-20201008012351-6d8090f759d4
25-
kmodules.xyz/objectstore-api v0.0.0-20200922210707-59bab27e5d41 // indirect
2624
kmodules.xyz/offshoot-api v0.0.0-20200922211229-36acc531abab
27-
kmodules.xyz/prober v0.0.0-20200922212142-743a6514664e // indirect
2825
kubedb.dev/apimachinery v0.14.0-beta.2
2926
sigs.k8s.io/yaml v1.2.0
30-
stash.appscode.dev/apimachinery v0.11.0
27+
stash.appscode.dev/apimachinery v0.11.3-0.20201012035827-8f31689080d6
3128
)
3229

3330
// release-1.18

go.sum

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -289,8 +289,6 @@ github.com/go-openapi/spec v0.18.0/go.mod h1:XkF/MOi14NmjsfZ8VtAKf8pIlbZzyoTvZsd
289289
github.com/go-openapi/spec v0.19.2/go.mod h1:sCxk3jxKgioEJikev4fgkNmwS+3kuYdJtcsZsD5zxMY=
290290
github.com/go-openapi/spec v0.19.3 h1:0XRyw8kguri6Yw4SxhsQA/atC88yqrk0+G4YhI2wabc=
291291
github.com/go-openapi/spec v0.19.3/go.mod h1:FpwSN1ksY1eteniUU7X0N/BgJ7a4WvBFVA8Lj9mJglo=
292-
github.com/go-openapi/spec v0.19.7 h1:0xWSeMd35y5avQAThZR2PkEuqSosoS5t6gDH4L8n11M=
293-
github.com/go-openapi/spec v0.19.7/go.mod h1:Hm2Jr4jv8G1ciIAo+frC/Ft+rR2kQDh8JHKHb3gWUSk=
294292
github.com/go-openapi/spec v0.19.8 h1:qAdZLh1r6QF/hI/gTq+TJTvsQUodZsM7KLqkAJdiJNg=
295293
github.com/go-openapi/spec v0.19.8/go.mod h1:Hm2Jr4jv8G1ciIAo+frC/Ft+rR2kQDh8JHKHb3gWUSk=
296294
github.com/go-openapi/strfmt v0.17.0/go.mod h1:P82hnJI0CXkErkXi8IKjPbNBM6lV6+5pLP5l494TcyU=
@@ -1304,11 +1302,9 @@ kmodules.xyz/client-go v0.0.0-20200818143024-600fef263e03/go.mod h1:sY/eoe4ktxZE
13041302
kmodules.xyz/client-go v0.0.0-20200818171030-24b2ce405feb h1:0yIIoTfkhR4JAgx8UyXbP7oAveVAOcf66+D+20Uj/Uc=
13051303
kmodules.xyz/client-go v0.0.0-20200818171030-24b2ce405feb/go.mod h1:sY/eoe4ktxZEoHpr5NpAQ5s22VSwTE8psJtKVeVgLRY=
13061304
kmodules.xyz/client-go v0.0.0-20200903033732-dab39b86c81b/go.mod h1:sY/eoe4ktxZEoHpr5NpAQ5s22VSwTE8psJtKVeVgLRY=
1307-
kmodules.xyz/client-go v0.0.0-20200915091229-7df16c29f4e8 h1:C6+M9aTLhPCmsJ8dmhPvkr7Qe2MN+iiY3kZvbonhS9E=
1308-
kmodules.xyz/client-go v0.0.0-20200915091229-7df16c29f4e8/go.mod h1:sY/eoe4ktxZEoHpr5NpAQ5s22VSwTE8psJtKVeVgLRY=
13091305
kmodules.xyz/client-go v0.0.0-20200922200830-63d86b6e5b63/go.mod h1:JZN34jqk6ZlR+QOnBPpnUVBab4rmfamqxfSvLaulBMY=
1310-
kmodules.xyz/client-go v0.0.0-20201008164401-74d81f261ec5 h1:mGySTT2dC8u2FQDUFbDLcOt7GM+IkXqlH2xzATyddKg=
1311-
kmodules.xyz/client-go v0.0.0-20201008164401-74d81f261ec5/go.mod h1:pnRh7gtJ6ErPJQBkQeRlpD95KRtxhD4eGrYagZEU8RM=
1306+
kmodules.xyz/client-go v0.0.0-20201011221802-3180ab67d845 h1:7ytqOvrfdq5Ul5SicCyy0s1YnnBSGu33hSZaBEcTbXs=
1307+
kmodules.xyz/client-go v0.0.0-20201011221802-3180ab67d845/go.mod h1:pnRh7gtJ6ErPJQBkQeRlpD95KRtxhD4eGrYagZEU8RM=
13121308
kmodules.xyz/constants v0.0.0-20200506032633-a21e58ceec72/go.mod h1:DbiFk1bJ1KEO94t1SlAn7tzc+Zz95rSXgyUKa2nzPmY=
13131309
kmodules.xyz/crd-schema-fuzz v0.0.0-20200521005638-2433a187de95 h1:v0S/+ftzL6Xrs9XevgchAOJyPKlRQXPiZf87xotj3X4=
13141310
kmodules.xyz/crd-schema-fuzz v0.0.0-20200521005638-2433a187de95/go.mod h1:jpu8xFsDKd6kAWUAKk8oTu/GQGBWqhrcaDeOJdaCJnk=
@@ -1363,6 +1359,6 @@ software.sslmate.com/src/go-pkcs12 v0.0.0-20180114231543-2291e8f0f237/go.mod h1:
13631359
sourcegraph.com/sqs/pbtypes v0.0.0-20180604144634-d3ebe8f20ae4/go.mod h1:ketZ/q3QxT9HOBeFhu6RdvsftgpsbFHBF5Cas6cDKZ0=
13641360
stash.appscode.dev/apimachinery v0.10.0 h1:zKmaANWOTH89J7a/D1FwXFUWAQdI1rA5Nr82WbnLGm8=
13651361
stash.appscode.dev/apimachinery v0.10.0/go.mod h1:TpdBIAiHCtpkUB13SDUyCZ6y+5wmzXBMAf9e72cSPO4=
1366-
stash.appscode.dev/apimachinery v0.11.0 h1:ntvpZDGRsM0f99TBMYrvdtPiF7+d/0th13/EW9d978c=
1367-
stash.appscode.dev/apimachinery v0.11.0/go.mod h1:Cw+8L2u+1T7ZqfYvB2ktdXD/bsWslXNG/bIhk/sV+qs=
1362+
stash.appscode.dev/apimachinery v0.11.3-0.20201012035827-8f31689080d6 h1:HzGwwdUhJhqJRYnAAeoparQ9nj42w6pAMoA6dpZoUlY=
1363+
stash.appscode.dev/apimachinery v0.11.3-0.20201012035827-8f31689080d6/go.mod h1:ieNywb/MTJs/n1T2wMBEr1m13Ek+ygTnhPCsaqqcyBI=
13681364
vbom.ml/util v0.0.0-20160121211510-db5cfe13f5cc/go.mod h1:so/NYdZXCz+E3ZpW0uAoCj6uzU2+8OWDFv/HxUSs7kI=

vendor/kmodules.xyz/client-go/api/v1/conditions.go

Lines changed: 6 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ limitations under the License.
1717
package v1
1818

1919
import (
20+
core "k8s.io/api/core/v1"
2021
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
2122
)
2223

@@ -34,18 +35,6 @@ const (
3435
ConditionRequestDenied = "Denied"
3536
)
3637

37-
type ConditionStatus string
38-
39-
// These are valid condition statuses. "ConditionTrue" means a resource is in the condition.
40-
// "ConditionFalse" means a resource is not in the condition. "ConditionUnknown" means kubernetes
41-
// can't decide if a resource is in the condition or not. In the future, we could add other
42-
// intermediate conditions, e.g. ConditionDegraded.
43-
const (
44-
ConditionTrue ConditionStatus = "True"
45-
ConditionFalse ConditionStatus = "False"
46-
ConditionUnknown ConditionStatus = "Unknown"
47-
)
48-
4938
type Condition struct {
5039
// Type of condition in CamelCase or in foo.example.com/CamelCase.
5140
// Many .condition.type values are consistent across resources like Available, but because arbitrary conditions can be
@@ -54,7 +43,7 @@ type Condition struct {
5443
Type string `json:"type" protobuf:"bytes,1,opt,name=type"`
5544
// Status of the condition, one of True, False, Unknown.
5645
// +required
57-
Status ConditionStatus `json:"status" protobuf:"bytes,2,opt,name=status"`
46+
Status core.ConditionStatus `json:"status" protobuf:"bytes,2,opt,name=status"`
5847
// If set, this represents the .metadata.generation that the condition was set based upon.
5948
// For instance, if .metadata.generation is currently 12, but the .status.condition[x].observedGeneration is 9, the condition is out of date
6049
// with respect to the current state of the instance.
@@ -76,9 +65,9 @@ type Condition struct {
7665
}
7766

7867
func NewCondition(reason string, message string, generation int64, conditionStatus ...bool) Condition {
79-
cs := ConditionTrue
68+
cs := core.ConditionTrue
8069
if len(conditionStatus) > 0 && !conditionStatus[0] {
81-
cs = ConditionFalse
70+
cs = core.ConditionFalse
8271
}
8372

8473
return Condition{
@@ -150,7 +139,7 @@ func RemoveCondition(conditions []Condition, condType string) []Condition {
150139
// It returns "false" if the desired condition is not in "true" state or is not in the condition list.
151140
func IsConditionTrue(conditions []Condition, condType string) bool {
152141
for i := range conditions {
153-
if conditions[i].Type == condType && conditions[i].Status == ConditionTrue {
142+
if conditions[i].Type == condType && conditions[i].Status == core.ConditionTrue {
154143
return true
155144
}
156145
}
@@ -161,7 +150,7 @@ func IsConditionTrue(conditions []Condition, condType string) bool {
161150
// It returns "false" if the desired condition is not in "false" state or is not in the condition list.
162151
func IsConditionFalse(conditions []Condition, condType string) bool {
163152
for i := range conditions {
164-
if conditions[i].Type == condType && conditions[i].Status == ConditionFalse {
153+
if conditions[i].Type == condType && conditions[i].Status == core.ConditionFalse {
165154
return true
166155
}
167156
}

0 commit comments

Comments
 (0)