Description
Add an empty Status field to the Function CRD
Expected Behaviour
The Function CRD should have a Status in its CRD, so that we can expand on readiness concepts later on or store state about the function.
Current Behaviour
This doesn't exist at present.
Which Solution Do You Recommend?
Update the definition for the types, so that kubebuilder generates a status object.
Make sure that it is not mandatory, otherwise it will be a breaking change for anyone applying a new object from YAML.
Codegen will need to be updated so that the Status object is added to the Go SDK for Functions:
https://github.com/openfaas/faas-netes/blob/master/hack/update-codegen.sh
The CRDs will have to be regenerated too:
https://github.com/openfaas/faas-netes/blob/master/hack/update-crds.sh
The inlets-operator already has a status, this may be useful?
https://github.com/inlets/inlets-operator/blob/master/pkg/apis/inletsoperator/v1alpha1/types.go#L40
https://github.com/inlets/inlets-operator/blob/master/pkg/apis/inletsoperator/v1alpha1/types.go#L54
We will probably need to add // +kubebuilder:subresource:status
to the Function type.
https://github.com/openfaas/faas-netes/blob/master/pkg/apis/openfaas/v1/types.go#L13
I have been through this exercise once or twice but threw away the code, there may be a couple of surprises or issues to resolve.
Activity