Skip to content

Commit 4c259eb

Browse files
fix: add secret ref for AuthString & update some annotations.
Signed-off-by: Electronic-Waste <[email protected]>
1 parent cfe3498 commit 4c259eb

File tree

5 files changed

+63
-5
lines changed

5 files changed

+63
-5
lines changed

config/crd/bases/databendlabs.io_tenants.yaml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,51 @@ spec:
5555
authString:
5656
description: Password encrypted with AuthType.
5757
type: string
58+
authStringSecretRef:
59+
description: |-
60+
Reference to the secret with AuthString of user.
61+
Secret can be created in any namespace.
62+
properties:
63+
apiVersion:
64+
description: API version of the referent.
65+
type: string
66+
fieldPath:
67+
description: |-
68+
If referring to a piece of an object instead of an entire object, this string
69+
should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2].
70+
For example, if the object reference is to a container within a pod, this would take on a value like:
71+
"spec.containers{name}" (where "name" refers to the name of the container that triggered
72+
the event) or if no container name is specified "spec.containers[2]" (container with
73+
index 2 in this pod). This syntax is chosen only to have some well-defined way of
74+
referencing a part of an object.
75+
type: string
76+
kind:
77+
description: |-
78+
Kind of the referent.
79+
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
80+
type: string
81+
name:
82+
description: |-
83+
Name of the referent.
84+
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
85+
type: string
86+
namespace:
87+
description: |-
88+
Namespace of the referent.
89+
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/
90+
type: string
91+
resourceVersion:
92+
description: |-
93+
Specific resourceVersion to which this reference is made, if any.
94+
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency
95+
type: string
96+
uid:
97+
description: |-
98+
UID of the referent.
99+
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids
100+
type: string
101+
type: object
102+
x-kubernetes-map-type: atomic
58103
authType:
59104
default: no_password
60105
description: |-

config/crd/bases/databendlabs.io_warehouses.yaml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,10 @@ spec:
5353
description: WarehouseSpec defines the desired state of Warehouse.
5454
properties:
5555
autoSuspendAfterSecs:
56-
default: 1500
57-
description: Time for Query clsuter to suspend when no query requests
58-
are received.
56+
default: 0
57+
description: |-
58+
Time for Query clsuter to suspend when no query requests are received.
59+
Set to 0 if you don't want Query cluster to be suspended.
5960
type: integer
6061
diskCacheSize:
6162
description: Configurations of cache in disk.

pkg/api/v1alpha1/tenant_types.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,10 @@ type User struct {
110110

111111
// Password encrypted with AuthType.
112112
AuthString string `json:"authString,omitempty"`
113+
114+
// Reference to the secret with AuthString of user.
115+
// Secret can be created in any namespace.
116+
AuthStringSecretRef *corev1.ObjectReference `json:"authStringSecretRef,omitempty"`
113117
}
114118

115119
// TenantSpec defines the desired state of Tenant.

pkg/api/v1alpha1/warehouse_types.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,8 @@ type WarehouseSpec struct {
106106
Replicas int `json:"replicas,omitempty"`
107107

108108
// Time for Query clsuter to suspend when no query requests are received.
109-
// +kubebuilder:default=1500
109+
// Set to 0 if you don't want Query cluster to be suspended.
110+
// +kubebuilder:default=0
110111
AutoSuspendAfterSecs int `json:"autoSuspendAfterSecs,omitempty"`
111112

112113
// Image for Query.

pkg/api/v1alpha1/zz_generated.deepcopy.go

Lines changed: 8 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)