forked from AVENTER-UG/mesos-m3s
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ADD: timeout for agent start. ADD: disk capacity CHANGE: improve heartbeat Added docker parameter for CPU Limit Updated Makefile to explicitly specific amd64 in build command Updated Default Values for Agent & Server CPU Fixed Call for Cluster Restart pr-13 (#49) Import from: AVENTER-UG#13 Changes - Update to controller/makefile to add BUILD_ARCH explicitly in normal build command for situations where the controller might be built from an Apple Silicon based machine for non Apple Silicon environments - Update to agent.go & server.go files to add DockerParameter of CPU Allocation for the container to be made aware of the CPU Allocations, this also exposes the value within the container's cgroup files which then can be used downstream for some applications like limiting the resource access of kubernetes.. - Updated .gitignore for adding controller/sbom Co-authored-by: Sarvesh Bedekar <[email protected]> Reviewed-on: https://gitea:3000/AVENTER/mesos-m3s/pulls/49 CHANGE: mesos cli plugin to the new version of avmesos-cli. UPDATE: changelog. Revert Version to aventer Added Capability Disclosure in API, fired go mod tidy for cleanup pr-14 (#51) Changes - Added missing call in api/V0ClusterRestart.go to the function ClusterRestart from the controller Import from: AVENTER-UG#14 Co-authored-by: Sarvesh Bedekar <[email protected]> Co-authored-by: Sarvesh Bedekar <[email protected]> Reviewed-on: https://gitea:3000/AVENTER/mesos-m3s/pulls/51 UPDATE: changelog with fix info about clusterrestart.
- Loading branch information
1 parent
40133dd
commit 4b62692
Showing
21 changed files
with
216 additions
and
506 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 |
---|---|---|
@@ -1 +1 @@ | ||
{"m3sVersion": { "gitVersion": "v0.4.0-46-g51a13dd", "buildDate": "2023-08-08T20:43:03Z"}} | ||
{"m3sVersion": { "gitVersion": "v0.4.0-46-g51a13dd", "buildDate": "2023-08-08T20:43:03Z"}} |
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,42 @@ | ||
package api | ||
|
||
import ( | ||
"encoding/json" | ||
"net/http" | ||
|
||
"github.com/sirupsen/logrus" | ||
) | ||
|
||
// V0CapabilitiesDisclosure gives out the current capabilities supported in this m3s framework version. | ||
// Helpful when you may have multiple versions running in your environment and need feature flagging on downstream applications. | ||
// example: | ||
// curl -X GET 127.0.0.1:10000/v0/capabilities | ||
func (e *API) V0CapabilitiesDisclosure(w http.ResponseWriter, r *http.Request) { | ||
logrus.WithField("func", "api.V0CapabilitiesDisclosure").Debug("Call") | ||
|
||
if !e.CheckAuth(r, w) { | ||
w.WriteHeader(http.StatusUnauthorized) | ||
return | ||
} | ||
|
||
w.Header().Set("Content-Type", "application/json; charset=utf-8") | ||
w.Header().Set("Api-Service", "v0") | ||
|
||
capabilities := []string{} | ||
capabilities = append(capabilities, "cluster-restart") | ||
capabilities = append(capabilities, "cluster-start") | ||
capabilities = append(capabilities, "cluster-shutdown") | ||
capabilities = append(capabilities, "k3s-count-agents") | ||
capabilities = append(capabilities, "k3s-count-servers") | ||
capabilities = append(capabilities, "get-kubeconfig") | ||
capabilities = append(capabilities, "get-kubeversion") | ||
capabilities = append(capabilities, "scale-agent") | ||
capabilities = append(capabilities, "scale-server") | ||
capabilities = append(capabilities, "scale-datastore") | ||
capabilities = append(capabilities, "scale-datastore") | ||
capabilities = append(capabilities, "status-k3s") | ||
capabilities = append(capabilities, "status-m3s") | ||
|
||
response, _ := json.Marshal(capabilities) | ||
w.Write(response) | ||
} |
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
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
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
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
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
Oops, something went wrong.