Skip to content

Commit

Permalink
test ads predownload image ok
Browse files Browse the repository at this point in the history
Signed-off-by: Abner <abner199709@gmail.com>
  • Loading branch information
ABNER-1 committed Aug 14, 2022
1 parent b1c9c13 commit 0de6458
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 3 deletions.
1 change: 0 additions & 1 deletion apis/policy/v1alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pkg/controller/daemonset/daemonset_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,7 @@ func (dsc *ReconcileDaemonSet) syncDaemonSet(request reconcile.Request) error {

if !isPreDownloadDisabled {
if ds.Status.UpdatedNumberScheduled != ds.Status.DesiredNumberScheduled ||
cur.Name != ds.Status.DaemonSetHash {
hash != ds.Status.DaemonSetHash {
// get ads pre-download annotation
minUpdatedReadyPodsCount := 0
if minUpdatedReadyPods, ok := ds.Annotations[appsv1alpha1.ImagePreDownloadMinUpdatedReadyPods]; ok {
Expand Down
2 changes: 1 addition & 1 deletion pkg/controller/daemonset/daemonset_predownload_image.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ func (r *ReconcileDaemonSet) createImagePullJobsForInPlaceUpdate(ds *appsv1alpha
for name, image := range containerImages {
// job name is revision name + container name, it can not be more than 255 characters
jobName := fmt.Sprintf("%s-%s", updateRevision.Name, name)
err := imagejobutilfunc.CreateJobForWorkload(r.Client, ds, clonesetutils.ControllerKind, jobName, image, labelMap, *selector, pullSecrets)
err := imagejobutilfunc.CreateJobForWorkload(r.Client, ds, controllerKind, jobName, image, labelMap, *selector, pullSecrets)
if err != nil {
if !errors.IsAlreadyExists(err) {
klog.Errorf("DaemonSet %s/%s failed to create ImagePullJob %s: %v", ds.Namespace, ds.Name, jobName, err)
Expand Down

0 comments on commit 0de6458

Please sign in to comment.