fix: Don't mark CRD degraded while 'Installing' (#26126)

Signed-off-by: Kyle Brown <[email protected]>
This commit is contained in:
kbweave
2026-05-27 15:09:46 +00:00
committed by GitHub
parent be055e7f22
commit 899341a0d5
3 changed files with 70 additions and 4 deletions
@@ -46,9 +46,15 @@ for _, condition in pairs(obj.status.conditions) do
end
-- Checking if CRD is established
if condition.type == "Established" and condition.status == "True" then
isEstablished = true
conditionMsg = condition.message
if condition.type == "Established" then
if condition.status == "True" then
isEstablished = true
conditionMsg = condition.message
elseif condition.reason == "Installing" then
hs.status = "Progressing"
hs.message = "CRD is being installed"
return hs
end
end
end
@@ -26,4 +26,8 @@ tests:
- healthStatus:
status: Progressing
message: "Status conditions not found"
inputPath: testdata/crd-v1-no-conditions-progressing.yaml
inputPath: testdata/crd-v1-no-conditions-progressing.yaml
- healthStatus:
status: Progressing
message: "CRD is being installed"
inputPath: testdata/crd-v1-installing-progressing.yaml
@@ -0,0 +1,56 @@
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
name: examples.example.io
spec:
conversion:
strategy: None
group: example.io
names:
kind: Example
listKind: ExampleList
plural: examples
shortNames:
- ex
singular: example
preserveUnknownFields: true
scope: Namespaced
versions:
- additionalPrinterColumns:
- description: >-
CreationTimestamp is a timestamp representing the server time when
this object was created. It is not guaranteed to be set in
happens-before order across separate operations. Clients may not set
this value. It is represented in RFC3339 form and is in UTC.
Populated by the system. Read-only. Null for lists. More info:
https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
jsonPath: .metadata.creationTimestamp
name: Age
type: date
name: v1alpha1
served: true
storage: true
subresources: {}
status:
acceptedNames:
kind: Example
listKind: ExampleList
plural: examples
shortNames:
- ex
singular: example
conditions:
- lastTransitionTime: '2024-05-19T23:35:28Z'
message: no conflicts found
reason: NoConflicts
status: 'True'
type: NamesAccepted
- lastTransitionTime: '2024-05-19T23:35:28Z'
message: the initial names have not been accepted
reason: Installing
status: 'False'
type: Established
storedVersions:
- v1alpha1