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 and improvements #1251

Open
wants to merge 14 commits into
base: main
Choose a base branch
from

Conversation

fanny-jiang
Copy link
Contributor

@fanny-jiang fanny-jiang commented Nov 19, 2024

What does this PR do?

  • Remove hardcoded values such as namespace and operator image path in agentwithoperatorparams and operatorparams
  • Move KubernetesObjectRef to the kubernetes component
  • Add KubernetesObjectRef to the operator component output
  • Add DDAConfig param option for the datadogagent app component

Which scenarios this will impact?

Motivation

Additional Notes

components/datadog/agent/kubernetes_operator.go Outdated Show resolved Hide resolved
components/datadog/apps/dda/datadogagent.go Outdated Show resolved Hide resolved
@fanny-jiang fanny-jiang force-pushed the fanny/operator-namespaces branch from 676da02 to 8355c2d Compare November 22, 2024 01:16
@@ -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?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I was getting this lint error:

Error: components/datadog/operator/component.go:11:6: exported: type name will be used as operator.OperatorOutput by other packages, and that stutters; consider calling this Output (revive)
  type OperatorOutput struct {

@fanny-jiang fanny-jiang changed the title DDA w/operator component cleanups DDA w/operator component cleanups and improvements Dec 9, 2024
type OperatorOutput struct { // nolint:revive, We want to keep the name as <Component>Output
components.JSONImporter

Operator compkubernetes.KubernetesObjRefOutput `pulumi:"operator"`
Copy link
Contributor

Choose a reason for hiding this comment

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

Should use json decorator on outputs
💬 suggestion

Suggested change
Operator compkubernetes.KubernetesObjRefOutput `pulumi:"operator"`
Operator compkubernetes.KubernetesObjRefOutput `json:"operator"`

@@ -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
Copy link
Contributor

Choose a reason for hiding this comment

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

❓ question
What is revive complaining about here? The comment seems to be a copy paste from above that does not fit here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants