Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,13 @@ help: ## Display this help.

.PHONY: manifests
manifests: controller-gen ## Generate WebhookConfiguration, ClusterRole and CustomResourceDefinition objects.
$(CONTROLLER_GEN) rbac:roleName=jumpstarter-manager-role crd webhook paths="./..." \
output:crd:artifacts:config=deploy/helm/jumpstarter/charts/jumpstarter-controller/templates/crds/ \
$(CONTROLLER_GEN) rbac:roleName=jumpstarter-manager-role crd webhook paths="./api/..." paths="./internal/..." \
output:crd:artifacts:config=deploy/helm/jumpstarter/crds/ \
output:rbac:artifacts:config=deploy/helm/jumpstarter/charts/jumpstarter-controller/templates/rbac/

.PHONY: generate
generate: controller-gen ## Generate code containing DeepCopy, DeepCopyInto, and DeepCopyObject method implementations.
$(CONTROLLER_GEN) object:headerFile="hack/boilerplate.go.txt" paths="./..."
$(CONTROLLER_GEN) object:headerFile="hack/boilerplate.go.txt" paths="./api/..." paths="./internal/..."

.PHONY: fmt
fmt: ## Run go fmt against code.
Expand Down
20 changes: 17 additions & 3 deletions deploy/helm/jumpstarter/crds/jumpstarter.dev_leases.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,12 @@ spec:
spec:
description: LeaseSpec defines the desired state of Lease
properties:
beginTime:
description: |-
Requested start time. If omitted, lease starts when exporter is acquired.
Immutable after lease starts (cannot change the past).
format: date-time
type: string
clientRef:
description: The client that is requesting the lease
properties:
Expand All @@ -64,7 +70,16 @@ spec:
type: object
x-kubernetes-map-type: atomic
duration:
description: The desired duration of the lease
description: |-
Duration of the lease. Must be positive when provided.
Can be omitted (nil) when both BeginTime and EndTime are provided,
in which case it's calculated as EndTime - BeginTime.
type: string
endTime:
description: |-
Requested end time. If specified with BeginTime, Duration is calculated.
Can be updated to extend or shorten active leases.
format: date-time
type: string
release:
description: The release flag requests the controller to end the lease
Expand Down Expand Up @@ -118,7 +133,6 @@ spec:
x-kubernetes-map-type: atomic
required:
- clientRef
- duration
- selector
type: object
status:
Expand All @@ -127,7 +141,7 @@ spec:
beginTime:
description: |-
If the lease has been acquired an exporter name is assigned
and then and then it can be used, it will be empty while still pending
and then it can be used, it will be empty while still pending
format: date-time
type: string
conditions:
Expand Down
2 changes: 1 addition & 1 deletion internal/controller/suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ var _ = BeforeSuite(func() {

By("bootstrapping test environment")
testEnv = &envtest.Environment{
CRDDirectoryPaths: []string{filepath.Join("..", "..", "deploy", "helm", "jumpstarter", "charts", "jumpstarter-controller", "templates", "crds")},
CRDDirectoryPaths: []string{filepath.Join("..", "..", "deploy", "helm", "jumpstarter", "crds")},
ErrorIfCRDPathMissing: true,

// The BinaryAssetsDirectory is only required if you want to run the tests directly
Expand Down
Loading