-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathdevfile.yaml
More file actions
57 lines (56 loc) · 1.78 KB
/
devfile.yaml
File metadata and controls
57 lines (56 loc) · 1.78 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
## Based on https://github.com/cgruver/ocp-4-18-nested-container-tech-preview/blob/main/devfile.yaml
schemaVersion: 2.2.0
attributes:
controller.devfile.io/storage-type: per-workspace
metadata:
name: ansible-devspaces-example
components:
- name: dev-tools
attributes:
pod-overrides:
metadata:
annotations:
# Ask for /dev/fuse and /dev/net/tun to be mapped into this Pod
io.kubernetes.cri-o.Devices: "/dev/fuse,/dev/net/tun"
spec:
# Instruct the container runtime to create a new user namespace for the containers in this Pod.
hostUsers: false
container-overrides:
securityContext:
# Ask for an unmasked /proc to be available to this container
procMount: Unmasked
container:
image: quay.io/jpullen0/ansible-devspaces-nested-podman:opencode
cpuLimit: 4000m
cpuRequest: 250m
memoryLimit: 4Gi
memoryRequest: 128Mi
env:
- name: VSCODE_DEFAULT_WORKSPACE
value: /projects/devspaces-example/devspaces.code-workspace
- name: prep-workspace
container:
args:
- '-c'
- >-
mkdir -p /projects/bin && cp /usr/bin/oc /projects/bin/oc && cp /usr/bin/kubectl /projects/bin/kubectl && if [[ -f ${HOME}/.kube/config ]]; then rm ${HOME}/.kube/config; fi
command:
- /bin/bash
image: image-registry.openshift-image-registry.svc:5000/openshift/cli:latest
mountSources: true
sourceMapping: /projects
memoryRequest: 128Mi
memoryLimit: 256Mi
cpuRequest: 10m
cpuLimit: 200m
env:
- name: HOME
value: "/projects/home"
commands:
- apply:
component: prep-workspace
label: Pre Start Prep
id: prep-workspace
events:
preStart:
- prep-workspace