diff --git a/rfc/0022-policy-lifecycle.md b/rfc/0022-policy-lifecycle.md index 916a7c5..4bc0e84 100644 --- a/rfc/0022-policy-lifecycle.md +++ b/rfc/0022-policy-lifecycle.md @@ -245,7 +245,9 @@ This will allow us to identify the status of a policy on a specific Policy Serve ### Policy Status -We will use the [status condition](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#typical-status-properties) convention to report the status of the policy. +#### Status Conditions + +We will use the [status conditions](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#typical-status-properties) convention to report the status of the policy. The status condition struct will be extended to include the replica number. The approach of extending the status condition struct is already used in the Kubernetes codebase, for example in the [Pod conditions](https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#pod-conditions). @@ -282,6 +284,18 @@ conditions: generation: 1 ``` +#### Policy phase + +Similarly to the `Pod` phase, we will introduce a `phase` field in the `Policy` CRD . +The phase of a Policy is a simple, high-level summary of where the policy is in its lifecycle. + +Here are the possible values for `phase`: + +- `Pending`: The policy was created and is pending to be loaded. +- `Updating`: The policy was updated and is pending to be loaded. +- `Active`: The policy was successfully loaded and is ready to be used. +- `Failed`: The policy failed to load. + ### Kubernetes Events The controller will generate [Kubernetes Events](https://kubernetes.io/docs/reference/kubernetes-api/cluster-resources/event-v1/) to reflect the status of a policy.