Skip to content

Operator fails with node group XX has volume claim template without storage class which is not allowed #198

Open
@cintoSunny

Description

The operator fails with node group historical has volume claim template without storage class which is not allowed
This is because there is no storageClassName in the Volume Claim Templates. This is the exact check

func validateNodeVolumeClaimTemplateSpec(nodeSpec *v1alpha1.DruidNodeSpec) error {

func validateNodeVolumeClaimTemplateSpec(nodeSpec *v1alpha1.DruidNodeSpec) error {
	for _, vct := range nodeSpec.VolumeClaimTemplates {
		if vct.Spec.StorageClassName == nil || *vct.Spec.StorageClassName == "" {
			return fmt.Errorf("node group %s has volume claim template without storage class which is not allowed: %s",
				nodeSpec.NodeType, vct.Name)
		}
	}
	return nil
}

This was recently added, and hence existing runs are failing that doesn't have this field - StorageClassName. Is there any particular reason we added this? I mean, apart from volumeExpansion do we need it anywhere? I can change the code accordingly.

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions