Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing subpath custom conf #627

Merged
merged 2 commits into from
Oct 12, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion apis/datadoghq/v1alpha1/datadogagent_conversion.go
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,8 @@ func convertConfigMapConfig(src *CustomConfigSpec) *v2alpha1.CustomConfig {
// TODO: Check if that was the intended usage of `FileKey`
if src.ConfigMap.FileKey != "" {
dstConfig.ConfigMap.Items = append(dstConfig.ConfigMap.Items, v1.KeyToPath{
Key: src.ConfigMap.FileKey,
Key: src.ConfigMap.FileKey,
Path: src.ConfigMap.FileKey,
})
}
}
Expand Down
2 changes: 1 addition & 1 deletion apis/datadoghq/v1alpha1/testdata/all.expected.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ spec:
configMap:
items:
- key: config.yaml
path: ""
path: "config.yaml"
name: orch-cm
enabled: true
ddUrl: https://orch-explorer.com
Expand Down
2 changes: 1 addition & 1 deletion controllers/datadogagent/clusteragent.go
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ func newClusterAgentPodTemplate(logger logr.Logger, dda *datadoghqv1alpha1.Datad
customConfigVolumeSource := objectvolume.GetVolumeFromCustomConfigSpec(
datadoghqv1alpha1.ConvertCustomConfig(dda.Spec.ClusterAgent.CustomConfig),
getClusterAgentCustomConfigConfigMapName(dda),
apicommon.AgentCustomConfigVolumeName,
apicommon.ClusterAgentCustomConfigVolumeName,
)
volumes = append(volumes, customConfigVolumeSource)

Expand Down