cluster

package
v2.14.1+incompatible Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2020 License: Apache-2.0 Imports: 51 Imported by: 0

Documentation

Index

Constants

View Source
const (
	UserClusterComponentKey       = "component"
	UserClusterRoleComponentValue = "userClusterRole"
	UserClusterRoleLabelSelector  = "component=userClusterRole"
)
View Source
const (
	UserClusterBindingComponentValue = "userClusterBinding"
)

Variables

This section is empty.

Functions

func AssignSSHKeyEndpoint

func AssignSSHKeyEndpoint(sshKeyProvider provider.SSHKeyProvider, privilegedSSHKeyProvider provider.PrivilegedSSHKeyProvider, projectProvider provider.ProjectProvider, privilegedProjectProvider provider.PrivilegedProjectProvider, userInfoGetter provider.UserInfoGetter) endpoint.Endpoint

func BindUserToClusterRoleEndpoint

func BindUserToClusterRoleEndpoint(projectProvider provider.ProjectProvider, privilegedProjectProvider provider.PrivilegedProjectProvider, userInfoGetter provider.UserInfoGetter) endpoint.Endpoint

func BindUserToRoleEndpoint

func BindUserToRoleEndpoint(projectProvider provider.ProjectProvider, privilegedProjectProvider provider.PrivilegedProjectProvider, userInfoGetter provider.UserInfoGetter) endpoint.Endpoint

func CreateClusterRoleEndpoint

func CreateClusterRoleEndpoint(userInfoGetter provider.UserInfoGetter) endpoint.Endpoint

func CreateEndpoint

func CreateEndpoint(sshKeyProvider provider.SSHKeyProvider, projectProvider provider.ProjectProvider, privilegedProjectProvider provider.PrivilegedProjectProvider, seedsGetter provider.SeedsGetter,
	initNodeDeploymentFailures *prometheus.CounterVec, eventRecorderProvider provider.EventRecorderProvider, credentialManager provider.PresetProvider,
	exposeStrategy corev1.ServiceType, userInfoGetter provider.UserInfoGetter, settingsProvider provider.SettingsProvider) endpoint.Endpoint

func CreateOIDCKubeconfigEndpoint

func CreateOIDCKubeconfigEndpoint(projectProvider provider.ProjectProvider, privilegedProjectProvider provider.PrivilegedProjectProvider, oidcIssuerVerifier auth.OIDCIssuerVerifier, oidcCfg common.OIDCConfiguration) endpoint.Endpoint

func CreateRoleEndpoint

func CreateRoleEndpoint(userInfoGetter provider.UserInfoGetter) endpoint.Endpoint

func DecodeAdminTokenReq

func DecodeAdminTokenReq(c context.Context, r *http.Request) (interface{}, error)

func DecodeAssignSSHKeyReq

func DecodeAssignSSHKeyReq(c context.Context, r *http.Request) (interface{}, error)

func DecodeClusterRoleUserReq

func DecodeClusterRoleUserReq(c context.Context, r *http.Request) (interface{}, error)

func DecodeClusterTypeReq

func DecodeClusterTypeReq(c context.Context, r *http.Request) (interface{}, error)

DecodeAddReq decodes an HTTP request into TypeReq

func DecodeCreateClusterRoleReq

func DecodeCreateClusterRoleReq(c context.Context, r *http.Request) (interface{}, error)

func DecodeCreateOIDCKubeconfig

func DecodeCreateOIDCKubeconfig(c context.Context, r *http.Request) (interface{}, error)

func DecodeCreateReq

func DecodeCreateReq(c context.Context, r *http.Request) (interface{}, error)

func DecodeCreateRoleReq

func DecodeCreateRoleReq(c context.Context, r *http.Request) (interface{}, error)

func DecodeDeleteReq

func DecodeDeleteReq(c context.Context, r *http.Request) (interface{}, error)

func DecodeDetachSSHKeysReq

func DecodeDetachSSHKeysReq(c context.Context, r *http.Request) (interface{}, error)

func DecodeGetAdminKubeconfig

func DecodeGetAdminKubeconfig(c context.Context, r *http.Request) (interface{}, error)

func DecodeGetClusterEvents

func DecodeGetClusterEvents(c context.Context, r *http.Request) (interface{}, error)

func DecodeGetClusterRoleReq

func DecodeGetClusterRoleReq(c context.Context, r *http.Request) (interface{}, error)

func DecodeGetRoleReq

func DecodeGetRoleReq(c context.Context, r *http.Request) (interface{}, error)

func DecodeListBindingReq

func DecodeListBindingReq(c context.Context, r *http.Request) (interface{}, error)

func DecodeListClusterRoleReq

func DecodeListClusterRoleReq(c context.Context, r *http.Request) (interface{}, error)

func DecodeListReq

func DecodeListReq(c context.Context, r *http.Request) (interface{}, error)

func DecodeListSSHKeysReq

func DecodeListSSHKeysReq(c context.Context, r *http.Request) (interface{}, error)

func DecodeNodeUpgradesReq

func DecodeNodeUpgradesReq(c context.Context, r *http.Request) (interface{}, error)

func DecodePatchClusterRoleReq

func DecodePatchClusterRoleReq(c context.Context, r *http.Request) (interface{}, error)

func DecodePatchReq

func DecodePatchReq(c context.Context, r *http.Request) (interface{}, error)

func DecodePatchRoleReq

func DecodePatchRoleReq(c context.Context, r *http.Request) (interface{}, error)

func DecodeRoleUserReq

func DecodeRoleUserReq(c context.Context, r *http.Request) (interface{}, error)

func DecodeUpgradeNodeDeploymentsReq

func DecodeUpgradeNodeDeploymentsReq(c context.Context, r *http.Request) (interface{}, error)

func DeleteClusterRoleEndpoint

func DeleteClusterRoleEndpoint(userInfoGetter provider.UserInfoGetter) endpoint.Endpoint

DeleteClusterRoleEndpoint deletes ClusterRole with given name

func DeleteEndpoint

func DeleteEndpoint(sshKeyProvider provider.SSHKeyProvider, privilegedSSHKeyProvider provider.PrivilegedSSHKeyProvider, projectProvider provider.ProjectProvider, privilegedProjectProvider provider.PrivilegedProjectProvider, userInfoGetter provider.UserInfoGetter) endpoint.Endpoint

func DeleteRoleEndpoint

func DeleteRoleEndpoint(userInfoGetter provider.UserInfoGetter) endpoint.Endpoint

DeleteRoleEndpoint deletes Role with given name

func DetachSSHKeyEndpoint

func DetachSSHKeyEndpoint(sshKeyProvider provider.SSHKeyProvider, privilegedSSHKeyProvider provider.PrivilegedSSHKeyProvider, projectProvider provider.ProjectProvider, privilegedProjectProvider provider.PrivilegedProjectProvider, userInfoGetter provider.UserInfoGetter) endpoint.Endpoint

func EncodeKubeconfig

func EncodeKubeconfig(c context.Context, w http.ResponseWriter, response interface{}) (err error)

func EncodeOIDCKubeconfig

func EncodeOIDCKubeconfig(c context.Context, w http.ResponseWriter, response interface{}) (err error)

func GetAdminKubeconfigEndpoint

func GetAdminKubeconfigEndpoint(projectProvider provider.ProjectProvider, privilegedProjectProvider provider.PrivilegedProjectProvider, userInfoGetter provider.UserInfoGetter) endpoint.Endpoint

func GetCluster

func GetCluster(ctx context.Context, projectProvider provider.ProjectProvider, privilegedProjectProvider provider.PrivilegedProjectProvider, userInfoGetter provider.UserInfoGetter, projectID, clusterID string, options *provider.ClusterGetOptions) (*kubermaticv1.Cluster, error)

GetCluster returns the cluster for a given request

func GetClusterEventsEndpoint

func GetClusterEventsEndpoint(projectProvider provider.ProjectProvider, privilegedProjectProvider provider.PrivilegedProjectProvider, userInfoGetter provider.UserInfoGetter) endpoint.Endpoint

func GetClusterProviderFromRequest

func GetClusterProviderFromRequest(
	ctx context.Context,
	request interface{},
	projectProvider provider.ProjectProvider,
	privilegedProjectProvider provider.PrivilegedProjectProvider,
	userInfoGetter provider.UserInfoGetter) (*kubermaticv1.Cluster, *kubernetesprovider.ClusterProvider, error)

GetClusterProviderFromRequest returns cluster and cluster provider based on the provided request.

func GetClusterRoleEndpoint

func GetClusterRoleEndpoint(userInfoGetter provider.UserInfoGetter) endpoint.Endpoint

GetClusterRoleEndpoint gets ClusterRole with given name.

func GetEndpoint

func GetEndpoint(projectProvider provider.ProjectProvider, privilegedProjectProvider provider.PrivilegedProjectProvider, userInfoGetter provider.UserInfoGetter) endpoint.Endpoint

func GetMasterVersionsEndpoint

func GetMasterVersionsEndpoint(updateManager common.UpdateManager) endpoint.Endpoint

func GetMetricsEndpoint

func GetMetricsEndpoint(projectProvider provider.ProjectProvider, privilegedProjectProvider provider.PrivilegedProjectProvider, userInfoGetter provider.UserInfoGetter) endpoint.Endpoint

func GetNodeUpgrades

func GetNodeUpgrades(updateManager common.UpdateManager) endpoint.Endpoint

func GetOidcKubeconfigEndpoint

func GetOidcKubeconfigEndpoint(projectProvider provider.ProjectProvider, privilegedProjectProvider provider.PrivilegedProjectProvider, userInfoGetter provider.UserInfoGetter) endpoint.Endpoint

func GetRoleEndpoint

func GetRoleEndpoint(userInfoGetter provider.UserInfoGetter) endpoint.Endpoint

func GetUpgradesEndpoint

func GetUpgradesEndpoint(updateManager common.UpdateManager, projectProvider provider.ProjectProvider, privilegedProjectProvider provider.PrivilegedProjectProvider, userInfoGetter provider.UserInfoGetter) endpoint.Endpoint

func HealthEndpoint

func HealthEndpoint(projectProvider provider.ProjectProvider, privilegedProjectProvider provider.PrivilegedProjectProvider, userInfoGetter provider.UserInfoGetter) endpoint.Endpoint

func ListAllEndpoint

func ListAllEndpoint(projectProvider provider.ProjectProvider, privilegedProjectProvider provider.PrivilegedProjectProvider, seedsGetter provider.SeedsGetter, clusterProviderGetter provider.ClusterProviderGetter, userInfoGetter provider.UserInfoGetter) endpoint.Endpoint

ListAllEndpoint list clusters for the given project in all datacenters

func ListClusterRoleBindingEndpoint

func ListClusterRoleBindingEndpoint(projectProvider provider.ProjectProvider, privilegedProjectProvider provider.PrivilegedProjectProvider, userInfoGetter provider.UserInfoGetter) endpoint.Endpoint

func ListClusterRoleEndpoint

func ListClusterRoleEndpoint(userInfoGetter provider.UserInfoGetter) endpoint.Endpoint

func ListClusterRoleNamesEndpoint

func ListClusterRoleNamesEndpoint(userInfoGetter provider.UserInfoGetter) endpoint.Endpoint

func ListEndpoint

func ListEndpoint(projectProvider provider.ProjectProvider, privilegedProjectProvider provider.PrivilegedProjectProvider, userInfoGetter provider.UserInfoGetter) endpoint.Endpoint

ListEndpoint list clusters within the given datacenter

func ListNamespaceEndpoint

func ListNamespaceEndpoint(projectProvider provider.ProjectProvider, privilegedProjectProvider provider.PrivilegedProjectProvider, userInfoGetter provider.UserInfoGetter) endpoint.Endpoint

func ListRoleBindingEndpoint

func ListRoleBindingEndpoint(projectProvider provider.ProjectProvider, privilegedProjectProvider provider.PrivilegedProjectProvider, userInfoGetter provider.UserInfoGetter) endpoint.Endpoint

func ListRoleEndpoint

func ListRoleEndpoint(userInfoGetter provider.UserInfoGetter) endpoint.Endpoint

func ListRoleNamesEndpoint

func ListRoleNamesEndpoint(userInfoGetter provider.UserInfoGetter) endpoint.Endpoint

func ListSSHKeysEndpoint

func ListSSHKeysEndpoint(sshKeyProvider provider.SSHKeyProvider, projectProvider provider.ProjectProvider, privilegedProjectProvider provider.PrivilegedProjectProvider, userInfoGetter provider.UserInfoGetter) endpoint.Endpoint

func PatchClusterRoleEndpoint

func PatchClusterRoleEndpoint(userInfoGetter provider.UserInfoGetter) endpoint.Endpoint

PatchRoleEndpoint patches ClusterRole with given name

func PatchEndpoint

func PatchEndpoint(projectProvider provider.ProjectProvider, privilegedProjectProvider provider.PrivilegedProjectProvider, seedsGetter provider.SeedsGetter, userInfoGetter provider.UserInfoGetter) endpoint.Endpoint

func PatchRoleEndpoint

func PatchRoleEndpoint(userInfoGetter provider.UserInfoGetter) endpoint.Endpoint

PatchRoleEndpoint patches Role with given name

func RevokeAdminTokenEndpoint

func RevokeAdminTokenEndpoint(projectProvider provider.ProjectProvider, privilegedProjectProvider provider.PrivilegedProjectProvider, userInfoGetter provider.UserInfoGetter) endpoint.Endpoint

func RevokeViewerTokenEndpoint

func RevokeViewerTokenEndpoint(projectProvider provider.ProjectProvider, privilegedProjectProvider provider.PrivilegedProjectProvider, userInfoGetter provider.UserInfoGetter) endpoint.Endpoint

func UnbindUserFromClusterRoleBindingEndpoint

func UnbindUserFromClusterRoleBindingEndpoint(projectProvider provider.ProjectProvider, privilegedProjectProvider provider.PrivilegedProjectProvider, userInfoGetter provider.UserInfoGetter) endpoint.Endpoint

func UnbindUserFromRoleBindingEndpoint

func UnbindUserFromRoleBindingEndpoint(projectProvider provider.ProjectProvider, privilegedProjectProvider provider.PrivilegedProjectProvider, userInfoGetter provider.UserInfoGetter) endpoint.Endpoint

func UpgradeNodeDeploymentsEndpoint

func UpgradeNodeDeploymentsEndpoint(projectProvider provider.ProjectProvider, privilegedProjectProvider provider.PrivilegedProjectProvider, userInfoGetter provider.UserInfoGetter) endpoint.Endpoint

Types

type AdminTokenReq

type AdminTokenReq struct {
	common.DCReq
	// in: path
	ClusterID string `json:"cluster_id"`
}

AdminTokenReq defines HTTP request data for revokeClusterAdminToken and revokeClusterViewerToken endpoints. swagger:parameters revokeClusterAdminToken revokeClusterViewerToken

type AssignSSHKeysReq

type AssignSSHKeysReq struct {
	common.DCReq
	// in: path
	ClusterID string `json:"cluster_id"`
	// in: path
	KeyID string `json:"key_id"`
}

AssignSSHKeysReq defines HTTP request data for assignSSHKeyToCluster endpoint swagger:parameters assignSSHKeyToCluster

type CreateOIDCKubeconfigReq

type CreateOIDCKubeconfigReq struct {
	// in: query
	ClusterID  string `json:"cluster_id,omitempty"`
	ProjectID  string `json:"project_id,omitempty"`
	UserID     string `json:"user_id,omitempty"`
	Datacenter string `json:"datacenter,omitempty"`
	// contains filtered or unexported fields
}

CreateOIDCKubeconfigReq represent a request for creating kubeconfig for a cluster with OIDC credentials swagger:parameters createOIDCKubeconfig

func (CreateOIDCKubeconfigReq) GetDC

func (r CreateOIDCKubeconfigReq) GetDC() string

GetDC implements DCGetter interface

func (CreateOIDCKubeconfigReq) GetProjectID

func (r CreateOIDCKubeconfigReq) GetProjectID() string

GetProjectID implements ProjectGetter interface

func (CreateOIDCKubeconfigReq) GetUserID

func (r CreateOIDCKubeconfigReq) GetUserID() string

GetUserID implements UserGetter interface

type CreateReq

type CreateReq struct {
	common.DCReq
	// in: body
	Body apiv1.CreateClusterSpec
}

CreateReq defines HTTP request for createCluster endpoint swagger:parameters createCluster

func (CreateReq) Validate

func (r CreateReq) Validate(clusterType kubermaticv1.ClusterType) error

Validate validates DeleteEndpoint request

type DeleteReq

type DeleteReq struct {
	common.GetClusterReq
	// DeleteVolumes if true all cluster PV's and PVC's will be deleted from cluster
	DeleteVolumes bool
	// DeleteLoadBalancers if true all load balancers will be deleted from cluster
	DeleteLoadBalancers bool
}

type DetachSSHKeysReq

type DetachSSHKeysReq struct {
	common.DCReq
	// in: path
	KeyID string `json:"key_id"`
	// in: path
	ClusterID string `json:"cluster_id"`
}

DetachSSHKeysReq defines HTTP request for detachSSHKeyFromCluster endpoint swagger:parameters detachSSHKeyFromCluster

type EventsReq

type EventsReq struct {
	common.GetClusterReq

	// in: query
	Type string `json:"type,omitempty"`
}

EventsReq defines HTTP request for getClusterEvents endpoint swagger:parameters getClusterEvents

type ListReq

type ListReq struct {
	common.DCReq
}

ListReq defines HTTP request for listClusters endpoint swagger:parameters listClusters

type ListSSHKeysReq

type ListSSHKeysReq struct {
	common.DCReq
	// in: path
	ClusterID string `json:"cluster_id"`
}

ListSSHKeysReq defines HTTP request data for listSSHKeysAssignedToCluster endpoint swagger:parameters listSSHKeysAssignedToCluster

type NodeDeploymentEvent

type NodeDeploymentEvent string

NodeDeploymentEvent represents type of events related to Node Deployment

type NodeUpgradesReq

type NodeUpgradesReq struct {
	TypeReq
	// in: query
	ControlPlaneVersion string `json:"control_plane_version,omitempty"`
}

NodeUpgradesReq defines HTTP request for getNodeUpgrades swagger:parameters getNodeUpgrades

type OIDCState

type OIDCState struct {
	// nonce a random string that binds requests / responses of API server and OIDC provider
	// see https://tools.ietf.org/html/rfc6749#section-10.12
	Nonce     string `json:"nonce"`
	ClusterID string `json:"cluster_id"`
	ProjectID string `json:"project_id"`
	// UserID holds the ID of the user on behalf of which the request is being handled.
	UserID     string `json:"user_id"`
	Datacenter string `json:"datacenter"`
}

OIDCState holds data that are send and retrieved from OIDC provider

type PatchReq

type PatchReq struct {
	common.GetClusterReq

	// in: body
	Patch json.RawMessage
}

PatchReq defines HTTP request for patchCluster endpoint swagger:parameters patchCluster

type TypeReq

type TypeReq struct {
	// in: query
	Type string `json:"type"`
}

TypeReq represents a request that contains the cluster type

func (TypeReq) Validate

func (r TypeReq) Validate() error

type UpgradeNodeDeploymentsReq

type UpgradeNodeDeploymentsReq struct {
	common.GetClusterReq

	// in: body
	Body apiv1.MasterVersion
}

UpgradeNodeDeploymentsReq defines HTTP request for upgradeClusterNodeDeployments endpoint swagger:parameters upgradeClusterNodeDeployments

Jump to

Keyboard shortcuts

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