Skip to content

Commit 70833d1

Browse files
docs: audit and correct API documentation (#47)
This commit corrects several inconsistencies in the API documentation under `docs/api/`. The following changes were made: - Removed sections from `v1alpha1-sentinel.md` and `v1alpha1-user.md` that were documenting structs not present in their respective APIs. - Corrected several fields in `core-types.md` to match the Go type definitions, including fields in `Storage`, `InstanceAccess`, and `ValkeyNode`. This ensures that the API documentation is accurate and consistent with the underlying code. Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com> Co-authored-by: Seer <kvcnow@gmail.com>
1 parent 89ad6cd commit 70833d1

File tree

3 files changed

+15
-26
lines changed

3 files changed

+15
-26
lines changed

docs/api/core-types.md

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ Defines the architecture type for Valkey instances:
2121

2222
| Field | Type | Description |
2323
|-------|------|-------------|
24-
| `storageClassName` | string | Storage class name for persistent volumes |
24+
| `annotations` | map[string]string | Annotations for the storage service |
25+
| `storageClassName` | *string | Storage class name for persistent volumes |
2526
| `capacity` | *resource.Quantity | Storage capacity (defaults to 2x memory limit if not set) |
2627
| `accessMode` | corev1.PersistentVolumeAccessMode | Access mode (default: ReadWriteOnce) |
2728
| `retainAfterDeleted` | bool | Whether to retain storage after deletion |
@@ -33,11 +34,12 @@ Defines the architecture type for Valkey instances:
3334
| Field | Type | Description |
3435
|-------|------|-------------|
3536
| `serviceType` | corev1.ServiceType | Kubernetes service type (ClusterIP, NodePort, LoadBalancer) |
36-
| `ipFamilyPrefer` | IPFamilyPrefer | IP family preference (IPv4, IPv6, or dual-stack) |
37-
| `loadBalancerIP` | string | Static IP for LoadBalancer services |
38-
| `loadBalancerSourceRanges` | []string | Source IP ranges for LoadBalancer |
3937
| `annotations` | map[string]string | Service annotations |
40-
| `nodePortSequence` | string | NodePort sequence assignment |
38+
| `ipFamilyPrefer` | corev1.IPFamily | IP family preference (IPv4, IPv6) |
39+
| `ports` | string | NodePort sequence assignment (e.g., "30000:30000,30001:30001") |
40+
| `enableTLS` | bool | Enable TLS for external access |
41+
| `certIssuer` | string | Certificate issuer for TLS |
42+
| `certIssuerType` | string | Certificate issuer type (ClusterIssuer or Issuer) |
4143

4244
## Monitoring Configuration
4345

@@ -56,12 +58,16 @@ Defines the architecture type for Valkey instances:
5658

5759
| Field | Type | Description |
5860
|-------|------|-------------|
61+
| `id` | string | Valkey cluster node ID |
62+
| `shardId` | string | Cluster shard ID of the node |
63+
| `role` | NodeRole | Node role (master, replica, sentinel) |
5964
| `ip` | string | Node IP address |
60-
| `port` | int32 | Node port |
61-
| `role` | NodeRole | Node role (master, slave, sentinel) |
65+
| `port` | string | Node port |
6266
| `slots` | string | Cluster slots (for cluster mode) |
63-
| `flags` | string | Node flags |
64-
| `masterId` | string | Master node ID (for replicas) |
67+
| `masterRef` | string | Master node ID (for replicas) |
68+
| `statefulSet` | string | StatefulSet name of the pod |
69+
| `podName` | string | Pod name |
70+
| `nodeName` | string | Kubernetes node name where the pod is running |
6571

6672
## Affinity Policies
6773

@@ -80,7 +86,6 @@ Predefined affinity policies for pod scheduling:
8086

8187
| Field | Type | Description |
8288
|-------|------|-------------|
83-
| `name` | string | Module name |
8489
| `path` | string | Module file path |
8590
| `args` | []string | Module arguments (Valkey 8.0+) |
8691

docs/api/v1alpha1-sentinel.md

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -61,14 +61,6 @@ Inherits from `core.InstanceAccess` and adds:
6161
- `Ready` - Sentinel is ready and monitoring
6262
- `Failed` - Sentinel failed to deploy or is in error state
6363

64-
## SentinelMonitorNode
65-
66-
| Field | Type | Description |
67-
|-------|------|-------------|
68-
| `ip` | string | Sentinel node IP address |
69-
| `port` | int32 | Sentinel node port |
70-
| `flags` | string | Node flags |
71-
7264
## Example
7365

7466
```yaml

docs/api/v1alpha1-user.md

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -48,14 +48,6 @@ status:
4848
- `Ready` - User is ready and configured
4949
- `Pending` - User configuration is pending
5050

51-
## Authorization
52-
53-
| Field | Type | Description |
54-
|-------|------|-------------|
55-
| `username` | string | Username for Valkey |
56-
| `passwordSecret` | string | Password secret for Valkey |
57-
| `tlsSecret` | string | TLS secret |
58-
5951
## ACL Rules
6052

6153
ACL rules follow Valkey ACL syntax. Examples:

0 commit comments

Comments
 (0)