Skip to content

Commit

Permalink
Merge branch 'main' into levan-m/issue-staler
Browse files Browse the repository at this point in the history
  • Loading branch information
levan-m authored Jul 25, 2024
2 parents 9ee3ef0 + a38116f commit 718044c
Show file tree
Hide file tree
Showing 50 changed files with 110 additions and 19,718 deletions.
21 changes: 15 additions & 6 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ trigger_internal_operator_check_image:
trigger_internal_operator_nightly_image:
stage: release
rules:
- if: '$CI_COMMIT_BRANCH == "main" && $DDR == "true" && $TARGET_ENV == "nightly-build"'
- if: '$CI_COMMIT_BRANCH == "main" && $TARGET_ENV == "nightly-build"'
when: on_success
- when: never
trigger:
Expand All @@ -313,7 +313,7 @@ trigger_internal_operator_nightly_image:
trigger_internal_operator_check_nightly_image:
stage: release
rules:
- if: '$CI_COMMIT_BRANCH == "main" && $DDR == "true" && $TARGET_ENV == "nightly-build"'
- if: '$CI_COMMIT_BRANCH == "main" && $TARGET_ENV == "nightly-build"'
when: on_success
- when: never
trigger:
Expand Down Expand Up @@ -461,10 +461,11 @@ publish_community_operators:
- make publish-community-bundles


deploy_nightly_image:
# On success, this will cause Conductor to trigger a Deployment to nightly clusters in SDP
publish_nightly_workflow:
stage: deploy
rules:
- if: '$CI_COMMIT_BRANCH == "main" && $DDR == "true" && $TARGET_ENV == "nightly-build"'
- if: '$CI_COMMIT_BRANCH == "main" && $TARGET_ENV == "nightly-build"'
when: on_success
- when: never
needs:
Expand All @@ -474,7 +475,15 @@ deploy_nightly_image:
project: DataDog/k8s-datadog-agent-ops
branch: main
strategy: depend
forward:
pipeline_variables: true
variables:
OPERATOR_NIGHTLY: true
ENVIRONMENTS: "alpha,experimental,staging"
OPERATOR_NIGHTLY: "true"
SKIP_PLAN_CHECK: "true"
ENVIRONMENTS: "experimental"
CHART: "datadog-operator"
EXPLICIT_WORKFLOWS: "//workflows:deploy_operator.operator_nightly.publish"
BAZEL_TARGET: $BAZEL_TARGET
DDR: $DDR
TARGET_ENV: $TARGET_ENV
DDR_WORKFLOW_ID: $DDR_WORKFLOW_ID
1 change: 1 addition & 0 deletions .golangci.toml
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@
"inamedparam",
"nakedret",
"gomoddirectives",
"dupword",
]

[issues]
Expand Down
2 changes: 1 addition & 1 deletion apis/datadoghq/v2alpha1/datadogagent_default.go
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ func defaultFeaturesConfig(ddaSpec *DatadogAgentSpec) {
}

if ddaSpec.Features.APM.SingleStepInstrumentation.LanguageDetection == nil {
ddaSpec.Features.APM.SingleStepInstrumentation.LanguageDetection = &LanguageDetection{}
ddaSpec.Features.APM.SingleStepInstrumentation.LanguageDetection = &LanguageDetectionConfig{}
}

apiutils.DefaultBooleanIfUnset(&ddaSpec.Features.APM.SingleStepInstrumentation.Enabled, defaultAPMSingleStepInstrEnabled)
Expand Down
24 changes: 12 additions & 12 deletions apis/datadoghq/v2alpha1/datadogagent_default_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ func Test_defaultFeatures(t *testing.T) {
},
SingleStepInstrumentation: &SingleStepInstrumentation{
Enabled: apiutils.NewBoolPointer(defaultAPMSingleStepInstrEnabled),
LanguageDetection: &LanguageDetection{Enabled: apiutils.NewBoolPointer(defaultLanguageDetectionEnabled)},
LanguageDetection: &LanguageDetectionConfig{Enabled: apiutils.NewBoolPointer(defaultLanguageDetectionEnabled)},
},
},
ASM: &ASMFeatureConfig{
Expand Down Expand Up @@ -502,7 +502,7 @@ func Test_defaultFeatures(t *testing.T) {
},
SingleStepInstrumentation: &SingleStepInstrumentation{
Enabled: apiutils.NewBoolPointer(defaultAPMSingleStepInstrEnabled),
LanguageDetection: &LanguageDetection{Enabled: apiutils.NewBoolPointer(defaultLanguageDetectionEnabled)},
LanguageDetection: &LanguageDetectionConfig{Enabled: apiutils.NewBoolPointer(defaultLanguageDetectionEnabled)},
},
},
ASM: &ASMFeatureConfig{
Expand Down Expand Up @@ -632,7 +632,7 @@ func Test_defaultFeatures(t *testing.T) {
},
SingleStepInstrumentation: &SingleStepInstrumentation{
Enabled: apiutils.NewBoolPointer(defaultAPMSingleStepInstrEnabled),
LanguageDetection: &LanguageDetection{Enabled: apiutils.NewBoolPointer(defaultLanguageDetectionEnabled)},
LanguageDetection: &LanguageDetectionConfig{Enabled: apiutils.NewBoolPointer(defaultLanguageDetectionEnabled)},
},
},
ASM: &ASMFeatureConfig{
Expand Down Expand Up @@ -757,7 +757,7 @@ func Test_defaultFeatures(t *testing.T) {
},
SingleStepInstrumentation: &SingleStepInstrumentation{
Enabled: apiutils.NewBoolPointer(defaultAPMSingleStepInstrEnabled),
LanguageDetection: &LanguageDetection{Enabled: apiutils.NewBoolPointer(defaultLanguageDetectionEnabled)},
LanguageDetection: &LanguageDetectionConfig{Enabled: apiutils.NewBoolPointer(defaultLanguageDetectionEnabled)},
},
},
ASM: &ASMFeatureConfig{
Expand Down Expand Up @@ -882,7 +882,7 @@ func Test_defaultFeatures(t *testing.T) {
},
SingleStepInstrumentation: &SingleStepInstrumentation{
Enabled: apiutils.NewBoolPointer(defaultAPMSingleStepInstrEnabled),
LanguageDetection: &LanguageDetection{Enabled: apiutils.NewBoolPointer(defaultLanguageDetectionEnabled)},
LanguageDetection: &LanguageDetectionConfig{Enabled: apiutils.NewBoolPointer(defaultLanguageDetectionEnabled)},
},
},
ASM: &ASMFeatureConfig{
Expand Down Expand Up @@ -1016,7 +1016,7 @@ func Test_defaultFeatures(t *testing.T) {
},
SingleStepInstrumentation: &SingleStepInstrumentation{
Enabled: apiutils.NewBoolPointer(defaultAPMSingleStepInstrEnabled),
LanguageDetection: &LanguageDetection{Enabled: apiutils.NewBoolPointer(defaultLanguageDetectionEnabled)},
LanguageDetection: &LanguageDetectionConfig{Enabled: apiutils.NewBoolPointer(defaultLanguageDetectionEnabled)},
},
},
ASM: &ASMFeatureConfig{
Expand Down Expand Up @@ -1141,7 +1141,7 @@ func Test_defaultFeatures(t *testing.T) {
},
SingleStepInstrumentation: &SingleStepInstrumentation{
Enabled: apiutils.NewBoolPointer(defaultAPMSingleStepInstrEnabled),
LanguageDetection: &LanguageDetection{Enabled: apiutils.NewBoolPointer(defaultLanguageDetectionEnabled)},
LanguageDetection: &LanguageDetectionConfig{Enabled: apiutils.NewBoolPointer(defaultLanguageDetectionEnabled)},
},
},
ASM: &ASMFeatureConfig{
Expand Down Expand Up @@ -1269,7 +1269,7 @@ func Test_defaultFeatures(t *testing.T) {
},
SingleStepInstrumentation: &SingleStepInstrumentation{
Enabled: apiutils.NewBoolPointer(defaultAPMSingleStepInstrEnabled),
LanguageDetection: &LanguageDetection{Enabled: apiutils.NewBoolPointer(defaultLanguageDetectionEnabled)},
LanguageDetection: &LanguageDetectionConfig{Enabled: apiutils.NewBoolPointer(defaultLanguageDetectionEnabled)},
},
},
ASM: &ASMFeatureConfig{
Expand Down Expand Up @@ -1386,7 +1386,7 @@ func Test_defaultFeatures(t *testing.T) {
},
SingleStepInstrumentation: &SingleStepInstrumentation{
Enabled: apiutils.NewBoolPointer(defaultAPMSingleStepInstrEnabled),
LanguageDetection: &LanguageDetection{Enabled: apiutils.NewBoolPointer(defaultLanguageDetectionEnabled)},
LanguageDetection: &LanguageDetectionConfig{Enabled: apiutils.NewBoolPointer(defaultLanguageDetectionEnabled)},
},
},
ASM: &ASMFeatureConfig{
Expand Down Expand Up @@ -1525,7 +1525,7 @@ func Test_defaultFeatures(t *testing.T) {
},
SingleStepInstrumentation: &SingleStepInstrumentation{
Enabled: apiutils.NewBoolPointer(defaultAPMSingleStepInstrEnabled),
LanguageDetection: &LanguageDetection{Enabled: apiutils.NewBoolPointer(defaultLanguageDetectionEnabled)},
LanguageDetection: &LanguageDetectionConfig{Enabled: apiutils.NewBoolPointer(defaultLanguageDetectionEnabled)},
},
},
ASM: &ASMFeatureConfig{
Expand Down Expand Up @@ -1672,7 +1672,7 @@ func Test_defaultFeatures(t *testing.T) {
},
SingleStepInstrumentation: &SingleStepInstrumentation{
Enabled: apiutils.NewBoolPointer(defaultAPMSingleStepInstrEnabled),
LanguageDetection: &LanguageDetection{Enabled: apiutils.NewBoolPointer(defaultLanguageDetectionEnabled)},
LanguageDetection: &LanguageDetectionConfig{Enabled: apiutils.NewBoolPointer(defaultLanguageDetectionEnabled)},
},
},
ASM: &ASMFeatureConfig{
Expand Down Expand Up @@ -1800,7 +1800,7 @@ func Test_defaultFeatures(t *testing.T) {
},
SingleStepInstrumentation: &SingleStepInstrumentation{
Enabled: apiutils.NewBoolPointer(defaultAPMSingleStepInstrEnabled),
LanguageDetection: &LanguageDetection{Enabled: apiutils.NewBoolPointer(defaultLanguageDetectionEnabled)},
LanguageDetection: &LanguageDetectionConfig{Enabled: apiutils.NewBoolPointer(defaultLanguageDetectionEnabled)},
},
},
ASM: &ASMFeatureConfig{
Expand Down
10 changes: 5 additions & 5 deletions apis/datadoghq/v2alpha1/datadogagent_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -157,15 +157,15 @@ type SingleStepInstrumentation struct {
// +optional
LibVersions map[string]string `json:"libVersions,omitempty"`

// Language detection currently only detects languages and adds them as annotations on deployments, but doesn't use these languages for injecting libraries to applicative pods.
// LanguageDetection detects languages and adds them as annotations on Deployments, but does not use these languages for injecting libraries to workload pods.
// (Requires Agent 7.52.0+ and Cluster Agent 7.52.0+)
// +optional
LanguageDetection *LanguageDetection `json:"languageDetection,omitempty"`
LanguageDetection *LanguageDetectionConfig `json:"languageDetection,omitempty"`
}

// LanguageDetection contains the config for the language detection feature.
type LanguageDetection struct {
// Enabled enables language detection to automatically detect languages of user workloads (beta).
// LanguageDetectionConfig contains the config for Language Detection.
type LanguageDetectionConfig struct {
// Enabled enables Language Detection to automatically detect languages of user workloads (beta).
// Requires SingleStepInstrumentation.Enabled to be true.
// Default: true
// +optional
Expand Down
2 changes: 1 addition & 1 deletion apis/datadoghq/v2alpha1/test/builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -566,7 +566,7 @@ func (builder *DatadogAgentBuilder) WithAPMSingleStepInstrumentationEnabled(enab
EnabledNamespaces: enabledNamespaces,
DisabledNamespaces: disabledNamespaces,
LibVersions: libVersion,
LanguageDetection: &v2alpha1.LanguageDetection{Enabled: apiutils.NewBoolPointer(languageDetectionEnabled)},
LanguageDetection: &v2alpha1.LanguageDetectionConfig{Enabled: apiutils.NewBoolPointer(languageDetectionEnabled)},
}
return builder
}
Expand Down
10 changes: 5 additions & 5 deletions apis/datadoghq/v2alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions config/crd/bases/v1/datadoghq.com_datadogagents.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -491,12 +491,12 @@ spec:
x-kubernetes-list-type: set
languageDetection:
description: |-
Language detection currently only detects languages and adds them as annotations on deployments, but doesn't use these languages for injecting libraries to applicative pods.
LanguageDetection detects languages and adds them as annotations on Deployments, but does not use these languages for injecting libraries to workload pods.
(Requires Agent 7.52.0+ and Cluster Agent 7.52.0+)
properties:
enabled:
description: |-
Enabled enables language detection to automatically detect languages of user workloads (beta).
Enabled enables Language Detection to automatically detect languages of user workloads (beta).
Requires SingleStepInstrumentation.Enabled to be true.
Default: true
type: boolean
Expand Down Expand Up @@ -6344,12 +6344,12 @@ spec:
x-kubernetes-list-type: set
languageDetection:
description: |-
Language detection currently only detects languages and adds them as annotations on deployments, but doesn't use these languages for injecting libraries to applicative pods.
LanguageDetection detects languages and adds them as annotations on Deployments, but does not use these languages for injecting libraries to workload pods.
(Requires Agent 7.52.0+ and Cluster Agent 7.52.0+)
properties:
enabled:
description: |-
Enabled enables language detection to automatically detect languages of user workloads (beta).
Enabled enables Language Detection to automatically detect languages of user workloads (beta).
Requires SingleStepInstrumentation.Enabled to be true.
Default: true
type: boolean
Expand Down
Loading

0 comments on commit 718044c

Please sign in to comment.