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

feat: Support Reconciliation Tracing #8143

Open
wants to merge 119 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
119 commits
Select commit Hold shift + click to select a range
edcd798
api scaffold
free6om Sep 10, 2024
c355207
embed changes into object tree
free6om Sep 11, 2024
d57e381
workflow style WIP
free6om Sep 11, 2024
0e67c96
workflow style done
free6om Sep 12, 2024
ee8f5ce
make manifests
free6om Sep 12, 2024
de61b49
gpt suggests that
free6om Sep 12, 2024
5ceeb23
make generate
free6om Sep 12, 2024
294cd9d
fix CRD validation error
free6om Sep 12, 2024
b37bc81
view controller WIP
free6om Sep 13, 2024
88cfe52
resources loader, validator done, informer manager WIP
free6om Sep 18, 2024
7d6d2b2
informer manager poc done
free6om Sep 19, 2024
2b8efcf
root finder poc done
free6om Sep 19, 2024
f28798a
view calculation WIP
free6om Sep 19, 2024
b25d5de
view calculation done
free6om Sep 20, 2024
0a8c3ae
view state evaluation WIP
free6om Sep 20, 2024
188bbdb
view state evaluation done
free6om Sep 23, 2024
91dc8d5
object store done
free6om Sep 23, 2024
fe89ded
debug view controller
free6om Sep 23, 2024
6b848e2
debug view controller
free6om Sep 23, 2024
f791e64
viewResourses() works
free6om Sep 23, 2024
f289b55
viewResourcesValidation() works
free6om Sep 23, 2024
202e83b
updateInformerManager() works
free6om Sep 23, 2024
22cfaa5
viewCalculation() works
free6om Sep 23, 2024
fb576e3
viewStateEvaluation() works
free6om Sep 23, 2024
0c164b3
view.status update works
free6om Sep 24, 2024
a878f48
fix infinite view.status update
free6om Sep 24, 2024
16908d3
handle store lost after controller restarted
free6om Sep 24, 2024
cd08fc0
code cleanup
free6om Sep 24, 2024
9077b09
add observed generation fields
free6om Sep 24, 2024
ee1a0c0
plan controller, planResources(), planResourcesValidation() done, pla…
free6om Sep 24, 2024
bd8ea76
planGeneration() WIP
free6om Sep 24, 2024
6f0f792
planGeneration() done
free6om Sep 25, 2024
ee52232
plan controller works
free6om Sep 25, 2024
4be0e01
code cleanup, kbagent dry-run mode
free6om Sep 25, 2024
fb01638
remove ReconciliationViewDefinition
free6om Sep 25, 2024
75ab43f
merge ReconciliationPlan into ReconciliationView
free6om Sep 26, 2024
a0f689e
complete Cluster rules
free6om Sep 26, 2024
e48b8fd
mock reconciler WIP
free6om Sep 26, 2024
398ca44
mock reconciler done
free6om Sep 27, 2024
145ed26
refine store
free6om Sep 27, 2024
8f75f86
Merge branch 'main' into support/reconciliation-view
free6om Sep 27, 2024
c7cf952
bump KB API to v1
free6om Sep 27, 2024
8c024e9
fix kustmization.yaml
free6om Sep 27, 2024
954150e
bugfix
free6om Sep 27, 2024
3ff9195
code cleanup
free6om Sep 28, 2024
64ccd16
ownership validation, code cleanup
free6om Sep 28, 2024
12aa1c0
fix ownership validation
free6om Sep 28, 2024
d2e6db9
fix Configuration apiVersion, run plan generation with timeout
free6om Sep 29, 2024
9552951
adjust structure of DryRunResult
free6om Sep 29, 2024
987b2e6
set Depth default to 0
free6om Sep 29, 2024
a9832cc
i18n resources manager
free6om Sep 29, 2024
66e0f64
handle event WIP
free6om Sep 29, 2024
6411aba
handle event done
free6om Sep 29, 2024
dd563cc
get involved object of event
free6om Sep 29, 2024
5c2efaa
add some todos
free6om Sep 29, 2024
3d84e4c
re-org code
free6om Sep 30, 2024
d1d7aa3
fix staticcheck & golint error
free6om Sep 30, 2024
73c88af
handle deletion done
free6om Sep 30, 2024
e8fc6a6
fix missing arg
free6om Sep 30, 2024
ca059ed
Merge branch 'main' into support/reconciliation-view
free6om Oct 8, 2024
6ee26af
fix sort error
free6om Oct 8, 2024
dd92b20
fix NPE
free6om Oct 8, 2024
913896e
event cleanup, findMatchedRules()
free6om Oct 8, 2024
c76b082
Merge branch 'main' into support/reconciliation-view
free6om Oct 8, 2024
83b9bb7
relax chinese check
free6om Oct 8, 2024
4eb6a97
remove leagcy import
free6om Oct 8, 2024
a468b07
relax chinese check
free6om Oct 8, 2024
04e3030
ut util_test WIP
free6om Oct 8, 2024
2a9e9f7
try fix ci error
free6om Oct 14, 2024
8903863
try fix ci error
free6om Oct 14, 2024
fca2d27
init scheme
free6om Oct 14, 2024
2a7c870
try fix ci error
free6om Oct 14, 2024
60b47f8
Revert "try fix ci error"
free6om Oct 14, 2024
ca20ea9
ut for getObjectReference
free6om Oct 14, 2024
08a41a3
try fix ci error
free6om Oct 14, 2024
644e71e
try fix ci error
free6om Oct 14, 2024
615b485
try fix ci error
free6om Oct 14, 2024
af8b8a5
try fix ci error
free6om Oct 14, 2024
6ffa1b9
Revert "try fix ci error"
free6om Oct 14, 2024
6abdcd4
ut WIP
free6om Oct 14, 2024
6618b21
test view only
free6om Oct 14, 2024
3ab1ac1
verbose
free6om Oct 14, 2024
d1d45ed
verbose
free6om Oct 14, 2024
0dffb36
verbose3
free6om Oct 14, 2024
13df22f
verbose4
free6om Oct 14, 2024
eade629
fix lint error
free6om Oct 14, 2024
885a7af
revert verbose
free6om Oct 14, 2024
fbb18e9
useTestEnvCfg
free6om Oct 14, 2024
a342017
ci error fixed
free6om Oct 14, 2024
144bc85
util ut WIP
free6om Oct 14, 2024
7628fb4
rename view to trace
free6om Oct 15, 2024
044ea98
Merge branch 'main' into support/reconciliation-view
free6om Oct 15, 2024
81c7c3e
util ut done
free6om Oct 16, 2024
93db999
fix lint error
free6om Oct 16, 2024
7d948ee
change_capture_store ut done
free6om Oct 16, 2024
e12e437
object_revision_store ut done
free6om Oct 17, 2024
6e13875
reconciler_tree ut done
free6om Oct 17, 2024
6b44def
fix scheme error
free6om Oct 17, 2024
c895201
current_state_handler ut done
free6om Oct 17, 2024
c2516a7
deletion_handler ut done
free6om Oct 17, 2024
6621d11
desired_state_handler ut WIP
free6om Oct 17, 2024
8661897
desired_state_handler ut WIP
free6om Oct 18, 2024
8f7d74c
desired_state_handler ut WIP
free6om Oct 18, 2024
07b35bd
desired_state_handler ut done
free6om Oct 20, 2024
430e447
desired_state_handler ut done
free6om Oct 20, 2024
105809f
fix broken ut, fix lint error
free6om Oct 20, 2024
2b85675
count changes without event
free6om Oct 21, 2024
d2261df
dry_run_handler ut done
free6om Oct 21, 2024
dc64642
finalizer_handler ut done
free6om Oct 21, 2024
6e2f344
deletion_handler ut for pre-condition
free6om Oct 21, 2024
a515a58
dry_run_handler ut for pre-condition
free6om Oct 21, 2024
e482166
resources loader, validator ut done
free6om Oct 21, 2024
ce09dc3
object_tree_root_finder ut done
free6om Oct 21, 2024
0dadc9c
fix k8sMock related issue
free6om Oct 21, 2024
c138c43
fix panic error
free6om Oct 21, 2024
d511335
fix event loss issue
free6om Oct 22, 2024
9f4f798
fix deletion issue
free6om Oct 22, 2024
c8c2ec7
fix panic on trace creation
free6om Oct 22, 2024
87e4684
remove Depth
free6om Oct 29, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/cicd-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ jobs:
for filePath in $(echo "$FILE_PATH"); do
filePath="${filePath%/*}"
if [[ -d $filePath && "$filePath" != *"i18n/zh-cn"* ]]; then
echo $(pcregrep -r -n -I '[^\x00-\x7f]' $filePath >> pcregrep.out)
echo $(find "$filePath" -type f ! -name "*i18n*" -exec pcregrep -n -I '[^\x00-\x7f]' {} + >> pcregrep.out)
fi
done

Expand Down
10 changes: 10 additions & 0 deletions PROJECT
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,16 @@ resources:
kind: NodeCountScaler
path: github.com/apecloud/kubeblocks/apis/experimental/v1alpha1
version: v1alpha1
- api:
crdVersion: v1
namespaced: true
controller: true
domain: kubeblocks.io
domain: kubeblocks.io
group: trace
kind: ReconciliationTrace
path: github.com/apecloud/kubeblocks/apis/trace/v1
version: v1
- api:
crdVersion: v1
namespaced: true
Expand Down
41 changes: 41 additions & 0 deletions apis/trace/v1/groupversion_info.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
/*
Copyright (C) 2022-2024 ApeCloud Co., Ltd

This file is part of KubeBlocks project

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

// Package v1 contains API Schema definitions for the trace v1 API group
// +kubebuilder:object:generate=true
// +groupName=trace.kubeblocks.io
package v1

import (
"k8s.io/apimachinery/pkg/runtime/schema"
"sigs.k8s.io/controller-runtime/pkg/scheme"
)

var (
// GroupVersion is group version used to register these objects
GroupVersion = schema.GroupVersion{Group: "trace.kubeblocks.io", Version: "v1"}

// SchemeBuilder is used to add go types to the GroupVersionKind scheme
SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion}

// AddToScheme adds the types in this group-version to the given scheme.
AddToScheme = SchemeBuilder.AddToScheme
)

const Kind = "ReconciliationTrace"
Loading
Loading