acorn-io / runtime

A simple application deployment framework built on Kubernetes

Home Page:https://docs.acorn.io/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Don't expose k8s scheduling details to end-users

njhale opened this issue · comments

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

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.