Documentation ¶
Index ¶
- Constants
- func AddAnnotation(obj client.Object, key string, value string)
- func AddFinalizer(obj client.Object, finalizer string) bool
- func AddLabel(obj client.Object, key string, value string)
- func AddOwnerReference(owner, res client.Object, scheme *runtime.Scheme, isController bool) error
- func Contains(slice []string, s string) bool
- func DeploymentNameFromPodName(podName string) (string, error)
- func GetResourceRequirements(name string) corev1.ResourceRequirements
- func HTTPGetAndParseBody(endpoint string) (string, error)
- func HandleMissingWatch(missingCRDName string)
- func IMDSFetchIPv4CIDR(imdsServerAddr string) (string, error)
- func MapItems(source []string, transform func(string) string) []string
- func MarshalRookResourceRequirements(reqList RookResourceRequirementsList) string
- func Remove(slice []string, s string) (result []string)
- func RemoveFinalizer(obj client.Object, finalizer string) bool
- func Retry(attempts int, sleep time.Duration, f func() error) error
- func ToJsonOrDie(value interface{}) []byte
- func ToPointer[T any](v T) *T
- type RookResourceRequirements
- type RookResourceRequirementsList
Constants ¶
View Source
const ( // https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instancedata-data-retrieval.html IMDSv1Server = "http://169.254.169.254" IMDSConfigMapName = "aws-data" CIDRKey = "vpc-cidr" )
Variables ¶
This section is empty.
Functions ¶
func AddOwnerReference ¶
func GetResourceRequirements ¶
func GetResourceRequirements(name string) corev1.ResourceRequirements
func HTTPGetAndParseBody ¶
func HandleMissingWatch ¶
func HandleMissingWatch(missingCRDName string)
func IMDSFetchIPv4CIDR ¶
func MarshalRookResourceRequirements ¶
func MarshalRookResourceRequirements(reqList RookResourceRequirementsList) string
func ToJsonOrDie ¶
func ToJsonOrDie(value interface{}) []byte
Types ¶
type RookResourceRequirements ¶
type RookResourceRequirements struct { Name string Resource corev1.ResourceRequirements `json:"resource,omitempty"` }
The Rook config requires the resources requirements in yaml format. Marshalling corev1.ResourceRequirements into yaml does not render the Quantity values as need. This type and the below helper function are used so that the resource configurations in reconcileRookCephOperatorConfig are marshalled properly.
type RookResourceRequirementsList ¶
type RookResourceRequirementsList []RookResourceRequirements
Click to show internal directories.
Click to hide internal directories.