Skip to content

Commit

Permalink
Add default fields in Job (rancher#173)
Browse files Browse the repository at this point in the history
With the new version of wrangler, default fields are added. This poses
an issue when Apply is called again because these default fields won't
exist on the next call. This causes wrangler to think that something has
changed.

In this fix, default fields are added to the Job to prevent this issue.
  • Loading branch information
Donnie Adams authored Dec 15, 2021
1 parent a1b0657 commit 2c588d5
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pkg/upgrade/job/job.go
Original file line number Diff line number Diff line change
Expand Up @@ -178,10 +178,11 @@ func New(plan *upgradeapiv1.Plan, node *corev1.Node, controllerName string) *bat
Name: "pod-info",
VolumeSource: corev1.VolumeSource{
DownwardAPI: &corev1.DownwardAPIVolumeSource{
DefaultMode: &[]int32{420}[0],
Items: []corev1.DownwardAPIVolumeFile{{
Path: "labels", FieldRef: &corev1.ObjectFieldSelector{FieldPath: "metadata.labels"},
Path: "labels", FieldRef: &corev1.ObjectFieldSelector{FieldPath: "metadata.labels", APIVersion: "v1"},
}, {
Path: "annotations", FieldRef: &corev1.ObjectFieldSelector{FieldPath: "metadata.annotations"},
Path: "annotations", FieldRef: &corev1.ObjectFieldSelector{FieldPath: "metadata.annotations", APIVersion: "v1"},
}},
},
},
Expand Down

0 comments on commit 2c588d5

Please sign in to comment.