Closed daviderli614 closed 2 months ago
The updates involve version upgrades for tools and dependencies, changes to type annotations for port variables, renaming fields in structs for clarity, and modifications to function signatures to enhance specificity. Additionally, enhancements to the Custom Resource Definition (CRD) structure and minor adjustments to build constraints are included. Overall, these changes aim to improve clarity, maintainability, and compatibility within the codebase.
File Path | Change Summary |
---|---|
Makefile |
Updated KUSTOMIZE_VERSION to v5.3.0 and CONTROLLER_TOOLS_VERSION to v0.14.0 . |
apis/v1alpha1/defaulting.go |
Changed default port variables from untyped to int32 . Replaced intstr.FromInt with intstr.FromInt32 . |
apis/v1alpha1/greptimedbstandalone_types.go |
Renamed HTTPServicePort to HTTPPort in GreptimeDBStandaloneSpec . |
apis/v1alpha1/zz_generated.deepcopy.go |
Removed the build constraint // +build !ignore_autogenerated . |
cmd/operator/app/command.go |
Replaced MetricsBindAddress with Metrics: metricsserver.Options{ BindAddress: o.MetricsAddr } . |
config/crd/resources/greptime.io_greptimedbstandalones.yaml |
Updated CRD with new fields and annotations, changed controller-gen.kubebuilder.io/version to v0.14.0 . |
config/rbac/role.yaml |
Removed creationTimestamp from ClusterRole metadata. |
controllers/greptimedbcluster/controller.go |
Refactored default value initialization in Reconcile function. |
controllers/greptimedbcluster/deployers/common.go |
Changed UpdateStatus parameter type from client.UpdateOption to client.SubResourceUpdateOption . |
controllers/greptimedbstandalone/controller.go |
Changed UpdateStatus parameter type from client.UpdateOption to client.SubResourceUpdateOption . |
controllers/greptimedbstandalone/deployer.go |
Renamed HTTPServicePort to HTTPPort in several methods. |
go.mod |
Updated various Go module dependencies to newer versions. |
sequenceDiagram
participant User
participant Controller
participant CRD
User->>Controller: Create or update resource
Controller->>CRD: Validate and set defaults
alt New Resource
Controller->>CRD: Initialize default values
end
Controller->>CRD: Update status
CRD-->>Controller: Acknowledge update
Controller-->>User: Confirm resource status
π "Oh, what a hop, what a skip,
Versions upgraded, letβs take a trip!
Ports now typed, clear as can be,
Renamed fields sing, 'Look at me!'
In the code, we dance and play,
Happy changes brighten the day!" π
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
@daviderli614 It's not a best practice to fix a bug and upgrade the dependencies simultaneously, which is not about the bug itself.
Can you please make the PR into two standalone PRs:
Describe what the bug is and how to reproduce it. Reverting the code logic is not a good solution. After reviewing the code, I strongly suspect this is not a bug.
Submit another PR to bump the dependencies;
I will split this PR.
if len(cluster.Status.ClusterPhase) == 0
:Summary by CodeRabbit
greptimedbstandalones
, adding new properties such asresizePolicy
,restartPolicy
, andclaims
for improved resource management.