Skip to content

Commit

Permalink
set default observedGeneration to -1
Browse files Browse the repository at this point in the history
for the following CRDs

- HelmRepository
- HelmChart
- GitRepository
- Bucket

Signed-off-by: York Chen <ychen@d2iq.com>
  • Loading branch information
York Chen authored and hiddeco committed Dec 9, 2021
1 parent bb6794c commit 52d21ec
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 4 deletions.
3 changes: 2 additions & 1 deletion api/v1beta1/bucket_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,8 @@ type Bucket struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`

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

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

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

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

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

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

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

Expand Down
2 changes: 2 additions & 0 deletions config/crd/bases/source.toolkit.fluxcd.io_buckets.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,8 @@ spec:
subresources:
status: {}
status:
default:
observedGeneration: -1
acceptedNames:
kind: ""
plural: ""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,8 @@ spec:
subresources:
status: {}
status:
default:
observedGeneration: -1
acceptedNames:
kind: ""
plural: ""
Expand Down
2 changes: 2 additions & 0 deletions config/crd/bases/source.toolkit.fluxcd.io_helmcharts.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,8 @@ spec:
subresources:
status: {}
status:
default:
observedGeneration: -1
acceptedNames:
kind: ""
plural: ""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,8 @@ spec:
subresources:
status: {}
status:
default:
observedGeneration: -1
acceptedNames:
kind: ""
plural: ""
Expand Down

0 comments on commit 52d21ec

Please sign in to comment.