Skip to content

Commit 755c351

Browse files
committed
test
1 parent 45b5302 commit 755c351

File tree

4 files changed

+20
-12
lines changed

4 files changed

+20
-12
lines changed

internal/controller/datadogagent/feature/cspm/feature.go

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -297,10 +297,12 @@ func (f *cspmFeature) ManageNodeAgent(managers feature.PodTemplateManagers, prov
297297
volMountMgr.AddVolumeMountToContainer(&cgroupsVolMount, apicommon.SecurityAgentContainerName)
298298
VolMgr.AddVolume(&cgroupsVol)
299299

300-
// passwd volume mount
301-
passwdVol, passwdVolMount := volume.GetVolumes(common.PasswdVolumeName, common.PasswdHostPath, common.PasswdMountPath, true)
302-
volMountMgr.AddVolumeMountToContainer(&passwdVolMount, apicommon.SecurityAgentContainerName)
303-
VolMgr.AddVolume(&passwdVol)
300+
if provider != kubernetes.TalosProvider {
301+
// passwd volume mount
302+
passwdVol, passwdVolMount := volume.GetVolumes(common.PasswdVolumeName, common.PasswdHostPath, common.PasswdMountPath, true)
303+
volMountMgr.AddVolumeMountToContainer(&passwdVolMount, apicommon.SecurityAgentContainerName)
304+
VolMgr.AddVolume(&passwdVol)
305+
}
304306

305307
// procdir volume mount
306308
procdirVol, procdirVolMount := volume.GetVolumes(common.ProcdirVolumeName, common.ProcdirHostPath, common.ProcdirMountPath, true)

internal/controller/datadogagent/feature/cws/feature.go

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -283,10 +283,12 @@ func (f *cwsFeature) ManageNodeAgent(managers feature.PodTemplateManagers, provi
283283
volMountMgr.AddVolumeMountToContainer(&procdirVolMount, apicommon.SystemProbeContainerName)
284284
volMgr.AddVolume(&procdirVol)
285285

286-
// passwd volume mount
287-
passwdVol, passwdVolMount := volume.GetVolumes(common.PasswdVolumeName, common.PasswdHostPath, common.PasswdMountPath, true)
288-
volMountMgr.AddVolumeMountToContainer(&passwdVolMount, apicommon.SystemProbeContainerName)
289-
volMgr.AddVolume(&passwdVol)
286+
if provider != kubernetes.TalosProvider {
287+
// passwd volume mount
288+
passwdVol, passwdVolMount := volume.GetVolumes(common.PasswdVolumeName, common.PasswdHostPath, common.PasswdMountPath, true)
289+
volMountMgr.AddVolumeMountToContainer(&passwdVolMount, apicommon.SystemProbeContainerName)
290+
volMgr.AddVolume(&passwdVol)
291+
}
290292

291293
// group volume mount
292294
groupVol, groupVolMount := volume.GetVolumes(common.GroupVolumeName, common.GroupHostPath, common.GroupMountPath, true)

internal/controller/datadogagent/feature/liveprocess/feature.go

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ import (
1515
"github.com/DataDog/datadog-operator/internal/controller/datadogagent/feature"
1616
featutils "github.com/DataDog/datadog-operator/internal/controller/datadogagent/feature/utils"
1717
"github.com/DataDog/datadog-operator/internal/controller/datadogagent/object/volume"
18+
"github.com/DataDog/datadog-operator/pkg/kubernetes"
1819
)
1920

2021
func init() {
@@ -117,10 +118,12 @@ func (f *liveProcessFeature) ManageNodeAgent(managers feature.PodTemplateManager
117118

118119
func (f *liveProcessFeature) manageNodeAgent(agentContainerName apicommon.AgentContainerName, managers feature.PodTemplateManagers, provider string) error {
119120

120-
// passwd volume mount
121-
passwdVol, passwdVolMount := volume.GetVolumes(common.PasswdVolumeName, common.PasswdHostPath, common.PasswdMountPath, true)
122-
managers.VolumeMount().AddVolumeMountToContainer(&passwdVolMount, agentContainerName)
123-
managers.Volume().AddVolume(&passwdVol)
121+
if provider != kubernetes.TalosProvider {
122+
// passwd volume mount
123+
passwdVol, passwdVolMount := volume.GetVolumes(common.PasswdVolumeName, common.PasswdHostPath, common.PasswdMountPath, true)
124+
managers.VolumeMount().AddVolumeMountToContainer(&passwdVolMount, agentContainerName)
125+
managers.Volume().AddVolume(&passwdVol)
126+
}
124127

125128
// cgroups volume mount
126129
cgroupsVol, cgroupsVolMount := volume.GetVolumes(common.CgroupsVolumeName, common.CgroupsHostPath, common.CgroupsMountPath, true)

pkg/kubernetes/provider.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,7 @@ func GetProviderListFromNodeList(nodeList []corev1.Node, logger logr.Logger) map
190190
providerList := make(map[string]struct{})
191191
for _, node := range nodeList {
192192
provider := determineProvider(&node)
193+
logger.V(1).Info("Node provider detected", "node", node.Name, "provider", provider)
193194
if _, ok := providerList[provider]; !ok {
194195
providerList[provider] = struct{}{}
195196
logger.V(1).Info("New provider detected", "provider", provider)

0 commit comments

Comments
 (0)