Skip to content

Commit 30d6085

Browse files
committed
Remove deprecated status fields from OCIRepository v1
Signed-off-by: Stefan Prodan <[email protected]>
1 parent fe0b8ca commit 30d6085

File tree

5 files changed

+0
-77
lines changed

5 files changed

+0
-77
lines changed

api/v1/ocirepository_types.go

-17
Original file line numberDiff line numberDiff line change
@@ -108,9 +108,6 @@ type OCIRepositorySpec struct {
108108
// authenticating with a certificate; the CA cert is useful if
109109
// you are using a self-signed server certificate. The Secret must
110110
// be of type `Opaque` or `kubernetes.io/tls`.
111-
//
112-
// Note: Support for the `caFile`, `certFile` and `keyFile` keys have
113-
// been deprecated.
114111
// +optional
115112
CertSecretRef *meta.LocalObjectReference `json:"certSecretRef,omitempty"`
116113

@@ -205,20 +202,6 @@ type OCIRepositoryStatus struct {
205202
// +optional
206203
Artifact *Artifact `json:"artifact,omitempty"`
207204

208-
// ContentConfigChecksum is a checksum of all the configurations related to
209-
// the content of the source artifact:
210-
// - .spec.ignore
211-
// - .spec.layerSelector
212-
// observed in .status.observedGeneration version of the object. This can
213-
// be used to determine if the content configuration has changed and the
214-
// artifact needs to be rebuilt.
215-
// It has the format of `<algo>:<checksum>`, for example: `sha256:<checksum>`.
216-
//
217-
// Deprecated: Replaced with explicit fields for observed artifact content
218-
// config in the status.
219-
// +optional
220-
ContentConfigChecksum string `json:"contentConfigChecksum,omitempty"`
221-
222205
// ObservedIgnore is the observed exclusion patterns used for constructing
223206
// the source artifact.
224207
// +optional

config/crd/bases/source.toolkit.fluxcd.io_ocirepositories.yaml

-17
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,6 @@ spec:
6868
authenticating with a certificate; the CA cert is useful if
6969
you are using a self-signed server certificate. The Secret must
7070
be of type `Opaque` or `kubernetes.io/tls`.
71-
72-
Note: Support for the `caFile`, `certFile` and `keyFile` keys have
73-
been deprecated.
7471
properties:
7572
name:
7673
description: Name of the referent.
@@ -364,20 +361,6 @@ spec:
364361
- type
365362
type: object
366363
type: array
367-
contentConfigChecksum:
368-
description: |-
369-
ContentConfigChecksum is a checksum of all the configurations related to
370-
the content of the source artifact:
371-
- .spec.ignore
372-
- .spec.layerSelector
373-
observed in .status.observedGeneration version of the object. This can
374-
be used to determine if the content configuration has changed and the
375-
artifact needs to be rebuilt.
376-
It has the format of `<algo>:<checksum>`, for example: `sha256:<checksum>`.
377-
378-
Deprecated: Replaced with explicit fields for observed artifact content
379-
config in the status.
380-
type: string
381364
lastHandledReconcileAt:
382365
description: |-
383366
LastHandledReconcileAt holds the value of the most recent

docs/api/v1/source.md

-25
Original file line numberDiff line numberDiff line change
@@ -1196,8 +1196,6 @@ registry. The client cert and key are useful if you are
11961196
authenticating with a certificate; the CA cert is useful if
11971197
you are using a self-signed server certificate. The Secret must
11981198
be of type <code>Opaque</code> or <code>kubernetes.io/tls</code>.</p>
1199-
<p>Note: Support for the <code>caFile</code>, <code>certFile</code> and <code>keyFile</code> keys have
1200-
been deprecated.</p>
12011199
</td>
12021200
</tr>
12031201
<tr>
@@ -3296,8 +3294,6 @@ registry. The client cert and key are useful if you are
32963294
authenticating with a certificate; the CA cert is useful if
32973295
you are using a self-signed server certificate. The Secret must
32983296
be of type <code>Opaque</code> or <code>kubernetes.io/tls</code>.</p>
3299-
<p>Note: Support for the <code>caFile</code>, <code>certFile</code> and <code>keyFile</code> keys have
3300-
been deprecated.</p>
33013297
</td>
33023298
</tr>
33033299
<tr>
@@ -3457,27 +3453,6 @@ Artifact
34573453
</tr>
34583454
<tr>
34593455
<td>
3460-
<code>contentConfigChecksum</code><br>
3461-
<em>
3462-
string
3463-
</em>
3464-
</td>
3465-
<td>
3466-
<em>(Optional)</em>
3467-
<p>ContentConfigChecksum is a checksum of all the configurations related to
3468-
the content of the source artifact:
3469-
- .spec.ignore
3470-
- .spec.layerSelector
3471-
observed in .status.observedGeneration version of the object. This can
3472-
be used to determine if the content configuration has changed and the
3473-
artifact needs to be rebuilt.
3474-
It has the format of <code>&lt;algo&gt;:&lt;checksum&gt;</code>, for example: <code>sha256:&lt;checksum&gt;</code>.</p>
3475-
<p>Deprecated: Replaced with explicit fields for observed artifact content
3476-
config in the status.</p>
3477-
</td>
3478-
</tr>
3479-
<tr>
3480-
<td>
34813456
<code>observedIgnore</code><br>
34823457
<em>
34833458
string

docs/spec/v1/ocirepositories.md

-17
Original file line numberDiff line numberDiff line change
@@ -326,10 +326,6 @@ data:
326326
ca.crt: <BASE64>
327327
```
328328

329-
**Warning:** Support for the `caFile`, `certFile` and `keyFile` keys have been
330-
deprecated. If you have any Secrets using these keys and specified in an
331-
OCIRepository, the controller will log a deprecation warning.
332-
333329
### Proxy secret reference
334330

335331
`.spec.proxySecretRef.name` is an optional field used to specify the name of a
@@ -1073,19 +1069,6 @@ configuration issue in the OCIRepository spec. When a reconciliation fails, the
10731069
reconciliation is performed again after the failure, the reason is updated to
10741070
`Progressing`.
10751071

1076-
### Content Configuration Checksum
1077-
1078-
The source-controller calculates the SHA256 checksum of the various
1079-
configurations of the OCIRepository that indicate a change in source and
1080-
records it in `.status.contentConfigChecksum`. This field is used to determine
1081-
if the source artifact needs to be rebuilt.
1082-
1083-
**Deprecation Note:** `contentConfigChecksum` is no longer used and will be
1084-
removed in the next API version. The individual components used for generating
1085-
content configuration checksum now have explicit fields in the status. This
1086-
makes the observations used by the controller for making artifact rebuild
1087-
decisions more transparent and easier to debug.
1088-
10891072
### Observed Ignore
10901073

10911074
The source-controller reports an observed ignore in the OCIRepository's

internal/controller/ocirepository_controller.go

-1
Original file line numberDiff line numberDiff line change
@@ -1218,7 +1218,6 @@ func (r *OCIRepositoryReconciler) reconcileArtifact(ctx context.Context, sp *pat
12181218
// Record the observations on the object.
12191219
obj.Status.Artifact = artifact.DeepCopy()
12201220
obj.Status.Artifact.Metadata = metadata.Metadata
1221-
obj.Status.ContentConfigChecksum = "" // To be removed in the next API version.
12221221
obj.Status.ObservedIgnore = obj.Spec.Ignore
12231222
obj.Status.ObservedLayerSelector = obj.Spec.LayerSelector
12241223

0 commit comments

Comments
 (0)