Skip to content

Commit

Permalink
Add first samples yaml file for demo service
Browse files Browse the repository at this point in the history
  • Loading branch information
vutuong committed Jan 16, 2021
1 parent d19c657 commit 1c39ba4
Show file tree
Hide file tree
Showing 5 changed files with 86 additions and 0 deletions.
23 changes: 23 additions & 0 deletions config/samples/1.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
apiVersion: v1
kind: Pod
metadata:
name: simple
labels:
name: simple
#annotations:
#snapshotPolicy: "checkpoint"
#snapshotPath: "/var/lib/kubelet/migration/abc"
spec:
containers:
- name: count
image: alpine
imagePullPolicy: IfNotPresent
command: ["/bin/ash", "-c", "i=1; while true; do echo $i; i=$((i+1)); sleep 1; done"]
ports:
- containerPort: 80
resources:
limits:
memory: "128Mi"
cpu: "600m"
nodeSelector:
kubernetes.io/hostname: worker1
11 changes: 11 additions & 0 deletions config/samples/2-service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
apiVersion: v1
kind: Service
metadata:
name: video-service
spec:
type: NodePort
selector:
app: video
ports:
- port: 8080
targetPort: 8080
19 changes: 19 additions & 0 deletions config/samples/2.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
apiVersion: v1
kind: Pod
metadata:
name: video
labels:
app: video
#annotations:
#snapshotPolicy: "checkpoint"
#snapshotPath: "/var/lib/kubelet/migration/abc"
spec:
containers:
- name: vlc
image: lroktu/vlc-server:latest
ports:
- containerPort: 8080
protocol: TCP
args: ["big_buck_bunny.mp4","--loop","--sout", "#transcode{scodec=none}:http{mux=ffmpeg{mux=flv},dst=:8080/}"]
nodeSelector:
kubernetes.io/hostname: worker1
33 changes: 33 additions & 0 deletions config/samples/test2.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# apiVersion: podmig.dcn.ssu.ac.kr/v1
# kind: Podmigration
# metadata:
# name: podmigration-sample
# spec:
# # Add fields here
# foo: bar
apiVersion: podmig.dcn.ssu.ac.kr/v1
kind: Podmigration
metadata:
name: test2
labels:
name: test2
spec:
replicas: 1
template:
metadata:
labels:
app: video
annotations:
snapshotPolicy: "live-migration"
#snapshotPath: "/var/lib/kubelet/migration"
sourcePod: "video"
spec:
containers:
- name: vlc
image: lroktu/vlc-server:latest
ports:
- containerPort: 8080
protocol: TCP
#args: ["big_buck_bunny.mp4","--loop","--sout", "#transcode{scodec=none}:http{mux=ffmpeg{mux=flv},dst=:8080/}"]
nodeSelector:
kubernetes.io/hostname: worker2
Binary file added config/samples/video.mp4
Binary file not shown.

0 comments on commit 1c39ba4

Please sign in to comment.