Skip to content

Commit

Permalink
up: upgrade kubebuilder (#75)
Browse files Browse the repository at this point in the history
  • Loading branch information
isindir authored May 28, 2021
1 parent 00ba647 commit d76b7d8
Show file tree
Hide file tree
Showing 6 changed files with 74 additions and 119 deletions.
12 changes: 6 additions & 6 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ jobs:
# https://golang.org/dl/
GOLANG_VERSION: 1.16.4
# https://github.com/kubernetes-sigs/kubebuilder/releases
KUBEBUILDER_VERSION: 3.0.0
KUBEBUILDER_VERSION: 3.1.0
# https://github.com/kubernetes-sigs/kustomize/releases
KUSTOMIZE_VERSION: v4.1.2
KUSTOMIZE_VERSION: v4.1.3
# https://github.com/github/hub/releases
HUB_VERSION: 2.14.2
# https://github.com/git-chglog/git-chglog/releases
Expand Down Expand Up @@ -100,17 +100,17 @@ jobs:
# https://github.com/kubernetes/kubernetes/releases
K8S_VERSION: v1.20.7
# https://github.com/rancher/k3d/releases
K3D_VERSION: v4.4.3
K3D_VERSION: v4.4.4
# https://github.com/helm/helm/releases
HELM_VERSION: v3.5.4
HELM_VERSION: v3.6.0
# https://golang.org/dl/
GOLANG_VERSION: 1.16.4
# https://github.com/kubernetes-sigs/kubebuilder/releases
KUBEBUILDER_VERSION: 3.0.0
KUBEBUILDER_VERSION: 3.1.0
# https://github.com/mozilla/sops/releases
SOPS_VERSION: v3.7.1
# https://github.com/kubernetes-sigs/kustomize/releases
KUSTOMIZE_VERSION: v4.1.2
KUSTOMIZE_VERSION: v4.1.3
# https://github.com/quintush/helm-unittest/releases
HELM_UNITTEST_VERSION: 0.2.6
# https://github.com/instrumenta/kubeval/releases
Expand Down
8 changes: 4 additions & 4 deletions .tool-versions
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
# https://github.com/kubernetes-sigs/kubebuilder/releases
kubebuilder 3.0.0
kubebuilder 3.1.0
# https://golang.org/dl/
golang 1.16.4
# https://github.com/mozilla/sops/releases
sops 3.7.1
# https://github.com/kubernetes-sigs/kustomize/releases
kustomize 4.1.2
kustomize 4.1.3
# https://github.com/rancher/k3d/releases
k3d 4.4.3
k3d 4.4.4
# https://github.com/kubernetes/kubernetes/releases
kubectl 1.20.7
# https://github.com/helm/helm/releases
helm 3.5.4
helm 3.6.0
# https://github.com/instrumenta/kubeval/releases
kubeval v0.16.1
6 changes: 2 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ SOPS_SEC_OPERATOR_VERSION := 0.2.2

# https://github.com/kubernetes-sigs/controller-tools/releases
CONTROLLER_GEN_VERSION := "v0.4.1"
CONTROLLER_RUNTIME_VERSION := "v0.8.3"
KUSTOMIZE_VERSION := "v4.1.2"

# Use existing cluster instead of starting processes
Expand Down Expand Up @@ -89,13 +90,10 @@ fmt: ## Run go fmt against code.
vet: ## Run go vet against code.
go vet ./...

#test: controller-gen generate fmt vet manifests ## Run tests.
# USE_EXISTING_CLUSTER=${USE_EXISTING_CLUSTER} go test ./... -coverprofile cover.out

ENVTEST_ASSETS_DIR=$(shell pwd)/testbin
test: manifests generate fmt vet ## Run tests.
mkdir -p ${ENVTEST_ASSETS_DIR}
test -f ${ENVTEST_ASSETS_DIR}/setup-envtest.sh || curl -sSLo ${ENVTEST_ASSETS_DIR}/setup-envtest.sh https://raw.githubusercontent.com/kubernetes-sigs/controller-runtime/v0.7.2/hack/setup-envtest.sh
test -f ${ENVTEST_ASSETS_DIR}/setup-envtest.sh || curl -sSLo ${ENVTEST_ASSETS_DIR}/setup-envtest.sh https://raw.githubusercontent.com/kubernetes-sigs/controller-runtime/${CONTROLLER_RUNTIME_VERSION}/hack/setup-envtest.sh
source ${ENVTEST_ASSETS_DIR}/setup-envtest.sh; fetch_envtest_tools $(ENVTEST_ASSETS_DIR); setup_envtest_env $(ENVTEST_ASSETS_DIR); go test ./... -coverprofile cover.out

##@ Build
Expand Down
2 changes: 1 addition & 1 deletion controllers/sopssecret_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ type SopsSecretReconciler struct {
// Reconcile is part of the main kubernetes reconciliation loop which aims to
// move the current state of the cluster closer to the desired state.
// For more details, check Reconcile and its Result here:
// - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.7.2/pkg/reconcile
// - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.8.3/pkg/reconcile
func (r *SopsSecretReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error) {
_ = r.Log.WithValues("sopssecret", req.NamespacedName)

Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ require (
k8s.io/api v0.20.7
k8s.io/apimachinery v0.20.7
k8s.io/client-go v0.20.7
sigs.k8s.io/controller-runtime v0.7.2
sigs.k8s.io/controller-runtime v0.8.3
)
Loading

0 comments on commit d76b7d8

Please sign in to comment.