acorn-io / runtime

A simple application deployment framework built on Kubernetes
https://docs.acorn.io/
Apache License 2.0
1.13k stars 100 forks source link

Don't expose k8s scheduling details to end-users #2457

Closed njhale closed 8 months ago

njhale commented 8 months ago

Description

Hide k8s scheduling details from end-users by dropping the scheduling status field from the user-facing App resource.

Motivation

One of Acorn's primary goals is to "abstract Kubernetes". The existence of k8s-specific details in the status of an App is incongruent with this goal.

Requirements

The scheduling field:

  1. Is not surfaced in the status of Apps
  2. Is not present in the API schema of Apps (i.e. it's not surfaced in API discovery)
  3. Is still surfaced in the status and schema of AppInstances and the features it drive continue to work
sangee2004 commented 8 months ago

Tested with acorn version v0.10.1-rc1-18-g523ede04+523ede04

scheduling status field is not available in app anymore . It continues to present in appinstance

% kubectl explain  --recursive appinstance | grep -i scheduling
      scheduling    <>
% kubectl explain  --recursive app | grep -i scheduling 

Deploy apps. When inspecting apps using acorn apps -o json , scheduling field is not present. When viewing apps using kubectl app -o json , scheduling field is not present. When viewing appInstances using kubectl appinstance -o json , scheduling field is present. Deployed app's pod configuraition has affinity and resources set as expected.