mirror of
https://github.com/argoproj/argo-cd.git
synced 2026-02-20 01:28:45 +01:00
* test: add broken unit test data Signed-off-by: Jingchao <alswlx@gmail.com> * fix: npe error in kruise ds health-check Signed-off-by: Jingchao <alswlx@gmail.com> --------- Signed-off-by: Jingchao <alswlx@gmail.com>
This commit is contained in:
@@ -8,7 +8,7 @@ if obj.status ~= nil then
|
||||
hs.status = "Suspended"
|
||||
hs.message = "Daemonset is paused"
|
||||
return hs
|
||||
elseif obj.spec.updateStrategy.rollingUpdate.partition ~= 0 and obj.metadata.generation > 1 then
|
||||
elseif (obj.spec.updateStrategy.rollingUpdate.partition ~= nil) and (obj.spec.updateStrategy.rollingUpdate.partition ~= 0 and obj.metadata.generation > 1) then
|
||||
if obj.status.updatedNumberScheduled > (obj.status.desiredNumberScheduled - obj.spec.updateStrategy.rollingUpdate.partition) then
|
||||
hs.status = "Suspended"
|
||||
hs.message = "Daemonset needs manual intervention"
|
||||
|
||||
@@ -11,6 +11,10 @@ tests:
|
||||
status: Progressing
|
||||
message: "Waiting for initialization"
|
||||
inputPath: testdata/unknown.yaml
|
||||
- healthStatus:
|
||||
status: Progressing
|
||||
message: "Waiting for initialization"
|
||||
inputPath: testdata/no-update-strategy-partition.yaml
|
||||
- healthStatus:
|
||||
status: Suspended
|
||||
message: "Daemonset is paused"
|
||||
|
||||
34
resource_customizations/apps.kruise.io/DaemonSet/testdata/no-update-strategy-partition.yaml
vendored
Normal file
34
resource_customizations/apps.kruise.io/DaemonSet/testdata/no-update-strategy-partition.yaml
vendored
Normal file
@@ -0,0 +1,34 @@
|
||||
apiVersion: apps.kruise.io/v1alpha1
|
||||
kind: DaemonSet
|
||||
metadata:
|
||||
name: rdma-device-plugin
|
||||
namespace: nvidia-gpu
|
||||
generation: 2
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
app-name: rdma-device-plugin-pod
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app-name: rdma-device-plugin-pod
|
||||
spec:
|
||||
containers:
|
||||
image: 'my-k8s-rdmaplugin'
|
||||
imagePullPolicy: IfNotPresent
|
||||
name: k8s-rdma-device-plugin
|
||||
hostNetwork: true
|
||||
updateStrategy:
|
||||
rollingUpdate:
|
||||
maxSurge: 0
|
||||
maxUnavailable: 50
|
||||
rollingUpdateType: Standard
|
||||
type: RollingUpdate
|
||||
status:
|
||||
currentNumberScheduled: 0
|
||||
daemonSetHash: 5998d4d4d7
|
||||
desiredNumberScheduled: 0
|
||||
numberMisscheduled: 0
|
||||
numberReady: 0
|
||||
observedGeneration: 2
|
||||
updatedNumberScheduled: 0
|
||||
Reference in New Issue
Block a user