This repository was archived by the owner on May 6, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 381
Add ObservedGeneration and Provisioned into ServiceInstanceStatus #1748
Merged
nilebox
merged 22 commits into
kubernetes-retired:master
from
atlassian:observed-generation
Mar 3, 2018
Merged
Changes from 21 commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
66b51b5
Add ObservedGeneration and Provisioned into ServiceInstanceStatus
f15cda5
Fix tests
c033bb5
Add test for API migration path
d0efd0f
Add checking ObservedGeneration to tests
1816912
Add Provisioned flag checks to unit tests
50a81bb
Update generated files
fd2c9e7
Determine reconciled generation based on ObservedGeneration and Ready…
4091566
Fix typo in comment
4fcefee
Fix test for reconciled generation
200d0e4
Update cached instance after update succeeds
8990e75
Add debugging information for the test
cc99cce
Bugfix: set Failed condition in case of terminal failure during update
77c79ba
Remove debugging information
c46c96f
Update ObservedGeneration at the start of operation only
2e174fe
Copy ReconciledGeneration from ObservedGeneration and remove hacks fo…
b6e8567
Update comment
ef56ba8
Set ObservedGeneration as soon as we start processing the new spec
c1405f8
Restore status after invoking UpdateReferences
afad585
Fix review comments
a4389d4
Fix tests (ObservedGeneration for orphan mitigation)
2af0932
Fix test
bc770d1
Fix review comments
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -601,8 +601,14 @@ type ServiceInstanceStatus struct { | |
// ReconciledGeneration is the 'Generation' of the serviceInstanceSpec that | ||
// was last processed by the controller. The reconciled generation is updated | ||
// even if the controller failed to process the spec. | ||
// Deprecated: use ObservedGeneration instead | ||
ReconciledGeneration int64 `json:"reconciledGeneration"` | ||
|
||
// ObservedGeneration is the 'Generation' of the serviceInstanceSpec that | ||
// was last processed by the controller. The observed generation is updated | ||
// whenever the status is updated regardless of operation result | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nit, this should end with a period. |
||
ObservedGeneration int64 `json:"observedGeneration"` | ||
|
||
// OperationStartTime is the time at which the current operation began. | ||
OperationStartTime *metav1.Time `json:"operationStartTime,omitempty"` | ||
|
||
|
@@ -615,6 +621,9 @@ type ServiceInstanceStatus struct { | |
// broker knows about. | ||
ExternalProperties *ServiceInstancePropertiesState `json:"externalProperties,omitempty"` | ||
|
||
// ProvisionStatus describes whether the instance is in the provisioned state. | ||
ProvisionStatus ServiceInstanceProvisionStatus `json:"provisionStatus"` | ||
|
||
// DeprovisionStatus describes what has been done to deprovision the | ||
// ServiceInstance. | ||
DeprovisionStatus ServiceInstanceDeprovisionStatus `json:"deprovisionStatus"` | ||
|
@@ -717,6 +726,19 @@ const ( | |
ServiceInstanceDeprovisionStatusFailed ServiceInstanceDeprovisionStatus = "Failed" | ||
) | ||
|
||
// ServiceInstanceProvisionStatus is the status of provisioning a | ||
// ServiceInstance | ||
type ServiceInstanceProvisionStatus string | ||
|
||
const ( | ||
// ServiceInstanceProvisionStatusProvisioned indicates that the instance | ||
// was provisioned. | ||
ServiceInstanceProvisionStatusProvisioned ServiceInstanceProvisionStatus = "Provisioned" | ||
// ServiceInstanceProvisionStatusNotProvisioned indicates that the instance | ||
// was not ever provisioned or was deprovisioned. | ||
ServiceInstanceProvisionStatusNotProvisioned ServiceInstanceProvisionStatus = "NotProvisioned" | ||
) | ||
|
||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object | ||
|
||
// ServiceBindingList is a list of ServiceBindings. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it would be helpful to specify what 'use' pertains to here (totally fine to do this in a follow-up)