Skip to content

Conversation

@HoustonPutman
Copy link
Contributor

Addresses feature requests in: #63, #55

Describe your changes
Adding many configuration options for the Solr StatefulSet and Pods.

These options are flexible and should be able to be easily extended in the future for new options.

Options being added:

// StatefulSetOptions defines custom options for StatefulSets
type StatefulSetOptions struct {
	// Annotations to be added for the solrCloud Services.
	// +optional
	Annotations map[string]string `json:"annotations,omitempty"`

	// Labels to be added for the solrCloud Services.
	// +optional
	Labels map[string]string `json:"labels,omitempty"`
}

// PodOptions defines the common pod configuration for Pods, including when used
// in deployments, stateful-sets, etc.
type PodOptions struct {
	// The scheduling constraints on pods.
	// +optional
	Affinity *corev1.Affinity `json:"affinity,omitempty"`

	// Resources is the resource requirements for the container.
	// This field cannot be updated once the cluster is created.
	// +optional
	Resources corev1.ResourceRequirements `json:"resources,omitempty"`

	// Additional non-data volumes to load into the default container.
	// +optional
	Volumes []AdditionalVolume `json:"volumes,omitempty"`

	// PodSecurityContext is the security context for the pod.
	// +optional
	PodSecurityContext *corev1.PodSecurityContext `json:"podSecurityContext,omitempty"`

	// Additional environment variables to pass to the default container.
	// +optional
	EnvVariables []corev1.EnvVar `json:"envVars,omitempty"`

	// Annotations to be added for pods.
	// +optional
	Annotations map[string]string `json:"annotations,omitempty"`

	// Labels to be added for pods.
	// +optional
	Labels map[string]string `json:"labels,omitempty"`
}

Deprecation

Because of this change, we are moving Spec.solrPodOptions to a new location: Spec.customSolrKubeOptions.podOptions. The old location will still be available until the release of v0.3.0

@HoustonPutman
Copy link
Contributor Author

Still need to add unit tests for the non label/annotation options. But the label/annotation options are well tested.

@sepulworld
Copy link
Contributor

Awesome!!

@HoustonPutman
Copy link
Contributor Author

I tested this locally and it worked fairly well for me

Signed-off-by: Houston Putman <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants