Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
4t145 committed Jan 22, 2025
1 parent 3d6bf5b commit cbca3c0
Show file tree
Hide file tree
Showing 3 changed files with 72 additions and 3 deletions.
3 changes: 1 addition & 2 deletions backend/services/bios-event/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "event"
name = "bios-event"
version.workspace = true
authors.workspace = true
homepage.workspace = true
Expand All @@ -11,7 +11,6 @@ readme.workspace = true
publish.workspace = true

[dependencies]
serde.workspace = true
tardis = { workspace = true, features = [
"web-server",
"conf-remote",
Expand Down
70 changes: 70 additions & 0 deletions backend/services/bios-event/bios-event-resource.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: bios-event
spec:
serviceName: bios-event
replicas: 3
selector:
matchLabels:
app: bios-event
template:
metadata:
labels:
app: bios-event
spec:
serviceAccountName: sa-bios-event
containers:
- name: bios-event
image: bios-event:latest
imagePullPolicy: Never
ports:
- containerPort: 8080
- containerPort: 9559
---
apiVersion: v1
kind: Service
metadata:
name: bios-event
spec:
clusterIP: None
selector:
app: bios-event
ports:
- name: http
port: 8080
targetPort: 8080
nodePort: 30080
- name: mq
port: 9559
targetPort: 9559
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: sa-bios-event
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: cr-bios-event
rules:
- apiGroups: [""]
resources: ["services", "endpoints", "pods"]
verbs: ["get", "list", "watch"]
- apiGroups: ["apps"]
resources: ["statefulsets"]
verbs: ["get", "list", "watch"]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: rb-bios-event
subjects:
- kind: ServiceAccount
name: sa-bios-event
namespace: default
roleRef:
kind: ClusterRole
name: cr-bios-event
apiGroup: rbac.authorization.k8s.io
2 changes: 1 addition & 1 deletion backend/services/bios-event/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ fi

# cargo update;
cargo build $RUST_BUILD_ARG;
mv ../../../target/$TARGET_DIR/bios-serv-all ./
mv ../../../target/$TARGET_DIR/bios-event ./


### Docker
Expand Down

0 comments on commit cbca3c0

Please sign in to comment.