devzone 4.1.0 → 4.2.0
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/argocd/apps.sh +1 -1
- package/.devcontainer/argocd/services.sh +1 -1
- package/.devcontainer/isolation.sh +1 -1
- package/.devcontainer/services-admin.sh +1 -1
- package/manage/scripts/ci/versions-tools-plan.sh +105 -0
- package/manage/scripts/{argocd-services-svc.sh → workspace/argocd-services-svc.sh} +1 -1
- package/manage/scripts/{argocd-services.sh → workspace/argocd-services.sh} +4 -4
- package/manage/scripts/{ports-workspace.sh → workspace/ports-workspace.sh} +1 -1
- package/manage/workspace.sh +20 -20
- package/package.json +1 -1
- /package/manage/scripts/{argocd-workspace.sh → workspace/argocd-workspace.sh} +0 -0
- /package/manage/scripts/{ports-apps.sh → workspace/ports-apps.sh} +0 -0
- /package/manage/scripts/{services-workspace.sh → workspace/services-workspace.sh} +0 -0
- /package/manage/scripts/{workspace-aliases.sh → workspace/workspace-aliases.sh} +0 -0
- /package/manage/scripts/{workspace-clone.sh → workspace/workspace-clone.sh} +0 -0
- /package/manage/scripts/{workspace-copies.sh → workspace/workspace-copies.sh} +0 -0
- /package/manage/scripts/{workspace-egress.sh → workspace/workspace-egress.sh} +0 -0
- /package/manage/scripts/{workspace-update.sh → workspace/workspace-update.sh} +0 -0
- /package/manage/scripts/{workspace-wait.sh → workspace/workspace-wait.sh} +0 -0
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
# argocd_app remove <N>
|
|
7
7
|
# apps_reconcile every [app N] of .argocd.conf applied, the others removed
|
|
8
8
|
# Sourced by the container (argocd.sh: kubectl --context devzone) and by the
|
|
9
|
-
# workstation (manage/scripts/argocd-services.sh), after conf.sh and
|
|
9
|
+
# workstation (manage/scripts/workspace/argocd-services.sh), after conf.sh and
|
|
10
10
|
# gitops.sh. The includer defines argocd_kubectl, APPS_GENERATOR, APPS_CMD,
|
|
11
11
|
# ARGOCD_CONF and ARGOCD_CONF_DIR (the devzone folder: token-file paths are
|
|
12
12
|
# relative to it), and may define apps_gitlab_token (root token of the
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
# services_note <svc> on|off writes the [services] section
|
|
20
20
|
# chart_require <svc> chart charts/devzone-<svc> named devzone-<svc>, or code 2
|
|
21
21
|
# Sourced after conf.sh and gitops.sh by the workstation
|
|
22
|
-
# (manage/scripts/argocd-services.sh) and by the container (argocd.sh). The
|
|
22
|
+
# (manage/scripts/workspace/argocd-services.sh) and by the container (argocd.sh). The
|
|
23
23
|
# includer defines argocd_kubectl, APPS_GENERATOR, ARGOCD_CONF and
|
|
24
24
|
# ARGOCD_CONF_DIR (the devzone folder: relative paths there), DEVZONE_REPO_URL
|
|
25
25
|
# and argocd_revision, the secret hook of each service
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
# Network isolation and access authorization between devzone namespaces.
|
|
3
3
|
# File <= 250 lines: functions namespace_isolate, allow, forbid.
|
|
4
4
|
# These functions modify NetworkPolicies in the Kubernetes cluster.
|
|
5
|
-
#
|
|
5
|
+
# Loaded by argocd.sh, catalog.sh, mysql.sh, gitlab.sh and postgres.sh; shipped with the package.
|
|
6
6
|
|
|
7
7
|
# Sets an isolating NetworkPolicy in a namespace.
|
|
8
8
|
# Only the pods of the same namespace can reach the services.
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
# the Kubernetes workspace pod, with a temporary administrator token (#528).
|
|
4
4
|
# services-admin.sh enable|disable <service> [options of devzone enable]
|
|
5
5
|
# services-admin.sh seed gitlab data of gitlab seeded again, in the pod (#538)
|
|
6
|
-
# Run by the workstation (manage/scripts/services-workspace.sh) through
|
|
6
|
+
# Run by the workstation (manage/scripts/workspace/services-workspace.sh) through
|
|
7
7
|
# kubectl exec -i: the token comes on stdin, is never printed and lives only
|
|
8
8
|
# in a temporary kubeconfig removed at the end.
|
|
9
9
|
# Why: the pod has no kubeconfig and its service account is limited (#430),
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# Plan of the image tools to bump, for the versions workflow. Reads the
|
|
3
|
+
# "tool pinned upstream [majeure]" lines of "versions.sh --tools" on stdin and
|
|
4
|
+
# prints one TAB-separated line per tool to act on, with the fields:
|
|
5
|
+
# kind tool pinned upstream title notes ticket
|
|
6
|
+
# plan a new ticket, the design, the bump and the push; at most MAX
|
|
7
|
+
# (3 by default) per run, the others wait for the next run
|
|
8
|
+
# existant the App has an open ticket for this tool with another title:
|
|
9
|
+
# the workflow only updates it (no branch); ticket is its number
|
|
10
|
+
# majeure a next major version: listed in the job summary, never applied
|
|
11
|
+
# A tool whose open ticket of the author has the same title is not listed.
|
|
12
|
+
# Usage: versions.sh --tools | bash versions-tools-plan.sh <author> [max]
|
|
13
|
+
# Compatible with bash 3.2 (macOS).
|
|
14
|
+
set -euo pipefail
|
|
15
|
+
|
|
16
|
+
HERE="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
17
|
+
AUTHOR="${1:-}"
|
|
18
|
+
MAX="${2:-3}"
|
|
19
|
+
|
|
20
|
+
if [ -z "$AUTHOR" ]; then
|
|
21
|
+
echo "usage: versions.sh --tools | bash versions-tools-plan.sh <author> [max]" >&2
|
|
22
|
+
exit 2
|
|
23
|
+
fi
|
|
24
|
+
case "$MAX" in
|
|
25
|
+
'' | *[!0-9]*)
|
|
26
|
+
echo "versions-tools-plan: invalid max: $MAX" >&2
|
|
27
|
+
exit 2
|
|
28
|
+
;;
|
|
29
|
+
esac
|
|
30
|
+
|
|
31
|
+
# Release notes of tool $1 at version $2 (Go publishes its notes on go.dev)
|
|
32
|
+
notes_of() {
|
|
33
|
+
case "$1" in
|
|
34
|
+
go) echo "https://go.dev/doc/devel/release#go$2" ;;
|
|
35
|
+
k9s) echo "https://github.com/derailed/k9s/releases/tag/v$2" ;;
|
|
36
|
+
actionlint) echo "https://github.com/rhysd/actionlint/releases/tag/v$2" ;;
|
|
37
|
+
gitleaks) echo "https://github.com/gitleaks/gitleaks/releases/tag/v$2" ;;
|
|
38
|
+
kind) echo "https://github.com/kubernetes-sigs/kind/releases/tag/v$2" ;;
|
|
39
|
+
*)
|
|
40
|
+
echo "versions-tools-plan: unknown tool: $1" >&2
|
|
41
|
+
exit 1
|
|
42
|
+
;;
|
|
43
|
+
esac
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
# Title of the ticket and of the commit for the bump of tool $1 from $2 to $3
|
|
47
|
+
title_of() {
|
|
48
|
+
echo "$1 $2 → $3 dans l'image"
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
# "number<TAB>title" of the open ticket of AUTHOR for tool $1, nothing otherwise
|
|
52
|
+
open_ticket_of() {
|
|
53
|
+
bash "$HERE/versions.sh" --existing-ticket "$1" "$AUTHOR" </dev/null
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
# Prints one plan line: kind, tool, pinned, upstream, title, notes, ticket
|
|
57
|
+
emit() {
|
|
58
|
+
printf '%s\t%s\t%s\t%s\t%s\t%s\t%s\n' "$1" "$2" "$3" "$4" "$5" "$6" "${7:--}"
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
count=0
|
|
62
|
+
deferred=""
|
|
63
|
+
while read -r tool pinned upstream rest; do
|
|
64
|
+
[ -n "${tool:-}" ] || continue
|
|
65
|
+
if [ -z "${upstream:-}" ]; then
|
|
66
|
+
echo "versions-tools-plan: invalid line: $tool $pinned" >&2
|
|
67
|
+
exit 1
|
|
68
|
+
fi
|
|
69
|
+
case "$rest" in
|
|
70
|
+
'') kind=plan ;;
|
|
71
|
+
majeure) kind=majeure ;;
|
|
72
|
+
*)
|
|
73
|
+
echo "versions-tools-plan: invalid line: $tool $pinned $upstream $rest" >&2
|
|
74
|
+
exit 1
|
|
75
|
+
;;
|
|
76
|
+
esac
|
|
77
|
+
title="$(title_of "$tool" "$pinned" "$upstream")"
|
|
78
|
+
notes="$(notes_of "$tool" "$upstream")"
|
|
79
|
+
|
|
80
|
+
if [ "$kind" = majeure ]; then
|
|
81
|
+
emit majeure "$tool" "$pinned" "$upstream" "$title" "$notes"
|
|
82
|
+
continue
|
|
83
|
+
fi
|
|
84
|
+
|
|
85
|
+
existing="$(open_ticket_of "$tool")"
|
|
86
|
+
if [ -n "$existing" ]; then
|
|
87
|
+
number="${existing%%$'\t'*}"
|
|
88
|
+
existing_title="${existing#*$'\t'}"
|
|
89
|
+
if [ "$existing_title" != "$title" ]; then
|
|
90
|
+
emit existant "$tool" "$pinned" "$upstream" "$title" "$notes" "$number"
|
|
91
|
+
fi
|
|
92
|
+
continue
|
|
93
|
+
fi
|
|
94
|
+
|
|
95
|
+
if [ "$count" -ge "$MAX" ]; then
|
|
96
|
+
deferred="$deferred $tool"
|
|
97
|
+
continue
|
|
98
|
+
fi
|
|
99
|
+
count=$((count + 1))
|
|
100
|
+
emit plan "$tool" "$pinned" "$upstream" "$title" "$notes"
|
|
101
|
+
done
|
|
102
|
+
|
|
103
|
+
if [ -n "$deferred" ]; then
|
|
104
|
+
echo "versions-tools-plan: deferred to the next run (at most $MAX per run):$deferred" >&2
|
|
105
|
+
fi
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
# apart (postgres-admin, mysql-admin, mirrored and never printed), Helm
|
|
4
4
|
# parameters of the mysql chart (existing volume claim), and the
|
|
5
5
|
# devzone workspace services enable|disable switch when Argo CD holds the
|
|
6
|
-
# charts. Sourced by manage/scripts/argocd-services.sh. bash 3.2 (macOS).
|
|
6
|
+
# charts. Sourced by manage/scripts/workspace/argocd-services.sh. bash 3.2 (macOS).
|
|
7
7
|
|
|
8
8
|
# Namespace of the service: labelled, isolated like the other devzone-*
|
|
9
9
|
# (services.sh: services_namespace_prepare)
|
|
@@ -46,16 +46,16 @@ GITOPS_CMD="devzone workspace argocd init"
|
|
|
46
46
|
ARGOCD_CONF_DIR="$PWD"
|
|
47
47
|
# shellcheck disable=SC2034
|
|
48
48
|
ARGOCD_CONF="$PWD/.argocd.conf"
|
|
49
|
-
# shellcheck source
|
|
49
|
+
# shellcheck source=../../../.devcontainer/argocd/conf.sh
|
|
50
50
|
# shellcheck disable=SC1091
|
|
51
51
|
. "$RACINE/.devcontainer/argocd/conf.sh"
|
|
52
|
-
# shellcheck source
|
|
52
|
+
# shellcheck source=../../../.devcontainer/argocd/gitops.sh
|
|
53
53
|
# shellcheck disable=SC1091
|
|
54
54
|
. "$RACINE/.devcontainer/argocd/gitops.sh"
|
|
55
|
-
# shellcheck source
|
|
55
|
+
# shellcheck source=../../../.devcontainer/argocd/apps.sh
|
|
56
56
|
# shellcheck disable=SC1091
|
|
57
57
|
. "$RACINE/.devcontainer/argocd/apps.sh"
|
|
58
|
-
# shellcheck source
|
|
58
|
+
# shellcheck source=../../../.devcontainer/argocd/services.sh
|
|
59
59
|
# shellcheck disable=SC1091
|
|
60
60
|
. "$RACINE/.devcontainer/argocd/services.sh"
|
|
61
61
|
argocd_kubectl() { ak "$@"; }
|
|
@@ -14,7 +14,7 @@ PW_INTERNAL=" 2475 1234 "
|
|
|
14
14
|
# pgAdmin service port: read from the service, without it nothing is relayed.
|
|
15
15
|
PW_JSONPATH='jsonpath={.spec.ports[0].port}'
|
|
16
16
|
# Cluster Services relayed as applications (#611).
|
|
17
|
-
# shellcheck source=manage/scripts/ports-apps.sh
|
|
17
|
+
# shellcheck source=manage/scripts/workspace/ports-apps.sh
|
|
18
18
|
. "$(dirname "${BASH_SOURCE[0]}")/ports-apps.sh"
|
|
19
19
|
|
|
20
20
|
# Watcher state folder: lock, pid, relays, reported ports, log.
|
package/manage/workspace.sh
CHANGED
|
@@ -165,28 +165,28 @@ copy_from() {
|
|
|
165
165
|
}
|
|
166
166
|
|
|
167
167
|
# French names of the command and compatibility aliases (lot 3, #508)
|
|
168
|
-
# shellcheck source=manage/scripts/workspace-aliases.sh
|
|
169
|
-
. "$HERE/scripts/workspace-aliases.sh"
|
|
168
|
+
# shellcheck source=manage/scripts/workspace/workspace-aliases.sh
|
|
169
|
+
. "$HERE/scripts/workspace/workspace-aliases.sh"
|
|
170
170
|
# shellcheck source=manage/scripts/kube-ready.sh
|
|
171
171
|
. "$HERE/scripts/kube-ready.sh"
|
|
172
|
-
# shellcheck source=manage/scripts/workspace-wait.sh
|
|
173
|
-
. "$HERE/scripts/workspace-wait.sh"
|
|
174
|
-
# shellcheck source=manage/scripts/workspace-clone.sh
|
|
175
|
-
. "$HERE/scripts/workspace-clone.sh"
|
|
176
|
-
# shellcheck source=manage/scripts/workspace-copies.sh
|
|
177
|
-
. "$HERE/scripts/workspace-copies.sh"
|
|
178
|
-
# shellcheck source=manage/scripts/ports-workspace.sh
|
|
179
|
-
. "$HERE/scripts/ports-workspace.sh"
|
|
180
|
-
# shellcheck source=manage/scripts/services-workspace.sh
|
|
181
|
-
. "$HERE/scripts/services-workspace.sh"
|
|
182
|
-
# shellcheck source=manage/scripts/argocd-workspace.sh
|
|
183
|
-
. "$HERE/scripts/argocd-workspace.sh"
|
|
184
|
-
# shellcheck source=manage/scripts/argocd-services.sh
|
|
185
|
-
. "$HERE/scripts/argocd-services.sh"
|
|
186
|
-
# shellcheck source=manage/scripts/workspace-update.sh
|
|
187
|
-
. "$HERE/scripts/workspace-update.sh"
|
|
188
|
-
# shellcheck source=manage/scripts/workspace-egress.sh
|
|
189
|
-
. "$HERE/scripts/workspace-egress.sh"
|
|
172
|
+
# shellcheck source=manage/scripts/workspace/workspace-wait.sh
|
|
173
|
+
. "$HERE/scripts/workspace/workspace-wait.sh"
|
|
174
|
+
# shellcheck source=manage/scripts/workspace/workspace-clone.sh
|
|
175
|
+
. "$HERE/scripts/workspace/workspace-clone.sh"
|
|
176
|
+
# shellcheck source=manage/scripts/workspace/workspace-copies.sh
|
|
177
|
+
. "$HERE/scripts/workspace/workspace-copies.sh"
|
|
178
|
+
# shellcheck source=manage/scripts/workspace/ports-workspace.sh
|
|
179
|
+
. "$HERE/scripts/workspace/ports-workspace.sh"
|
|
180
|
+
# shellcheck source=manage/scripts/workspace/services-workspace.sh
|
|
181
|
+
. "$HERE/scripts/workspace/services-workspace.sh"
|
|
182
|
+
# shellcheck source=manage/scripts/workspace/argocd-workspace.sh
|
|
183
|
+
. "$HERE/scripts/workspace/argocd-workspace.sh"
|
|
184
|
+
# shellcheck source=manage/scripts/workspace/argocd-services.sh
|
|
185
|
+
. "$HERE/scripts/workspace/argocd-services.sh"
|
|
186
|
+
# shellcheck source=manage/scripts/workspace/workspace-update.sh
|
|
187
|
+
. "$HERE/scripts/workspace/workspace-update.sh"
|
|
188
|
+
# shellcheck source=manage/scripts/workspace/workspace-egress.sh
|
|
189
|
+
. "$HERE/scripts/workspace/workspace-egress.sh"
|
|
190
190
|
|
|
191
191
|
# Renamed names (#695): an old French name is refused before anything runs, with
|
|
192
192
|
# its English name (« devzone workspace start »). A copied devzone may miss the
|
package/package.json
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|