Skip to content

Commit

Permalink
function name change
Browse files Browse the repository at this point in the history
  • Loading branch information
suryagupta4 committed May 26, 2023
1 parent 2639041 commit 9c66829
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions pkg/modules/resiliency.go
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,8 @@ func getResiliencyEnv(resiliencyModule csmv1.Module, driverType csmv1.DriverType
return ""
}

func applyModuleToSideCar(component csmv1.ContainerTemplate, container *acorev1.ContainerApplyConfiguration) {
// Apply resiliency module from the manifest file to the podmon sidecar
func modifyPodmon(component csmv1.ContainerTemplate, container *acorev1.ContainerApplyConfiguration) {
if component.Image != "" {
image := string(component.Image)
if container.Image != nil {
Expand All @@ -152,10 +153,10 @@ func applyModuleToSideCar(component csmv1.ContainerTemplate, container *acorev1.
func setResiliencyArgs(m csmv1.Module, mode string, container *acorev1.ContainerApplyConfiguration) {
for _, component := range m.Components {
if component.Name == utils.PodmonControllerComponent && mode == "controller" {
applyModuleToSideCar(component, container)
modifyPodmon(component, container)
}
if component.Name == utils.PodmonNodeComponent && mode == "node" {
applyModuleToSideCar(component, container)
modifyPodmon(component, container)
}
}
}
Expand Down

0 comments on commit 9c66829

Please sign in to comment.