devzone 0.36.5 → 0.36.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.devcontainer/Dockerfile +24 -0
- package/.devcontainer/devzone +4 -0
- package/.devcontainer/versions.env +4 -0
- package/.devcontainer/workspace-build.sh +51 -0
- package/charts/devzone-workspace/Chart.yaml +1 -1
- package/charts/devzone-workspace/templates/networkpolicy.yaml +2 -2
- package/charts/devzone-workspace/templates/role.yaml +6 -6
- package/charts/devzone-workspace/templates/statefulset.yaml +56 -48
- package/charts/devzone-workspace/values.yaml +34 -27
- package/manage/devzone +1 -1
- package/manage/scripts/migrer.sh +1 -1
- package/package.json +1 -1
package/.devcontainer/Dockerfile
CHANGED
|
@@ -19,6 +19,12 @@ ARG RUFF_VERSION=0.17.0
|
|
|
19
19
|
ARG VULTURE_VERSION=2.16
|
|
20
20
|
# pytest : même version que la CI de repowarden (ci/requirements/e2e-python.in)
|
|
21
21
|
ARG PYTEST_VERSION=9.1.1
|
|
22
|
+
# BuildKit client (buildctl) for the Kubernetes workspace pod (#514). Pinned to
|
|
23
|
+
# the buildkitd sidecar version; checksums from the moby/buildkit v0.34.2 release
|
|
24
|
+
# assets (https://github.com/moby/buildkit/releases/tag/v0.34.2).
|
|
25
|
+
ARG BUILDKIT_VERSION=0.34.2
|
|
26
|
+
ARG BUILDKIT_SHA256_AMD64=b9f18b8e37eb450e9e5df03117045237cdd12d3c4a0034ffeeaa857852a15e13
|
|
27
|
+
ARG BUILDKIT_SHA256_ARM64=a4ad483a33b2f1544c5ccce1c5956c559e1a6e84b8bf6cedd847d695885237a3
|
|
22
28
|
|
|
23
29
|
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
|
|
24
30
|
|
|
@@ -83,6 +89,24 @@ RUN set -eu; \
|
|
|
83
89
|
installer kubectx "$kctx_sha"; \
|
|
84
90
|
installer kubens "$kns_sha"
|
|
85
91
|
|
|
92
|
+
# BuildKit client: the workspace pod talks to the buildkitd sidecar over
|
|
93
|
+
# BUILDKIT_HOST but has no client in the image (#514). Install only buildctl,
|
|
94
|
+
# same version as the sidecar, from the official moby/buildkit release archive
|
|
95
|
+
# with SHA-256 verification (https://github.com/moby/buildkit/releases/tag/v0.34.2).
|
|
96
|
+
RUN set -eu; \
|
|
97
|
+
arch="$(dpkg --print-architecture)"; \
|
|
98
|
+
case "$arch" in \
|
|
99
|
+
arm64) bk_sha="${BUILDKIT_SHA256_ARM64}" ;; \
|
|
100
|
+
amd64) bk_sha="${BUILDKIT_SHA256_AMD64}" ;; \
|
|
101
|
+
*) echo "Architecture non prise en charge : $arch" >&2; exit 1 ;; \
|
|
102
|
+
esac; \
|
|
103
|
+
tmp="$(mktemp -d)"; \
|
|
104
|
+
curl -fsSL "https://github.com/moby/buildkit/releases/download/v${BUILDKIT_VERSION}/buildkit-v${BUILDKIT_VERSION}.linux-${arch}.tar.gz" -o "$tmp/buildkit.tar.gz"; \
|
|
105
|
+
echo "$bk_sha $tmp/buildkit.tar.gz" | sha256sum -c --quiet; \
|
|
106
|
+
tar -xzf "$tmp/buildkit.tar.gz" -C "$tmp" bin/buildctl; \
|
|
107
|
+
install -m 0755 "$tmp/bin/buildctl" /usr/local/bin/buildctl; \
|
|
108
|
+
rm -rf "$tmp"
|
|
109
|
+
|
|
86
110
|
# kind passe par une enveloppe (#291) : avec le Docker de l'hôte, un cluster
|
|
87
111
|
# créé à la main doit être rendu joignable depuis le conteneur (kube-joignable.sh)
|
|
88
112
|
COPY kube-joignable.sh /usr/local/lib/devzone/kube-joignable.sh
|
package/.devcontainer/devzone
CHANGED
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
# devzone test-bash32 lance les tests bats sous bash 3.2 (conteneur Docker)
|
|
17
17
|
# devzone test-gitlab essai de bout en bout du module et de la plateforme GitLab
|
|
18
18
|
# devzone agent <dossier> <fichier-consigne> dirige opencode sur une consigne
|
|
19
|
+
# devzone build <dossier> [--tag <nom>] construit une image dans le workspace Kubernetes (BuildKit)
|
|
19
20
|
# devzone activer postgres [--contexte CTX] [--confirmer CTX] PostgreSQL partagé, cluster au choix
|
|
20
21
|
# devzone postgres creer <projet> base et utilisateur d'un projet (aussi : liste, psql, supprimer)
|
|
21
22
|
# devzone gitlab migrer [--oui] GitLab dans le cluster des services, puis ancien cluster kind supprimé
|
|
@@ -1349,6 +1350,9 @@ case "${1:-}" in
|
|
|
1349
1350
|
agent)
|
|
1350
1351
|
bash "$ICI/agent.sh" "${@:2}"
|
|
1351
1352
|
;;
|
|
1353
|
+
build)
|
|
1354
|
+
bash "$ICI/workspace-build.sh" "${@:2}"
|
|
1355
|
+
;;
|
|
1352
1356
|
reparer) reparer ;;
|
|
1353
1357
|
demarrer) bash "$ICI/demarrage.sh" ;;
|
|
1354
1358
|
metrics) bash "$ICI/metrics-server.sh" "${@:2}" ;;
|
|
@@ -1,2 +1,6 @@
|
|
|
1
1
|
# Single source for the repowarden version used by post-create.sh and workspace-init.sh.
|
|
2
2
|
REPOWARDEN_VERSION=4.17.1
|
|
3
|
+
|
|
4
|
+
# BuildKit client version installed in the workspace image (#514). Must match
|
|
5
|
+
# buildkit.image in charts/devzone-workspace/values.yaml.
|
|
6
|
+
BUILDKIT_VERSION=0.34.2
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# Build a container image in the Kubernetes workspace pod with the BuildKit
|
|
3
|
+
# sidecar (#514). Uses buildctl against $BUILDKIT_HOST (tcp://127.0.0.1:1234).
|
|
4
|
+
# On the Docker workstation, use docker build instead.
|
|
5
|
+
set -euo pipefail
|
|
6
|
+
|
|
7
|
+
refuse() {
|
|
8
|
+
echo "devzone build: $*" >&2
|
|
9
|
+
exit 1
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
if [ "${DEVZONE_WORKSPACE:-}" != "kubernetes" ]; then
|
|
13
|
+
refuse "use docker build on the Docker workstation"
|
|
14
|
+
fi
|
|
15
|
+
|
|
16
|
+
if [ "$#" -lt 1 ]; then
|
|
17
|
+
refuse "usage: devzone build <directory> [--tag <name>]"
|
|
18
|
+
fi
|
|
19
|
+
|
|
20
|
+
dir="$1"
|
|
21
|
+
shift
|
|
22
|
+
tag=""
|
|
23
|
+
|
|
24
|
+
while [ "$#" -gt 0 ]; do
|
|
25
|
+
case "$1" in
|
|
26
|
+
--tag)
|
|
27
|
+
[ "$#" -ge 2 ] || refuse "--tag requires a name"
|
|
28
|
+
tag="$2"
|
|
29
|
+
shift 2
|
|
30
|
+
;;
|
|
31
|
+
*)
|
|
32
|
+
refuse "unknown argument: $1"
|
|
33
|
+
;;
|
|
34
|
+
esac
|
|
35
|
+
done
|
|
36
|
+
|
|
37
|
+
[ -d "$dir" ] || refuse "directory not found: $dir"
|
|
38
|
+
[ -f "$dir/Dockerfile" ] || refuse "Dockerfile not found in: $dir"
|
|
39
|
+
|
|
40
|
+
if [ -n "$tag" ]; then
|
|
41
|
+
output="type=image,name=${tag},push=false"
|
|
42
|
+
else
|
|
43
|
+
output="type=cacheonly"
|
|
44
|
+
fi
|
|
45
|
+
|
|
46
|
+
addr="${BUILDKIT_HOST:-tcp://127.0.0.1:1234}"
|
|
47
|
+
exec buildctl --addr "$addr" build \
|
|
48
|
+
--frontend dockerfile.v0 \
|
|
49
|
+
--local "context=$dir" \
|
|
50
|
+
--local "dockerfile=$dir" \
|
|
51
|
+
--output "$output"
|
|
@@ -8,13 +8,13 @@ spec:
|
|
|
8
8
|
podSelector: {}
|
|
9
9
|
policyTypes:
|
|
10
10
|
- Ingress
|
|
11
|
-
{{- if .Values.networkPolicy.
|
|
11
|
+
{{- if .Values.networkPolicy.restrictEgress }}
|
|
12
12
|
- Egress
|
|
13
13
|
{{- end }}
|
|
14
14
|
ingress:
|
|
15
15
|
- from:
|
|
16
16
|
- podSelector: {}
|
|
17
|
-
{{- if .Values.networkPolicy.
|
|
17
|
+
{{- if .Values.networkPolicy.restrictEgress }}
|
|
18
18
|
egress:
|
|
19
19
|
- to:
|
|
20
20
|
- podSelector: {}
|
|
@@ -3,12 +3,12 @@ kind: Role
|
|
|
3
3
|
metadata:
|
|
4
4
|
name: devzone-workspace
|
|
5
5
|
namespace: {{ .Release.Namespace }}
|
|
6
|
-
#
|
|
7
|
-
# pods (
|
|
8
|
-
# pods/log, pods/exec
|
|
9
|
-
# configmaps (
|
|
10
|
-
#
|
|
11
|
-
#
|
|
6
|
+
# Rights of kubedock (0.23.0, read in its sources), limited to the namespace:
|
|
7
|
+
# pods (create and delete the test containers, list and follow them),
|
|
8
|
+
# pods/log, pods/exec and pods/portforward (logs, commands, ports), services and
|
|
9
|
+
# configmaps (created and deleted with the pods). No right on secrets or
|
|
10
|
+
# deployments: kubedock 0.23.0 does not use them. The pod runs project code:
|
|
11
|
+
# no right on other namespaces, nor on the cluster.
|
|
12
12
|
rules:
|
|
13
13
|
- apiGroups: [""]
|
|
14
14
|
resources: ["pods"]
|
|
@@ -6,7 +6,7 @@ metadata:
|
|
|
6
6
|
spec:
|
|
7
7
|
serviceName: {{ include "devzone-workspace.fullname" . }}
|
|
8
8
|
replicas: {{ .Values.replicaCount }}
|
|
9
|
-
#
|
|
9
|
+
# The PVCs (projects, logins) are never deleted with the StatefulSet.
|
|
10
10
|
persistentVolumeClaimRetentionPolicy:
|
|
11
11
|
whenDeleted: Retain
|
|
12
12
|
whenScaled: Retain
|
|
@@ -19,28 +19,29 @@ spec:
|
|
|
19
19
|
app.kubernetes.io/name: {{ include "devzone-workspace.name" . }}
|
|
20
20
|
spec:
|
|
21
21
|
serviceAccountName: {{ include "devzone-workspace.serviceAccountName" . }}
|
|
22
|
-
# Pod
|
|
23
|
-
# /home/vscode,
|
|
24
|
-
#
|
|
22
|
+
# Pod as user vscode (UID 1000), never root: the HOME of the workspace is
|
|
23
|
+
# /home/vscode, where the logins are mounted. fsGroup 1000 makes the state
|
|
24
|
+
# volume writable by vscode. Settings in values.yaml (securityContext).
|
|
25
25
|
securityContext:
|
|
26
26
|
{{- toYaml .Values.securityContext | nindent 8 }}
|
|
27
|
-
#
|
|
28
|
-
#
|
|
29
|
-
#
|
|
30
|
-
#
|
|
27
|
+
# Native sidecars (restartPolicy: Always, Kubernetes 1.29+): they start
|
|
28
|
+
# before the workspace container, and their startupProbe holds that start
|
|
29
|
+
# until they answer. None gets extra rights and none declares a port: they only
|
|
30
|
+
# listen on 127.0.0.1 of the pod.
|
|
31
31
|
initContainers:
|
|
32
|
-
# etat-init
|
|
33
|
-
# caches).
|
|
34
|
-
#
|
|
35
|
-
#
|
|
32
|
+
# etat-init: creates the directories of the state volume (identities,
|
|
33
|
+
# logins, caches). It runs as vscode (UID 1000), with no extra rights. A
|
|
34
|
+
# symbolic link written here would not survive: the workspace container
|
|
35
|
+
# has its own file system. So the workspace mounts each directory
|
|
36
|
+
# (subPath) at its place. The names "etat" stay: existing volumes (#507).
|
|
36
37
|
- name: etat-init
|
|
37
38
|
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
|
|
38
39
|
{{- /*
|
|
39
|
-
|
|
40
|
-
|
|
40
|
+
Helm comment: not in the rendering. The $dirs list comes from
|
|
41
|
+
persistence.state.paths, like the mounts of the workspace.
|
|
41
42
|
*/}}
|
|
42
43
|
{{- $dirs := list }}
|
|
43
|
-
{{- range .Values.persistence.
|
|
44
|
+
{{- range .Values.persistence.state.paths }}
|
|
44
45
|
{{- $dirs = append $dirs (printf "/home/vscode/.devzone-etat/%s" .) }}
|
|
45
46
|
{{- end }}
|
|
46
47
|
command: ["sh", "-c", "mkdir -p {{ join " " $dirs }}"]
|
|
@@ -60,22 +61,29 @@ spec:
|
|
|
60
61
|
limits:
|
|
61
62
|
cpu: "100m"
|
|
62
63
|
memory: "64Mi"
|
|
63
|
-
# kubedock
|
|
64
|
-
# namespace,
|
|
64
|
+
# kubedock: Docker API of the pod. Test containers become pods of the
|
|
65
|
+
# namespace, created with the Role of the chart (limited to the namespace).
|
|
65
66
|
- name: kubedock
|
|
66
67
|
image: {{ .Values.kubedock.image }}
|
|
67
68
|
restartPolicy: Always
|
|
68
69
|
{{- /*
|
|
69
|
-
|
|
70
|
-
NAMESPACE
|
|
71
|
-
|
|
70
|
+
Settings from the lead's trial (#410): server --port-forward --reverse-proxy.
|
|
71
|
+
NAMESPACE comes from the pod, so that kubedock creates the pods in its
|
|
72
|
+
namespace. --reapmax/--prune-start clean up kubedock test resources (#514,
|
|
73
|
+
https://github.com/joyrex2001/kubedock/blob/master/config.md). Helm
|
|
74
|
+
comment: not in the rendering.
|
|
72
75
|
*/}}
|
|
73
76
|
args:
|
|
74
77
|
- server
|
|
75
78
|
- --port-forward
|
|
76
79
|
- --reverse-proxy
|
|
77
80
|
- --timeout
|
|
78
|
-
- {{ .Values.kubedock.
|
|
81
|
+
- {{ .Values.kubedock.timeout | quote }}
|
|
82
|
+
- --reapmax
|
|
83
|
+
- {{ .Values.kubedock.reapmax | quote }}
|
|
84
|
+
{{- if .Values.kubedock.pruneStart }}
|
|
85
|
+
- --prune-start
|
|
86
|
+
{{- end }}
|
|
79
87
|
env:
|
|
80
88
|
- name: NAMESPACE
|
|
81
89
|
valueFrom:
|
|
@@ -93,15 +101,15 @@ spec:
|
|
|
93
101
|
failureThreshold: 60
|
|
94
102
|
resources:
|
|
95
103
|
{{- toYaml .Values.kubedock.resources | nindent 12 }}
|
|
96
|
-
# BuildKit
|
|
97
|
-
#
|
|
104
|
+
# Rootless BuildKit: builds the images, with no extra rights or node socket.
|
|
105
|
+
# Rootless settings of the BuildKit docs for Kubernetes (examples/kubernetes).
|
|
98
106
|
- name: buildkitd
|
|
99
107
|
image: {{ .Values.buildkit.image }}
|
|
100
108
|
restartPolicy: Always
|
|
101
109
|
{{- /*
|
|
102
|
-
--oci-worker-no-process-sandbox
|
|
103
|
-
|
|
104
|
-
|
|
110
|
+
--oci-worker-no-process-sandbox: rootless has no process sandbox on
|
|
111
|
+
Kubernetes (BuildKit docs). UID 1000 is the one of the rootless image.
|
|
112
|
+
Helm comment: not in the rendering.
|
|
105
113
|
*/}}
|
|
106
114
|
args:
|
|
107
115
|
- --oci-worker-no-process-sandbox
|
|
@@ -127,37 +135,37 @@ spec:
|
|
|
127
135
|
- name: workspace
|
|
128
136
|
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
|
|
129
137
|
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
|
130
|
-
#
|
|
138
|
+
# The projects live on the workspace PVC: the container starts there.
|
|
131
139
|
workingDir: /workspaces/projets
|
|
132
140
|
{{- /*
|
|
133
|
-
|
|
134
|
-
devcontainer),
|
|
135
|
-
|
|
136
|
-
devcontainer
|
|
137
|
-
|
|
141
|
+
Without command, the container runs the entrypoint of the image (bash
|
|
142
|
+
for a devcontainer), which ends at once without a terminal: the pod
|
|
143
|
+
loops on restarts. sleep infinity keeps it alive, like VS Code for a
|
|
144
|
+
devcontainer; the workstation then enters through kubectl exec. Helm
|
|
145
|
+
comment: not in the rendering.
|
|
138
146
|
*/}}
|
|
139
147
|
{{- with .Values.workspace.command }}
|
|
140
148
|
command: {{ toJson . }}
|
|
141
149
|
{{- end }}
|
|
142
150
|
env:
|
|
143
|
-
# HOME
|
|
144
|
-
#
|
|
151
|
+
# HOME of vscode: gh, claude, opencode... write their logins in the
|
|
152
|
+
# paths mounted from the state volume (not in the home of root).
|
|
145
153
|
- name: HOME
|
|
146
154
|
value: /home/vscode
|
|
147
|
-
#
|
|
155
|
+
# Marker of the Kubernetes workspace: devzone agent runs opencode here (#431)
|
|
148
156
|
- name: DEVZONE_WORKSPACE
|
|
149
157
|
value: kubernetes
|
|
150
158
|
# Root of the devzone projects in the Kubernetes workspace (#503)
|
|
151
159
|
- name: DEVZONE_RACINE
|
|
152
160
|
value: /workspaces/projets
|
|
153
|
-
# Global npm prefix, stored on the mounted
|
|
161
|
+
# Global npm prefix, stored on the mounted state volume (#503)
|
|
154
162
|
- name: NPM_CONFIG_PREFIX
|
|
155
163
|
value: /home/vscode/.local/npm
|
|
156
164
|
# Image PATH plus the npm global bin, installed at startup (#503)
|
|
157
165
|
- name: PATH
|
|
158
166
|
value: /home/vscode/.local/npm/bin:/usr/local/share/nvm/current/bin:/usr/local/sdkman/bin:/usr/local/sdkman/candidates/java/current/bin:/usr/local/sdkman/candidates/gradle/current/bin:/usr/local/sdkman/candidates/maven/current/bin:/usr/local/sdkman/candidates/ant/current/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
|
|
159
|
-
# Testcontainers
|
|
160
|
-
# Ryuk
|
|
167
|
+
# Testcontainers and docker talk to kubedock, and buildctl to BuildKit.
|
|
168
|
+
# Ryuk is off: kubedock cleans the test containers up itself.
|
|
161
169
|
- name: DOCKER_HOST
|
|
162
170
|
value: tcp://127.0.0.1:2475
|
|
163
171
|
- name: TESTCONTAINERS_RYUK_DISABLED
|
|
@@ -173,9 +181,9 @@ spec:
|
|
|
173
181
|
mountPath: /workspaces/projets
|
|
174
182
|
- name: etat
|
|
175
183
|
mountPath: /home/vscode/.devzone-etat
|
|
176
|
-
#
|
|
177
|
-
#
|
|
178
|
-
{{- range .Values.persistence.
|
|
184
|
+
# Identities and caches: each path of the state volume is mounted at
|
|
185
|
+
# its usual place (gh, git, Claude Code, opencode, devzone agent, caches).
|
|
186
|
+
{{- range .Values.persistence.state.paths }}
|
|
179
187
|
- name: etat
|
|
180
188
|
subPath: {{ . | quote }}
|
|
181
189
|
mountPath: {{ printf "/home/vscode/%s" . | quote }}
|
|
@@ -184,7 +192,7 @@ spec:
|
|
|
184
192
|
- metadata:
|
|
185
193
|
name: workspace
|
|
186
194
|
annotations:
|
|
187
|
-
#
|
|
195
|
+
# The projects are never deleted by helm uninstall (#399).
|
|
188
196
|
helm.sh/resource-policy: keep
|
|
189
197
|
spec:
|
|
190
198
|
accessModes: ["ReadWriteOnce"]
|
|
@@ -193,18 +201,18 @@ spec:
|
|
|
193
201
|
{{- end }}
|
|
194
202
|
resources:
|
|
195
203
|
requests:
|
|
196
|
-
storage: {{ .Values.workspace.
|
|
204
|
+
storage: {{ .Values.workspace.size }}
|
|
197
205
|
- metadata:
|
|
198
206
|
name: etat
|
|
199
207
|
annotations:
|
|
200
|
-
#
|
|
201
|
-
#
|
|
208
|
+
# The PVC survives the uninstall of the chart (logins kept). The real
|
|
209
|
+
# protection is persistentVolumeClaimRetentionPolicy above.
|
|
202
210
|
helm.sh/resource-policy: keep
|
|
203
211
|
spec:
|
|
204
212
|
accessModes: ["ReadWriteOnce"]
|
|
205
|
-
{{- if .Values.persistence.
|
|
206
|
-
storageClassName: {{ .Values.persistence.
|
|
213
|
+
{{- if .Values.persistence.state.storageClass }}
|
|
214
|
+
storageClassName: {{ .Values.persistence.state.storageClass }}
|
|
207
215
|
{{- end }}
|
|
208
216
|
resources:
|
|
209
217
|
requests:
|
|
210
|
-
storage: {{ .Values.persistence.
|
|
218
|
+
storage: {{ .Values.persistence.state.size }}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
replicaCount: 1
|
|
2
2
|
|
|
3
|
-
#
|
|
4
|
-
#
|
|
5
|
-
#
|
|
3
|
+
# Pod security: user vscode (UID 1000), never root. The sidecars inherit
|
|
4
|
+
# runAsUser (kubedock included, which declares none); buildkit declares it
|
|
5
|
+
# again, rootless as 1000.
|
|
6
6
|
securityContext:
|
|
7
7
|
runAsUser: 1000
|
|
8
8
|
runAsGroup: 1000
|
|
@@ -14,42 +14,48 @@ image:
|
|
|
14
14
|
tag: ""
|
|
15
15
|
pullPolicy: IfNotPresent
|
|
16
16
|
|
|
17
|
-
# Docker
|
|
18
|
-
#
|
|
17
|
+
# Docker with no extra rights. kubedock (Docker API): Testcontainers and docker
|
|
18
|
+
# start their containers as pods of the namespace; it listens on 127.0.0.1:2475
|
|
19
|
+
# of the pod.
|
|
19
20
|
kubedock:
|
|
20
21
|
image: joyrex2001/kubedock:0.23.0
|
|
21
|
-
#
|
|
22
|
-
#
|
|
23
|
-
#
|
|
24
|
-
#
|
|
25
|
-
|
|
22
|
+
# Time given to kubedock to start a test container (--timeout). By default
|
|
23
|
+
# kubedock waits one minute only: on the first run on a node, the test pod
|
|
24
|
+
# must pull its image, which often takes longer. Without this timeout,
|
|
25
|
+
# kubedock gives up ("timeout starting container").
|
|
26
|
+
timeout: 5m
|
|
27
|
+
# Cleanup of kubedock-managed test pods (#514). --reapmax reaps resources older
|
|
28
|
+
# than this age (0 disables reaping); --prune-start removes leftover kubedock
|
|
29
|
+
# resources before the API starts. https://github.com/joyrex2001/kubedock/blob/master/config.md
|
|
30
|
+
reapmax: 30m
|
|
31
|
+
pruneStart: true
|
|
26
32
|
resources:
|
|
27
33
|
limits:
|
|
28
34
|
cpu: "1"
|
|
29
35
|
memory: "1Gi"
|
|
30
36
|
|
|
31
|
-
# BuildKit
|
|
32
|
-
# 127.0.0.1:1234
|
|
37
|
+
# Rootless BuildKit: builds the images (buildctl, devzone build); listens on
|
|
38
|
+
# 127.0.0.1:1234 of the pod, with no extra rights.
|
|
33
39
|
buildkit:
|
|
34
40
|
image: moby/buildkit:v0.34.2-rootless
|
|
35
|
-
# seccomp
|
|
36
|
-
#
|
|
41
|
+
# seccomp and AppArmor Unconfined: BuildKit needs mount and unshare, which the
|
|
42
|
+
# default profiles block (BuildKit docs, rootless). AppArmor: Kubernetes 1.30+.
|
|
37
43
|
unconfined: true
|
|
38
44
|
resources:
|
|
39
45
|
limits:
|
|
40
46
|
cpu: "2"
|
|
41
47
|
memory: "4Gi"
|
|
42
48
|
|
|
43
|
-
#
|
|
44
|
-
#
|
|
49
|
+
# Workspace container and the volume of its projects (#399): the workspace PVC
|
|
50
|
+
# is mounted on /workspaces/projets, where the container starts (workingDir).
|
|
45
51
|
workspace:
|
|
46
52
|
# Command: run workspace-init.sh in the foreground first, then keep the pod
|
|
47
53
|
# alive with sleep infinity (like VS Code for a devcontainer) (#503). The init
|
|
48
54
|
# script runs before exec, its errors are ignored (|| true) and its journal is
|
|
49
55
|
# ~/.local/state/devzone/init.log. Empty = image default command.
|
|
50
56
|
command: ["bash", "-c", "mkdir -p \"$HOME/.local/state/devzone\"; bash /usr/local/share/devzone/.devcontainer/workspace-init.sh >>\"$HOME/.local/state/devzone/init.log\" 2>&1 || true; exec sleep infinity"]
|
|
51
|
-
#
|
|
52
|
-
|
|
57
|
+
# Size of the projects volume.
|
|
58
|
+
size: 20Gi
|
|
53
59
|
storageClass: ""
|
|
54
60
|
|
|
55
61
|
resources:
|
|
@@ -61,13 +67,14 @@ resources:
|
|
|
61
67
|
memory: "1Gi"
|
|
62
68
|
|
|
63
69
|
persistence:
|
|
64
|
-
#
|
|
65
|
-
#
|
|
66
|
-
#
|
|
67
|
-
etat
|
|
70
|
+
# Identities, logins and caches, kept from one restart to the next. Each path
|
|
71
|
+
# (relative to the home of vscode) is mounted from this volume at its usual
|
|
72
|
+
# place; the etat-init initContainer creates the directories first. The
|
|
73
|
+
# volume itself keeps its historical name "etat" (existing data, #507).
|
|
74
|
+
state:
|
|
68
75
|
size: 10Gi
|
|
69
76
|
storageClass: ""
|
|
70
|
-
|
|
77
|
+
paths:
|
|
71
78
|
- .config/gh
|
|
72
79
|
- .config/git
|
|
73
80
|
- .claude
|
|
@@ -86,7 +93,7 @@ serviceAccount:
|
|
|
86
93
|
|
|
87
94
|
networkPolicy:
|
|
88
95
|
enabled: true
|
|
89
|
-
#
|
|
90
|
-
#
|
|
91
|
-
#
|
|
92
|
-
|
|
96
|
+
# Ingress limited to the namespace. Egress open by default: a development
|
|
97
|
+
# workstation needs the Internet (Maven, npm, Docker images). true limits the
|
|
98
|
+
# egress to the namespace and to DNS (kube-system). The egress allow list is #220.
|
|
99
|
+
restrictEgress: false
|
package/manage/devzone
CHANGED
|
@@ -474,7 +474,7 @@ creer() {
|
|
|
474
474
|
# final de .devcontainer/devzone (test de cohérence dans manage/test/cli.bats)
|
|
475
475
|
commande_du_conteneur() {
|
|
476
476
|
case "$1" in
|
|
477
|
-
actif | activer | agent | appliquer | argocd | catalogue | cluster | clusters | \
|
|
477
|
+
actif | activer | agent | appliquer | argocd | build | catalogue | cluster | clusters | \
|
|
478
478
|
demarrer | desactiver | etat | gitlab | metrics | modules | mots-de-passe | \
|
|
479
479
|
mysql | paquets | plateforme | port | postgres | reparer | test-bash32 | \
|
|
480
480
|
test-gitlab | utiliser) return 0 ;;
|
package/manage/scripts/migrer.sh
CHANGED
|
@@ -39,7 +39,7 @@ lire_option() {
|
|
|
39
39
|
}
|
|
40
40
|
|
|
41
41
|
# Chemin du volume etat (relatif au home de vscode) d'un volume Docker devzone-<x> ;
|
|
42
|
-
# vide si le chart n'en monte aucun (persistence.
|
|
42
|
+
# vide si le chart n'en monte aucun (persistence.state.paths).
|
|
43
43
|
chemin_etat() {
|
|
44
44
|
case "$1" in
|
|
45
45
|
gh) echo .config/gh ;;
|