question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

V1RollingUpdateDaemonSet maxUnavailable is 'String' but API specifies 'IntOrString'

See original GitHub issue

V1beta2RollingUpdateDaemonSet has IntOrString maxUnavailable but V1RollingUpdateDaemonSet has String maxUnavailable, even though the swagger.json specifies it as an IntOrString.

This causes an issue that when trying to use the integer form for maxUnavailable, because the API assumes that if it is a string then it should be treated as a percentage.

spec.updateStrategy.rollingUpdate.maxUnavailable: Invalid value: intstr.IntOrString{Type:1, IntVal:0, StrVal:\"1\"}: a valid percent string must be a numeric string followed by an ending '%'

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:12 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
yue9944882commented, Oct 23, 2019
0reactions
huhu-skycommented, Jul 8, 2020
{
	"kind": "Status",
	"apiVersion": "v1",
	"metadata": {},
	"status": "Failure",
	"message": "Deployment.apps \"ingress-gateway-test\" is invalid: [spec.strategy.rollingUpdate.maxUnavailable: Invalid value: intstr.IntOrString{Type:1, IntVal:0, StrVal:\"1\"}: a valid percent string must be a numeric string followed by an ending '%' (e.g. '1%',  or '93%', regex used for validation is '[0-9]+%'), spec.strategy.rollingUpdate.maxSurge: Invalid value: intstr.IntOrString{Type:1, IntVal:0, StrVal:\"1\"}: a valid percent string must be a numeric string followed by an ending '%' (e.g. '1%',  or '93%', regex used for validation is '[0-9]+%')]",
	"reason": "Invalid",
	"details": {
		"name": "ingress-gateway-test",
		"group": "apps",
		"kind": "Deployment",
		"causes": [
			{
				"reason": "FieldValueInvalid",
				"message": "Invalid value: intstr.IntOrString{Type:1, IntVal:0, StrVal:\"1\"}: a valid percent string must be a numeric string followed by an ending '%' (e.g. '1%',  or '93%', regex used for validation is '[0-9]+%')",
				"field": "spec.strategy.rollingUpdate.maxUnavailable"
			},
			{
				"reason": "FieldValueInvalid",
				"message": "Invalid value: intstr.IntOrString{Type:1, IntVal:0, StrVal:\"1\"}: a valid percent string must be a numeric string followed by an ending '%' (e.g. '1%',  or '93%', regex used for validation is '[0-9]+%')",
				"field": "spec.strategy.rollingUpdate.maxSurge"
			}
		]
	},
	"code": 422
}

I have the same error with 5.0.0, so which version i can use to solve this problem, Thanks;

Read more comments on GitHub >

github_iconTop Results From Across the Web

Specifying a Disruption Budget for your Application - Kubernetes
When you specify a percentage by setting the value to a string representation of ... You can specify only one of maxUnavailable and...
Read more >
Index (client-java-api 2.0.0 API) - javadoc.io
Build a form-encoding request body with the given form parameters. buildRequestBodyMultipart(Map<String, Object>) - Method in class io.kubernetes.client.
Read more >
Understanding the Available condition of a Kubernetes ...
Although the Kubernetes documentation is excellent, the API ... maxUnavailable is an optional field that specifies the maximum number of ...
Read more >
Deployment [apps/v1] - apps | OpenShift Container Platform 3.11
/apis/apps/v1/deployments; /apis/apps/v1/namespaces/{namespace}/deployments ... This is a pointer to distinguish between explicit zero and not specified.
Read more >
Kubernetes Rolling Update Configuration - Blue Matador
The ReplicaSet manages the number of running pods, and the Deployment ... Both maxSurge and maxUnavailable can be specified as either an ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found