Skip to content
Merged
Show file tree
Hide file tree
Changes from 9 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -127,4 +127,7 @@ kubernetes.tar.gz

# .devcontainer files
.devcontainer

#local debug files
cmd/kar-controllers/__debug_bin
apiserver.local.config
kubeconfig
25 changes: 22 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ ${BIN_DIR}/deepcopy-gen:
$(info Compiling deepcopy-gen...)
go build -o ${BIN_DIR}/deepcopy-gen ./cmd/deepcopy-gen/

images: verify-tag-name generate-code
images: verify-tag-name generate-code update-deployment-crds
$(info List executable directory)
$(info repo id: ${git_repository_id})
$(info branch: ${GIT_BRANCH})
Expand All @@ -83,7 +83,7 @@ else
docker build --no-cache --tag mcad-controller:${TAG} --build-arg GO_BUILD_ARGS=$(GO_BUILD_ARGS) -f ${CURRENT_DIR}/Dockerfile ${CURRENT_DIR}
endif

images-podman: verify-tag-name generate-code
images-podman: verify-tag-name generate-code update-deployment-crds
$(info List executable directory)
$(info repo id: ${git_repository_id})
$(info branch: ${GIT_BRANCH})
Expand Down Expand Up @@ -117,7 +117,7 @@ run-test:
$(info Running unit tests...)
hack/make-rules/test.sh $(WHAT) $(TESTS)

run-e2e: verify-tag-name
run-e2e: verify-tag-name update-deployment-crds
ifeq ($(strip $(quay_repository)),)
echo "Running e2e with MCAD local image: mcad-controller ${TAG} IfNotPresent."
hack/run-e2e-kind.sh mcad-controller ${TAG} IfNotPresent
Expand All @@ -131,3 +131,22 @@ coverage:

clean:
rm -rf _output/

#CRD file maintenance rules
DEPLOYMENT_CRD_DIR=deployment/mcad-controller/crds
CRD_BASE_DIR=config/crd/bases
MCAD_CRDS= ${DEPLOYMENT_CRD_DIR}/ibm.com_quotasubtree-v1.yaml \
${DEPLOYMENT_CRD_DIR}/mcad.ibm.com_appwrappers.yaml \
${DEPLOYMENT_CRD_DIR}/mcad.ibm.com_queuejobs.yaml \
${DEPLOYMENT_CRD_DIR}/mcad.ibm.com_schedulingspecs.yaml

update-deployment-crds: ${MCAD_CRDS}

${DEPLOYMENT_CRD_DIR}/mcad.ibm.com_schedulingspecs.yaml : ${CRD_BASE_DIR}/mcad.ibm.com_schedulingspecs.yaml
${DEPLOYMENT_CRD_DIR}/mcad.ibm.com_appwrappers.yaml : ${CRD_BASE_DIR}/mcad.ibm.com_appwrappers.yaml
${DEPLOYMENT_CRD_DIR}/mcad.ibm.com_queuejobs.yaml : ${CRD_BASE_DIR}/mcad.ibm.com_queuejobs.yaml
${DEPLOYMENT_CRD_DIR}/mcad.ibm.com_schedulingspecs.yaml : ${CRD_BASE_DIR}/mcad.ibm.com_schedulingspecs.yaml


$(DEPLOYMENT_CRD_DIR)/%: ${CRD_BASE_DIR}/%
cp $< $@
3 changes: 2 additions & 1 deletion config/crd/bases/mcad.ibm.com_appwrappers.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.4.1
creationTimestamp: null
name: appwrappers.mcad.ibm.com
spec:
group: mcad.ibm.com
Expand Down Expand Up @@ -68,6 +67,8 @@ spec:
The associated item's level .status.conditions[].type field is monitored for any one of these conditions. Once all items with this
option is set and the conditionstatus is met the entire appwrapper state will be changed to one of the valid appwrapper completion state. Note :- this is an AND
operation for all items where this option is set. See the list of appwrapper states for a list of valid complete states.
type: string

custompodresources:
description: Optional section that specifies resource requirements
for non-standard k8s resources, follows same format as
Expand Down
1 change: 0 additions & 1 deletion config/crd/bases/mcad.ibm.com_queuejobs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.4.1
creationTimestamp: null
name: queuejobs.mcad.ibm.com
spec:
group: mcad.ibm.com
Expand Down
1 change: 0 additions & 1 deletion config/crd/bases/mcad.ibm.com_schedulingspecs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.4.1
creationTimestamp: null
name: schedulingspecs.mcad.ibm.com
spec:
group: mcad.ibm.com
Expand Down
62 changes: 62 additions & 0 deletions deployment/mcad-controller/crds/ibm.com_quotasubtree-v1.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
name: quotasubtrees.ibm.com
finalizers: []
spec:
group: ibm.com
scope: Namespaced
names:
kind: QuotaSubtree
singular: quotasubtree
plural: quotasubtrees
shortNames:
- qst
versions:
- name: v1
served: true
storage: true
subresources:
status: {}
schema:
openAPIV3Schema:
type: object
properties:
status:
type: object
x-kubernetes-preserve-unknown-fields: true
spec:
type: object
properties:
parent:
type: string
parentNamespace:
type: string
children:
type: array
items:
type: object
properties:
name:
type: string
namespace:
type: string
quotas:
type: object
properties:
disabled:
type: boolean
hardLimit:
type: boolean
requests:
type: object
properties:
cpu:
x-kubernetes-int-or-string: true
pattern: '^[0-9]*(m)*$'
memory:
x-kubernetes-int-or-string: true
pattern: '^[0-9]*(Ei|Pi|Ti|Gi|Mi|Ki|E|P|T|G|M|K)*$'
nvidia.com/gpu:
x-kubernetes-int-or-string: true
pattern: '^[0-9]*$'
Loading