-
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 all 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 | ||
imagePullPolicy: IfNotPresent | ||
image: atomix/raft-storage-node:v0.1.0 | ||
replicas: 1 | ||
partitionsPerCluster: 3 | ||
volumeClaimTemplates: | ||
data: | ||
metadata: | ||
name: "test" | ||
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: kube-system |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,24 +29,52 @@ spec: | |
type: string | ||
replicas: | ||
type: integer | ||
min: 1 | ||
max: 9 | ||
minimum: 1 | ||
maximum: 9 | ||
default: 1 | ||
partitionsPerCluster: | ||
type: integer | ||
min: 1 | ||
max: 1024 | ||
minimum: 1 | ||
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. This should be updated in helm charts as well. |
||
maximum: 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: object | ||
required: | ||
- data | ||
properties: | ||
data: | ||
type: object | ||
required: | ||
- spec | ||
properties: | ||
metadata: | ||
type: object | ||
properties: | ||
name: | ||
type: string | ||
default: '' | ||
spec: | ||
type: object | ||
properties: | ||
accessModes: | ||
type: array | ||
items: | ||
type: string | ||
default: '' | ||
storageClassName: | ||
type: string | ||
default: '' | ||
resources: | ||
type: object | ||
properties: | ||
requests: | ||
type: object | ||
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 | ||
metadata: | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
// Copyright 2020-present Open Networking Foundation. | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
package v1beta1 | ||
|
||
import ( | ||
corev1 "k8s.io/api/core/v1" | ||
) | ||
|
||
// VolumeClaimTemplates k8s persistent volume claims | ||
type VolumeClaimTemplates struct { | ||
Data *corev1.PersistentVolumeClaim `json:"data,omitempty"` | ||
} |
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?