Skip to content

Commit f8eff25

Browse files
sync: Report whether updates are verified and allow admin override
For safety, all unverified images are considered untrusted and the CVO should not apply them. An admin may override this safe default with force (which would be mapped to oc adm upgrade --force). When this happens, we should communicate clearly which updates were verified and which were not. The CVO, unless configured otherwise, assumes everything is unverified. The payload retriever uses the verifier to check the incoming image - both tags or failed verification is reported to the user. If the admin then sets allowUnverifiedImages, the sync loop continues. Periodically in the background recheck any reconciling payload that is unverified against the verifier, just in case it was a temporary state.
1 parent 73599c8 commit f8eff25

File tree

19 files changed

+879
-45
lines changed

19 files changed

+879
-45
lines changed

pkg/autoupdate/autoupdate.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ func (ctrl *Controller) sync(key string) error {
178178

179179
_, updated, err := resourceapply.ApplyClusterVersionFromCache(ctrl.cvLister, ctrl.client.ConfigV1(), clusterversion)
180180
if updated {
181-
glog.Infof("Auto Update set to %s", up)
181+
glog.Infof("Auto Update set to %v", up)
182182
}
183183
return err
184184
}

pkg/autoupdate/autoupdate_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import (
44
"fmt"
55
"testing"
66

7-
"github.com/openshift/api/config/v1"
7+
v1 "github.com/openshift/api/config/v1"
88
)
99

1010
func TestNextUpdate(t *testing.T) {
@@ -36,7 +36,7 @@ func TestNextUpdate(t *testing.T) {
3636

3737
got := nextUpdate(ups)
3838
if got.Version != test.want {
39-
t.Fatalf("mismatch: got %s want: %s", got, test.want)
39+
t.Fatalf("mismatch: got %v want: %v", got, test.want)
4040
}
4141
})
4242
}

0 commit comments

Comments
 (0)