-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement cluster-admin/ HTTP route with set-route action as other routes.
- Loading branch information
1 parent
61b8187
commit f2b0ee7
Showing
4 changed files
with
34 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#!/bin/bash | ||
|
||
# | ||
# Copyright (C) 2025 Nethesis S.r.l. | ||
# SPDX-License-Identifier: GPL-3.0-or-later | ||
# | ||
|
||
set -e | ||
exec 1>&2 | ||
|
||
[[ -f "configs/cluster-admin.yml" ]] || exit 0 # Nothing to do | ||
|
||
echo 'Creating HTTP route for cluster-admin...' | ||
api-cli --endpoint=http://127.0.0.1:9311 run "module/${MODULE_ID}/set-route" --data - <<'EOF' | ||
{ | ||
"instance": "cluster-admin", | ||
"path": "/cluster-admin", | ||
"url": "http://127.0.0.1:9311", | ||
"priority": 100000, | ||
"lets_encrypt": false, | ||
"skip_cert_verify": false, | ||
"http2https": true, | ||
"strip_prefix": true, | ||
"slash_redirect":true, | ||
"user_created": false | ||
} | ||
EOF | ||
|
||
rm -vf "configs/_api_server.yml" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../actions/create-module/60cluster_admin |