Skip to content

Commit db28a52

Browse files
authored
Remove status.phase field from the code and doc references (#368)
Signed-off-by: Todd Short <[email protected]>
1 parent 23e2f4f commit db28a52

File tree

7 files changed

+1
-38
lines changed

7 files changed

+1
-38
lines changed

README.md

-2
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,6 @@ Procedure steps marked with an asterisk (`*`) are likely to change with future A
7272
f:status:
7373
.:
7474
f:conditions:
75-
f:phase:
7675
Manager: manager
7776
Operation: Update
7877
Subresource: status
@@ -91,7 +90,6 @@ Procedure steps marked with an asterisk (`*`) are likely to change with future A
9190
Reason: Unpacking
9291
Status: False
9392
Type: Unpacked
94-
Phase: Unpacking
9593
Events: <none>
9694
```
9795

api/core/v1alpha1/clustercatalog_types.go

-10
Original file line numberDiff line numberDiff line change
@@ -35,17 +35,11 @@ const (
3535
ReasonUnpackFailed = "UnpackFailed"
3636
ReasonStorageFailed = "FailedToStore"
3737
ReasonStorageDeleteFailed = "FailedToDelete"
38-
39-
PhasePending = "Pending"
40-
PhaseUnpacking = "Unpacking"
41-
PhaseFailing = "Failing"
42-
PhaseUnpacked = "Unpacked"
4338
)
4439

4540
//+kubebuilder:object:root=true
4641
//+kubebuilder:resource:scope=Cluster
4742
//+kubebuilder:subresource:status
48-
//+kubebuilder:printcolumn:name="Phase",type=string,JSONPath=`.status.phase`
4943
//+kubebuilder:printcolumn:name=LastUnpacked,type=date,JSONPath=`.status.lastUnpacked`
5044
//+kubebuilder:printcolumn:name=Age,type=date,JSONPath=`.metadata.creationTimestamp`
5145

@@ -91,10 +85,6 @@ type ClusterCatalogStatus struct {
9185
// resolvedSource contains information about the resolved source
9286
// +optional
9387
ResolvedSource *ResolvedCatalogSource `json:"resolvedSource,omitempty"`
94-
// phase represents a human-readable status of resolution of the content source.
95-
// It is not appropriate to use for business logic determination.
96-
// +optional
97-
Phase string `json:"phase,omitempty"`
9888
// contentURL is a cluster-internal address that on-cluster components
9989
// can read the content of a catalog from
10090
// +optional

config/base/crd/bases/olm.operatorframework.io_clustercatalogs.yaml

-8
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,6 @@ spec:
1515
scope: Cluster
1616
versions:
1717
- additionalPrinterColumns:
18-
- jsonPath: .status.phase
19-
name: Phase
20-
type: string
2118
- jsonPath: .status.lastUnpacked
2219
name: LastUnpacked
2320
type: date
@@ -182,11 +179,6 @@ spec:
182179
ClusterCatalog's generation, which is updated on mutation by the API Server.
183180
format: int64
184181
type: integer
185-
phase:
186-
description: |-
187-
phase represents a human-readable status of resolution of the content source.
188-
It is not appropriate to use for business logic determination.
189-
type: string
190182
resolvedSource:
191183
description: resolvedSource contains information about the resolved
192184
source

docs/fetching-catalog-contents.md

-1
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,6 @@ of a catalog can be read from:
9191
status: "True"
9292
type: Unpacked
9393
contentURL: https://catalogd-catalogserver.olmv1-system.svc/catalogs/operatorhubio/all.json
94-
phase: Unpacked
9594
resolvedSource:
9695
image:
9796
ref: quay.io/operatorhubio/catalog@sha256:e53267559addc85227c2a7901ca54b980bc900276fc24d3f4db0549cb38ecf76

internal/controllers/core/clustercatalog_controller.go

-5
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,6 @@ func (r *ClusterCatalogReconciler) reconcile(ctx context.Context, catalog *v1alp
186186

187187
func updateStatusUnpackPending(status *v1alpha1.ClusterCatalogStatus, result *source.Result) {
188188
status.ResolvedSource = nil
189-
status.Phase = v1alpha1.PhasePending
190189
meta.SetStatusCondition(&status.Conditions, metav1.Condition{
191190
Type: v1alpha1.TypeUnpacked,
192191
Status: metav1.ConditionFalse,
@@ -197,7 +196,6 @@ func updateStatusUnpackPending(status *v1alpha1.ClusterCatalogStatus, result *so
197196

198197
func updateStatusUnpacking(status *v1alpha1.ClusterCatalogStatus, result *source.Result) {
199198
status.ResolvedSource = nil
200-
status.Phase = v1alpha1.PhaseUnpacking
201199
meta.SetStatusCondition(&status.Conditions, metav1.Condition{
202200
Type: v1alpha1.TypeUnpacked,
203201
Status: metav1.ConditionFalse,
@@ -209,7 +207,6 @@ func updateStatusUnpacking(status *v1alpha1.ClusterCatalogStatus, result *source
209207
func updateStatusUnpacked(status *v1alpha1.ClusterCatalogStatus, result *source.Result, contentURL string, generation int64, lastUnpacked metav1.Time) {
210208
status.ResolvedSource = result.ResolvedSource
211209
status.ContentURL = contentURL
212-
status.Phase = v1alpha1.PhaseUnpacked
213210
status.ObservedGeneration = generation
214211
status.LastUnpacked = lastUnpacked
215212
meta.SetStatusCondition(&status.Conditions, metav1.Condition{
@@ -222,7 +219,6 @@ func updateStatusUnpacked(status *v1alpha1.ClusterCatalogStatus, result *source.
222219

223220
func updateStatusUnpackFailing(status *v1alpha1.ClusterCatalogStatus, err error) error {
224221
status.ResolvedSource = nil
225-
status.Phase = v1alpha1.PhaseFailing
226222
meta.SetStatusCondition(&status.Conditions, metav1.Condition{
227223
Type: v1alpha1.TypeUnpacked,
228224
Status: metav1.ConditionFalse,
@@ -234,7 +230,6 @@ func updateStatusUnpackFailing(status *v1alpha1.ClusterCatalogStatus, err error)
234230

235231
func updateStatusStorageError(status *v1alpha1.ClusterCatalogStatus, err error) error {
236232
status.ResolvedSource = nil
237-
status.Phase = v1alpha1.PhaseFailing
238233
meta.SetStatusCondition(&status.Conditions, metav1.Condition{
239234
Type: v1alpha1.TypeUnpacked,
240235
Status: metav1.ConditionFalse,

internal/controllers/core/clustercatalog_controller_test.go

-11
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,6 @@ func TestCatalogdControllerReconcile(t *testing.T) {
115115
},
116116
},
117117
Status: catalogdv1alpha1.ClusterCatalogStatus{
118-
Phase: catalogdv1alpha1.PhaseFailing,
119118
Conditions: []metav1.Condition{
120119
{
121120
Type: catalogdv1alpha1.TypeUnpacked,
@@ -160,7 +159,6 @@ func TestCatalogdControllerReconcile(t *testing.T) {
160159
},
161160
},
162161
Status: catalogdv1alpha1.ClusterCatalogStatus{
163-
Phase: catalogdv1alpha1.PhasePending,
164162
Conditions: []metav1.Condition{
165163
{
166164
Type: catalogdv1alpha1.TypeUnpacked,
@@ -205,7 +203,6 @@ func TestCatalogdControllerReconcile(t *testing.T) {
205203
},
206204
},
207205
Status: catalogdv1alpha1.ClusterCatalogStatus{
208-
Phase: catalogdv1alpha1.PhaseUnpacking,
209206
Conditions: []metav1.Condition{
210207
{
211208
Type: catalogdv1alpha1.TypeUnpacked,
@@ -251,7 +248,6 @@ func TestCatalogdControllerReconcile(t *testing.T) {
251248
},
252249
},
253250
Status: catalogdv1alpha1.ClusterCatalogStatus{
254-
Phase: catalogdv1alpha1.PhaseFailing,
255251
Conditions: []metav1.Condition{
256252
{
257253
Type: catalogdv1alpha1.TypeUnpacked,
@@ -297,7 +293,6 @@ func TestCatalogdControllerReconcile(t *testing.T) {
297293
},
298294
},
299295
Status: catalogdv1alpha1.ClusterCatalogStatus{
300-
Phase: catalogdv1alpha1.PhaseFailing,
301296
Conditions: []metav1.Condition{
302297
{
303298
Type: catalogdv1alpha1.TypeUnpacked,
@@ -345,7 +340,6 @@ func TestCatalogdControllerReconcile(t *testing.T) {
345340
},
346341
},
347342
Status: catalogdv1alpha1.ClusterCatalogStatus{
348-
Phase: catalogdv1alpha1.PhaseUnpacked,
349343
ContentURL: "URL",
350344
Conditions: []metav1.Condition{
351345
{
@@ -397,7 +391,6 @@ func TestCatalogdControllerReconcile(t *testing.T) {
397391
},
398392
},
399393
Status: catalogdv1alpha1.ClusterCatalogStatus{
400-
Phase: catalogdv1alpha1.PhaseFailing,
401394
Conditions: []metav1.Condition{
402395
{
403396
Type: catalogdv1alpha1.TypeUnpacked,
@@ -650,7 +643,6 @@ func TestPollingReconcilerUnpack(t *testing.T) {
650643
},
651644
},
652645
Status: catalogdv1alpha1.ClusterCatalogStatus{
653-
Phase: catalogdv1alpha1.PhaseUnpacked,
654646
ContentURL: "URL",
655647
Conditions: []metav1.Condition{
656648
{
@@ -689,7 +681,6 @@ func TestPollingReconcilerUnpack(t *testing.T) {
689681
},
690682
},
691683
Status: catalogdv1alpha1.ClusterCatalogStatus{
692-
Phase: catalogdv1alpha1.PhaseUnpacked,
693684
ContentURL: "URL",
694685
Conditions: []metav1.Condition{
695686
{
@@ -728,7 +719,6 @@ func TestPollingReconcilerUnpack(t *testing.T) {
728719
},
729720
},
730721
Status: catalogdv1alpha1.ClusterCatalogStatus{
731-
Phase: catalogdv1alpha1.PhaseUnpacked,
732722
ContentURL: "URL",
733723
Conditions: []metav1.Condition{
734724
{
@@ -767,7 +757,6 @@ func TestPollingReconcilerUnpack(t *testing.T) {
767757
},
768758
},
769759
Status: catalogdv1alpha1.ClusterCatalogStatus{
770-
Phase: catalogdv1alpha1.PhaseUnpacked,
771760
ContentURL: "URL",
772761
Conditions: []metav1.Condition{
773762
{

test/tools/imageregistry/registry.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ set -e
77
# 1. Installs cert-manager for creating a self-signed certificate for the image registry
88
# 2. Creates all the resources necessary for deploying the image registry in the catalogd-e2e namespace
99
# 3. Creates ConfigMaps containing the test catalog + Dockerfile to be mounted to the kaniko pod
10-
# 4. Waits for kaniko pod to have Phase == Succeeded, indicating the test catalog image has been built + pushed
10+
# 4. Waits for kaniko pod to have Condition Complete == true, indicating the test catalog image has been built + pushed
1111
# to the test image registry
1212
# Usage:
1313
# registry.sh

0 commit comments

Comments
 (0)