-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added ItemBlockAction plugin and example test data
Signed-off-by: Scott Seago <[email protected]>
- Loading branch information
Showing
8 changed files
with
476 additions
and
302 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,147 @@ | ||
# Copyright 2017, 2019 the Velero contributors. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
--- | ||
apiVersion: v1 | ||
kind: Namespace | ||
metadata: | ||
name: nginx-itemblock | ||
|
||
--- | ||
kind: PersistentVolumeClaim | ||
apiVersion: v1 | ||
metadata: | ||
name: mypvc1 | ||
namespace: nginx-itemblock | ||
spec: | ||
accessModes: | ||
- ReadWriteOnce | ||
resources: | ||
requests: | ||
storage: 3Gi | ||
|
||
|
||
--- | ||
kind: PersistentVolumeClaim | ||
apiVersion: v1 | ||
metadata: | ||
name: mypvc2 | ||
namespace: nginx-itemblock | ||
spec: | ||
accessModes: | ||
- ReadWriteOnce | ||
resources: | ||
requests: | ||
storage: 3Gi | ||
|
||
|
||
--- | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: nginx-deployment1 | ||
namespace: nginx-itemblock | ||
spec: | ||
selector: | ||
matchLabels: | ||
app: nginx1 | ||
replicas: 1 | ||
template: | ||
metadata: | ||
annotations: | ||
pre.hook.backup.velero.io/command: '["/usr/bin/echo", "pre-hook"]' | ||
post.hook.backup.velero.io/command: '["/usr/bin/echo", "post-hook"]' | ||
labels: | ||
app: nginx1 | ||
itemblock: myblock | ||
spec: | ||
volumes: | ||
- name: nginx-logs | ||
persistentVolumeClaim: | ||
claimName: mypvc1 | ||
containers: | ||
- image: docker.io/bitnami/nginx | ||
name: nginx | ||
ports: | ||
- containerPort: 80 | ||
volumeMounts: | ||
- mountPath: "/var/log/nginx" | ||
name: nginx-logs | ||
readOnly: false | ||
|
||
--- | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: nginx-deployment2 | ||
namespace: nginx-itemblock | ||
spec: | ||
selector: | ||
matchLabels: | ||
app: nginx2 | ||
replicas: 1 | ||
template: | ||
metadata: | ||
annotations: | ||
pre.hook.backup.velero.io/command: '["/usr/bin/echo", "pre-hook"]' | ||
post.hook.backup.velero.io/command: '["/usr/bin/echo", "post-hook"]' | ||
labels: | ||
app: nginx2 | ||
itemblock: myblock | ||
spec: | ||
volumes: | ||
- name: nginx-logs | ||
persistentVolumeClaim: | ||
claimName: mypvc2 | ||
containers: | ||
- image: docker.io/bitnami/nginx | ||
name: nginx | ||
ports: | ||
- containerPort: 80 | ||
volumeMounts: | ||
- mountPath: "/var/log/nginx" | ||
name: nginx-logs | ||
readOnly: false | ||
|
||
--- | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
labels: | ||
app: nginx1 | ||
name: my-nginx1 | ||
namespace: nginx-itemblock | ||
spec: | ||
ports: | ||
- port: 80 | ||
targetPort: 80 | ||
selector: | ||
app: nginx1 | ||
type: LoadBalancer | ||
|
||
--- | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
labels: | ||
app: nginx2 | ||
name: my-nginx2 | ||
namespace: nginx-itemblock | ||
spec: | ||
ports: | ||
- port: 80 | ||
targetPort: 80 | ||
selector: | ||
app: nginx2 | ||
type: LoadBalancer |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,70 +1,86 @@ | ||
module github.com/vmware-tanzu/velero-plugin-example | ||
|
||
go 1.21 | ||
|
||
toolchain go1.21.3 | ||
go 1.22.6 | ||
|
||
require ( | ||
github.com/pkg/errors v0.9.1 | ||
github.com/sirupsen/logrus v1.8.1 | ||
github.com/vmware-tanzu/velero v1.7.1 | ||
k8s.io/api v0.25.6 | ||
k8s.io/apimachinery v0.25.6 | ||
k8s.io/client-go v0.25.6 | ||
github.com/sirupsen/logrus v1.9.3 | ||
github.com/vmware-tanzu/velero v1.15.0 | ||
k8s.io/api v0.29.0 | ||
k8s.io/apimachinery v0.29.0 | ||
k8s.io/client-go v0.29.0 | ||
sigs.k8s.io/controller-runtime v0.17.2 | ||
) | ||
|
||
require ( | ||
github.com/beorn7/perks v1.0.1 // indirect | ||
github.com/cespare/xxhash/v2 v2.2.0 // indirect | ||
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/emicklei/go-restful/v3 v3.11.0 // indirect | ||
github.com/evanphx/json-patch/v5 v5.8.0 // indirect | ||
github.com/fatih/color v1.16.0 // indirect | ||
github.com/fsnotify/fsnotify v1.7.0 // indirect | ||
github.com/go-logr/logr v1.4.1 // indirect | ||
github.com/go-openapi/jsonpointer v0.19.6 // indirect | ||
github.com/go-openapi/jsonreference v0.20.2 // indirect | ||
github.com/go-openapi/swag v0.22.3 // indirect | ||
github.com/gobwas/glob v0.2.3 // indirect | ||
github.com/gogo/protobuf v1.3.2 // indirect | ||
github.com/golang/protobuf v1.5.3 // indirect | ||
github.com/google/gnostic v0.6.9 // indirect | ||
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect | ||
github.com/golang/protobuf v1.5.4 // indirect | ||
github.com/google/gnostic-models v0.6.8 // indirect | ||
github.com/google/go-cmp v0.6.0 // indirect | ||
github.com/google/gofuzz v1.2.0 // indirect | ||
github.com/google/uuid v1.6.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-20190923154419-df201c70410d // indirect | ||
github.com/hashicorp/go-plugin v1.6.0 // indirect | ||
github.com/hashicorp/yamux v0.1.1 // indirect | ||
github.com/imdario/mergo v0.3.13 // indirect | ||
github.com/inconshreveable/mousetrap v1.0.0 // indirect | ||
github.com/inconshreveable/mousetrap v1.1.0 // indirect | ||
github.com/josharian/intern v1.0.0 // indirect | ||
github.com/json-iterator/go v1.1.12 // indirect | ||
github.com/kopia/kopia v0.10.7 // indirect | ||
github.com/kubernetes-csi/external-snapshotter/client/v7 v7.0.0 // indirect | ||
github.com/mailru/easyjson v0.7.7 // indirect | ||
github.com/mattn/go-colorable v0.1.12 // indirect | ||
github.com/mattn/go-isatty v0.0.14 // indirect | ||
github.com/mattn/go-colorable v0.1.13 // indirect | ||
github.com/mattn/go-isatty v0.0.20 // 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/spf13/cobra v1.4.0 // indirect | ||
github.com/prometheus/client_golang v1.19.0 // indirect | ||
github.com/prometheus/client_model v0.6.1 // indirect | ||
github.com/prometheus/common v0.52.3 // indirect | ||
github.com/prometheus/procfs v0.12.0 // indirect | ||
github.com/rogpeppe/go-internal v1.12.0 // indirect | ||
github.com/spf13/cobra v1.7.0 // indirect | ||
github.com/spf13/pflag v1.0.5 // indirect | ||
golang.org/x/net v0.17.0 // indirect | ||
golang.org/x/oauth2 v0.7.0 // indirect | ||
golang.org/x/sys v0.13.0 // indirect | ||
golang.org/x/term v0.13.0 // indirect | ||
golang.org/x/text v0.13.0 // 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-20230410155749-daa745c078e1 // indirect | ||
google.golang.org/grpc v1.56.3 // indirect | ||
google.golang.org/protobuf v1.30.0 // indirect | ||
golang.org/x/exp v0.0.0-20230522175609-2e198f4a06a1 // indirect | ||
golang.org/x/net v0.26.0 // indirect | ||
golang.org/x/oauth2 v0.19.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 | ||
gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect | ||
google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda // indirect | ||
google.golang.org/grpc v1.63.2 // indirect | ||
google.golang.org/protobuf v1.33.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/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 | ||
k8s.io/apiextensions-apiserver v0.29.0 // indirect | ||
k8s.io/component-base v0.29.0 // indirect | ||
k8s.io/klog/v2 v2.110.1 // indirect | ||
k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00 // indirect | ||
k8s.io/utils v0.0.0-20230726121419-3b25d923346b // indirect | ||
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect | ||
sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect | ||
sigs.k8s.io/yaml v1.4.0 // indirect | ||
) | ||
|
||
replace github.com/gogo/protobuf => github.com/gogo/protobuf v1.3.2 | ||
|
||
replace github.com/vmware-tanzu/velero => github.com/vmware-tanzu/velero v1.10.0-rc.1.0.20230321103129-29b5894be6f1 | ||
replace github.com/vmware-tanzu/velero => github.com/vmware-tanzu/velero v1.10.0-rc.1.0.20240913022151-3f9c2dc789af | ||
|
||
replace github.com/kopia/kopia => github.com/project-velero/kopia v0.0.0-20240829032136-7fca59662a06 |
Oops, something went wrong.