Skip to content

Commit

Permalink
Merge pull request #225 from Surax98/initContainers
Browse files Browse the repository at this point in the history
initContainers configmaps are now retrieved and associated correctly
  • Loading branch information
dciangot authored May 23, 2024
2 parents 243676f + 6af3554 commit e21f37a
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions pkg/interlink/api/func.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,18 @@ func getData(ctx context.Context, config commonIL.InterLinkConfig, pod commonIL.
log.G(ctx).Debug(pod.ConfigMaps)
var retrievedData commonIL.RetrievedPodData
retrievedData.Pod = pod.Pod

for _, container := range pod.Pod.Spec.InitContainers {
log.G(ctx).Info("- Retrieving Secrets and ConfigMaps for the Docker Sidecar. InitContainer: " + container.Name)
log.G(ctx).Debug(container.VolumeMounts)
data, err := retrieveData(ctx, config, pod, container)
if err != nil {
log.G(ctx).Error(err)
return commonIL.RetrievedPodData{}, err
}
retrievedData.Containers = append(retrievedData.Containers, data)
}

for _, container := range pod.Pod.Spec.Containers {
log.G(ctx).Info("- Retrieving Secrets and ConfigMaps for the Docker Sidecar. Container: " + container.Name)
log.G(ctx).Debug(container.VolumeMounts)
Expand Down

0 comments on commit e21f37a

Please sign in to comment.