Skip to content

Commit

Permalink
feat: add kind deployments examples (#258)
Browse files Browse the repository at this point in the history
Signed-off-by: Vladislav Polyakov <polRk@ydb.tech>
  • Loading branch information
polRk authored Oct 31, 2024
1 parent 8125bba commit 5744c87
Show file tree
Hide file tree
Showing 6 changed files with 236 additions and 0 deletions.
24 changes: 24 additions & 0 deletions samples/kind/database-3dc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
apiVersion: ydb.tech/v1alpha1
kind: Database
metadata:
name: database-kind-sample
spec:
image:
name: cr.yandex/crptqonuodf51kdj7a7d/ydb:24.2.7
affinity:
podAntiAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchExpressions:
- key: app.kubernetes.io/component
operator: In
values:
- storage-node
topologyKey: "kubernetes.io/hostname"
nodes: 3
resources:
storageUnits:
- count: 1
unitKind: ssd
storageClusterRef:
name: storage-kind-sample
14 changes: 14 additions & 0 deletions samples/kind/database.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
apiVersion: ydb.tech/v1alpha1
kind: Database
metadata:
name: database-kind-sample
spec:
image:
name: cr.yandex/crptqonuodf51kdj7a7d/ydb:24.2.7
nodes: 1
resources:
storageUnits:
- count: 1
unitKind: ssd
storageClusterRef:
name: storage-kind-sample
13 changes: 13 additions & 0 deletions samples/kind/kind-3dc-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
nodes:
- role: control-plane
- role: worker
labels:
topology.kubernetes.io/zone: az-1
- role: worker
labels:
topology.kubernetes.io/zone: az-2
- role: worker
labels:
topology.kubernetes.io/zone: az-3
7 changes: 7 additions & 0 deletions samples/kind/kind-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
nodes:
- role: control-plane
- role: worker
labels:
topology.kubernetes.io/zone: az-1
113 changes: 113 additions & 0 deletions samples/kind/storage-mirror-3dc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
apiVersion: ydb.tech/v1alpha1
kind: Storage
metadata:
name: storage-kind-sample
spec:
image:
name: cr.yandex/crptqonuodf51kdj7a7d/ydb:24.2.7
affinity:
podAntiAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchExpressions:
- key: app.kubernetes.io/component
operator: In
values:
- storage-node
topologyKey: "kubernetes.io/hostname"
dataStore: []
nodes: 3
domain: Root
erasure: mirror-3-dc
configuration: |-
actor_system_config:
cpu_count: 1
node_type: STORAGE
use_auto_config: true
blob_storage_config:
service_set:
groups:
- erasure_species: mirror-3-dc
rings:
- fail_domains:
- vdisk_locations:
- node_id: 1
pdisk_category: SSD
path: SectorMap:1:64
- vdisk_locations:
- node_id: 1
pdisk_category: SSD
path: SectorMap:2:64
- vdisk_locations:
- node_id: 1
pdisk_category: SSD
path: SectorMap:3:64
- fail_domains:
- vdisk_locations:
- node_id: 2
pdisk_category: SSD
path: SectorMap:1:64
- vdisk_locations:
- node_id: 2
pdisk_category: SSD
path: SectorMap:2:64
- vdisk_locations:
- node_id: 2
pdisk_category: SSD
path: SectorMap:3:64
- fail_domains:
- vdisk_locations:
- node_id: 3
pdisk_category: SSD
path: SectorMap:1:64
- vdisk_locations:
- node_id: 3
pdisk_category: SSD
path: SectorMap:2:64
- vdisk_locations:
- node_id: 3
pdisk_category: SSD
path: SectorMap:3:64
channel_profile_config:
profile:
- channel:
- erasure_species: mirror-3-dc
pdisk_category: 0
storage_pool_kind: ssd
- erasure_species: mirror-3-dc
pdisk_category: 0
storage_pool_kind: ssd
- erasure_species: mirror-3-dc
pdisk_category: 0
storage_pool_kind: ssd
profile_id: 0
domains_config:
domain:
- name: Root
storage_pool_types:
- kind: ssd
pool_config:
box_id: 1
erasure_species: mirror-3-dc
kind: ssd
pdisk_filter:
- property:
- type: SSD
vdisk_kind: Default
state_storage:
- ring:
node: [1, 2, 3]
nto_select: 3
ssid: 1
grpc_config:
port: 2135
host_configs:
- drive:
- path: SectorMap:1:64
type: SSD
- path: SectorMap:2:64
type: SSD
- path: SectorMap:3:64
type: SSD
host_config_id: 1
static_erasure: mirror-3-dc
65 changes: 65 additions & 0 deletions samples/kind/storage.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
apiVersion: ydb.tech/v1alpha1
kind: Storage
metadata:
name: storage-kind-sample
spec:
dataStore: []
image:
name: cr.yandex/crptqonuodf51kdj7a7d/ydb:24.2.7
nodes: 1
domain: Root
erasure: none
configuration: |-
actor_system_config:
cpu_count: 1
node_type: STORAGE
use_auto_config: true
blob_storage_config:
service_set:
groups:
- erasure_species: none
rings:
- fail_domains:
- vdisk_locations:
- node_id: 1
path: SectorMap:1:64
pdisk_category: SSD
channel_profile_config:
profile:
- channel:
- erasure_species: none
pdisk_category: 0
storage_pool_kind: ssd
- erasure_species: none
pdisk_category: 0
storage_pool_kind: ssd
- erasure_species: none
pdisk_category: 0
storage_pool_kind: ssd
profile_id: 0
domains_config:
domain:
- name: Root
storage_pool_types:
- kind: ssd
pool_config:
box_id: 1
erasure_species: none
kind: ssd
pdisk_filter:
- property:
- type: SSD
vdisk_kind: Default
state_storage:
- ring:
node: [1]
nto_select: 1
ssid: 1
grpc_config:
port: 2135
host_configs:
- drive:
- path: SectorMap:1:64
type: SSD
host_config_id: 1
static_erasure: none

0 comments on commit 5744c87

Please sign in to comment.