Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[fix] nil status panic #1432

Closed
wants to merge 1 commit into from
Closed

Conversation

ls-2018
Copy link
Member

@ls-2018 ls-2018 commented Oct 4, 2023

image
apiVersion: apps.kruise.io/v1alpha1
kind: PodProbeMarker
metadata:
  name: game-server-probe
spec:
  selector:
    matchLabels:
      app: game-server-probe
  probes:
  - name: Idle
    containerName: game-server
    probe:
      exec:
        command:
        - telnet 127.0.0.1 8080
      initialDelaySeconds: 10
      timeoutSeconds: 3
      periodSeconds: 10
      successThreshold: 1
      failureThreshold: 3
    markerPolicy:
    - state: Succeeded
      labels:
        gameserver-idle: 'true'
      annotations:
        controller.kubernetes.io/pod-deletion-cost: '-10'
    - state: Failed
      labels:
        gameserver-idle: 'false'
      annotations:
        controller.kubernetes.io/pod-deletion-cost: '10'
    podConditionType: game.io/idle
---
apiVersion: v1
kind: Pod
metadata:
  name: game-server-probe
  labels:
    app: game-server-probe
spec:
  containers:
  - name: game-server-probe
    image: centos:7
    command:
    - "/bin/sh"
    - "-c"
    - "sleep 1d"
    imagePullPolicy: IfNotPresent
  restartPolicy: Always

The cluster does not have the image.
Both containerStatus and err are nil

@kruise-bot
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign fei-guo for approval by writing /assign @fei-guo in a comment. For more information see:The Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ls-2018 ls-2018 changed the title 🐛 fix nil status [fix] nil status Oct 4, 2023
@kruise-bot kruise-bot added the size/XS size/XS: 0-9 label Oct 4, 2023
@ls-2018 ls-2018 changed the title [fix] nil status [fix] nil status panic Oct 4, 2023
@codecov-commenter
Copy link

codecov-commenter commented Oct 4, 2023

Codecov Report

Merging #1432 (8104a4f) into master (81b5d52) will decrease coverage by 0.06%.
The diff coverage is 0.00%.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

@@            Coverage Diff             @@
##           master    #1432      +/-   ##
==========================================
- Coverage   48.27%   48.22%   -0.06%     
==========================================
  Files         153      153              
  Lines       21493    21497       +4     
==========================================
- Hits        10376    10366      -10     
- Misses       9979     9991      +12     
- Partials     1138     1140       +2     
Flag Coverage Δ
unittests 48.22% <0.00%> (-0.06%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
pkg/daemon/podprobe/pod_probe_controller.go 41.31% <0.00%> (-0.59%) ⬇️

... and 2 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@ls-2018 ls-2018 changed the title [fix] nil status panic Draft 🐛 fix nil status Oct 4, 2023
@ls-2018 ls-2018 changed the title Draft 🐛 fix nil status [fix] nil status panic Oct 4, 2023
@kruise-bot kruise-bot added size/S size/S 10-29 and removed size/XS size/XS: 0-9 labels Oct 4, 2023
Signed-off-by: 刘硕 <[email protected]>
@zmberg
Copy link
Member

zmberg commented Oct 9, 2023

@ls-2018 What version of the kruise?

@zmberg
Copy link
Member

zmberg commented Oct 9, 2023

@ls-2018 We already consider this situation.
image

@zmberg zmberg closed this Nov 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size/XS size/XS: 0-9
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants