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

[CONTP-508] Supporting startupProbe in operator #1536

Merged
merged 7 commits into from
Nov 25, 2024

Conversation

gabedos
Copy link
Contributor

@gabedos gabedos commented Nov 22, 2024

What does this PR do?

Provides support for the startupProbe in the operator (similar to readinessProbe and livelinessProbe)

Motivation

Being able to configure the success/failure thresholds of the agent.

Additional Notes

N/A

Minimum Agent Versions

N/A

Describe your test plan

Apply the following agent configuration via k apply -f datadog-agent.yaml

apiVersion: datadoghq.com/v2alpha1
kind: DatadogAgent
metadata:
  name: datadog
spec:
  global:
    clusterName: gabedos-basic-cluster
    credentials:
      apiSecret:
        secretName: datadog-secret
        keyName: api-key
    kubelet:
      tlsVerify: false
  override:
    nodeAgent:
      containers:
        agent:
          readinessProbe:
            failureThreshold: 60
            initialDelaySeconds: 15
            periodSeconds: 150
            successThreshold: 1
            timeoutSeconds: 50
          startupProbe:
            failureThreshold: 60
            initialDelaySeconds: 1501
            periodSeconds: 150
            successThreshold: 1
            timeoutSeconds: 50

Then check the startupProbe on the agent pod via k get pod datadog-agent-xxxxx -o yaml and search for startupProbe

    readinessProbe:
      failureThreshold: 60
      httpGet:
        path: /ready
        port: 5555
        scheme: HTTP
      initialDelaySeconds: 15
      periodSeconds: 150
      successThreshold: 1
      timeoutSeconds: 50
    resources: {}
    startupProbe:
      failureThreshold: 60
      httpGet:
        path: /live
        port: 5555
        scheme: HTTP
      initialDelaySeconds: 1501
      periodSeconds: 150
      successThreshold: 1
      timeoutSeconds: 50

Checklist

  • PR has at least one valid label: bug, enhancement, refactoring, documentation, tooling, and/or dependencies
  • PR has a milestone or the qa/skip-qa label

@gabedos gabedos added the enhancement New feature or request label Nov 22, 2024
@gabedos gabedos requested review from a team as code owners November 22, 2024 20:29
@gabedos gabedos added this to the v1.11.0 milestone Nov 22, 2024
@codecov-commenter
Copy link

codecov-commenter commented Nov 22, 2024

Codecov Report

Attention: Patch coverage is 44.44444% with 15 lines in your changes missing coverage. Please review.

Project coverage is 48.52%. Comparing base (9891de6) to head (2153b68).

Files with missing lines Patch % Lines
internal/controller/testutils/agent.go 0.00% 15 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1536      +/-   ##
==========================================
- Coverage   48.52%   48.52%   -0.01%     
==========================================
  Files         226      226              
  Lines       20287    20314      +27     
==========================================
+ Hits         9845     9857      +12     
- Misses       9924     9939      +15     
  Partials      518      518              
Flag Coverage Δ
unittests 48.52% <44.44%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
api/datadoghq/v2alpha1/datadogagent_types.go 100.00% <ø> (ø)
...controller/datadogagent/component/agent/default.go 79.16% <100.00%> (+0.04%) ⬆️
...rnal/controller/datadogagent/override/container.go 95.02% <100.00%> (+0.32%) ⬆️
internal/controller/testutils/agent.go 0.00% <0.00%> (ø)

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9891de6...2153b68. Read the comment docs.

---- 🚨 Try these New Features:

Copy link
Contributor

@drichards-87 drichards-87 left a comment

Choose a reason for hiding this comment

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

Left some suggestions from Docs and approved the PR.

docs/configuration.v2alpha1.md Outdated Show resolved Hide resolved
docs/configuration.v2alpha1.md Show resolved Hide resolved
docs/configuration.v2alpha1.md Show resolved Hide resolved
docs/configuration.v2alpha1.md Show resolved Hide resolved
docs/configuration.v2alpha1.md Outdated Show resolved Hide resolved
docs/configuration.v2alpha1.md Show resolved Hide resolved
@gabedos
Copy link
Contributor Author

gabedos commented Nov 25, 2024

/merge

@dd-devflow
Copy link

dd-devflow bot commented Nov 25, 2024

Devflow running: /merge

View all feedbacks in Devflow UI.


2024-11-25 16:03:14 UTC ℹ️ MergeQueue: pull request added to the queue

The median merge time in main is 15m.


2024-11-25 16:03:37 UTCMergeQueue: This merge request is not mergeable, blocked by github

PR can't be merged according to github policy

@gabedos gabedos merged commit 52f6295 into main Nov 25, 2024
20 checks passed
@gabedos gabedos deleted the gabedos/add-startup-probe branch November 25, 2024 17:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants