Skip to content

Commit 7fb25b7

Browse files
committed
Change the OperatorUpgradeable condition to Upgradeable only
The original design intends to use the name `Upgradeable` only. Signed-off-by: Vu Dinh <[email protected]>
1 parent ffb66b0 commit 7fb25b7

File tree

1,408 files changed

+78036
-92395
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,408 files changed

+78036
-92395
lines changed

Diff for: go.mod

+23-27
Original file line numberDiff line numberDiff line change
@@ -10,55 +10,53 @@ require (
1010
github.com/fsnotify/fsnotify v1.4.9
1111
github.com/ghodss/yaml v1.0.0
1212
github.com/go-bindata/go-bindata/v3 v3.1.3
13-
github.com/go-logr/logr v0.2.1
14-
github.com/go-logr/zapr v0.2.0 // indirect
13+
github.com/go-logr/logr v0.3.0
1514
github.com/go-openapi/spec v0.19.4
16-
github.com/golang/mock v1.3.1
17-
github.com/google/go-cmp v0.5.0
15+
github.com/golang/mock v1.4.1
16+
github.com/google/go-cmp v0.5.2
1817
github.com/irifrance/gini v1.0.1
1918
github.com/itchyny/gojq v0.11.0
2019
github.com/maxbrunsfeld/counterfeiter/v6 v6.2.2
21-
github.com/mikefarah/yq/v3 v3.0.0-20201020025845-ccb718cd0f59
20+
github.com/mikefarah/yq/v3 v3.0.0-20201202084205-8846255d1c37
2221
github.com/mitchellh/hashstructure v1.0.0
2322
github.com/mitchellh/mapstructure v1.1.2
24-
github.com/onsi/ginkgo v1.12.0
25-
github.com/onsi/gomega v1.9.0
23+
github.com/onsi/ginkgo v1.14.1
24+
github.com/onsi/gomega v1.10.2
2625
github.com/openshift/api v0.0.0-20200331152225-585af27e34fd
2726
github.com/openshift/client-go v0.0.0-20200326155132-2a6cd50aedd0
28-
github.com/operator-framework/api v0.3.25
27+
github.com/operator-framework/api v0.5.1
2928
github.com/operator-framework/operator-registry v1.13.6
3029
github.com/otiai10/copy v1.2.0
3130
github.com/pkg/errors v0.9.1
3231
github.com/prometheus/client_golang v1.7.1
3332
github.com/prometheus/client_model v0.2.0
3433
github.com/prometheus/common v0.10.0
3534
github.com/sirupsen/logrus v1.7.0
36-
github.com/spf13/cobra v1.0.0
35+
github.com/spf13/cobra v1.1.1
3736
github.com/spf13/pflag v1.0.5
3837
github.com/stretchr/testify v1.6.1
39-
golang.org/x/time v0.0.0-20191024005414-555d28b269f0
38+
golang.org/x/time v0.0.0-20200630173020-3af7569d3a1e
4039
google.golang.org/grpc v1.30.0
41-
gopkg.in/yaml.v2 v2.2.8
42-
helm.sh/helm/v3 v3.4.0
43-
k8s.io/api v0.19.3
44-
k8s.io/apiextensions-apiserver v0.19.3
45-
k8s.io/apimachinery v0.19.3
46-
k8s.io/apiserver v0.19.3
47-
k8s.io/client-go v0.19.3
48-
k8s.io/code-generator v0.19.3
49-
k8s.io/component-base v0.19.3
40+
gopkg.in/yaml.v2 v2.3.0
41+
helm.sh/helm/v3 v3.1.0-rc.1.0.20201215141456-e71d38b414eb
42+
k8s.io/api v0.20.0
43+
k8s.io/apiextensions-apiserver v0.20.0
44+
k8s.io/apimachinery v0.20.0
45+
k8s.io/apiserver v0.20.0
46+
k8s.io/client-go v0.20.0
47+
k8s.io/code-generator v0.20.0
48+
k8s.io/component-base v0.20.0
5049
k8s.io/klog v1.0.0
51-
k8s.io/kube-aggregator v0.19.3
52-
k8s.io/kube-openapi v0.0.0-20200805222855-6aeccd4b50c6
50+
k8s.io/kube-aggregator v0.20.0
51+
k8s.io/kube-openapi v0.0.0-20201113171705-d219536bb9fd
5352
rsc.io/letsencrypt v0.0.3 // indirect
54-
sigs.k8s.io/controller-runtime v0.6.0
55-
sigs.k8s.io/controller-tools v0.3.0
53+
sigs.k8s.io/controller-runtime v0.7.0
54+
sigs.k8s.io/controller-tools v0.4.1
5655
sigs.k8s.io/kind v0.7.0
5756
)
5857

5958
replace (
60-
github.com/Azure/go-autorest => github.com/Azure/go-autorest v13.3.2+incompatible
61-
github.com/docker/docker => github.com/moby/moby v0.7.3-0.20190826074503-38ab9da00309 // Required by Helm
59+
github.com/googleapis/gnostic => github.com/googleapis/gnostic v0.4.1
6260

6361
// controller runtime
6462
github.com/openshift/api => github.com/openshift/api v0.0.0-20200331152225-585af27e34fd // release-4.5
@@ -70,7 +68,5 @@ replace (
7068
google.golang.org/grpc/examples => google.golang.org/grpc/examples v0.0.0-20200709232328-d8193ee9cc3e
7169

7270
// pinned because no tag supports 1.18 yet
73-
// pinned because no tag supports 1.18 yet
74-
sigs.k8s.io/controller-runtime => sigs.k8s.io/controller-runtime v0.5.1-0.20200414221803-bac7e8aaf90a
7571
sigs.k8s.io/structured-merge-diff => sigs.k8s.io/structured-merge-diff v1.0.1-0.20191108220359-b1b620dd3f06
7672
)

Diff for: go.sum

+227-52
Large diffs are not rendered by default.

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 rype 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/cloud.google.com/go/compute/metadata/.repo-metadata.json

-12
This file was deleted.

Diff for: vendor/cloud.google.com/go/compute/metadata/metadata.go

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

Diff for: vendor/github.com/Azure/go-autorest/.gitignore

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

0 commit comments

Comments
 (0)