Skip to content

Commit

Permalink
Pin env-test for Profiles Controller (kubeflow#7591)
Browse files Browse the repository at this point in the history
* profiles: Pin the env-test version

Signed-off-by: Kimonas Sotirchos <kimwnasptd@gmail.com>

* profiles: Add generated files from make test

Signed-off-by: Kimonas Sotirchos <kimwnasptd@gmail.com>

---------

Signed-off-by: Kimonas Sotirchos <kimwnasptd@gmail.com>
  • Loading branch information
kimwnasptd authored May 28, 2024
1 parent f791158 commit 222bec2
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 13 deletions.
9 changes: 5 additions & 4 deletions components/profile-controller/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ manifests: controller-gen ## Generate WebhookConfiguration, ClusterRole and Cust
.PHONY: generate
generate: controller-gen ## Generate code containing DeepCopy, DeepCopyInto, and DeepCopyObject method implementations.
$(CONTROLLER_GEN) object:headerFile="hack/boilerplate.go.txt" paths="./..."


.PHONY: fmt
fmt: ## Run go fmt against code.
Expand All @@ -59,7 +59,7 @@ build: generate fmt vet ## Build manager binary.

.PHONY: run
run: manifests generate fmt vet ## Run a controller from your host.
go run ./main.go -namespace-labels-path ./config/base/namespace-labels.yaml
go run ./main.go -namespace-labels-path ./config/base/namespace-labels.yaml

.PHONY: docker-build
docker-build: ## Build docker image with the manager.
Expand All @@ -75,7 +75,7 @@ docker-build-multi-arch: ## Build multi-arch docker images with docker buildx
docker buildx build --load --platform ${ARCH} --tag ${IMG}:${TAG} .

.PHONY: docker-build-push-multi-arch
docker-build-push-multi-arch: ## Build multi-arch docker images with docker buildx and push to docker registry
docker-build-push-multi-arch: ## Build multi-arch docker images with docker buildx and push to docker registry
docker buildx build --platform ${ARCH} --tag ${IMG}:${TAG} --push .

.PHONY: image
Expand Down Expand Up @@ -134,6 +134,7 @@ $(LOCALBIN):
KUSTOMIZE ?= $(LOCALBIN)/kustomize
CONTROLLER_GEN ?= $(LOCALBIN)/controller-gen
ENVTEST ?= $(LOCALBIN)/setup-envtest
ENVTEST_VERSION?=release-0.12

## Tool Versions
KUSTOMIZE_VERSION ?= v3.2.0
Expand All @@ -153,4 +154,4 @@ $(CONTROLLER_GEN): $(LOCALBIN)
.PHONY: envtest
envtest: $(ENVTEST) ## Download envtest-setup locally if necessary.
$(ENVTEST): $(LOCALBIN)
GOBIN=$(LOCALBIN) go install sigs.k8s.io/controller-runtime/tools/setup-envtest@latest
GOBIN=$(LOCALBIN) go install sigs.k8s.io/controller-runtime/tools/setup-envtest@$(ENVTEST_VERSION)
4 changes: 2 additions & 2 deletions components/profile-controller/api/v1/groupversion_info.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ limitations under the License.
*/

// Package v1 contains API Schema definitions for the v1 API group
//+kubebuilder:object:generate=true
//+groupName=kubeflow.org
// +kubebuilder:object:generate=true
// +groupName=kubeflow.org
package v1

import (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ limitations under the License.
*/

// Package v1beta1 contains API Schema definitions for the v1beta1 API group
//+kubebuilder:object:generate=true
//+groupName=kubeflow.org
// +kubebuilder:object:generate=true
// +groupName=kubeflow.org
package v1beta1

import (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.8.0
creationTimestamp: null
name: profiles.kubeflow.org
spec:
group: kubeflow.org
Expand Down Expand Up @@ -60,7 +61,6 @@ spec:
- kind
- name
type: object
x-kubernetes-map-type: atomic
plugins:
items:
description: Plugin is for customize actions on different platform.
Expand Down Expand Up @@ -134,7 +134,6 @@ spec:
type: object
type: array
type: object
x-kubernetes-map-type: atomic
scopes:
description: A collection of filters that must match each object
tracked by a quota. If not specified, the quota matches all
Expand Down Expand Up @@ -212,7 +211,6 @@ spec:
- kind
- name
type: object
x-kubernetes-map-type: atomic
plugins:
items:
description: Plugin is for customize actions on different platform.
Expand Down Expand Up @@ -286,7 +284,6 @@ spec:
type: object
type: array
type: object
x-kubernetes-map-type: atomic
scopes:
description: A collection of filters that must match each object
tracked by a quota. If not specified, the quota matches all
Expand Down Expand Up @@ -318,3 +315,9 @@ spec:
storage: false
subresources:
status: {}
status:
acceptedNames:
kind: ""
plural: ""
conditions: []
storedVersions: []
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,6 @@ func TestIsAnnotateOnly(t *testing.T) {
// Check that the result is true
assert.True(t, aws.isAnnotateOnly())


aws = &AwsIAMForServiceAccount{AnnotateOnly: false}
// Check that the result is true
assert.False(t, aws.isAnnotateOnly())
Expand Down

0 comments on commit 222bec2

Please sign in to comment.