feat: support to deploy oblogservice and oceanbase.ai#933
Open
Junkrat77 wants to merge 12 commits into
Open
Conversation
This commit adds complete support for OceanBase shared-storage deployment mode and LogService cluster management via a three-layer CRD architecture. LogService (new): - Three-layer CRD: OBLogServiceCluster → OBLogServiceZone → OBLogServiceNode - Declarative topology with automatic cascade create/delete - Auto bootstrap via ls_ctrl after all nodes ready - Node failure recovery (Pod lost/failed → auto rebuild) - Configurable resource requests, affinity, tolerations per zone - Deletion protection via ignore-deletion annotation - Immutability checks for objectStoreUrl and storage in ValidateUpdate Shared Storage OBCluster (extended): - New spec fields: deploymentMode, sharedStorageInfo, logServiceRef - Bootstrap with LOGSERVICE_ACCESS_POINT + SHARED_STORAGE_INFO - Observer starts with -m shared_storage, enable_logservice=True - No redoLog PVC in shared storage mode - Webhook validates SS-specific required fields and immutability Security & robustness: - Shell injection fix: user-supplied BucketURL/Region/Zone passed via env vars - RBAC markers for Zone/Node CRDs - DeepCopy pointer aliasing fix - Nil pointer guards in UpdateStatus and CreatePod - Finalizer safety: transition to Deleting instead of skipping cleanup - AlreadyExists handling for idempotent zone/node creation - Deterministic node deletion ordering (newest first) Build & deployment: - SS image build scripts (oblogservice + observer-ss Dockerfiles) - Non-root USER in Dockerfile.oblogservice - Pinned base image for observer-ss - Example manifests with placeholder credentials and endpoints
make export-operator export-charts
Remove access_id/access_key from operator logs by: - Not logging the full bootstrap SQL in BootstrapSharedStorage - Not including ls_ctrl Job output in error messages or success logs
Rename image, namespace, and resource names from ss to ai across build scripts and example manifests.
…en formatting. Remove local-only RPM image build helpers from version control and revert accidental column-alignment churn in unrelated resource manager task name files.
- Merge LogService DeepCopy methods into api/types/deepcopy.go with proper handling of Resource, Affinity, Tolerations, and StorageSpec fields - Delete redundant api/types/zz_generated_deepcopy.go - Add Affinity/Tolerations fields to OBLogServiceNodeSpec and propagate from Zone topology through to Pod spec - Set container resource Limits equal to Requests (Guaranteed QoS) - Regenerate CRD manifests via controller-gen - Fix obcluster_webhook RedoLogStorage indent and obcluster_test pointer type - Fix observer_task.go switch-case indentation (gofmt)
Propagate user-defined parameters through the Cluster→Zone→Node hierarchy and inject them into the oblogservice startup command via the -g flag.
…OBCluster - Add required resource field (cpu/memory) to OBLogServiceCluster and OBLogServiceZone specs with webhook validation and propagation - Remove hardcoded resource defaults in Pod creation, use spec values - Auto-calculate log_disk_size from storeStorage PVC size (95%) - Auto-calculate memory_limit from resource.memory (90%) via webhook Defaulter, matching OBCluster's Default() pattern - Add mutating webhook for OBLogServiceCluster to fill memory_limit - Add LogServiceReservedParameters to filter log_disk_size/percentage - Extract LogService mount paths and volume names to constants - Validate memory_limit does not exceed resource.memory in webhook
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Solution Description