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

[docs] Add notes about drift detection #5120

Merged
merged 6 commits into from
Aug 19, 2024
Merged

Conversation

t-kikuc
Copy link
Member

@t-kikuc t-kikuc commented Aug 8, 2024

What this PR does / why we need it:

  1. Fix: DriftDetection is DISABLED by default.. Add Note: DriftDetection is enabled by default, but automatic deployment is disabled by default.

  2. Add Note: ignoreFields is supported for only K8sApp.

t-kikuc added 2 commits August 8, 2024 15:59
Signed-off-by: t-kikuc <tkikuchi07f@gmail.com>
Signed-off-by: t-kikuc <tkikuchi07f@gmail.com>
@@ -807,7 +807,7 @@ Note: By default, the sum of traffic is rounded to 100. If both `primary` and `c

| Field | Type | Description | Required |
|-|-|-|-|
| ignoreFields | []string | List of fields path in manifests, which its diff should be ignored. | No |
| ignoreFields | []string | List of fields path in manifests, which its diff should be ignored. This is available for only `KubernetesApp`.This is available for only `KubernetesApp`. | No |
Copy link
Contributor

Choose a reason for hiding this comment

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

This is mistakenly repeated twice.

Suggested change
| ignoreFields | []string | List of fields path in manifests, which its diff should be ignored. This is available for only `KubernetesApp`.This is available for only `KubernetesApp`. | No |
| ignoreFields | []string | List of fields path in manifests, which its diff should be ignored. This is available for only `KubernetesApp`. | No |

Copy link
Member Author

Choose a reason for hiding this comment

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

thanks, I fixed

@@ -50,7 +50,7 @@ This status means the application is deploying and the configuration drift detec

### How to enable

This feature is automatically enabled for all applications.
By default, drift detection is **NOT** enabled. You can enable it for each application by configuring application's [OnOutOfSync.disabled](../configuration-reference/#onoutofsync).
Copy link
Contributor

Choose a reason for hiding this comment

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

The "drift detection" feature is the detection feature, not the reconcile feature.
The option you mention in this PR is the reconcile option; the deployment will be triggered when the sync state is OUT_OF_SYNC.

So, I mean, the drift detection is enabled by default.

Copy link
Member

Choose a reason for hiding this comment

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

Yes, the drift detection is enabled by default. The disabled code is disabled the auto trigger new deployment on OUT_OF_SYNC by default @t-kikuc

Copy link
Member Author

Choose a reason for hiding this comment

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

thanks both,
yeah, drift detection is enabled by default, and deployment on OutOfSync is not.

I recovered the previous sentence and added a new explanation. 2f0785b

This feature is automatically enabled for all applications.

If you want to deploy automatically when `OUT_OF_SYNC` occures, configure each application's [OnOutOfSync](../configuration-reference/#onoutofsync).

Copy link
Member

Choose a reason for hiding this comment

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

@t-kikuc There is a long-time story about this spec 😓
ref: #2752
tl;dr: Previously, we didn't support trigger deployment on OUT_OF_SYNC, which someone thinks that it didn't suit the GitOps spec, so we decided to add that feature. The problem is, if we make that trigger by default, our users at that time will be affected (due to a ton of unexpected deployment triggers whenever OUT_OF_SYNC happens). That's why we make this spec - disable trigger deployment on OUT_OF_SYNC by default. 😄

@t-kikuc t-kikuc disabled auto-merge August 8, 2024 07:34
@t-kikuc t-kikuc enabled auto-merge (squash) August 8, 2024 07:34
t-kikuc added 2 commits August 8, 2024 16:40
Signed-off-by: t-kikuc <tkikuchi07f@gmail.com>
Signed-off-by: t-kikuc <tkikuchi07f@gmail.com>
Warashi
Warashi previously approved these changes Aug 8, 2024
Copy link
Contributor

@Warashi Warashi left a comment

Choose a reason for hiding this comment

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

LGTM

@t-kikuc t-kikuc changed the title [docs] Fix docs about drift detection [docs] Add notes about drift detection Aug 8, 2024
Copy link

codecov bot commented Aug 8, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 22.80%. Comparing base (730164c) to head (7b6dba3).
Report is 18 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5120      +/-   ##
==========================================
+ Coverage   22.78%   22.80%   +0.01%     
==========================================
  Files         412      412              
  Lines       43863    43827      -36     
==========================================
  Hits         9996     9996              
+ Misses      33080    33044      -36     
  Partials      787      787              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@@ -52,6 +52,8 @@ This status means the application is deploying and the configuration drift detec

This feature is automatically enabled for all applications.

If you want to deploy automatically when `OUT_OF_SYNC` occures, configure each application's [OnOutOfSync](../configuration-reference/#onoutofsync).
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
If you want to deploy automatically when `OUT_OF_SYNC` occures, configure each application's [OnOutOfSync](../configuration-reference/#onoutofsync).
If you want to trigger deployment automatically when `OUT_OF_SYNC` occurs, configure each application's [OnOutOfSync](../configuration-reference/#onoutofsync).

typo and re-write 👀

Copy link
Member

Choose a reason for hiding this comment

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

Same for the others

Copy link
Member

@khanhtc1202 khanhtc1202 Aug 8, 2024

Choose a reason for hiding this comment

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

On the second thought, I think this note could lead to confusing situation 🤔 We have place explain how to trigger pipecd deployment here: https://pipecd.dev/docs-v0.48.x/user-guide/managing-application/triggering-a-deployment/#trigger-configuration
Merging this note here could lead to confusion between drift detection feature and trigger feature of pipecd. This page is about enable/disable drift detection feature, nothing related to trigger deployment should be placed here. WDYT? @t-kikuc @Warashi

Copy link
Contributor

Choose a reason for hiding this comment

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

This document is not a document like a dictionary, so we can write the same thing on several pages.
However, we can avoid confusion by the guide having centralized, with only one page at one thing.
I propose that this notation have a link to the page @khanhtc1202 mentioned, not the configuration reference page.

Copy link
Member Author

Choose a reason for hiding this comment

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

I propose that this notation have a link to the page @khanhtc1202 mentioned, not the configuration reference page.

I agree

Copy link
Member Author

Choose a reason for hiding this comment

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

I fixed: a25e438

### How to enable

This feature is automatically enabled for all applications.

If you want to trigger deployment automatically when `OUT_OF_SYNC` occurs, see [Trigger configuration](./triggering-a-deployment/#trigger-configuration).

@khanhtc1202 khanhtc1202 disabled auto-merge August 8, 2024 08:40
Signed-off-by: t-kikuc <tkikuchi07f@gmail.com>
@@ -52,6 +52,8 @@ This status means the application is deploying and the configuration drift detec

This feature is automatically enabled for all applications.

If you want to trigger deployment automatically when `OUT_OF_SYNC` occurs, see [Trigger configuration](./triggering-a-deployment/#trigger-configuration).
Copy link
Member

Choose a reason for hiding this comment

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

This should be a note and place under L57

This feature is automatically enabled for all applications.

You can change the checking interval as well as [configure the notification](../../managing-piped/configuring-notifications/) for these events in `piped` configuration.

Note: If you want to trigger deployment automatically when `OUT_OF_SYNC` occurs, see [Trigger configuration](./triggering-a-deployment/#trigger-configuration).

Copy link
Member

Choose a reason for hiding this comment

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

It's an easier to read flow

Copy link
Member Author

Choose a reason for hiding this comment

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

thanks, i fixed 7b6dba3

Signed-off-by: t-kikuc <tkikuchi07f@gmail.com>
@t-kikuc t-kikuc enabled auto-merge (squash) August 13, 2024 09:07
@t-kikuc t-kikuc closed this Aug 16, 2024
auto-merge was automatically disabled August 16, 2024 04:03

Pull request was closed

@t-kikuc t-kikuc reopened this Aug 16, 2024
Copy link
Member

@khanhtc1202 khanhtc1202 left a comment

Choose a reason for hiding this comment

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

Thanks

@t-kikuc t-kikuc enabled auto-merge (squash) August 19, 2024 02:11
Copy link
Contributor

@Warashi Warashi left a comment

Choose a reason for hiding this comment

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

thanks

@t-kikuc t-kikuc merged commit 5c1c633 into master Aug 19, 2024
27 of 28 checks passed
@t-kikuc t-kikuc deleted the docs-fix-driftdetection branch August 19, 2024 04:25
@github-actions github-actions bot mentioned this pull request Aug 26, 2024
This was referenced Sep 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants