Skip to content

kubernetes: ideas how to handle embedded fields. #24

@dilyevsky

Description

@dilyevsky

Here's specific case: https://github.com/kubernetes/api/blob/d04500c8c3dda9c980b668c57abc2ca61efcf5c4/core/v1/types.go#L1957-L1958

This will be accepted fine when media type is protobuf but will render incorrectly to JSON/YAML (for diffs or if you want to do PATCH because protobufs for patches are not accepted). Since generated.proto loses all information that the field is meant to be inline, we need some other way of having that information available during json marshaling.

Example:

...
        livenessProbe:
          handler:
            httpGet:
              path: /healthz
              port: 80
          initialDelaySeconds: 10
...

Should be:

...
        readinessProbe:
          failureThreshold: 3
          httpGet:
            path: /healthz
            port: 80
          initialDelaySeconds: 10
...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions