File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -112,6 +112,25 @@ lint: golangci-lint ## Run golangci-lint linter & yamllint
112112lint-fix : golangci-lint # # Run golangci-lint linter and perform fixes
113113 $(GOLANGCI_LINT ) run --fix
114114
115+ .PHONY : kind-start
116+ kind-start : # # Start a kind cluster if it doesn't exist
117+ @echo " Ensuring kind cluster is running..."
118+ @# Check if Docker is running
119+ @if ! $(CONTAINER_TOOL ) info > /dev/null 2>&1 ; then \
120+ echo " Error: Docker daemon is not running. Please start Docker first." ; \
121+ exit 1; \
122+ fi
123+ @if ! command -v kind > /dev/null; then \
124+ echo " Error: kind is not installed. Install it from https://kind.sigs.k8s.io/docs/user/quick-start/" ; \
125+ exit 1; \
126+ fi
127+ @if ! kind get clusters | grep -q gobackup-operator; then \
128+ echo " Creating gobackup-operator kind cluster..." ; \
129+ kind create cluster --name gobackup-operator; \
130+ else \
131+ echo " Using existing gobackup-operator kind cluster" ; \
132+ fi
133+
115134.PHONY : kind-run
116135kind-run : fmt vet kustomize # # Run the operator on a local kind cluster
117136 @echo " Setting up and running the operator on a kind cluster"
You can’t perform that action at this time.
0 commit comments