service_account

package
v1.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 9, 2023 License: Apache-2.0, BSD-2-Clause, BSD-3-Clause, + 3 more Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenKubeconfig

func GenKubeconfig(
	saName string, cp model.ClusterPack,
	specifyNameSpace string,
	then func(nss []NS, privilegeType PrivilegeType, kubeConfig string),
)

func ListAuthorization

func ListAuthorization(c *gin.Context)

Types

type NS

type NS struct {
	SpaceId      uint64 `json:"space_id"`
	Namespace    string `json:"namespace"`
	SpaceName    string `json:"spacename"`
	SpaceOwnType string `json:"space_own_type"`
}

type PrivilegeType

type PrivilegeType string
const CLUSTER_ADMIN PrivilegeType = "CLUSTER_ADMIN"

the user that has all verbs with all cluster resources

const CLUSTER_VIEWER PrivilegeType = "CLUSTER_VIEWER"

the user that has (get, list, watch) verbs with all cluster resources

const NONE PrivilegeType = "NONE"

user do not has cluster resources access permissions

type SaAuthorizeRequest

type SaAuthorizeRequest struct {
	ClusterId *uint64 `json:"cluster_id" binding:"required"`
	UserId    *uint64 `json:"user_id" binding:"required"`
	SpaceName string  `json:"space_name" binding:"required"`
}

type ServiceAccountModel

type ServiceAccountModel struct {
	ClusterId     uint64        `json:"cluster_id"`
	KubeConfig    string        `json:"kubeconfig"`
	StorageClass  string        `json:"storage_class"`
	NS            []NS          `json:"namespace_packs"`
	Privilege     bool          `json:"privilege"`
	PrivilegeType PrivilegeType `json:"privilege_type"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL