Skip to content

Commit

Permalink
add phase
Browse files Browse the repository at this point in the history
Signed-off-by: Fabrizio Sestito <[email protected]>
  • Loading branch information
fabriziosestito committed Jan 15, 2025
1 parent 6ee62e6 commit 5407d80
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion rfc/0022-policy-lifecycle.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).
Expand Down Expand Up @@ -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.
Expand Down

0 comments on commit 5407d80

Please sign in to comment.