Skip to content

Commit

Permalink
Moving make file back to org
Browse files Browse the repository at this point in the history
  • Loading branch information
mattmattox committed Apr 8, 2024
1 parent 747ab3d commit fd133dd
Showing 1 changed file with 20 additions and 17 deletions.
37 changes: 20 additions & 17 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ install: ## Install all resources (RBAC and Operator)
kubectl apply -f deploy/role.yaml -n ${NAMESPACE}
kubectl apply -f deploy/role_binding.yaml -n ${NAMESPACE}
kubectl apply -f deploy/service_account.yaml -n ${NAMESPACE}
@echo ....... Applying CRDs .......
kubectl apply -f deploy/crds/secretgenerator.mittwald.de_basicauths_crd.yaml
kubectl apply -f deploy/crds/secretgenerator.mittwald.de_sshkeypairs_crd.yaml
kubectl apply -f deploy/crds/secretgenerator.mittwald.de_stringsecrets_crd.yaml
@echo ....... Applying Operator .......
kubectl apply -f deploy/operator.yaml -n ${NAMESPACE}

Expand All @@ -23,7 +27,6 @@ installwithmonitoring: ## Install all resources (RBAC and Operator) with monitor
@echo ....... Applying Operator .......
kubectl apply -f deploy/operator.yaml -n ${NAMESPACE}


.PHONY: uninstall
uninstall: ## Uninstall all that all performed in the $ make install
@echo ....... Uninstalling .......
Expand All @@ -47,30 +50,30 @@ uninstallwithmonitoring: ## Uninstall all that all performed in the $ make insta
.PHONY: test
test: crd
@echo go test
go test ./... -v
go test ./... -v -count=1

.PHONY: fmt
fmt:
@echo go fmt
go fmt $$(go list ./...)

.PHONY: kind
kind: ## Create a kind cluster to tefmt: ## Run go fmt against code.
go fmt ./...
kind: deletekind## Create a kind cluster to test against
kind create cluster --name kind-k8s-secret-generator
kind get kubeconfig --name kind-k8s-secret-generator | tee ${KUBECONFIG}

vet: ## Run go vet against code.
go vet ./...

.PHONY: build
build: fmt vet ## Build manager binary.
go build -o bin/manager ./cmd/manager/main.go
@exit $(.SHELLSTATUS)
.PHONY: deletekind
deletekind:
kind delete cluster --name kind-k8s-secret-generator

.PHONY: docker-build
docker-build: ## Build docker image with the manager.
docker build -t ${IMG} .
@exit $(.SHELLSTATUS)
.PHONY: crd
crd: kind
kubectl --context kind-kind-k8s-secret-generator apply -f deploy/crds/secretgenerator.mittwald.de_basicauths_crd.yaml
kubectl --context kind-kind-k8s-secret-generator apply -f deploy/crds/secretgenerator.mittwald.de_sshkeypairs_crd.yaml
kubectl --context kind-kind-k8s-secret-generator apply -f deploy/crds/secretgenerator.mittwald.de_stringsecrets_crd.yaml

docker-push: ## Push docker image with the manager.
docker tag ${IMG} ${IMAGE_TAG_BASE}:${VERSION}
docker push ${IMAGE_TAG_BASE}
.PHONY: build
build:
operator-sdk build --go-build-args "-ldflags -X=version.Version=${SECRET_OPERATOR_VERSION}" ${DOCKER_IMAGE}
@exit $(.SHELLSTATUS)

0 comments on commit fd133dd

Please sign in to comment.