Skip to content
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
16 changes: 16 additions & 0 deletions docker/event-adapter/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
FROM alpine/git:v2.32.0
RUN git clone https://gitee.com/zichengqu/event-adapter.git /event-adapter

FROM golang:alpine
WORKDIR /app
#COPY ./event-retriever/ ./
COPY --from=0 /event-adapter ./
RUN go mod download
RUN go build -o event_adapter src/server.go


FROM alpine:latest
RUN apk --no-cache add ca-certificates
WORKDIR /app
COPY --from=1 /app ./
CMD ["./event_adapter"]
16 changes: 16 additions & 0 deletions docker/issue-retriever/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
FROM alpine/git:v2.32.0
RUN git clone https://gitee.com/zichengqu/issue-retriever.git /issue-retriever

FROM golang:alpine
WORKDIR /app
#COPY ./event-retriever/ ./
COPY --from=0 /issue-retriever ./
RUN go mod download
RUN go build -o issue_retriever src/server.go


FROM alpine:latest
RUN apk --no-cache add ca-certificates
WORKDIR /app
COPY --from=1 /app ./
CMD ["./issue_retriever"]
16 changes: 16 additions & 0 deletions docker/note-retriever/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
FROM alpine/git:v2.32.0
RUN git clone https://gitee.com/zichengqu/note-retriever.git /note-retriever

FROM golang:alpine
WORKDIR /app
#COPY ./event-retriever/ ./
COPY --from=0 /note-retriever ./
RUN go mod download
RUN go build -o note_retriever src/server.go


FROM alpine:latest
RUN apk --no-cache add ca-certificates
WORKDIR /app
COPY --from=1 /app ./
CMD ["./note_retriever"]
55 changes: 55 additions & 0 deletions k8s-res/event-adapter/event-adapter.dep.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: event-adapter
spec:
selector:
matchLabels:
app: event-adapter
replicas: 1 # tells deployment to run 2 pods matching the template
template:
metadata:
labels:
app: event-adapter
spec:
# affinity:
# nodeAffinity:
# requiredDuringSchedulingIgnoredDuringExecution:
# nodeSelectorTerms:
# - matchExpressions:
# - key: workingnode
# operator: In
# values: ["true"]
containers:
- name: event-adapter
image: quzicheng/event-adapter:1.0
imagePullPolicy: Always
ports:
- containerPort: 8000
env:
- name: LOG_LEVEL
value: "INFO"
#- name: Org
# value: "qia-fan-group"
#- name: Repo
# value: "event-test"
- name: api_url
value: "http://data-cache/api/dataCache/pushGiteeIssue"
- name: filePath
value: "src/config.json"
- name: Issue_Hook
value: "http://issue-retriever:9001"
- name: Note_Hook
value: "http://note-retriever:9001"
- name: gitee_token
value: "xxxxxxxxxxxxxx" # event-test
volumeMounts:
- name: log-volume
#mountPropagation: "Bidirectional"
mountPath: "/app/src/log/"

volumes:
- name: log-volume
hostPath:
path: /event-platform-nfs/prod/event-adapter-log
type: DirectoryOrCreate
18 changes: 18 additions & 0 deletions k8s-res/event-adapter/event-adapter.svc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
apiVersion: v1
kind: Service
metadata:
name: event-adapter
labels:
run: event-adapter
spec:
ports:
- port: 9001
targetPort: 8000
nodePort: 9101
protocol: TCP
externalIPs: []
type: NodePort

selector:
app: event-adapter
#run: event-retriever
50 changes: 50 additions & 0 deletions k8s-res/issue-retriever/issue-retriever.dep.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: issue-retriever
spec:
selector:
matchLabels:
app: issue-retriever
replicas: 1 # tells deployment to run 2 pods matching the template
template:
metadata:
labels:
app: issue-retriever
spec:
# affinity:
# nodeAffinity:
# requiredDuringSchedulingIgnoredDuringExecution:
# nodeSelectorTerms:
# - matchExpressions:
# - key: workingnode
# operator: In
# values: ["true"]
containers:
- name: issue-retriever
image: quzicheng/issue-retriever:1.0
imagePullPolicy: Always
ports:
- containerPort: 8001
env:
- name: LOG_LEVEL
value: "INFO"
#- name: Org
# value: "qia-fan-group"
#- name: Repo
# value: "event-test"
- name: api_url
value: "http://data-cache/api/dataCache/pushGiteeIssue"

- name: gitee_token
value: "xxxxxxxxxxxxxx" # event-test
volumeMounts:
- name: log-volume
#mountPropagation: "Bidirectional"
mountPath: "/app/src/log/"

volumes:
- name: log-volume
hostPath:
path: /event-platform-nfs/prod/issue-retriever-log
type: DirectoryOrCreate
18 changes: 18 additions & 0 deletions k8s-res/issue-retriever/issue-retriever.svc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
apiVersion: v1
kind: Service
metadata:
name: issue-retriever
labels:
run: issue-retriever
spec:
ports:
- port: 9001
targetPort: 8001
nodePort: 9103
protocol: TCP
externalIPs: []
type: NodePort

selector:
app: issue-retriever
#run: issue-retriever
50 changes: 50 additions & 0 deletions k8s-res/note-retriever/note-retriever.dep.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: note-retriever
spec:
selector:
matchLabels:
app: note-retriever
replicas: 1 # tells deployment to run 2 pods matching the template
template:
metadata:
labels:
app: note-retriever
spec:
# affinity:
# nodeAffinity:
# requiredDuringSchedulingIgnoredDuringExecution:
# nodeSelectorTerms:
# - matchExpressions:
# - key: workingnode
# operator: In
# values: ["true"]
containers:
- name: note-retriever
image: quzicheng/note-retriever:1.0
imagePullPolicy: Always
ports:
- containerPort: 8002
env:
- name: LOG_LEVEL
value: "INFO"
#- name: Org
# value: "qia-fan-group"
#- name: Repo
# value: "event-test"
- name: api_url
value: "http://data-cache/api/dataCache/pushGiteeIssue"

- name: gitee_token
value: "xxxxxxxxxxxxxx" # event-test
volumeMounts:
- name: log-volume
#mountPropagation: "Bidirectional"
mountPath: "/app/src/log/"

volumes:
- name: log-volume
hostPath:
path: /event-platform-nfs/prod/note-retriever-log
type: DirectoryOrCreate
18 changes: 18 additions & 0 deletions k8s-res/note-retriever/note-retriever.svc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
apiVersion: v1
kind: Service
metadata:
name: note-retriever
labels:
run: note-retriever
spec:
ports:
- port: 9001
targetPort: 8002
nodePort: 9104
protocol: TCP
externalIPs: []
type: NodePort

selector:
app: note-retriever
#run: event-retriever