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

DDA w/operator component cleanups #1251

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
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: 3 additions & 0 deletions components/datadog/apps/dda/datadogagent.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,9 @@ func K8sAppDefinition(e config.Env, kubeProvider *kubernetes.Provider, namespace
}

ddaRef, err := componentskube.NewKubernetesObjRef(e, baseName, namespace, "DatadogAgent", pulumi.String("").ToStringOutput(), pulumi.String("datadoghq.com/v2alpha1").ToStringOutput(), map[string]string{"app": baseName})
if err != nil {
return nil, nil, err
}

return k8sComponent, ddaRef, nil
}
Expand Down
2 changes: 1 addition & 1 deletion components/datadog/operator/operator.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
)

// OperatorOutput is used to import the Operator component
type OperatorOutput struct {
type OperatorOutput struct { // nolint:revive, We want to keep the name as <Component>Output
Copy link
Contributor

Choose a reason for hiding this comment

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

What is the lint error?

components.JSONImporter
Operator compkubernetes.KubernetesObjectRef `json:"operator"`
}
Expand Down
4 changes: 2 additions & 2 deletions components/kubernetes/kubernetes_object_ref.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"github.com/DataDog/test-infra-definitions/components"
)

type KubernetesObjRefOutput struct {
type KubernetesObjRefOutput struct { // nolint:revive, We want to keep the name as <Component>Output
components.JSONImporter

Namespace string `json:"namespace"`
Expand All @@ -18,7 +18,7 @@ type KubernetesObjRefOutput struct {
LabelSelectors map[string]string `json:"labelSelectors"`
}

type KubernetesObjectRef struct {
type KubernetesObjectRef struct { // nolint:revive, We want to keep the name as <Component>Output
pulumi.ResourceState
components.Component

Expand Down