Skip to content

normalized PodView: shape-blind pod reads to match the shape-blind mutation api #344

Description

@AviadHayumi

follow-up to #341. the workload front door is shape-blind on the MUTATION and capability side , but Tree still returns ExtractedInstance with its mutually exclusive PodTemplateSpec / PodSpec / FragmentedPodSpec fields - so a consumer reading pod data still branches on which one is set ( the quickstart reads only PodTemplateSpec , which quietly skips fragmented-only workloads ).

the proposal : a normalized read view using the same vocabulary as PodPatch :

type PodView struct {
	SchedulerName     string
	PriorityClassName string
	Labels            map[string]string
	Annotations       map[string]string
	NodeAffinity      *corev1.NodeAffinity
	PodAffinity       *corev1.PodAffinity
	Containers        []corev1.Container
	// a field is zero when the definition cannot extract it
}

filled from whichever shape the definition has , exposed on the tree instance ( or via the workload ) , so read and write share one shape-blind vocabulary. ExtractedInstance stays in the power api.

out of scope for the first pr on #341 by agreement - tracked here.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Fields

    Priority

    None yet

    Target date

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions