jvm-operators / abstract-operator

Library/SDK for creating the operators for Kubernetes and Openshift.
Apache License 2.0
60 stars 17 forks source link

Add a status block to all CRDs created by AbstractOperator #62

Closed tmckayus closed 4 years ago

tmckayus commented 4 years ago

This initial PR creates an empty status block in all CRDs created by the AbstractOperator, regardless of json schema. Additionally, it adds a simple routine to optionallyupdate the status block to contain a 'state' string and 'lastTransitionTime' but is API compatible with earlier versions of AstractOperator.

In the future, more general support for definable status blocks can be added.

Description

Related Issue

Types of changes

tmckayus commented 4 years ago

@jkremser ptal

This fixes the issue in community-operators, which is now requiring the presence of a status block along with a status block write on PRs for operators (this will be referenced from the spark operator shortly).

It's a simple hard-coded addition of an empty status block, and a routine to update a simple status of "state: string, lastTransitionTime: string" with a fixed date format.

later we can fix up the classes to allow definition of general status blocks.