Skip to content

Commit 1dc799e

Browse files
committed
Change the "OperatorUpgradeable" condition to "Upgradeable"
The original design intends to use the name "Upgradeable for operator condition. Signed-off-by: Vu Dinh <[email protected]>
1 parent 72d0608 commit 1dc799e

File tree

6 files changed

+14
-14
lines changed

6 files changed

+14
-14
lines changed

Diff for: go.mod

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ require (
2525
github.com/onsi/gomega v1.10.2
2626
github.com/openshift/api v0.0.0-20200331152225-585af27e34fd
2727
github.com/openshift/client-go v0.0.0-20200326155132-2a6cd50aedd0
28-
github.com/operator-framework/api v0.5.0
28+
github.com/operator-framework/api v0.5.1
2929
github.com/operator-framework/operator-registry v1.13.6
3030
github.com/otiai10/copy v1.2.0
3131
github.com/pkg/errors v0.9.1

Diff for: go.sum

+2-2
Original file line numberDiff line numberDiff line change
@@ -818,8 +818,8 @@ github.com/openzipkin/zipkin-go v0.1.6/go.mod h1:QgAqvLzwWbR/WpD4A3cGpPtJrZXNIiJ
818818
github.com/openzipkin/zipkin-go v0.2.1/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4=
819819
github.com/openzipkin/zipkin-go v0.2.2/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4=
820820
github.com/operator-framework/api v0.3.7-0.20200602203552-431198de9fc2/go.mod h1:Xbje9x0SHmh0nihE21kpesB38vk3cyxnE6JdDS8Jo1Q=
821-
github.com/operator-framework/api v0.5.0 h1:pzlFOIyrbqoW5Fx6EgJNaEa2sipwPGhNhFxIwu9V6CY=
822-
github.com/operator-framework/api v0.5.0/go.mod h1:A4VYTXGHHutXy4VrVvr3voBkObOaCaKaGF2dn5i0Fnw=
821+
github.com/operator-framework/api v0.5.1 h1:3CVLatTCtgV+f/kPh36op7ZFRBPWro2SZDlQkE9Y4+w=
822+
github.com/operator-framework/api v0.5.1/go.mod h1:A4VYTXGHHutXy4VrVvr3voBkObOaCaKaGF2dn5i0Fnw=
823823
github.com/operator-framework/operator-registry v1.13.6 h1:h/dIjQQS7uneQNRifrSz7h0xg4Xyjg6C9f6XZofbMPg=
824824
github.com/operator-framework/operator-registry v1.13.6/go.mod h1:YhnIzOVjRU2ZwZtzt+fjcjW8ujJaSFynBEu7QVKaSdU=
825825
github.com/otiai10/copy v1.2.0 h1:HvG945u96iNadPoG2/Ja2+AUJeW5YuFQMixq9yirC+k=

Diff for: pkg/controller/operators/olm/operatorconditions.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ func (a *Operator) isOperatorUpgradeable(csv *v1alpha1.ClusterServiceVersion) (b
2626

2727
// Check condition overrides
2828
for _, override := range cond.Spec.Overrides {
29-
if override.Type == operatorsv1.OperatorUpgradeable {
29+
if override.Type == operatorsv1.Upgradeable {
3030
if override.Status == metav1.ConditionTrue {
3131
return true, nil
3232
}
@@ -35,7 +35,7 @@ func (a *Operator) isOperatorUpgradeable(csv *v1alpha1.ClusterServiceVersion) (b
3535
}
3636

3737
// Check for OperatorUpgradeable condition status
38-
if c := meta.FindStatusCondition(cond.Status.Conditions, operatorsv1.OperatorUpgradeable); c != nil {
38+
if c := meta.FindStatusCondition(cond.Status.Conditions, operatorsv1.Upgradeable); c != nil {
3939
if c.Status == metav1.ConditionFalse {
4040
return false, fmt.Errorf("The operator is not upgradeable: %s", c.Message)
4141
}

Diff for: test/e2e/operator_condition_e2e_test.go

+6-6
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@ var _ = Describe("Operator Condition", func() {
2323
TearDown(testNamespace)
2424
})
2525

26-
It("OperatorUpgradeable condition and overrides", func() {
26+
It("OperatorCondition Upgradeable type and overrides", func() {
2727
By("This test proves that an operator can upgrade successfully when" +
28-
"OperatorUpgrade condition is set in OperatorCondition CR. Plus, an operator" +
28+
"Upgrade condition type is set in OperatorCondition CR. Plus, an operator" +
2929
"chooses not to use OperatorCondition, the upgrade process will proceed as" +
3030
" asexpected. The overrides specification in OperatorCondition can be used to" +
3131
" override the status condition. The overrides spec will remain in place until" +
@@ -107,7 +107,7 @@ var _ = Describe("Operator Condition", func() {
107107

108108
// Set upgradeable condition to false
109109
newCond := metav1.Condition{
110-
Type: operatorsv1.OperatorUpgradeable,
110+
Type: operatorsv1.Upgradeable,
111111
Status: metav1.ConditionFalse,
112112
Reason: "test",
113113
Message: "test",
@@ -153,7 +153,7 @@ var _ = Describe("Operator Condition", func() {
153153

154154
// Switch upgradeable condition to true
155155
newCond = metav1.Condition{
156-
Type: operatorsv1.OperatorUpgradeable,
156+
Type: operatorsv1.Upgradeable,
157157
Status: metav1.ConditionTrue,
158158
Reason: "test",
159159
Message: "test",
@@ -183,7 +183,7 @@ var _ = Describe("Operator Condition", func() {
183183
// Add Condition overrides
184184
cond.Spec = operatorsv1.OperatorConditionSpec{
185185
Overrides: []metav1.Condition{{
186-
Type: operatorsv1.OperatorUpgradeable,
186+
Type: operatorsv1.Upgradeable,
187187
Status: metav1.ConditionFalse,
188188
Reason: "test",
189189
Message: "test",
@@ -230,7 +230,7 @@ var _ = Describe("Operator Condition", func() {
230230
// Set Condition overrides to True
231231
cond.Spec = operatorsv1.OperatorConditionSpec{
232232
Overrides: []metav1.Condition{{
233-
Type: operatorsv1.OperatorUpgradeable,
233+
Type: operatorsv1.Upgradeable,
234234
Status: metav1.ConditionTrue,
235235
Reason: "test",
236236
Message: "test",

Diff for: vendor/github.com/operator-framework/api/pkg/operators/v1/operatorcondition_types.go

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: vendor/modules.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -439,7 +439,7 @@ github.com/openshift/client-go/config/informers/externalversions/config
439439
github.com/openshift/client-go/config/informers/externalversions/config/v1
440440
github.com/openshift/client-go/config/informers/externalversions/internalinterfaces
441441
github.com/openshift/client-go/config/listers/config/v1
442-
# github.com/operator-framework/api v0.5.0
442+
# github.com/operator-framework/api v0.5.1
443443
github.com/operator-framework/api/crds
444444
github.com/operator-framework/api/pkg/lib/version
445445
github.com/operator-framework/api/pkg/manifests

0 commit comments

Comments
 (0)