Documentation ¶
Index ¶
- Constants
- func AddManagementApiServerSecurity(dc *api.CassandraDatacenter, pod *corev1.PodTemplateSpec) error
- func BuildPodHostFromPod(pod *corev1.Pod) (string, error)
- func GetManagementApiProtocol(dc *api.CassandraDatacenter) (string, error)
- func GetMgmtApiWgetAction(dc *api.CassandraDatacenter, endpoint string) (*corev1.ExecAction, error)
- func GetMgmtApiWgetPostAction(dc *api.CassandraDatacenter, endpoint string, postData string) (*corev1.ExecAction, error)
- func GetPodHost(podName, clusterName, dcName, namespace string) string
- func ValidateManagementApiConfig(dc *api.CassandraDatacenter, client client.Client, ctx context.Context) []error
- type CassMetadataEndpoints
- type EndpointState
- type HttpClient
- type InsecureManagementApiSecurityProvider
- func (provider *InsecureManagementApiSecurityProvider) AddServerSecurity(pod *corev1.PodTemplateSpec) error
- func (provider *InsecureManagementApiSecurityProvider) BuildHttpClient(client client.Client, ctx context.Context) (HttpClient, error)
- func (provider *InsecureManagementApiSecurityProvider) BuildMgmtApiWgetAction(endpoint string) *corev1.ExecAction
- func (provider *InsecureManagementApiSecurityProvider) BuildMgmtApiWgetPostAction(endpoint string, postData string) *corev1.ExecAction
- func (provider *InsecureManagementApiSecurityProvider) GetProtocol() string
- func (provider *InsecureManagementApiSecurityProvider) ValidateConfig(client client.Client, ctx context.Context) []error
- type ManagementApiSecurityProvider
- type ManualManagementApiSecurityProvider
- func (provider *ManualManagementApiSecurityProvider) AddServerSecurity(pod *corev1.PodTemplateSpec) error
- func (provider *ManualManagementApiSecurityProvider) BuildHttpClient(client client.Client, ctx context.Context) (HttpClient, error)
- func (provider *ManualManagementApiSecurityProvider) BuildMgmtApiWgetAction(endpoint string) *corev1.ExecAction
- func (provider *ManualManagementApiSecurityProvider) BuildMgmtApiWgetPostAction(endpoint string, postData string) *corev1.ExecAction
- func (provider *ManualManagementApiSecurityProvider) GetProtocol() string
- func (provider *ManualManagementApiSecurityProvider) ValidateConfig(client client.Client, ctx context.Context) []error
- type NoPodIPError
- type NodeMgmtClient
- func (client *NodeMgmtClient) CallCreateRoleEndpoint(pod *corev1.Pod, username string, password string, superuser bool) error
- func (client *NodeMgmtClient) CallDecommissionNodeEndpoint(pod *corev1.Pod) error
- func (client *NodeMgmtClient) CallDrainEndpoint(pod *corev1.Pod) error
- func (client *NodeMgmtClient) CallKeyspaceCleanupEndpoint(pod *corev1.Pod, jobs int, keyspaceName string, tables []string) error
- func (client *NodeMgmtClient) CallLifecycleStartEndpoint(pod *corev1.Pod) error
- func (client *NodeMgmtClient) CallLifecycleStartEndpointWithReplaceIp(pod *corev1.Pod, replaceIp string) error
- func (client *NodeMgmtClient) CallMetadataEndpointsEndpoint(pod *corev1.Pod) (CassMetadataEndpoints, error)
- func (client *NodeMgmtClient) CallProbeClusterEndpoint(pod *corev1.Pod, consistencyLevel string, rfPerDc int) error
- func (client *NodeMgmtClient) CallReloadSeedsEndpoint(pod *corev1.Pod) error
Constants ¶
View Source
const (
WgetNodeDrainEndpoint = "localhost:8080/api/v0/ops/node/drain"
)
Variables ¶
This section is empty.
Functions ¶
func AddManagementApiServerSecurity ¶
func AddManagementApiServerSecurity(dc *api.CassandraDatacenter, pod *corev1.PodTemplateSpec) error
func GetManagementApiProtocol ¶
func GetManagementApiProtocol(dc *api.CassandraDatacenter) (string, error)
API for Node Management mAuth Config
func GetMgmtApiWgetAction ¶
func GetMgmtApiWgetAction(dc *api.CassandraDatacenter, endpoint string) (*corev1.ExecAction, error)
func GetMgmtApiWgetPostAction ¶
func GetMgmtApiWgetPostAction(dc *api.CassandraDatacenter, endpoint string, postData string) (*corev1.ExecAction, error)
func GetPodHost ¶
Types ¶
type CassMetadataEndpoints ¶
type CassMetadataEndpoints struct {
Entity []EndpointState `json:"entity"`
}
type EndpointState ¶
type EndpointState struct { HostID string `json:"HOST_ID"` IsAlive string `json:"IS_ALIVE"` NativeTransportAddress string `json:"NATIVE_TRANSPORT_ADDRESS"` RpcAddress string `json:"RPC_ADDRESS"` Status string `json:"STATUS"` Load string `json:"LOAD"` }
func (*EndpointState) GetRpcAddress ¶
func (x *EndpointState) GetRpcAddress() string
type HttpClient ¶
func BuildManagementApiHttpClient ¶
func BuildManagementApiHttpClient(dc *api.CassandraDatacenter, client client.Client, ctx context.Context) (HttpClient, error)
type InsecureManagementApiSecurityProvider ¶
type InsecureManagementApiSecurityProvider struct { }
func (*InsecureManagementApiSecurityProvider) AddServerSecurity ¶
func (provider *InsecureManagementApiSecurityProvider) AddServerSecurity(pod *corev1.PodTemplateSpec) error
func (*InsecureManagementApiSecurityProvider) BuildHttpClient ¶
func (provider *InsecureManagementApiSecurityProvider) BuildHttpClient(client client.Client, ctx context.Context) (HttpClient, error)
func (*InsecureManagementApiSecurityProvider) BuildMgmtApiWgetAction ¶
func (provider *InsecureManagementApiSecurityProvider) BuildMgmtApiWgetAction(endpoint string) *corev1.ExecAction
func (*InsecureManagementApiSecurityProvider) BuildMgmtApiWgetPostAction ¶
func (provider *InsecureManagementApiSecurityProvider) BuildMgmtApiWgetPostAction(endpoint string, postData string) *corev1.ExecAction
func (*InsecureManagementApiSecurityProvider) GetProtocol ¶
func (provider *InsecureManagementApiSecurityProvider) GetProtocol() string
func (*InsecureManagementApiSecurityProvider) ValidateConfig ¶
type ManagementApiSecurityProvider ¶
type ManagementApiSecurityProvider interface { BuildHttpClient(client client.Client, ctx context.Context) (HttpClient, error) BuildMgmtApiWgetAction(endpoint string) *corev1.ExecAction BuildMgmtApiWgetPostAction(endpoint string, postData string) *corev1.ExecAction AddServerSecurity(pod *corev1.PodTemplateSpec) error GetProtocol() string ValidateConfig(client client.Client, ctx context.Context) []error }
SPI for adding new mechanisms for securing the management API
func BuildManagmenetApiSecurityProvider ¶
func BuildManagmenetApiSecurityProvider(dc *api.CassandraDatacenter) (ManagementApiSecurityProvider, error)
type ManualManagementApiSecurityProvider ¶
type ManualManagementApiSecurityProvider struct { Namespace string Config *api.ManagementApiAuthManualConfig }
func (*ManualManagementApiSecurityProvider) AddServerSecurity ¶
func (provider *ManualManagementApiSecurityProvider) AddServerSecurity(pod *corev1.PodTemplateSpec) error
func (*ManualManagementApiSecurityProvider) BuildHttpClient ¶
func (provider *ManualManagementApiSecurityProvider) BuildHttpClient(client client.Client, ctx context.Context) (HttpClient, error)
func (*ManualManagementApiSecurityProvider) BuildMgmtApiWgetAction ¶
func (provider *ManualManagementApiSecurityProvider) BuildMgmtApiWgetAction(endpoint string) *corev1.ExecAction
func (*ManualManagementApiSecurityProvider) BuildMgmtApiWgetPostAction ¶
func (provider *ManualManagementApiSecurityProvider) BuildMgmtApiWgetPostAction(endpoint string, postData string) *corev1.ExecAction
func (*ManualManagementApiSecurityProvider) GetProtocol ¶
func (provider *ManualManagementApiSecurityProvider) GetProtocol() string
func (*ManualManagementApiSecurityProvider) ValidateConfig ¶
type NoPodIPError ¶
type NoPodIPError error
type NodeMgmtClient ¶
type NodeMgmtClient struct { Client HttpClient Log logr.Logger Protocol string }
func (*NodeMgmtClient) CallCreateRoleEndpoint ¶
func (client *NodeMgmtClient) CallCreateRoleEndpoint(pod *corev1.Pod, username string, password string, superuser bool) error
Create a new superuser with the given username and password
func (*NodeMgmtClient) CallDecommissionNodeEndpoint ¶
func (client *NodeMgmtClient) CallDecommissionNodeEndpoint(pod *corev1.Pod) error
func (*NodeMgmtClient) CallDrainEndpoint ¶
func (client *NodeMgmtClient) CallDrainEndpoint(pod *corev1.Pod) error
func (*NodeMgmtClient) CallKeyspaceCleanupEndpoint ¶
func (*NodeMgmtClient) CallLifecycleStartEndpoint ¶
func (client *NodeMgmtClient) CallLifecycleStartEndpoint(pod *corev1.Pod) error
func (*NodeMgmtClient) CallLifecycleStartEndpointWithReplaceIp ¶
func (client *NodeMgmtClient) CallLifecycleStartEndpointWithReplaceIp(pod *corev1.Pod, replaceIp string) error
func (*NodeMgmtClient) CallMetadataEndpointsEndpoint ¶
func (client *NodeMgmtClient) CallMetadataEndpointsEndpoint(pod *corev1.Pod) (CassMetadataEndpoints, error)
func (*NodeMgmtClient) CallProbeClusterEndpoint ¶
func (*NodeMgmtClient) CallReloadSeedsEndpoint ¶
func (client *NodeMgmtClient) CallReloadSeedsEndpoint(pod *corev1.Pod) error
Click to show internal directories.
Click to hide internal directories.