Skip to content

Commit

Permalink
fixed ConfigTracker to be able to scan envFrom in init-containers
Browse files Browse the repository at this point in the history
Signed-off-by: kazukousen <mmchari.0228@gmail.com>
  • Loading branch information
kazukousen committed May 24, 2021
1 parent 39a3898 commit 17557dc
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pkg/canary/config_tracker.go
Original file line number Diff line number Diff line change
Expand Up @@ -135,13 +135,15 @@ func (ct *ConfigTracker) GetTargetConfigs(cd *flaggerv1.Canary) (map[string]Conf
}
vs = targetDep.Spec.Template.Spec.Volumes
cs = targetDep.Spec.Template.Spec.Containers
cs = append(cs, targetDep.Spec.Template.Spec.InitContainers...)
case "DaemonSet":
targetDae, err := ct.KubeClient.AppsV1().DaemonSets(cd.Namespace).Get(context.TODO(), targetName, metav1.GetOptions{})
if err != nil {
return nil, fmt.Errorf("daemonset %s.%s get query error: %w", targetName, cd.Namespace, err)
}
vs = targetDae.Spec.Template.Spec.Volumes
cs = targetDae.Spec.Template.Spec.Containers
cs = append(cs, targetDae.Spec.Template.Spec.InitContainers...)
default:
return nil, fmt.Errorf("TargetRef.Kind invalid: %s", cd.Spec.TargetRef.Kind)
}
Expand Down

0 comments on commit 17557dc

Please sign in to comment.