Skip to content

Commit 989cd80

Browse files
committed
Update Go framework to v0.7.0
1 parent 8a23b8a commit 989cd80

File tree

8 files changed

+250
-153
lines changed

8 files changed

+250
-153
lines changed

Makefile

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ endif
1212
all: build
1313

1414
build: # @HELP build the source code
15-
build: deps license_check linters
15+
build: license_check linters
1616
GOOS=linux GOARCH=amd64 go build -gcflags=-trimpath=${GOPATH} -asmflags=-trimpath=${GOPATH} -o build/_output/atomix-memory-storage-node ./cmd/atomix-memory-storage-node
1717
GOOS=linux GOARCH=amd64 go build -gcflags=-trimpath=${GOPATH} -asmflags=-trimpath=${GOPATH} -o build/_output/atomix-memory-storage-driver ./cmd/atomix-memory-storage-driver
1818
GOOS=linux GOARCH=amd64 go build -gcflags=-trimpath=${GOPATH} -asmflags=-trimpath=${GOPATH} -o build/_output/atomix-memory-storage-controller ./cmd/atomix-memory-storage-controller
@@ -23,7 +23,7 @@ deps: # @HELP ensure that the required dependencies are in place
2323
bash -c "diff -u <(echo -n) <(git diff go.sum)"
2424

2525
test: # @HELP run the unit tests and source code validation
26-
test: build
26+
test: deps build
2727
go test github.com/atomix/atomix-memory-storage-controller/...
2828

2929
linters: # @HELP examines Go source code and reports coding problems

cmd/atomix-memory-storage-driver/main.go

+8-4
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ package main
1616

1717
import (
1818
"fmt"
19+
protocolapi "github.com/atomix/atomix-api/go/atomix/protocol"
1920
"github.com/atomix/atomix-go-framework/pkg/atomix/cluster"
2021
"github.com/atomix/atomix-go-framework/pkg/atomix/driver"
2122
"github.com/atomix/atomix-go-framework/pkg/atomix/driver/env"
@@ -66,10 +67,13 @@ func main() {
6667

6768
// Create a Raft driver
6869
d := driver.NewDriver(
69-
provider,
70-
driver.WithDriverID("raft"),
71-
driver.WithHost(host),
72-
driver.WithPort(port))
70+
cluster.NewCluster(
71+
cluster.NewNetwork(),
72+
protocolapi.ProtocolConfig{},
73+
cluster.WithMemberID("memory"),
74+
cluster.WithHost(host),
75+
cluster.WithPort(port)),
76+
provider)
7377

7478
// Start the node
7579
if err := d.Start(); err != nil {

cmd/atomix-memory-storage-node/main.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ func main() {
4444
nodeID := os.Args[1]
4545
protocolConfig := parseProtocolConfig()
4646

47-
cluster := cluster.NewCluster(protocolConfig, cluster.WithMemberID(nodeID))
47+
cluster := cluster.NewCluster(cluster.NewNetwork(), protocolConfig, cluster.WithMemberID(nodeID))
4848

4949
// Create an Atomix node
5050
node := rsm.NewNode(cluster, local.NewProtocol())

deploy/atomix-memory-storage.yaml

+4-3
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ spec:
142142
kind: MemoryStore
143143
drivers:
144144
- version: v2beta1
145-
image: atomix/atomix-memory-storage-driver:v0.6.0
145+
image: atomix/atomix-memory-storage-driver:latest
146146
---
147147
apiVersion: v1
148148
kind: ServiceAccount
@@ -179,6 +179,7 @@ rules:
179179
- apiGroups:
180180
- apps
181181
resources:
182+
- deployments
182183
- statefulsets
183184
verbs:
184185
- '*'
@@ -236,7 +237,7 @@ spec:
236237
serviceAccountName: atomix-memory-storage-controller
237238
containers:
238239
- name: controller
239-
image: atomix/atomix-memory-storage-controller:v0.6.0
240+
image: atomix/atomix-memory-storage-controller:latest
240241
imagePullPolicy: IfNotPresent
241242
readinessProbe:
242243
exec:
@@ -262,4 +263,4 @@ spec:
262263
fieldRef:
263264
fieldPath: metadata.namespace
264265
- name: DEFAULT_NODE_V2BETA1_IMAGE
265-
value: atomix/atomix-memory-storage-node:v0.6.0
266+
value: atomix/atomix-memory-storage-node:latest

0 commit comments

Comments
 (0)