From 78e017b540b56eb0951313b4337a3d02722472b7 Mon Sep 17 00:00:00 2001 From: Yaswanth Kumar Togarapu Date: Thu, 12 Dec 2024 16:32:42 +0900 Subject: [PATCH] feat(package): supports hostPID for package --- riocli/apply/manifests/package.yaml | 31 +++++++++++++++++++ riocli/jsonschema/schemas/package-schema.yaml | 2 ++ 2 files changed, 33 insertions(+) diff --git a/riocli/apply/manifests/package.yaml b/riocli/apply/manifests/package.yaml index ec1b6ab6..b014dd7c 100644 --- a/riocli/apply/manifests/package.yaml +++ b/riocli/apply/manifests/package.yaml @@ -500,3 +500,34 @@ spec: ros: enabled: True version: melodic # Required, Options: [ kinetic, melodic, noetic ] +--- +apiVersion: "apiextensions.rapyuta.io/v1" +kind: "Package" +metadata: + name: "package-hostpid-enabled" # Required + version: "v1.0.0" # Required + description: "A RIO package with hostpid enabled" + labels: + app: test +spec: + runtime: device # Options: [device, cloud (default)] + cloud: + replicas: 1 # Required + executables: # Required + - name: "exec-docker" + type: docker # Options: [docker (default), preInstalled] + command: # Command supports both array and string + - "sleep infinity" + runAsBash: True + docker: + image: "busybox:latest" + pullSecret: + depends: + kind: secret + nameOrGUID: "secret-docker" + hostPID: True # Enable hostpid to give the host process namespace access to executables + environmentVars: + - name: "key1" # Required + default: "value1" + description: "An environment variable" + exposed: False diff --git a/riocli/jsonschema/schemas/package-schema.yaml b/riocli/jsonschema/schemas/package-schema.yaml index 8581c282..af74b32d 100644 --- a/riocli/jsonschema/schemas/package-schema.yaml +++ b/riocli/jsonschema/schemas/package-schema.yaml @@ -78,6 +78,8 @@ definitions: type: array items: "$ref": "#/definitions/deviceROSBagJobSpec" + hostPID: + type: boolean - properties: runtime: