mirror of
https://github.com/fluxcd/flagger.git
synced 2026-04-15 06:57:34 +00:00
fixed ConfigTracker to be able to scan envFrom in init-containers
Signed-off-by: kazukousen <mmchari.0228@gmail.com>
This commit is contained in:
@@ -135,6 +135,7 @@ 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 {
|
||||
@@ -142,6 +143,7 @@ func (ct *ConfigTracker) GetTargetConfigs(cd *flaggerv1.Canary) (map[string]Conf
|
||||
}
|
||||
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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user