func ParseDeploymentForReplicaSet(name string) string {
	lastDash := strings.LastIndexAny(name, "-")
	if lastDash == -1 {
		// No dash
		return ""
	}
	suffix := name[lastDash+1:]
	if len(suffix) < 3 {
		// Suffix is variable length but we cutoff at 3+ characters
		return ""
	}

	if !utils.StringInRuneset(suffix, Digits) && !utils.StringInRuneset(suffix, KubeAllowedEncodeStringAlphaNums) {
		// Invalid suffix
		return ""
	}

	return name[:lastDash]
}
// ParseDeploymentForReplicaSet gets the deployment name from a replicaset,
// or returns an empty string if no parent deployment is found.
ParseDeploymentForReplicaSet gets the deployment name from a replicaset,
or returns an empty string if no parent deployment is found.
// ParseDeploymentForReplicaSet gets the deployment name from a replicaset // or returns an empty string if no parent deployment is found .
func ParseDeploymentForReplicaSet(name string) string {
	lastDash := strings.LastIndexAny(name, "-")
	if lastDash == -1 {
		return ""
	}
	suffix := name[lastDash+1:]
	if len(suffix) < 3 {
		return ""
	}
	if !utils.StringInRuneset(suffix, Digits) && !utils.StringInRuneset(suffix, KubeAllowedEncodeStringAlphaNums) {
		return ""
	}
	return name[:lastDash]
}
func ParseDeploymentForReplicaSet ( name string ) string { lastDash := strings . LastIndexAny ( name , " " ) if lastDash == - 1 { return " " } suffix := name [ lastDash + 1 : ] if len ( suffix ) < 3 { return " " } if ! utils . StringInRuneset ( suffix , Digits ) && ! utils . StringInRuneset ( suffix , KubeAllowedEncodeStringAlphaNums ) { return " " } return name [ : lastDash ] }
ParseDeploymentForReplicaSet gets the deployment name from a replicaset,
or returns an empty string if no parent deployment is found.
ParseDeploymentForReplicaSet gets the deployment name from a replicaset or returns an empty string if no parent deployment is found .
// No dash // Suffix is variable length but we cutoff at 3+ characters // Invalid suffix