Skip to content
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

WIP: deploysentry demo #32

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Empty file added deploysentry/README.md
Empty file.
25 changes: 25 additions & 0 deletions deploysentry/autokitteh.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
version: v1

project:
name: deploysentry
vars:
- name: DEPLOYSENTRY_ADDR
value: "localhost:8080"
- name: INITIAL_RATIO
value: "10"
- name: RATIO_INCREMENT
value: "10"
- name: STEP_DURATION
value: "2s"
connections:
- name: grpc
integration: "grpc"
- name: slack
integration: "slack"
- name: "http"
integration: "http"
triggers:
- name: slack_app_mention
connection: slack
event_type: app_mention
entrypoint: main.star:on_slack_app_mention
8 changes: 8 additions & 0 deletions deploysentry/go/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
.PHONY: srv
srv: gen
go build .

.PHONY: gen
gen:
rm -fR gen
buf generate
33 changes: 33 additions & 0 deletions deploysentry/go/api.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
syntax = "proto3";

package autokitteh.deploysentry.api.v1;

message DeployRequest {
string svc = 1;
string version = 2;
}

message DeployResponse {}

message SetRatioRequest {
string svc = 1;
string version = 2;
int32 ratio = 3; // 0..100
}

message SetRatioResponse {}

message GetRequest {
string svc = 1;
}

message GetResponse {
string version = 1;
int32 ratio = 2;
}

service DeploySentryService {
rpc Deploy(DeployRequest) returns (DeployResponse);
rpc SetRatio(SetRatioRequest) returns (SetRatioResponse);
rpc Get(GetRequest) returns (GetResponse);
}
12 changes: 12 additions & 0 deletions deploysentry/go/buf.gen.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
version: v1
managed:
enabled: true
go_package_prefix:
default: github.com/autokitteh/kittehub/deploysentry/go/gen
plugins:
- plugin: buf.build/protocolbuffers/go:v1.31.0
out: gen
opt: paths=source_relative
- plugin: buf.build/connectrpc/go:v1.11.0
out: gen
opt: paths=source_relative
7 changes: 7 additions & 0 deletions deploysentry/go/buf.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
version: v1
breaking:
use:
- FILE
lint:
use:
- DEFAULT
Loading