Skip to content

Commit

Permalink
fix: allow empty string for condition reason
Browse files Browse the repository at this point in the history
  • Loading branch information
jmdeal committed May 28, 2024
1 parent a30f67a commit 85d4375
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions hack/validation/status.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# Updating the set of required items in our status conditions so that we support older versions of the condition
# TODO: This can be removed once we upgrade to v1 and can do conversion to automatically set values for old versions of the condition
yq eval 'del(.spec.versions[0].schema.openAPIV3Schema.properties.status.properties.conditions.items.properties.reason.minLength)' -i pkg/apis/crds/karpenter.sh_nodeclaims.yaml
yq eval '.spec.versions[0].schema.openAPIV3Schema.properties.status.properties.conditions.items.properties.reason.pattern = "(^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$|^$)"' -i pkg/apis/crds/karpenter.sh_nodeclaims.yaml
yq eval '.spec.versions[0].schema.openAPIV3Schema.properties.status.properties.conditions.items.required = ["lastTransitionTime","status","type"]' -i pkg/apis/crds/karpenter.sh_nodeclaims.yaml
2 changes: 1 addition & 1 deletion pkg/apis/crds/karpenter.sh_nodeclaims.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -413,8 +413,8 @@ spec:
The value should be a CamelCase string.
This field may not be empty.
maxLength: 1024
pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$
type: string
pattern: (^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$|^$)
status:
description: status of the condition, one of True, False, Unknown.
enum:
Expand Down

0 comments on commit 85d4375

Please sign in to comment.