generated from kubernetes/kubernetes-template-project
-
Notifications
You must be signed in to change notification settings - Fork 299
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
24 changed files
with
2,050 additions
and
67 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,3 +28,6 @@ vendor | |
|
||
# Local Netlify folder | ||
.netlify | ||
|
||
# Directory with CRDs for dependencies | ||
dep-crds |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,6 +25,9 @@ GO_TEST_FLAGS ?= -race | |
# Use go.mod go version as a single source of truth of GO version. | ||
GO_VERSION := $(shell awk '/^go /{print $$2}' go.mod|head -n1) | ||
|
||
# Use go.mod go version as a single source of truth of MPI version. | ||
MPI_VERSION := $(shell awk '/mpi-operator/{print $$2}' go.mod|head -n1) | ||
|
||
GIT_TAG ?= $(shell git describe --tags --dirty --always) | ||
# Image URL to use all building/pushing image targets | ||
PLATFORMS ?= linux/amd64,linux/arm64 | ||
|
@@ -141,7 +144,7 @@ test: generate fmt vet gotestsum ## Run tests. | |
$(GOTESTSUM) --junitfile $(ARTIFACTS)/junit.xml -- $(GO_TEST_FLAGS) $(shell go list ./... | grep -v '/test/') -coverprofile $(ARTIFACTS)/cover.out | ||
|
||
.PHONY: test-integration | ||
test-integration: manifests generate fmt vet envtest ginkgo ## Run tests. | ||
test-integration: manifests generate fmt vet envtest ginkgo mpi-operator-crd ## Run tests. | ||
KUBEBUILDER_ASSETS="$(shell $(ENVTEST) --arch=amd64 use $(ENVTEST_K8S_VERSION) -p path)" \ | ||
$(GINKGO) --junit-report=junit.xml --output-dir=$(ARTIFACTS) -v $(INTEGRATION_TARGET) | ||
|
||
|
@@ -273,3 +276,8 @@ KIND = $(shell pwd)/bin/kind | |
.PHONY: kind | ||
kind: | ||
@GOBIN=$(PROJECT_DIR)/bin GO111MODULE=on $(GO_CMD) install sigs.k8s.io/[email protected] | ||
.PHONY: mpi-operator-crd | ||
mpi-operator-crd: | ||
GOPATH=/tmp GO111MODULE=on $(GO_CMD) install github.com/kubeflow/mpi-operator/cmd/mpi-operator@$(MPI_VERSION) | ||
mkdir -p $(shell pwd)/dep-crds/mpi-operator/ | ||
cp -f /tmp/pkg/mod/github.com/kubeflow/mpi-operator@$(MPI_VERSION)/manifests/base/* $(shell pwd)/dep-crds/mpi-operator/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# permissions for end users to edit jobs. | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: ClusterRole | ||
metadata: | ||
name: mpijob-editor-role | ||
labels: | ||
rbac.kueue.x-k8s.io/batch-admin: "true" | ||
rbac.kueue.x-k8s.io/batch-user: "true" | ||
rules: | ||
- apiGroups: | ||
- kubeflow.org | ||
resources: | ||
- mpijobs | ||
verbs: | ||
- create | ||
- delete | ||
- get | ||
- list | ||
- patch | ||
- update | ||
- watch | ||
- apiGroups: | ||
- kubeflow.org | ||
resources: | ||
- mpijobs/status | ||
verbs: | ||
- get |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# permissions for end users to view jobs. | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: ClusterRole | ||
metadata: | ||
name: mpijob-viewer-role | ||
labels: | ||
rbac.kueue.x-k8s.io/batch-admin: "true" | ||
rbac.kueue.x-k8s.io/batch-user: "true" | ||
rules: | ||
- apiGroups: | ||
- kubeflow.org | ||
resources: | ||
- mpijobs | ||
verbs: | ||
- get | ||
- list | ||
- watch | ||
- apiGroups: | ||
- kubeflow.org | ||
resources: | ||
- mpijobs/status | ||
verbs: | ||
- get |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.