Skip to content

Commit 2c588d5

Browse files
author
Donnie Adams
authored
Add default fields in Job (#173)
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.
1 parent a1b0657 commit 2c588d5

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

pkg/upgrade/job/job.go

+3-2
Original file line numberDiff line numberDiff line change
@@ -178,10 +178,11 @@ func New(plan *upgradeapiv1.Plan, node *corev1.Node, controllerName string) *bat
178178
Name: "pod-info",
179179
VolumeSource: corev1.VolumeSource{
180180
DownwardAPI: &corev1.DownwardAPIVolumeSource{
181+
DefaultMode: &[]int32{420}[0],
181182
Items: []corev1.DownwardAPIVolumeFile{{
182-
Path: "labels", FieldRef: &corev1.ObjectFieldSelector{FieldPath: "metadata.labels"},
183+
Path: "labels", FieldRef: &corev1.ObjectFieldSelector{FieldPath: "metadata.labels", APIVersion: "v1"},
183184
}, {
184-
Path: "annotations", FieldRef: &corev1.ObjectFieldSelector{FieldPath: "metadata.annotations"},
185+
Path: "annotations", FieldRef: &corev1.ObjectFieldSelector{FieldPath: "metadata.annotations", APIVersion: "v1"},
185186
}},
186187
},
187188
},

0 commit comments

Comments
 (0)