From 93c36eabe1946d263dd82a9c7d157f006892872f Mon Sep 17 00:00:00 2001 From: MincYu Date: Sun, 21 Feb 2021 14:39:50 +0800 Subject: [PATCH] k8s pod yml --- CMakeLists.txt | 2 +- dockerfiles/shm.yml | 37 +++++++++++++++++++++++++++++++++++++ 2 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 dockerfiles/shm.yml diff --git a/CMakeLists.txt b/CMakeLists.txt index 124d223..c960077 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.10) +cmake_minimum_required(VERSION 3.9) project(cpp-ipc) set(CMAKE_CXX_STANDARD 17) diff --git a/dockerfiles/shm.yml b/dockerfiles/shm.yml new file mode 100644 index 0000000..236d04d --- /dev/null +++ b/dockerfiles/shm.yml @@ -0,0 +1,37 @@ +apiVersion: v1 +kind: Pod +metadata: + name: shm-demo +spec: + containers: + # - args: + # - infinity + # command: + # - sleep + # image: centos:7 + # name: centos + # volumeMounts: + # - mountPath: /dev/shm + # name: cache-volume + - name: function-1 + image: nginx + env: + - name: ROLE + value: s + volumeMounts: + - name: cache-volume + mountPath: /dev/shm + + - name: function-2 + image: debian + env: + - name: ROLE + value: c + volumeMounts: + - name: cache-volume + mountPath: /dev/shm + volumes: + - emptyDir: + medium: Memory + sizeLimit: 1024Mi + name: cache-volume \ No newline at end of file