Documentation ¶
Index ¶
- Constants
- func AddAnnotation(obj metav1.Object, key string, value string)
- func AddLabel(obj metav1.Object, key string, value string)
- 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 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 Retry(attempts int, sleep time.Duration, f func() error) error
- func ToJsonOrDie(value interface{}) []byte
- 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 GetResourceRequirements ¶
func GetResourceRequirements(name string) corev1.ResourceRequirements
func HTTPGetAndParseBody ¶
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.