Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set default observedGeneration to -1 #189

Merged
merged 1 commit into from
Nov 22, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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