Skip to content

Commit

Permalink
Fixed issue with copying reference pod labels (#65)
Browse files Browse the repository at this point in the history
  • Loading branch information
isala404 authored Aug 18, 2021
1 parent f0b5ab7 commit 5d86ce1
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion controllers/provision.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,11 @@ func (r *FlowTestReconciler) provisionResource(ctx context.Context) error {

extraLabels := GetLabels("pod-simulation", &flowTest)

simulationPod.ObjectMeta.Labels = referencePod.ObjectMeta.Labels
if referencePod.ObjectMeta.Labels != nil {
simulationPod.ObjectMeta.Labels = referencePod.ObjectMeta.Labels
} else {
simulationPod.ObjectMeta.Labels = make(map[string]string)
}

for k, v := range extraLabels {
simulationPod.ObjectMeta.Labels[k] = v
Expand Down

0 comments on commit 5d86ce1

Please sign in to comment.