From c75018e94c315fed8c53ade8205a86ca9078a326 Mon Sep 17 00:00:00 2001 From: Mario Loriedo Date: Mon, 16 Dec 2024 17:42:50 +0100 Subject: [PATCH] Add demo assets Signed-off-by: Mario Loriedo --- demo-assets/k-debug-by-copy.sh | 10 +++++ demo-assets/k-debug-ephemeral.sh | 9 +++++ demo-assets/k-debug-ide.sh | 12 ++++++ demo-assets/outyet-devworkspace.yaml | 32 ++++++++++++++++ demo-assets/outyet.yaml | 55 ++++++++++++++++++++++++++++ 5 files changed, 118 insertions(+) create mode 100755 demo-assets/k-debug-by-copy.sh create mode 100644 demo-assets/k-debug-ephemeral.sh create mode 100755 demo-assets/k-debug-ide.sh create mode 100644 demo-assets/outyet-devworkspace.yaml create mode 100644 demo-assets/outyet.yaml diff --git a/demo-assets/k-debug-by-copy.sh b/demo-assets/k-debug-by-copy.sh new file mode 100755 index 0000000..129dc39 --- /dev/null +++ b/demo-assets/k-debug-by-copy.sh @@ -0,0 +1,10 @@ +#!/usr/bin/env bash + +pod=outyet +img=golang +new_pod=outyet-debug + +kubectl debug -it $pod \ + --image $img \ + --share-processes \ + --copy-to=$new_pod diff --git a/demo-assets/k-debug-ephemeral.sh b/demo-assets/k-debug-ephemeral.sh new file mode 100644 index 0000000..26a9268 --- /dev/null +++ b/demo-assets/k-debug-ephemeral.sh @@ -0,0 +1,9 @@ +#!/usr/bin/env bash + +pod=outyet +img=ghcr.io/l0rd/outyet-dev:latest +container=outyet + +k debug -it $pod \ + --image $img \ + --target $container diff --git a/demo-assets/k-debug-ide.sh b/demo-assets/k-debug-ide.sh new file mode 100755 index 0000000..b248f70 --- /dev/null +++ b/demo-assets/k-debug-ide.sh @@ -0,0 +1,12 @@ +#!/usr/bin/env bash + +pod=outyet +img=ghcr.io/l0rd/outyet-dev:latest +new_pod=outyet-debug +repo=https://github.com/l0rd/outyet.git + +kubectl debug-ide $pod \ + --image $img \ + --share-processes \ + --copy-to=$new_pod \ + --git-repository $repo diff --git a/demo-assets/outyet-devworkspace.yaml b/demo-assets/outyet-devworkspace.yaml new file mode 100644 index 0000000..80ab019 --- /dev/null +++ b/demo-assets/outyet-devworkspace.yaml @@ -0,0 +1,32 @@ +kind: DevWorkspace +apiVersion: workspace.devfile.io/v1alpha2 +metadata: + name: outyet-dw +spec: + started: true + template: + attributes: + controller.devfile.io/storage-type: ephemeral + projects: + - name: outyet + git: + remotes: + origin: https://github.com/l0rd/outyet.git + components: + - name: dev-tooling + container: + image: ghcr.io/l0rd/outyet-dev:latest + memoryRequest: 2G + memoryLimit: 10G + cpuRequest: '1' + cpuLimit: '4' + contributions: + - name: che-code + uri: https://eclipse-che.github.io/che-plugin-registry/main/v3/plugins/che-incubator/che-code/latest/devfile.yaml + components: + - name: che-code-runtime-description + container: + env: + - name: CODE_HOST + value: 0.0.0.0 + diff --git a/demo-assets/outyet.yaml b/demo-assets/outyet.yaml new file mode 100644 index 0000000..bc8f6fc --- /dev/null +++ b/demo-assets/outyet.yaml @@ -0,0 +1,55 @@ +apiVersion: v1 +kind: Pod +metadata: + name: outyet + labels: + app: outyet +spec: + securityContext: + runAsNonRoot: true + containers: + - name: outyet + image: ghcr.io/l0rd/outyet:latest + ports: + - containerPort: 8080 + protocol: TCP + resources: + limits: + memory: "128Mi" + cpu: "500m" + securityContext: + allowPrivilegeEscalation: false + capabilities: + drop: + - "ALL" + seccompProfile: + type: RuntimeDefault +--- +kind: Service +apiVersion: v1 +metadata: + labels: + app: outyet + name: outyet-service +spec: + ports: + - port: 8080 + protocol: TCP + targetPort: 8080 + selector: + app: outyet + type: ClusterIP +--- +apiVersion: route.openshift.io/v1 +kind: Route +metadata: + labels: + app: outyet + name: outyet-route +spec: + port: + targetPort: 8080 + to: + kind: Service + name: outyet-service +---