Documentation ¶
Index ¶
- Constants
- func ArePodsAllReady(pods []corev1.Pod) bool
- func ArePodsAllScheduled(pods []corev1.Pod) bool
- func BuildPodMap(pods []corev1.Pod, keyFunc func(pod *corev1.Pod) string) map[string]*corev1.Pod
- func ContainsOnlyFinalizer(obj client.Object, finalizer string) bool
- func FilterPodsBy(pods []corev1.Pod, filter func(pod *corev1.Pod) bool) []corev1.Pod
- func GB(m *resource.Quantity) float64
- func GenerateResource(cpu float64, mem float64) (re map[corev1.ResourceName]resource.Quantity)
- func GetContainerFromPod(pod *corev1.Pod, name string) *corev1.Container
- func GetContainerFromPodSpec(podSpec *corev1.PodSpec, name string) *corev1.Container
- func GetEnvVarFromSecret(sctName, name, key string, opt bool) corev1.EnvVar
- func IsAllPodsReady(pods []corev1.Pod) bool
- func IsPodDeleted(po *corev1.Pod) bool
- func IsPodDeletedOrFailed(po *corev1.Pod) bool
- func IsPodFailed(po *corev1.Pod) bool
- func IsPodReady(pod *corev1.Pod) bool
- func IsPodRunning(pod *corev1.Pod) bool
- func IsPodScheduled(po *corev1.Pod) bool
- func ParseCPUWithUnit(cpu float64, unit string) (re resource.Quantity, err error)
- func ParseMemoryWithUnit(mem float64, unit string) (re resource.Quantity, err error)
- type JSON6902
- func (patch *JSON6902) Add(path ...string) func(value interface{}) *JSON6902
- func (patch JSON6902) Bytes() ([]byte, error)
- func (patch JSON6902) Data(client.Object) ([]byte, error)
- func (patch JSON6902) IsEmpty() bool
- func (patch *JSON6902) Remove(path ...string) *JSON6902
- func (patch *JSON6902) Replace(path ...string) func(value interface{}) *JSON6902
- func (patch JSON6902) Type() types.PatchType
- type Merge7386
- func (patch *Merge7386) Add(path ...string) func(value interface{}) *Merge7386
- func (patch Merge7386) Bytes() ([]byte, error)
- func (patch Merge7386) Data(client.Object) ([]byte, error)
- func (patch Merge7386) IsEmpty() bool
- func (patch *Merge7386) PatchAnnos(actual, old map[string]string)
- func (patch *Merge7386) PatchByteMap(path []string, actual, old map[string][]byte)
- func (patch *Merge7386) PatchLabels(actual, old map[string]string)
- func (patch *Merge7386) PatchStringMap(path []string, actual, old map[string]string)
- func (patch *Merge7386) Remove(path ...string) *Merge7386
- func (patch Merge7386) Type() types.PatchType
Constants ¶
const ( B float64 = 1 KiB = 1024 * B MiB = 1024 * KiB GiB = 1024 * MiB )
Variables ¶
This section is empty.
Functions ¶
func ArePodsAllReady ¶
func ArePodsAllScheduled ¶
func BuildPodMap ¶
func FilterPodsBy ¶
func GenerateResource ¶
func GetContainerFromPodSpec ¶
func GetEnvVarFromSecret ¶
func IsAllPodsReady ¶
func IsPodDeleted ¶
func IsPodDeletedOrFailed ¶
func IsPodFailed ¶
func IsPodReady ¶
func IsPodRunning ¶
func IsPodScheduled ¶
func ParseCPUWithUnit ¶
Types ¶
type JSON6902 ¶
type JSON6902 []interface{}
JSON6902 represents a JSON Patch according to RFC 6902; the same as k8s.io/apimachinery/pkg/types.JSONPatchType.
func NewJSONPatch ¶
func NewJSONPatch() *JSON6902
NewJSONPatch creates a new JSON Patch according to RFC 6902; the same as k8s.io/apimachinery/pkg/types.JSONPatchType.
func (*JSON6902) Add ¶
Add appends an "add" operation to patch.
> The "add" operation performs one of the following functions, > depending upon what the target location references: > > o If the target location specifies an array index, a new value is > inserted into the array at the specified index. > > o If the target location specifies an object member that does not > already exist, a new member is added to the object. > > o If the target location specifies an object member that does exist, > that member's value is replaced.
func (*JSON6902) Remove ¶
Remove appends a "remove" operation to patch.
> The "remove" operation removes the value at the target location. > > The target location MUST exist for the operation to be successful.
type Merge7386 ¶
type Merge7386 map[string]interface{}
Merge7386 represents a JSON Merge Patch according to RFC 7386; the same as k8s.io/apimachinery/pkg/types.MergePatchType.
func NewMergePatch ¶
func NewMergePatch() *Merge7386
NewMergePatch creates a new JSON Merge Patch according to RFC 7386; the same as k8s.io/apimachinery/pkg/types.MergePatchType.
func (*Merge7386) Add ¶
Add modifies patch to indicate that the member at path should be added or replaced with value.
> If the provided merge patch contains members that do not appear > within the target, those members are added. If the target does > contain the member, the value is replaced. Null values in the merge > patch are given special meaning to indicate the removal of existing > values in the target.