Bucket: Add status.observedIgnore
Introduce status.observedIgnore in the Bucket API for consistency with other sources with ignore. Signed-off-by: Sunny <darkowlzz@protonmail.com>
This commit is contained in:
parent
e996848555
commit
a6d7948667
|
@ -128,6 +128,11 @@ type BucketStatus struct {
|
|||
// +optional
|
||||
Artifact *Artifact `json:"artifact,omitempty"`
|
||||
|
||||
// ObservedIgnore is the observed exclusion patterns used for constructing
|
||||
// the source artifact.
|
||||
// +optional
|
||||
ObservedIgnore *string `json:"observedIgnore,omitempty"`
|
||||
|
||||
meta.ReconcileRequestStatus `json:",inline"`
|
||||
}
|
||||
|
||||
|
|
|
@ -166,6 +166,11 @@ func (in *BucketStatus) DeepCopyInto(out *BucketStatus) {
|
|||
*out = new(Artifact)
|
||||
(*in).DeepCopyInto(*out)
|
||||
}
|
||||
if in.ObservedIgnore != nil {
|
||||
in, out := &in.ObservedIgnore, &out.ObservedIgnore
|
||||
*out = new(string)
|
||||
**out = **in
|
||||
}
|
||||
out.ReconcileRequestStatus = in.ReconcileRequestStatus
|
||||
}
|
||||
|
||||
|
|
|
@ -492,6 +492,10 @@ spec:
|
|||
the Bucket object.
|
||||
format: int64
|
||||
type: integer
|
||||
observedIgnore:
|
||||
description: ObservedIgnore is the observed exclusion patterns used
|
||||
for constructing the source artifact.
|
||||
type: string
|
||||
url:
|
||||
description: URL is the dynamic fetch link for the latest Artifact.
|
||||
It is provided on a "best effort" basis, and using the precise BucketStatus.Artifact
|
||||
|
|
|
@ -628,6 +628,7 @@ func (r *BucketReconciler) reconcileArtifact(ctx context.Context, obj *sourcev1.
|
|||
|
||||
// Record it on the object
|
||||
obj.Status.Artifact = artifact.DeepCopy()
|
||||
obj.Status.ObservedIgnore = obj.Spec.Ignore
|
||||
|
||||
// Update symlink on a "best effort" basis
|
||||
url, err := r.Storage.Symlink(artifact, "latest.tar.gz")
|
||||
|
|
|
@ -1518,6 +1518,19 @@ Artifact
|
|||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<code>observedIgnore</code><br>
|
||||
<em>
|
||||
string
|
||||
</em>
|
||||
</td>
|
||||
<td>
|
||||
<em>(Optional)</em>
|
||||
<p>ObservedIgnore is the observed exclusion patterns used for constructing
|
||||
the source artifact.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<code>ReconcileRequestStatus</code><br>
|
||||
<em>
|
||||
<a href="https://godoc.org/github.com/fluxcd/pkg/apis/meta#ReconcileRequestStatus">
|
||||
|
|
|
@ -1064,6 +1064,25 @@ Note that a Bucket can be [reconciling](#reconciling-bucket) while failing at
|
|||
the same time, for example due to a newly introduced configuration issue in the
|
||||
Bucket spec.
|
||||
|
||||
### Observed Ignore
|
||||
|
||||
The source-controller reports an observed ignore in the Bucket's
|
||||
`.status.observedIgnore`. The observed ignore is the latest `.spec.ignore` value
|
||||
which resulted in a [ready state](#ready-bucket), or stalled due to error
|
||||
it can not recover from without human intervention. The value is the same as the
|
||||
[ignore in spec](#ignore). It indicates the ignore rules used in building the
|
||||
current artifact in storage.
|
||||
|
||||
Example:
|
||||
```yaml
|
||||
status:
|
||||
...
|
||||
observedIgnore: |
|
||||
hpa.yaml
|
||||
build
|
||||
...
|
||||
```
|
||||
|
||||
### Observed Generation
|
||||
|
||||
The source-controller reports an
|
||||
|
|
Loading…
Reference in New Issue