cluster

package
v2.21.11 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2023 License: Apache-2.0 Imports: 29 Imported by: 0

Documentation

Index

Constants

This section is empty.

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(
	projectProvider provider.ProjectProvider,
	privilegedProjectProvider provider.PrivilegedProjectProvider,
	seedsGetter provider.SeedsGetter,
	credentialManager provider.PresetProvider,
	exposeStrategy kubermaticv1.ExposeStrategy,
	userInfoGetter provider.UserInfoGetter,
	settingsProvider provider.SettingsProvider,
	caBundle *x509.CertPool,
	configGetter provider.KubermaticConfigurationGetter,
	features features.FeatureGate,
) 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 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, seedsGetter provider.SeedsGetter, userInfoGetter provider.UserInfoGetter, configGetter provider.KubermaticConfigurationGetter) endpoint.Endpoint

func GetMasterVersionsEndpoint

func GetMasterVersionsEndpoint(configGetter provider.KubermaticConfigurationGetter) endpoint.Endpoint

func GetMetricsEndpoint

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

func GetNodeUpgrades

func GetNodeUpgrades(configGetter provider.KubermaticConfigurationGetter) 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(configGetter provider.KubermaticConfigurationGetter, 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,
	configGetter provider.KubermaticConfigurationGetter,
) 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, seedsGetter provider.SeedsGetter, userInfoGetter provider.UserInfoGetter, configGetter provider.KubermaticConfigurationGetter) 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, caBundle *x509.CertPool, configGetter provider.KubermaticConfigurationGetter, features features.FeatureGate) 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 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(updateManager common.UpdateManager) error

Validate validates CreateEndpoint request.

type DeleteReq

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

DeleteReq defines HTTP request for deleteCluster endpoints swagger:parameters deleteCluster

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 NodeUpgradesReq

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

NodeUpgradesReq defines HTTP request for getNodeUpgrades swagger:parameters getNodeUpgrades

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 {
	// Type is deprecated and not used anymore.
	// 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