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

[release-4.5] [release-4.6] Bug 1896990: Handle values of 0 for maxUnavailable and maxSurge #7192

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions frontend/public/components/deployment-config.tsx
Expand Up @@ -131,11 +131,11 @@ export const DeploymentConfigDetailsList = ({ dc }) => {
obj={dc}
path="spec.strategy.rollingParams.maxUnavailable"
>
{dc.spec.strategy.rollingUpdate.maxUnavailable || 1} of{' '}
{dc.spec.strategy.rollingUpdate.maxUnavailable ?? 1} of{' '}
{pluralize(dc.spec.replicas, 'pod')}
</DetailsItem>
<DetailsItem label="Max Surge" obj={dc} path="spec.strategy.rollingParams.maxSurge">
{dc.spec.strategy.rollingUpdate.maxSurge || 1} greater than{' '}
{dc.spec.strategy.rollingUpdate.maxSurge ?? 1} greater than{' '}
{pluralize(dc.spec.replicas, 'pod')}
</DetailsItem>
</>
Expand Down
4 changes: 2 additions & 2 deletions frontend/public/components/deployment.tsx
Expand Up @@ -76,15 +76,15 @@ export const DeploymentDetailsList: React.FC<DeploymentDetailsListProps> = ({ de
obj={deployment}
path="spec.strategy.rollingUpdate.maxUnavailable"
>
{deployment.spec.strategy.rollingUpdate.maxUnavailable || 1} of{' '}
{deployment.spec.strategy.rollingUpdate.maxUnavailable ?? 1} of{' '}
{pluralize(deployment.spec.replicas, 'pod')}
</DetailsItem>
<DetailsItem
label="Max Surge"
obj={deployment}
path="spec.strategy.rollingUpdate.maxSurge"
>
{deployment.spec.strategy.rollingUpdate.maxSurge || 1} greater than{' '}
{deployment.spec.strategy.rollingUpdate.maxSurge ?? 1} greater than{' '}
{pluralize(deployment.spec.replicas, 'pod')}
</DetailsItem>
</>
Expand Down