-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
changes adds new spec versiondetails and set the current and desired versions for cstorvolumeclain resource in case of csi based volume provisioning required during seamless upgrade operations. Refer: openebs-archive/maya/pull/1465 openebs-archive/maya/pull/1466 Signed-off-by: prateekpandey14 <[email protected]>
- Loading branch information
1 parent
4727200
commit 8504486
Showing
6 changed files
with
126 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
0.1.0 | ||
1.3.0 |
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 |
---|---|---|
@@ -0,0 +1,62 @@ | ||
/* | ||
Copyright 2019 The OpenEBS Authors. | ||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
*/ | ||
|
||
package v1alpha1 | ||
|
||
import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" | ||
|
||
// VersionDetails provides the details for upgrade | ||
type VersionDetails struct { | ||
// If AutoUpgrade is set to true then the resource is | ||
// upgraded automatically without any manual steps | ||
AutoUpgrade bool `json:"autoUpgrade"` | ||
// Desired is the version that we want to | ||
// upgrade or the control plane version | ||
Desired string `json:"desired"` | ||
// Status gives the status of reconciliation triggered | ||
// when the desired and current version are not same | ||
Status VersionStatus `json:"status"` | ||
} | ||
|
||
// VersionStatus is the status of the reconciliation of versions | ||
type VersionStatus struct { | ||
// DependentsUpgraded gives the details whether all children | ||
// of a resource are upgraded to desired version or not | ||
DependentsUpgraded bool `json:"dependentsUpgraded"` | ||
// Current is the version of resource | ||
Current string `json:"current"` | ||
// State is the state of reconciliation | ||
State VersionState `json:"state"` | ||
// Message is a human readable message if some error occurs | ||
Message string `json:"message,omitempty"` | ||
// Reason is the actual reason for the error state | ||
Reason string `json:"reason,omitempty"` | ||
// LastUpdateTime is the time the status was last updated | ||
LastUpdateTime metav1.Time `json:"lastUpdateTime,omitempty"` | ||
} | ||
|
||
// VersionState is the state of reconciliation | ||
type VersionState string | ||
|
||
const ( | ||
// ReconcileComplete is the state when desired and current version are equal. | ||
ReconcileComplete VersionState = "Reconciled" | ||
// ReconcileInProgress is the state when desired and current version are | ||
// not same and the reconcile functions is retrying to make them same. | ||
ReconcileInProgress VersionState = "ReconcileInProgress" | ||
// ReconcilePending is the state the reconciliation is still not started yet | ||
ReconcilePending VersionState = "ReconcilePending" | ||
) |
35 changes: 35 additions & 0 deletions
35
pkg/apis/openebs.io/maya/v1alpha1/zz_generated.deepcopy.go
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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