Skip to content
Closed
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
8 changes: 8 additions & 0 deletions scenarios/azure/aks/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,14 @@ providers:
kubernetesagentparams.WithHelmValues(customValues),
)

if agentFullImagePath := env.AgentFullImagePath(); agentFullImagePath != "" {
k8sAgentOptions = append(k8sAgentOptions, kubernetesagentparams.WithAgentFullImagePath(agentFullImagePath))
}

if clusterAgentFullImagePath := env.ClusterAgentFullImagePath(); clusterAgentFullImagePath != "" {
k8sAgentOptions = append(k8sAgentOptions, kubernetesagentparams.WithClusterAgentFullImagePath(clusterAgentFullImagePath))
}

Comment on lines +70 to +77

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have you experienced unexpected behavior before adding that?
Because what you just added is supposed to already be handled deeper in the function that install the agent on Kubernetes: https://github.com/DataDog/test-infra-definitions/blob/main/components/datadog/agent/kubernetes_helm.go#L140-L150

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see yes it does what I was looking for, but cause it's not next to the other options. I did not see it.

I will close this PR then it's not necessary then.

if env.AgentUseFakeintake() {
fakeIntakeOptions := []fakeintake.Option{}
if env.AgentUseDualShipping() {
Expand Down
4 changes: 2 additions & 2 deletions scenarios/gcp/gke/cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ func NewGKECluster(env gcp.Environment, opts ...Option) (*kubeComp.Cluster, erro
return nil, err
}

return components.NewComponent(&env, env.Namer.ResourceName("gke"), func(comp *kubeComp.Cluster) error {
cluster, kubeConfig, err := gke.NewCluster(env, "gke", params.autopilot)
return components.NewComponent(&env, env.Namer.ResourceName(env.Ctx().Stack()), func(comp *kubeComp.Cluster) error {
cluster, kubeConfig, err := gke.NewCluster(env, env.Namer.ResourceName(env.Ctx().Stack()), params.autopilot)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
cluster, kubeConfig, err := gke.NewCluster(env, env.Namer.ResourceName(env.Ctx().Stack()), params.autopilot)
cluster, kubeConfig, err := gke.NewCluster(env, env.Namer.ResourceName("gke"), params.autopilot)

The namer should already be responsible for adding a prefix derived from the stack name

if err != nil {
return err
}
Expand Down
8 changes: 8 additions & 0 deletions scenarios/gcp/gke/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,14 @@ func Run(ctx *pulumi.Context) error {
kubernetesagentparams.WithNamespace("datadog"),
)

if agentFullImagePath := env.AgentFullImagePath(); agentFullImagePath != "" {
k8sAgentOptions = append(k8sAgentOptions, kubernetesagentparams.WithAgentFullImagePath(agentFullImagePath))
}

if clusterAgentFullImagePath := env.ClusterAgentFullImagePath(); clusterAgentFullImagePath != "" {
k8sAgentOptions = append(k8sAgentOptions, kubernetesagentparams.WithClusterAgentFullImagePath(clusterAgentFullImagePath))
}

if env.GKEAutopilot() {
k8sAgentOptions = append(
k8sAgentOptions,
Expand Down
Loading