-
Notifications
You must be signed in to change notification settings - Fork 4
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
implement raft storage node #3
Open
adibrastegarnia
wants to merge
11
commits into
atomix:master
Choose a base branch
from
adibrastegarnia:add_raft_storage_controller
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 9 commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
cc8c2f0
implement raft storage controller
adibrastegarnia 4d132d2
Add auto generated api
adibrastegarnia 4376a1c
Rename raft-replica to raft-storage-Add building blocks of raft contr…
adibrastegarnia dda6eca
Add new dockerfiles
adibrastegarnia 8027374
go mod tidy
adibrastegarnia d8f78d5
Disable cache
adibrastegarnia de9a9a4
Add helm charts
adibrastegarnia 5efd491
Disable coverage for now
adibrastegarnia fc55359
Remove raft storage controller
adibrastegarnia 6c06c4b
fix some of the tests
adibrastegarnia bc1f045
Remove deprecated API
adibrastegarnia File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ | |
*.dll | ||
*.so | ||
*.dylib | ||
|
||
**/_output | ||
# Test binary, build with `go test -c` | ||
*.test | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#!/bin/bash | ||
echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USER" --password-stdin | ||
make image | ||
make push | ||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
FROM alpine:3.9 | ||
|
||
USER nobody | ||
|
||
ADD build/raft-storage-node/_output/raft-storage-node /usr/local/bin/raft-storage-node | ||
|
||
ENTRYPOINT ["raft-storage-node"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
apiVersion: storage.cloud.atomix.io/v1beta1 | ||
kind: RaftStorageClass | ||
metadata: | ||
name: raft | ||
labels: | ||
app: raft | ||
spec: | ||
image: atomix/raft-storage-node:latest | ||
imagePullPolicy: IfNotPresent | ||
replicas: 1 | ||
--- | ||
apiVersion: cloud.atomix.io/v1beta2 | ||
kind: Database | ||
metadata: | ||
name: raft | ||
spec: | ||
clusters: 3 | ||
template: | ||
spec: | ||
partitions: 10 | ||
storage: | ||
group: storage.cloud.atomix.io | ||
version: v1beta1 | ||
kind: RaftStorageClass | ||
name: raft | ||
namespace: kube-system |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
apiVersion: v2 | ||
name: raft-database | ||
description: raft database | ||
kubeVersion: ">=1.12.0" | ||
type: application | ||
version: 0.1.0 | ||
appVersion: v0.1.0-beta.1 | ||
keywords: | ||
- atomix | ||
home: https://atomix.io | ||
maintainers: | ||
- name: adib | ||
email: [email protected] | ||
- name: kuujo | ||
email: [email protected] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
{{/* vim: set filetype=mustache: */}} | ||
{{/* | ||
Expand the name of the chart. | ||
*/}} | ||
{{- define "cache-storage.name" -}} | ||
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} | ||
{{- end -}} | ||
|
||
{{/* | ||
Create a default fully qualified app name. | ||
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). | ||
If release name contains chart name it will be used as a full name. | ||
*/}} | ||
{{- define "cache-storage.fullname" -}} | ||
{{- if .Values.fullnameOverride -}} | ||
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} | ||
{{- else -}} | ||
{{- $name := default .Chart.Name .Values.nameOverride -}} | ||
{{- if contains $name .Release.Name -}} | ||
{{- .Release.Name | trunc 63 | trimSuffix "-" -}} | ||
{{- else -}} | ||
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} | ||
{{- end -}} | ||
{{- end -}} | ||
{{- end -}} | ||
|
||
{{/* | ||
Create chart name and version as used by the chart label. | ||
*/}} | ||
{{- define "cache-storage.chart" -}} | ||
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} | ||
{{- end -}} | ||
|
||
{{/* | ||
Common labels | ||
*/}} | ||
{{- define "cache-storage.labels" -}} | ||
helm.sh/chart: {{ include "cache-storage.chart" . }} | ||
{{ include "cache-storage.selectorLabels" . }} | ||
{{- if .Chart.AppVersion }} | ||
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} | ||
{{- end }} | ||
app.kubernetes.io/managed-by: {{ .Release.Service }} | ||
{{- end -}} | ||
|
||
{{/* | ||
Selector labels | ||
*/}} | ||
{{- define "cache-storage.selectorLabels" -}} | ||
app.kubernetes.io/name: {{ include "cache-storage.name" . }} | ||
app.kubernetes.io/instance: {{ .Release.Name }} | ||
{{- end -}} | ||
|
||
{{/* | ||
Create the name of the service account to use | ||
*/}} | ||
{{- define "cache-storage.serviceAccountName" -}} | ||
{{- if .Values.serviceAccount.create -}} | ||
{{ default (include "cache-storage.fullname" .) .Values.serviceAccount.name }} | ||
{{- else -}} | ||
{{ default "default" .Values.serviceAccount.name }} | ||
{{- end -}} | ||
{{- end -}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
apiVersion: cloud.atomix.io/v1beta2 | ||
kind: Database | ||
metadata: | ||
name: {{ .Release.Name }} | ||
spec: | ||
clusters: {{ .Values.clusters }} | ||
template: | ||
spec: | ||
partitions: {{ .Values.partitions }} | ||
storage: | ||
group: storage.cloud.atomix.io | ||
version: v1beta1 | ||
kind: RaftStorageClass | ||
name: {{ .Release.Name }} | ||
namespace: {{ .Release.Namespace }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
apiVersion: storage.cloud.atomix.io/v1beta1 | ||
kind: RaftStorageClass | ||
metadata: | ||
name: {{ .Release.Name }} | ||
labels: | ||
app: {{ .Release.Name }} | ||
spec: | ||
image: {{ .Values.image.repository }}:{{ .Values.image.tag }} | ||
imagePullPolicy: {{ .Values.image.pullPolicy }} | ||
replicas: {{ .Values.replicas }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
clusters: 3 | ||
partitions: 10 | ||
replicas: 1 | ||
|
||
image: | ||
repository: atomix/raft-storage-node | ||
tag: latest | ||
pullPolicy: IfNotPresent | ||
pullSecrets: [] |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
@kuujo
This is deprecated. We should change it