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

why this happend? #1953

Open
song0071000 opened this issue Mar 10, 2025 · 2 comments
Open

why this happend? #1953

song0071000 opened this issue Mar 10, 2025 · 2 comments

Comments

@song0071000
Copy link

song0071000 commented Mar 10, 2025

kruise version: v1.4.0

apiVersion: apps.kruise.io/v1alpha1
kind: PodProbeMarker
metadata:
name: test-probe
namespace: default
spec:
selector:
matchLabels:
app.kubernetes.io/instance: test
probes:
- name: reporter
containerName: test
probe:
exec:
command:
- /opt/test/probe.sh
initialDelaySeconds: 10
timeoutSeconds: 3
periodSeconds: 10
successThreshold: 1
failureThreshold: 3
markerPolicy:
- state: idle
labels:
infra.test.im/biz-state: idle
- state: normal
labels:
infra.test.im/biz-state: normal

when i apply this yaml, the error occurs below:

admission webhook "vpodprobemarker.kb.io" denied the request: spec.markerPolicy.state: Required value: marker policy state must be 'True' or 'False'

@song0071000
Copy link
Author

spec.markerPolicy.state must be true or false?
I didn't find any relevant description in the document.

@song0071000
Copy link
Author

if policy.State != appsv1alpha1.ProbeSucceeded && policy.State != appsv1alpha1.ProbeFailed {
allErrors = append(allErrors, field.Required(fldPath.Child("state"), "marker policy state must be 'True' or 'False'"))
return allErrors
}

i see. Filed "spec.markerPolicy.state" can only be "Succeeded" or "Failed"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant