Skip to content

Commit

Permalink
Merge pull request #189 from tomhuang12/default-observed-generation
Browse files Browse the repository at this point in the history
  • Loading branch information
hiddeco authored Nov 22, 2021
2 parents 24dad26 + 293bf80 commit c931a29
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 2 deletions.
3 changes: 2 additions & 1 deletion api/v1beta1/imagepolicy_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,8 @@ type ImagePolicy struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`

Spec ImagePolicySpec `json:"spec,omitempty"`
Spec ImagePolicySpec `json:"spec,omitempty"`
// +kubebuilder:default={"observedGeneration":-1}
Status ImagePolicyStatus `json:"status,omitempty"`
}

Expand Down
3 changes: 2 additions & 1 deletion api/v1beta1/imagerepository_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,8 @@ type ImageRepository struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`

Spec ImageRepositorySpec `json:"spec,omitempty"`
Spec ImageRepositorySpec `json:"spec,omitempty"`
// +kubebuilder:default={"observedGeneration":-1}
Status ImageRepositoryStatus `json:"status,omitempty"`
}

Expand Down
3 changes: 3 additions & 0 deletions config/crd/bases/image.toolkit.fluxcd.io_imagepolicies.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,8 @@ spec:
- policy
type: object
status:
default:
observedGeneration: -1
description: ImagePolicyStatus defines the observed state of ImagePolicy
properties:
conditions:
Expand Down Expand Up @@ -144,6 +146,7 @@ spec:
description: LatestImage gives the first in the list of images scanned by the image repository, when filtered and ordered according to the policy.
type: string
observedGeneration:
description: ObservedGeneration is the last reconciled generation.
format: int64
type: integer
type: object
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@ spec:
type: string
type: object
status:
default:
observedGeneration: -1
description: ImageRepositoryStatus defines the observed state of ImageRepository
properties:
canonicalImageName:
Expand Down

0 comments on commit c931a29

Please sign in to comment.