Documentation ¶
Index ¶
- func BoolPointer(b bool) *bool
- func ContainsString(slice []string, s string) bool
- func EmptyTypedFloatSlice(f ...float64) []interface{}
- func EmptyTypedStrSlice(s ...string) []interface{}
- func GetAPIServerCertSANs(c *devopsv1.Cluster) []string
- func GetIndexedIP(subnet string, index int) (net.IP, error)
- func GetNodeCIDRMaskSize(clusterCIDR string, maxNodePodNum int32) (int32, error)
- func GetServiceCIDRAndNodeCIDRMaskSize(clusterCIDR string, maxClusterServiceNum int32, maxNodePodNum int32) (string, int32, error)
- func GroupVersionKindsHasKind(gvks []schema.GroupVersionKind, kind string) bool
- func Int64Pointer(i int64) *int64
- func IntPointer(i int32) *int32
- func IntstrPointer(i int) *intstr.IntOrString
- func IsObjectChanged(oldObj, newObj runtime.Object, ignoreStatusChange bool) (bool, error)
- func LoadObjs(f io.Reader) ([]client.Object, error)
- func MarshalToYaml(obj runtime.Object, gv schema.GroupVersion) ([]byte, error)
- func MarshalToYamlForCodecs(obj runtime.Object, gv schema.GroupVersion, codecs serializer.CodecFactory) ([]byte, error)
- func MergeMultipleStringMaps(stringMaps ...map[string]string) map[string]string
- func MergeStringMaps(l map[string]string, l2 map[string]string) map[string]string
- func ObjectMeta(name string, labels map[string]string, obj runtime.Object) metav1.ObjectMeta
- func PointerToBool(flag *bool) bool
- func PointerToInt32(i *int32) int32
- func PointerToString(s *string) string
- func Reconcile(log logr.Logger, cli client.Client, desired client.Object, ...) error
- func ReconcileCRDs(cfg *rest.Config, crds []*apiextensionsv1.CustomResourceDefinition) error
- func ReconcileNamespaceLabelsIgnoreNotFound(log logr.Logger, cli client.Client, namespace string, labels map[string]string, ...) error
- func RemoveNonYAMLLines(yms string) string
- func RemoveString(slice []string, s string) (result []string)
- func StrPointer(s string) *string
- func UnmarshalFromYaml(buffer []byte, gv schema.GroupVersion) (runtime.Object, error)
- func UnmarshalFromYamlForCodecs(buffer []byte, gv schema.GroupVersion, codecs serializer.CodecFactory) (runtime.Object, error)
- type DesiredState
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BoolPointer ¶
func ContainsString ¶
func EmptyTypedFloatSlice ¶
func EmptyTypedFloatSlice(f ...float64) []interface{}
func EmptyTypedStrSlice ¶
func EmptyTypedStrSlice(s ...string) []interface{}
func GetAPIServerCertSANs ¶
GetAPIServerCertSANs returns extra APIServer's certSANs need to pass kubeadm
func GetNodeCIDRMaskSize ¶
func GroupVersionKindsHasKind ¶
func GroupVersionKindsHasKind(gvks []schema.GroupVersionKind, kind string) bool
GroupVersionKindsHasKind returns whether the following gvk slice contains the kind given as a parameter
func Int64Pointer ¶
func IntPointer ¶
func IntstrPointer ¶
func IntstrPointer(i int) *intstr.IntOrString
func IsObjectChanged ¶
IsObjectChanged checks whether there is an actual difference between the two objects
func MarshalToYaml ¶
MarshalToYaml marshals an object into yaml.
func MarshalToYamlForCodecs ¶
func MarshalToYamlForCodecs(obj runtime.Object, gv schema.GroupVersion, codecs serializer.CodecFactory) ([]byte, error)
MarshalToYamlForCodecs marshals an object into yaml using the specified codec TODO: Is specifying the gv really needed here? TODO: Can we support json out of the box easily here?
func MergeMultipleStringMaps ¶
func MergeStringMaps ¶
func ObjectMeta ¶
func PointerToBool ¶
func PointerToInt32 ¶
func PointerToString ¶
func ReconcileCRDs ¶
func ReconcileCRDs(cfg *rest.Config, crds []*apiextensionsv1.CustomResourceDefinition) error
nolint ReconcileCRDs crds apply must before manager cache start, so crds apply need use raw kubernetes client
func ReconcileNamespaceLabelsIgnoreNotFound ¶
func ReconcileNamespaceLabelsIgnoreNotFound(log logr.Logger, cli client.Client, namespace string, labels map[string]string, labelsToRemove []string) error
ReconcileNamespaceLabelsIgnoreNotFound patches namespaces by adding/removing labels, returns without error if namespace is not found
func RemoveNonYAMLLines ¶
func RemoveString ¶
func StrPointer ¶
func UnmarshalFromYaml ¶
UnmarshalFromYaml unmarshals yaml into an object.
func UnmarshalFromYamlForCodecs ¶
func UnmarshalFromYamlForCodecs(buffer []byte, gv schema.GroupVersion, codecs serializer.CodecFactory) (runtime.Object, error)
UnmarshalFromYamlForCodecs unmarshals yaml into an object using the specified codec TODO: Is specifying the gv really needed here? TODO: Can we support json out of the box easily here?
Types ¶
type DesiredState ¶
type DesiredState string
const ( DesiredStatePresent DesiredState = "present" DesiredStateAbsent DesiredState = "absent" )