Documentation ¶
Index ¶
- Constants
- Variables
- func GetRefreenceS3Connection(ctx context.Context, client *client.Client, name string) (*v1alpha1.S3Connection, error)
- func NewConfigMapReconciler(client *client.Client, clusterConfig *sparkv1alpha1.ClusterConfigSpec, ...) *reconciler.SimpleResourceReconciler[*ConfigMapBuilder]
- func NewDeploymentReconciler(client *resourceClient.Client, roleGroupInfo reconciler.RoleGroupInfo, ...) (*reconciler.Deployment, error)
- type ClusterReconciler
- type ConfigMapBuilder
- type DeploymentBuilder
- type NodeRoleReconciler
- type S3BucketConnect
- func GetInlineS3Bucket(ctx context.Context, client *client.Client, s3Bucket *v1alpha1.S3BucketSpec) (*S3BucketConnect, error)
- func GetReferenceS3Bucket(ctx context.Context, client *client.Client, name string) (*S3BucketConnect, error)
- func GetS3BucketConnect(ctx context.Context, client *client.Client, s3 *shsv1alpha1.BucketSpec) (*S3BucketConnect, error)
- type S3Logconfig
- func (s *S3Logconfig) GetEndpoint() string
- func (s *S3Logconfig) GetLogDirectory() string
- func (s *S3Logconfig) GetMountPath() string
- func (s *S3Logconfig) GetPartialCmdArgs() string
- func (s *S3Logconfig) GetPartialProperties() map[string]string
- func (s *S3Logconfig) GetVolume() *corev1.Volume
- func (s *S3Logconfig) GetVolumeMount() *corev1.VolumeMount
- func (s *S3Logconfig) GetVolumeName() string
- type SparkHistoryServerReconciler
Constants ¶
View Source
const ( SparkConfigDefauleFileName = "spark-defaults.conf" SparkHistoryContainerName = "spark-history" LogVolumeName = "log" ConfigVolumeName = "config" )
View Source
const ( S3AccessKeyName = "ACCESS_KEY" S3SecretKeyName = "SECRET_KEY" S3VolumeName = "s3-credentials" )
Variables ¶
View Source
var ( SparkHistoryPorts = []corev1.ContainerPort{ { Name: "http", ContainerPort: 18080, }, } OidcPorts = []corev1.ContainerPort{ { Name: "oidc", ContainerPort: 4180, }, } )
Functions ¶
func NewConfigMapReconciler ¶
func NewConfigMapReconciler( client *client.Client, clusterConfig *sparkv1alpha1.ClusterConfigSpec, roleGroupInfo reconciler.RoleGroupInfo, roleGroupConfig *sparkv1alpha1.ConfigSpec, options ...builder.Option, ) *reconciler.SimpleResourceReconciler[*ConfigMapBuilder]
func NewDeploymentReconciler ¶
func NewDeploymentReconciler( client *resourceClient.Client, roleGroupInfo reconciler.RoleGroupInfo, clusterConfig *shsv1alpha1.ClusterConfigSpec, ports []corev1.ContainerPort, image *util.Image, replicas *int32, stopped bool, overrides *commonsv1alpha1.OverridesSpec, roleGroupConfig *commonsv1alpha1.RoleGroupConfigSpec, options ...builder.Option, ) (*reconciler.Deployment, error)
Types ¶
type ClusterReconciler ¶
type ClusterReconciler struct { reconciler.BaseCluster[*shsv1alpha1.SparkHistoryServerSpec] ClusterConfig *shsv1alpha1.ClusterConfigSpec }
func NewClusterReconciler ¶
func NewClusterReconciler( client *resourceClient.Client, clusterInfo reconciler.ClusterInfo, spec *shsv1alpha1.SparkHistoryServerSpec, ) *ClusterReconciler
func (*ClusterReconciler) GetImage ¶
func (r *ClusterReconciler) GetImage() *util.Image
func (*ClusterReconciler) RegisterResource ¶
func (r *ClusterReconciler) RegisterResource(ctx context.Context) error
type ConfigMapBuilder ¶
type ConfigMapBuilder struct { builder.ConfigMapBuilder ClusteerConfig *sparkv1alpha1.ClusterConfigSpec RoleGroupConfig *sparkv1alpha1.ConfigSpec ClusterName string RoleName string RoleGroupName string }
func NewSparkConfigMapBuilder ¶
func NewSparkConfigMapBuilder( client *client.Client, name string, clusterConfig *sparkv1alpha1.ClusterConfigSpec, roleGroupConfig *sparkv1alpha1.ConfigSpec, options ...builder.Option, ) *ConfigMapBuilder
func (*ConfigMapBuilder) Build ¶
func (b *ConfigMapBuilder) Build(ctx context.Context) (ctrlclient.Object, error)
type DeploymentBuilder ¶
type DeploymentBuilder struct { builder.Deployment Ports []corev1.ContainerPort ClusteerConfig *shsv1alpha1.ClusterConfigSpec ClusterName string RoleName string }
func NewDeploymentBuilder ¶
func NewDeploymentBuilder( client *resourceClient.Client, name string, clusterConfig *shsv1alpha1.ClusterConfigSpec, replicas *int32, ports []corev1.ContainerPort, image *util.Image, overrides *commonsv1alpha1.OverridesSpec, roleGroupConfig *commonsv1alpha1.RoleGroupConfigSpec, options ...builder.Option, ) *DeploymentBuilder
func (*DeploymentBuilder) Build ¶
func (b *DeploymentBuilder) Build(ctx context.Context) (ctrlclient.Object, error)
type NodeRoleReconciler ¶
type NodeRoleReconciler struct { reconciler.BaseRoleReconciler[*shsv1alpha1.RoleSpec] ClusterConfig *shsv1alpha1.ClusterConfigSpec Image *util.Image }
func NewNodeRoleReconciler ¶
func NewNodeRoleReconciler( client *resourceClient.Client, clusterStopped bool, clusterConfig *shsv1alpha1.ClusterConfigSpec, roleInfo reconciler.RoleInfo, image *util.Image, spec *shsv1alpha1.RoleSpec, ) *NodeRoleReconciler
func (*NodeRoleReconciler) GetImageResourceWithRoleGroup ¶
func (r *NodeRoleReconciler) GetImageResourceWithRoleGroup( info reconciler.RoleGroupInfo, replicas *int32, config *shsv1alpha1.ConfigSpec, overrides *commonsv1alpha1.OverridesSpec, ) ([]reconciler.Reconciler, error)
func (*NodeRoleReconciler) RegisterResources ¶
func (r *NodeRoleReconciler) RegisterResources(ctx context.Context) error
type S3BucketConnect ¶
type S3BucketConnect struct { Endpoint url.URL Bucket string Region string PathStyle bool // contains filtered or unexported fields }
TODO: Add the tls verification
func GetInlineS3Bucket ¶
func GetInlineS3Bucket(ctx context.Context, client *client.Client, s3Bucket *v1alpha1.S3BucketSpec) (*S3BucketConnect, error)
func GetReferenceS3Bucket ¶
func GetS3BucketConnect ¶
func GetS3BucketConnect(ctx context.Context, client *client.Client, s3 *shsv1alpha1.BucketSpec) (*S3BucketConnect, error)
type S3Logconfig ¶
type S3Logconfig struct { S3BucketConnect *S3BucketConnect LogPath string }
func NewS3Logconfig ¶
func NewS3Logconfig( ctx context.Context, client *client.Client, s3 *shsv1alpha1.S3Spec, ) (*S3Logconfig, error)
func (*S3Logconfig) GetEndpoint ¶
func (s *S3Logconfig) GetEndpoint() string
func (*S3Logconfig) GetLogDirectory ¶
func (s *S3Logconfig) GetLogDirectory() string
func (*S3Logconfig) GetMountPath ¶
func (s *S3Logconfig) GetMountPath() string
func (*S3Logconfig) GetPartialCmdArgs ¶
func (s *S3Logconfig) GetPartialCmdArgs() string
func (*S3Logconfig) GetPartialProperties ¶
func (s *S3Logconfig) GetPartialProperties() map[string]string
func (*S3Logconfig) GetVolume ¶
func (s *S3Logconfig) GetVolume() *corev1.Volume
func (*S3Logconfig) GetVolumeMount ¶
func (s *S3Logconfig) GetVolumeMount() *corev1.VolumeMount
func (*S3Logconfig) GetVolumeName ¶
func (s *S3Logconfig) GetVolumeName() string
type SparkHistoryServerReconciler ¶
type SparkHistoryServerReconciler struct { ctrlclient.Client Scheme *runtime.Scheme }
SparkHistoryServerReconciler reconciles a SparkHistoryServer object
func (*SparkHistoryServerReconciler) SetupWithManager ¶
func (r *SparkHistoryServerReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
Click to show internal directories.
Click to hide internal directories.