Skip to content
This repository was archived by the owner on Jul 11, 2023. It is now read-only.

Commit aaea07e

Browse files
committed
providerState to State
Signed-off-by: Sarah Christoff <[email protected]>
1 parent 0cf2efc commit aaea07e

File tree

6 files changed

+15
-15
lines changed

6 files changed

+15
-15
lines changed

cmd/osm-bootstrap/crds/config_mesh_root_certificate.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ spec:
3636
storage: true
3737
additionalPrinterColumns:
3838
- description: Provider state of the MeshRootCertificate config
39-
jsonPath: .status.providerState
40-
name: ProviderState
39+
jsonPath: .status.currentState
40+
name: State
4141
type: string
4242
schema:
4343
openAPIV3Schema:

cmd/osm-bootstrap/osm-bootstrap.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -423,7 +423,7 @@ func buildMeshRootCertificate(presetMeshRootCertificateConfigMap *corev1.ConfigM
423423
},
424424
Spec: presetMeshRootCertificateSpec,
425425
Status: configv1alpha2.MeshRootCertificateStatus{
426-
ProviderState: constants.MRCStateActive,
426+
State: constants.MRCStateActive,
427427
},
428428
}
429429

cmd/osm-bootstrap/osm-bootstrap_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ var testMeshRootCertificate *configv1alpha2.MeshRootCertificate = &configv1alpha
9797
},
9898
Spec: configv1alpha2.MeshRootCertificateSpec{},
9999
Status: configv1alpha2.MeshRootCertificateStatus{
100-
ProviderState: constants.MRCStateActive,
100+
State: constants.MRCStateActive,
101101
},
102102
}
103103

pkg/apis/config/v1alpha2/meshrootcertificate.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ type MeshRootCertificate struct {
2121
// +optional
2222
Spec MeshRootCertificateSpec `json:"spec,omitempty"`
2323

24-
// Status of the MeshRootCertificateStatus resource
24+
// Status of the MeshRootCertificate resource
2525
// +optional
2626
Status MeshRootCertificateStatus `json:"status,omitempty"`
2727
}
@@ -113,9 +113,9 @@ type TresorCASpec struct {
113113

114114
// MeshRootCertificateStatus defines the status of the MeshRootCertificate resource
115115
type MeshRootCertificateStatus struct {
116-
// ProviderState specifies the state of the certificate provider
116+
// State specifies the state of the certificate provider
117117
// All states are specified in constants.go
118-
ProviderState string `json:"providerState"`
118+
State string `json:"state"`
119119
}
120120

121121
// MeshRootCertificateList defines the list of MeshRootCertificate objects

pkg/certificate/providers/config.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ func NewCertificateManager(kubeClient kubernetes.Interface, kubeConfig *rest.Con
6969
},
7070
// TODO(#4502): Detect if an actual MRC exists, and set the status accordingly.
7171
Status: v1alpha2.MeshRootCertificateStatus{
72-
ProviderState: constants.MRCStateActive,
72+
State: constants.MRCStateActive,
7373
},
7474
},
7575
}

pkg/constants/constants.go

+7-7
Original file line numberDiff line numberDiff line change
@@ -166,25 +166,25 @@ const (
166166
// MRCVersionAnnotation is the annotation used for the version of the MeshRootCertificate
167167
MRCVersionAnnotation = "openservicemesh.io/mrc-version"
168168

169-
// MRCStateValidatingRollout is the validating rollout status option for the ProviderState of the MeshRootCertificate
169+
// MRCStateValidatingRollout is the validating rollout status option for the State of the MeshRootCertificate
170170
MRCStateValidatingRollout = "validatingRollout"
171171

172-
// MRCStateIssuingRollout is the issuing rollout status option for the ProviderState of the MeshRootCertificate
172+
// MRCStateIssuingRollout is the issuing rollout status option for the State of the MeshRootCertificate
173173
MRCStateIssuingRollout = "issuingRollout"
174174

175-
// MRCStateActive is the active status option for the ProviderState of the MeshRootCertificate
175+
// MRCStateActive is the active status option for the State of the MeshRootCertificate
176176
MRCStateActive = "active"
177177

178-
// MRCStateIssuingRollback is the issuing rollback status option for the ProviderState of the MeshRootCertificate
178+
// MRCStateIssuingRollback is the issuing rollback status option for the State of the MeshRootCertificate
179179
MRCStateIssuingRollback = "issuingRollback"
180180

181-
// MRCStateValidatingRollback is the validating rollback status option for the ProviderState of the MeshRootCertificate
181+
// MRCStateValidatingRollback is the validating rollback status option for the State of the MeshRootCertificate
182182
MRCStateValidatingRollback = "validatingRollback"
183183

184-
// MRCStateInactive is the inactive status option for the ProviderState of the MeshRootCertificate
184+
// MRCStateInactive is the inactive status option for the State of the MeshRootCertificate
185185
MRCStateInactive = "inactive"
186186

187-
// MRCStateError is the error status option for the ProviderState of the MeshRootCertificate
187+
// MRCStateError is the error status option for the State of the MeshRootCertificate
188188
MRCStateError = "error"
189189
)
190190

0 commit comments

Comments
 (0)