Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PVC Clone Populator #2709

Merged
merged 12 commits into from
May 24, 2023
7 changes: 7 additions & 0 deletions cluster-sync/clean.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,13 @@ _kubectl get dataimportcron --all-namespaces -o=custom-columns=NAME:.metadata.na
_kubectl patch dataimportcron $name -n $namespace --type=json -p '[{ "op": "remove", "path": "/metadata/finalizers" }]'
done

_kubectl get pvc --all-namespaces -o=custom-columns=NAME:.metadata.name,NAMESPACE:.metadata.namespace,FINALIZERS:.metadata.finalizers --no-headers | grep cdi.kubevirt.io/clonePopulator | while read p; do
arr=($p)
name="${arr[0]}"
namespace="${arr[1]}"
_kubectl patch pvc $name -n $namespace --type=json -p '[{ "op": "remove", "path": "/metadata/finalizers" }]'
done

if [ -f "${OPERATOR_CR_MANIFEST}" ]; then
echo "Cleaning CR object ..."
if _kubectl get crd cdis.cdi.kubevirt.io ; then
Expand Down
4 changes: 4 additions & 0 deletions cmd/cdi-controller/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,10 @@ func start() {
klog.Errorf("Unable to setup upload populator: %v", err)
os.Exit(1)
}
if _, err := populators.NewClonePopulator(ctx, mgr, log, clonerImage, pullPolicy, installerLabels); err != nil {
klog.Errorf("Unable to setup clone populator: %v", err)
os.Exit(1)
}

klog.V(1).Infoln("created cdi controllers")

Expand Down
2 changes: 1 addition & 1 deletion hack/build/run-linters.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ GOLANGCI_VERSION="${GOLANGCI_VERSION:-v1.52.2}"

go install "github.com/golangci/golangci-lint/cmd/golangci-lint@${GOLANGCI_VERSION}"

golangci-lint run --timeout=8m ./...
golangci-lint run --timeout=16m ./...
132 changes: 132 additions & 0 deletions pkg/apis/core/v1beta1/openapi_generated.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ go_library(
"generated_expansion.go",
"objecttransfer.go",
"storageprofile.go",
"volumeclonesource.go",
"volumeimportsource.go",
"volumeuploadsource.go",
],
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ go_library(
"fake_datavolume.go",
"fake_objecttransfer.go",
"fake_storageprofile.go",
"fake_volumeclonesource.go",
"fake_volumeimportsource.go",
"fake_volumeuploadsource.go",
],
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading