-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add volumeClaimTemplates to raft storage api #5
base: master
Are you sure you want to change the base?
Changes from 5 commits
f0b0315
5b6ed64
d0ad7e0
7a60b9a
efaaa2c
9ad46d3
7c97b02
f6203b2
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,33 @@ | ||
apiVersion: storage.cloud.atomix.io/v1beta1 | ||
kind: RaftStorageClass | ||
metadata: | ||
name: raft | ||
labels: | ||
app: raft | ||
name: raft-database | ||
labels: | ||
app: raft-database | ||
spec: | ||
image: atomix/raft-replica:latest | ||
image: atomix/raft-storage-node:v0.1.0 | ||
imagePullPolicy: IfNotPresent | ||
replicas: 1 | ||
partitionsPerCluster: 3 | ||
volumeClaimTemplates: | ||
- metadata: | ||
name: data | ||
spec: | ||
accessModes: [ "ReadWriteOnce" ] | ||
storageClassName: "standard" | ||
resources: | ||
requests: | ||
storage: 1Gi | ||
--- | ||
apiVersion: cloud.atomix.io/v1beta2 | ||
apiVersion: cloud.atomix.io/v1beta3 | ||
kind: Database | ||
metadata: | ||
name: raft | ||
name: raft-database | ||
spec: | ||
clusters: 3 | ||
template: | ||
spec: | ||
partitions: 10 | ||
storage: | ||
group: storage.cloud.atomix.io | ||
version: v1beta1 | ||
kind: RaftStorageClass | ||
name: raft | ||
namespace: kube-system | ||
partitions: 1 | ||
storageClass: | ||
group: storage.cloud.atomix.io | ||
version: v1beta1 | ||
kind: RaftStorageClass | ||
name: raft-database | ||
namespace: default |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,23 +29,94 @@ spec: | |
type: string | ||
replicas: | ||
type: integer | ||
min: 1 | ||
max: 9 | ||
default: 1 | ||
partitionsPerCluster: | ||
type: integer | ||
min: 1 | ||
max: 1024 | ||
default: 1 | ||
volumeClaimTemplates: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can we just convert this to YAML just so it's clear and so we're sure we can use it in the Helm chart as well? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I will figure that out. It looks like it is working in helm chart as well :) |
||
type: array | ||
"items": { | ||
"type": object, | ||
"required": [ | ||
"metadata", | ||
"spec" | ||
], | ||
"properties": { | ||
"metadata": { | ||
"$id": "#/items/properties/metadata", | ||
"type": "object", | ||
"default": {}, | ||
"required": [ | ||
"name" | ||
], | ||
"properties": { | ||
"name": { | ||
"$id": "#/items/properties/metadata/properties/name", | ||
"type": "string", | ||
"default": "", | ||
|
||
} | ||
} | ||
}, | ||
"spec": { | ||
"$id": "#/items/properties/spec", | ||
"type": "object", | ||
"default": {}, | ||
"required": [ | ||
"accessModes", | ||
"storageClassName", | ||
"resources" | ||
], | ||
"properties": { | ||
"accessModes": { | ||
"$id": "#/items/properties/spec/properties/accessModes", | ||
"type": "array", | ||
"default": [], | ||
|
||
"items": { | ||
"$id": "#/items/properties/spec/properties/accessModes/items", | ||
"type": "string", | ||
"default": "", | ||
|
||
} | ||
}, | ||
"storageClassName": { | ||
"$id": "#/items/properties/spec/properties/storageClassName", | ||
"type": "string", | ||
"default": "", | ||
|
||
}, | ||
"resources": { | ||
"$id": "#/items/properties/spec/properties/resources", | ||
"type": "object", | ||
"default": {}, | ||
"required": [ | ||
"requests" | ||
], | ||
"properties": { | ||
"requests": { | ||
"$id": "#/items/properties/spec/properties/resources/properties/requests", | ||
"type": "object", | ||
"default": {}, | ||
"required": [ | ||
"storage" | ||
], | ||
"properties": { | ||
"storage": { | ||
"$id": "#/items/properties/spec/properties/resources/properties/requests/properties/storage", | ||
"type": "string", | ||
"default": "", | ||
|
||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
--- | ||
apiVersion: cloud.atomix.io/v1beta2 | ||
kind: StorageController | ||
metadata: | ||
name: raft | ||
spec: | ||
group: storage.cloud.atomix.io | ||
version: v1beta1 | ||
kind: RaftStorageClass | ||
--- | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: ClusterRole | ||
|
@@ -97,7 +168,7 @@ metadata: | |
subjects: | ||
- kind: ServiceAccount | ||
name: raft-storage-controller | ||
namespace: kube-system | ||
namespace: default | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If this is a cluster scoped controller it should be deployed in the |
||
roleRef: | ||
kind: ClusterRole | ||
name: raft-storage-controller | ||
|
@@ -107,13 +178,13 @@ apiVersion: v1 | |
kind: ServiceAccount | ||
metadata: | ||
name: raft-storage-controller | ||
namespace: kube-system | ||
namespace: default | ||
--- | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: raft-storage-controller | ||
namespace: kube-system | ||
namespace: default | ||
spec: | ||
replicas: 1 | ||
selector: | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we keep this here as an example?