operatorcommon

package
v0.0.0-...-14494c5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 22, 2023 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateResourceName

func CreateResourceName(maxLen int, minSubstrLen int, str ...string) string

CreateResourceName is a function that concatenates the parts from the input and checks, if the resulting string matches the maxLen condition. If it does not match, it reduces the subparts, starting with the first one (but leaving its length at least in minSubstrLen so it's not deleted completely) adn continuing with the rest if needed. Let's take WorkloadInstance as an example (3 parts: app, workload, version). First the app name is reduced if needed (only to minSubstrLen), afterwards workload and the version is not reduced at all. This pattern is chosen to not reduce only one part of the name (that can be completely gone afterwards), but to include all of the parts in the resulting string.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL