Skip to content

Commit

Permalink
Upgrade Husky and SKIP_GIT_PUSH_HOOK option (#63)
Browse files Browse the repository at this point in the history
* Upgrade Husky and SKIP_GIT_PUSH_HOOK option

* Upgrade Kustomize to the latest

* Fix Kustomize env replace path

* Container order not guaranteed
  • Loading branch information
mhmxs authored Sep 21, 2022
1 parent 6fb925a commit 241521b
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 26 deletions.
2 changes: 2 additions & 0 deletions .husky/hooks/pre-push
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#!/usr/bin/env bash

if [[ "$SKIP_GIT_PUSH_HOOK" ]]; then exit 0; fi

set -e

if [[ -n "$(git status --short)" ]]; then
Expand Down
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ controller-gen: ## Download controller-gen locally if necessary.
KUSTOMIZE = $(shell pwd)/bin/kustomize
.PHONY: kustomize
kustomize: ## Download kustomize locally if necessary.
$(call go-get-tool,$(KUSTOMIZE),sigs.k8s.io/kustomize/kustomize/[email protected].7)
$(call go-get-tool,$(KUSTOMIZE),sigs.k8s.io/kustomize/kustomize/[email protected].7)

ENVTEST = $(shell pwd)/bin/setup-envtest
.PHONY: envtest
Expand All @@ -140,7 +140,7 @@ kubebuilder: ## Download kubebuilder locally if necessary.
HUSKY = $(shell pwd)/bin/husky
.PHONY: husky
husky: ## Download husky locally if necessary.
$(call go-get-tool,$(HUSKY),github.com/automation-co/[email protected].5)
$(call go-get-tool,$(HUSKY),github.com/automation-co/[email protected].14)

# go-get-tool will 'go get' any package $2 and install it to $1.
PROJECT_DIR := $(shell dirname $(abspath $(lastword $(MAKEFILE_LIST))))
Expand All @@ -151,7 +151,7 @@ TMP_DIR=$$(mktemp -d) ;\
cd $$TMP_DIR ;\
go mod init tmp ;\
echo "Downloading $(2)" ;\
GOBIN=$(PROJECT_DIR)/bin go get $(2) ;\
GOBIN=$(PROJECT_DIR)/bin go install $(2) ;\
rm -rf $$TMP_DIR ;\
}
endef
2 changes: 1 addition & 1 deletion config/default/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ vars:
patches:
- patch: |-
- op: replace
path: "/spec/template/spec/containers/1/env/0"
path: "/spec/template/spec/containers/0/env/0"
value:
name: SUPPORTED_CSI_DRIVERS
value: "ebs.csi.aws.com"
Expand Down
22 changes: 0 additions & 22 deletions tests/e2e/stable/storageos/01-assert.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,28 +21,6 @@ spec:
app.kubernetes.io/component: discoblocks
control-plane: controller-manager
spec:
containers:
- name: kube-rbac-proxy
- env:
- name: SUPPORTED_CSI_DRIVERS
value: csi.storageos.com
- name: SCHEDULER_STRICT_MODE
value: "true"
- name: MUTATOR_STRICT_MODE
value: "true"
name: manager
ports:
- containerPort: 9443
name: webhook-server
protocol: TCP
securityContext:
allowPrivilegeEscalation: false
volumeMounts:
- mountPath: /tmp/k8s-webhook-server/serving-certs
name: cert
readOnly: true
- mountPath: /etc/kubernetes/discoblocks-scheduler
name: config-volume
schedulerName: default-scheduler
securityContext:
runAsNonRoot: true
Expand Down

0 comments on commit 241521b

Please sign in to comment.