Skip to content

fix: Set spec.hard.pod value to string#1928

Merged
sozercan merged 6 commits into
open-policy-agent:masterfrom
OpenSourceZombie:patch-1
Jul 22, 2022
Merged

fix: Set spec.hard.pod value to string#1928
sozercan merged 6 commits into
open-policy-agent:masterfrom
OpenSourceZombie:patch-1

Conversation

@OpenSourceZombie
Copy link
Copy Markdown
Contributor

What this PR does / why we need it:
Fixes v3.7.1 on k8s 1.20 with server side apply

Special notes for your reviewer:
When deploying v3.7.1 using deploy/gatekeeper.yaml with server side apply I get

# Error from server: failed to create typed patch object: .spec.hard.pods: expected string, got &value.valueUnstructured{Value:100}

From the examples here https://kubernetes.io/docs/concepts/policy/resource-quotas/#resource-quota-per-priorityclass this value should be a string not an integer

@sozercan
Copy link
Copy Markdown
Member

@OpenSourceZombie thanks for the PR!

This is auto-generated. Can you revert your current change and make changes in:


then run make manifests.

Looks like DCO needs to be signed and needs a semantic pr title too.

Copy link
Copy Markdown
Member

@sozercan sozercan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

see comment

@maxsmythe
Copy link
Copy Markdown
Contributor

Also, this will get clobbered by the config autogen process unless it also gets updated here:

apiVersion: v1
kind: ResourceQuota
metadata:
name: critical-pods
namespace: system
spec:
hard:
pods: 100
scopeSelector:
matchExpressions:
- operator: In
scopeName: PriorityClass
values:
- system-cluster-critical

@willbeason willbeason changed the title Set spec.hard.pod value to string fix: Set spec.hard.pod value to string May 31, 2022
OpenSourceZombie and others added 2 commits July 5, 2022 15:37
Signed-off-by: ahmed <ahmed@planet.com>
Signed-off-by: ahmed <ahmed@planet.com>
@OpenSourceZombie
Copy link
Copy Markdown
Contributor Author

@sozercan - updated and signed my commits.

Copy link
Copy Markdown
Member

@sozercan sozercan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the delay, LGTM

@sozercan sozercan merged commit 6f665b4 into open-policy-agent:master Jul 22, 2022
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

Successfully merging this pull request may close these issues.

4 participants