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

K8SPXC-885: Fix validation webhook on k8s 1.22 #1021

Merged
merged 2 commits into from
Oct 18, 2021
Merged

K8SPXC-885: Fix validation webhook on k8s 1.22 #1021

merged 2 commits into from
Oct 18, 2021

Conversation

egegunes
Copy link
Contributor

@egegunes egegunes commented Oct 15, 2021

K8SPXC-885 Powered by Pull Request Badge

Validation webhook was failing with json: unknown field "subresource"
on decoding the admission request. It's because of the new "subresource"
field in metadata.managedFields1. Folks in Knative fixed the
issue2 with creating a custom json decoder that ignores unknown
fields only in metadata.

Footnotes

  1. https://github.com/kubernetes/apimachinery/commit/5c420e58bf9057fbc9457744dceaa765ef78c9dd

  2. https://github.com/knative/pkg/pull/2249

Validation webhook was failing with `json: unknown field "subresource"`
on decoding the admission request. It's because of the new "subresource"
field in `metadata.managedFields`[^0]. Folks in Knative fixed the
issue[^1] with creating a custom json decoder that ignores unknown
fields *only* in metadata.

[^0]: kubernetes/apimachinery@5c420e5
[^1]: knative/pkg#2249
@pull-request-size pull-request-size bot added the size/L 100-499 lines label Oct 15, 2021
pkg/webhook/hook.go Outdated Show resolved Hide resolved
Co-authored-by: Mykola Marzhan <[email protected]>
@delgod delgod assigned JNKPercona and unassigned egegunes Oct 18, 2021
@JNKPercona
Copy link
Collaborator

Test name Status
scheduled-backup passed
scaling passed
storage passed
scaling-proxysql passed
self-healing passed
security-context passed
self-healing-chaos passed
upgrade-haproxy passed
haproxy passed
big-data passed
init-deploy passed
limits passed
monitoring-2-0 passed
affinity passed
recreate passed
one-pod passed
restore-to-encrypted-cluster passed
auto-tuning passed
demand-backup passed
proxysql-sidecar-res-limits passed
pitr passed
users passed
demand-backup-encrypted-with-tls passed
tls-issue-self passed
tls-issue-cert-manager passed
tls-issue-cert-manager-ref passed
validation-hook passed
upgrade-proxysql passed
smart-update passed
upgrade-consistency passed
self-healing-advanced passed
self-healing-advanced-chaos passed
operator-self-healing passed
operator-self-healing-chaos passed

commit: c76e2f1
image: perconalab/percona-xtradb-cluster-operator:PR-1021-c76e2f19

@hors hors merged commit 2310888 into main Oct 18, 2021
@hors hors deleted the K8SPXC-885 branch October 18, 2021 18:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants