Skip to content

Commit

Permalink
Add ObservedGeneration to Function CRD
Browse files Browse the repository at this point in the history
ObservedGeneration helps the controller know when to add a
Reconciling condition to the status object of the Function.

Signed-off-by: Alex Ellis (OpenFaaS Ltd) <[email protected]>
  • Loading branch information
alexellis committed Jun 11, 2024
1 parent 2aa53c7 commit b49dde5
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 0 deletions.
3 changes: 3 additions & 0 deletions artifacts/crds/crds.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -624,6 +624,9 @@ spec:
- type
type: object
type: array
observedGeneration:
format: int64
type: integer
replicas:
format: int32
type: integer
Expand Down
3 changes: 3 additions & 0 deletions artifacts/crds/openfaas.com_functions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,9 @@ spec:
- type
type: object
type: array
observedGeneration:
format: int64
type: integer
replicas:
format: int32
type: integer
Expand Down
3 changes: 3 additions & 0 deletions chart/openfaas/artifacts/crds.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -624,6 +624,9 @@ spec:
- type
type: object
type: array
observedGeneration:
format: int64
type: integer
replicas:
format: int32
type: integer
Expand Down
3 changes: 3 additions & 0 deletions chart/openfaas/templates/openfaas.com_functions-crd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,9 @@ spec:
- type
type: object
type: array
observedGeneration:
format: int64
type: integer
replicas:
format: int32
type: integer
Expand Down
2 changes: 2 additions & 0 deletions pkg/apis/openfaas/v1/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,8 @@ type FunctionStatus struct {

// +optional
UnavailableReplicas int32 `json:"unavailableReplicas,omitempty"`

ObservedGeneration int64 `json:"observedGeneration,omitempty"`
}

// +genclient
Expand Down

0 comments on commit b49dde5

Please sign in to comment.