-
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.
- Loading branch information
Showing
5 changed files
with
121 additions
and
18 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,28 @@ | ||
package cmd | ||
|
||
import ( | ||
"net/http" | ||
|
||
"github.com/inseefrlab/onyxia-api/internal/helm" | ||
|
||
"github.com/gin-gonic/gin" | ||
) | ||
|
||
// @Summary Init a namespace for a user or a group | ||
// @Schemes | ||
// @Description Create or replace the namespace of the user or the namespace of a group if the user is in the requested group and the according rbac policies. with the group prefix / user prefix of the region | ||
// @Tags Onboarding | ||
// @Produce json | ||
// @Success 200 | ||
// @Router /onboarding [post] | ||
func onboarding(c *gin.Context) { | ||
myServices := MyServices{} | ||
for _, release := range helm.ListReleases() { | ||
myServices.Apps = append(myServices.Apps, App{ID: release.Name, Chart: release.Chart.Name()}) | ||
} | ||
c.JSON(http.StatusOK, myServices) | ||
} | ||
|
||
func registerOnboardingHandlers(r *gin.RouterGroup) { | ||
r.POST("/onboarding", onboarding) | ||
} |
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,5 +1,69 @@ | ||
authentication: | ||
issuerURI: | ||
mode: none | ||
oidc: | ||
issuer-uri: | ||
clientID: | ||
audience: | ||
username-claim: | ||
groups-claim: | ||
extra-query-params: | ||
rootPath: /api | ||
regions: | ||
regions: | ||
- id: kub | ||
name: Kubernetes (in-cluster) | ||
description: The in-cluster Kubernetes region. | ||
onyxiaAPI: | ||
baseURL: '' | ||
services: | ||
type: KUBERNETES | ||
initScript: https://git.lab.sspcloud.fr/innovation/plateforme-onyxia/services-ressources/-/raw/master/onyxia-init.sh | ||
singleNamespace: true | ||
namespacePrefix: user- | ||
usernamePrefix: oidc- | ||
groupNamespacePrefix: projet- | ||
authenticationMode: serviceAccount | ||
quotas: | ||
allowUserModification: true | ||
enabled: false | ||
default: | ||
requests.memory: 10Gi | ||
requests.cpu: '10' | ||
limits.memory: 10Gi | ||
limits.cpu: '10' | ||
requests.storage: 100Gi | ||
count/pods: '50' | ||
userEnabled: false | ||
user: | ||
requests.memory: 11Gi | ||
requests.cpu: '11' | ||
limits.memory: 11Gi | ||
limits.cpu: '11' | ||
requests.storage: 101Gi | ||
count/pods: '51' | ||
groupEnabled: false | ||
group: | ||
requests.memory: 12Gi | ||
requests.cpu: '12' | ||
limits.memory: 12Gi | ||
limits.cpu: '12' | ||
requests.storage: 102Gi | ||
count/pods: '52' | ||
defaultConfiguration: | ||
IPProtection: false | ||
networkPolicy: false | ||
expose: | ||
domain: fakedomain.kub.example.com | ||
ingress: true | ||
route: false | ||
istio: | ||
enabled: false | ||
gateways: [] | ||
monitoring: | ||
URLPattern: https://graphana.kub.example.com/$appIdSlug | ||
data: {} | ||
auth: | ||
type: openidconnect | ||
location: | ||
name: Paris | ||
lat: 48.8453225 | ||
long: 2.3024401 |
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