You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Error from server (BadRequest): error when creating "yamls/test.yaml": Pod in version "v1" cannot be handled as a Pod: strict decoding error: unknown field "invalidPart"
it actually works, it may cause potential bugs, for example, some users think their settings work, but actually not.
Describe the solution you'd like
I think k8s use the tech called openAPIV3Schema, generated from golang struct, to make sure yamls have exactly same schema of corresponding struct. Here is an example how they use it in CustomResourceDefinition.
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
# name must match the spec fields below, and be in the form: <plural>.<group>
name: crontabs.stable.example.com
spec:
# group name to use for REST API: /apis/<group>/<version>
group: stable.example.com
# list of versions supported by this CustomResourceDefinition
versions:
- name: v1
served: true
storage: true
schema:
openAPIV3Schema:
type: object
properties:
spec:
type: object
properties:
cronSpec:
type: string
image:
type: string
replicas:
type: integer
Thanks for contributing 🎉!
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
In k8s, if we create following yaml:
it will report error,
which mean
invalidPart
of yaml is unknown field.But in easegress, if we do this:
it actually works, it may cause potential bugs, for example, some users think their settings work, but actually not.
Describe the solution you'd like
I think k8s use the tech called
openAPIV3Schema
, generated from golang struct, to make sure yamls have exactly same schema of corresponding struct. Here is an example how they use it inCustomResourceDefinition
.Thanks for contributing 🎉!
The text was updated successfully, but these errors were encountered: