Skip to content

Commit

Permalink
Update go to 1.19 and all dependencies to latest version (#48)
Browse files Browse the repository at this point in the history
- Rewrite matching of error message in `ObjectExists()` to regexp (fixes issue with error message not getting matched)
- Fixes 2 high severity security issues in dependencies
  • Loading branch information
Lirt authored Nov 16, 2022
1 parent edb5531 commit f3886a9
Show file tree
Hide file tree
Showing 7 changed files with 614 additions and 369 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
runs-on: ubuntu-20.04
strategy:
matrix:
go-version: [ '1.16' ]
go-version: [ '1.19' ]
steps:
- name: Checkout velero-plugin-for-openstack
uses: actions/checkout@v3
Expand All @@ -25,7 +25,7 @@ jobs:
runs-on: ubuntu-20.04
strategy:
matrix:
go-version: [ '1.16' ]
go-version: [ '1.19' ]
env:
VELERO_CLI_VERSION: 1.9.3
# Contains Velero 1.9.3
Expand Down
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -184,15 +184,15 @@ Initialize velero plugin:
# Initialize velero from scratch:
velero install \
--provider "community.openstack.org/openstack" \
--plugins lirt/velero-plugin-for-openstack:v0.4.0 \
--plugins lirt/velero-plugin-for-openstack:v0.4.1 \
--bucket <BUCKET_NAME> \
--no-secret

# Or add plugin to existing velero:
velero plugin add lirt/velero-plugin-for-openstack:v0.4.0
velero plugin add lirt/velero-plugin-for-openstack:v0.4.1
```

Note: If you want to use plugin built for `arm` or `arm64` architecture, you can use tag such as this `lirt/velero-plugin-for-openstack:v0.4.0-arm64`.
Note: If you want to use plugin built for `arm` or `arm64` architecture, you can use tag such as this `lirt/velero-plugin-for-openstack:v0.4.1-arm64`.

Change configuration of `backupstoragelocations.velero.io`:

Expand Down Expand Up @@ -247,7 +247,7 @@ configuration:
# resticRepoPrefix: swift:my-awesome-bucket:/restic # Example
initContainers:
- name: velero-plugin-openstack
image: lirt/velero-plugin-for-openstack:v0.4.0
image: lirt/velero-plugin-for-openstack:v0.4.1
imagePullPolicy: IfNotPresent
volumeMounts:
- mountPath: /target
Expand Down Expand Up @@ -310,7 +310,7 @@ docker buildx create --use
docker buildx build \
--file docker/Dockerfile \
--platform "linux/amd64" \
--tag lirt/velero-plugin-for-openstack:v0.4.0 \
--tag lirt/velero-plugin-for-openstack:v0.4.1 \
--no-cache \
--load \
.
Expand All @@ -319,7 +319,7 @@ docker buildx build \
docker buildx build \
--file docker/Dockerfile \
--platform linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64 \
--tag lirt/velero-plugin-for-openstack:v0.4.0 \
--tag lirt/velero-plugin-for-openstack:v0.4.1 \
--no-cache \
--push \
.
Expand All @@ -330,7 +330,7 @@ docker buildx build \
for platform in linux/amd64 linux/arm/v6 linux/arm/v7 linux/arm64; do
docker buildx build \
--file docker/Dockerfile \
--tag lirt/velero-plugin-for-openstack:v0.4.0 \
--tag lirt/velero-plugin-for-openstack:v0.4.1 \
--platform "${platform}" \
--no-cache \
--load \
Expand Down
2 changes: 1 addition & 1 deletion docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# syntax=docker/dockerfile:1.3

# --- First stage
FROM --platform=$BUILDPLATFORM golang:1.16-alpine AS build
FROM --platform=$BUILDPLATFORM golang:1.19-alpine AS build

ARG REPOSITORY=Lirt
ARG PLUGIN=velero-plugin-swift
Expand Down
4 changes: 3 additions & 1 deletion docker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
* [`v0.3.0` (Dockerfile)](https://github.com/Lirt/velero-plugin-for-openstack/blob/v0.3.0/docker/Dockerfile)
* [`v0.3.1` (Dockerfile)](https://github.com/Lirt/velero-plugin-for-openstack/blob/v0.3.1/docker/Dockerfile)
* [`v0.4.0` (Dockerfile)](https://github.com/Lirt/velero-plugin-for-openstack/blob/v0.4.0/docker/Dockerfile)
* [`v0.4.1` (Dockerfile)](https://github.com/Lirt/velero-plugin-for-openstack/blob/v0.4.1/docker/Dockerfile)

# Velero plugin for OpenStack

Expand All @@ -21,6 +22,7 @@ Below is a listing of plugin versions and respective Velero versions for which t

| Plugin Version | Velero Version |
| :------------- | :------------- |
| v0.3.x | v1.4.x, v1.5.x, v1.6.x, v1.7.x, v1.8.x |
| v0.4.x | v1.4.x, v1.5.x, v1.6.x, v1.7.x, v1.8.x, 1.9.x |
| v0.3.x | v1.4.x, v1.5.x, v1.6.x, v1.7.x, v1.8.x, 1.9.x |
| v0.2.x | v1.4.x, v1.5.x |
| v0.1.x | v1.4.x, v1.5.x |
73 changes: 62 additions & 11 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,16 +1,67 @@
module github.com/Lirt/velero-plugin-swift

go 1.16
go 1.19

require (
github.com/gophercloud/gophercloud v0.20.0
github.com/gophercloud/utils v0.0.0-20210909165623-d7085207ff6d
github.com/kr/pretty v0.2.1 // indirect
github.com/pkg/errors v0.8.1
github.com/sirupsen/logrus v1.6.0
github.com/stretchr/testify v1.4.0
github.com/vmware-tanzu/velero v1.4.2
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 // indirect
k8s.io/api v0.17.4
k8s.io/apimachinery v0.17.4
github.com/gophercloud/gophercloud v1.0.0
github.com/gophercloud/utils v0.0.0-20220927104426-4113af8d2663
github.com/pkg/errors v0.9.1
github.com/sirupsen/logrus v1.9.0
github.com/stretchr/testify v1.8.1
github.com/vmware-tanzu/velero v1.9.3
k8s.io/api v0.25.4
k8s.io/apimachinery v0.25.4
)

require (
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/emicklei/go-restful/v3 v3.8.0 // indirect
github.com/fatih/color v1.13.0 // indirect
github.com/go-logr/logr v1.2.3 // indirect
github.com/go-openapi/jsonpointer v0.19.5 // indirect
github.com/go-openapi/jsonreference v0.20.0 // indirect
github.com/go-openapi/swag v0.21.1 // indirect
github.com/gobwas/glob v0.2.3 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/google/gnostic v0.6.9 // indirect
github.com/google/gofuzz v1.2.0 // indirect
github.com/hashicorp/go-hclog v0.14.1 // indirect
github.com/hashicorp/go-plugin v1.4.3 // indirect
github.com/hashicorp/yamux v0.0.0-20180604194846-3520598351bb // indirect
github.com/inconshreveable/mousetrap v1.0.0 // indirect
github.com/josharian/intern v1.0.0 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/mailru/easyjson v0.7.7 // indirect
github.com/mattn/go-colorable v0.1.9 // indirect
github.com/mattn/go-isatty v0.0.14 // indirect
github.com/mitchellh/go-homedir v1.1.0 // indirect
github.com/mitchellh/go-testing-interface v1.0.0 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
github.com/oklog/run v1.0.0 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/spf13/cobra v1.4.0 // indirect
github.com/spf13/pflag v1.0.5 // indirect
golang.org/x/net v0.0.0-20220722155237-a158d28d115b // indirect
golang.org/x/oauth2 v0.0.0-20220608161450-d0670ef3b1eb // indirect
golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8 // indirect
golang.org/x/term v0.0.0-20220526004731-065cf7ba2467 // indirect
golang.org/x/text v0.3.7 // indirect
golang.org/x/time v0.0.0-20220609170525-579cf78fd858 // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/genproto v0.0.0-20220107163113-42d7afdf6368 // indirect
google.golang.org/grpc v1.40.0 // indirect
google.golang.org/protobuf v1.28.0 // 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/client-go v0.24.2 // indirect
k8s.io/klog/v2 v2.70.1 // indirect
k8s.io/kube-openapi v0.0.0-20220803162953-67bda5d908f1 // indirect
k8s.io/utils v0.0.0-20220728103510-ee6ede2d64ed // indirect
sigs.k8s.io/json v0.0.0-20220713155537-f223a00ba0e2 // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect
sigs.k8s.io/yaml v1.3.0 // indirect
)
Loading

0 comments on commit f3886a9

Please sign in to comment.