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

[feature](dcr) add rolling restart capability #292

Merged
merged 4 commits into from
Nov 22, 2024

Conversation

catpineapple
Copy link
Contributor

What problem does this PR solve?

  • fe rolling restart capability
  • be rolling restart capability

Principle:

restart capability triggers a restart by patching the template metadata of all the pods of resource with apache.doris.org/restartedAt annotation.

Directions:

  1. Add corresponding annotations to dcr.metadata.annotations to rolling restart.
    a. apache.doris.be/restartedAt restart be
    b. apache.doris.fe/restartedAt restart fe
  2. Try to ensure that the time is after the current time. The time in the past will be regarded as an invalid parameter and the restart will be rejected. The format can refer to this command: date +"%Y-%m-%dT%H:%M:%S%:z".
apiVersion: doris.selectdb.com/v1
kind: DorisCluster
metadata:
  labels:
    app.kubernetes.io/name: doriscluster
    app.kubernetes.io/instance: doriscluster-sample
    app.kubernetes.io/part-of: doris-operator
  name: doriscluster-sample
  namespace: doris
  annotations:
    apache.doris.be/restartedAt: "2024-11-21T14:35:56+08:00"
    apache.doris.fe/restartedAt: "2024-11-21T15:20:56+08:00"
spec:
  feSpec:
  ...

Release note

None

Check List (For Author)

  • Test

    • Regression test
    • Unit Test
    • Manual test (add detailed scripts or steps below)
    • No need to test or manual test. Explain why:
      • This is a refactor/code format and no logic has been changed.
      • Previous test can cover this change.
      • No code files have been changed.
      • Other reason
  • Behavior changed:

    • No.
    • Yes.
  • Does this need documentation?

    • No.
    • Yes.

Check List (For Reviewer who merge this PR)

  • Confirm the release note
  • Confirm test cases
  • Confirm document
  • Add branch pick label

Copy link
Contributor

@intelligentfu8 intelligentfu8 left a comment

Choose a reason for hiding this comment

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

LGTM

@intelligentfu8 intelligentfu8 merged commit 8b06624 into apache:master Nov 22, 2024
1 check passed
@catpineapple catpineapple mentioned this pull request Nov 22, 2024
@catpineapple catpineapple deleted the add-restart-capability branch November 22, 2024 11:04
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