Documentation
¶
Index ¶
- Constants
- func AddOrSwapString(strings []string, str string) (bool, []string)
- func AddString(finalizers []string, f string) []string
- func ContainString(finalizers []string, f string) bool
- func GetCronJobImage(obj *unstructured.Unstructured) (image []string)
- func GetDeploymentImage(obj *unstructured.Unstructured) (image []string)
- func GetHTTPEntryName(url string) string
- func GetJobImage(obj *unstructured.Unstructured) (image []string)
- func GetNamespace() (string, error)
- func GetOCIEntryName(url string) string
- func GetOperatorUser() string
- func GetPodImage(obj *unstructured.Unstructured) (image []string)
- func GetStatefulSetImage(obj *unstructured.Unstructured) (image []string)
- func IgnoreNotFound(err error) error
- func OmitManagedFields(o runtime.Object) runtime.Object
- func ParseContainerImage(containers []corev1.Container) (image []string)
- func ParseValues(dir string, reference *apiextensionsv1.JSON) (fileName string, err error)
- func RemoveString(finalziers []string, f string) []string
- func ResourceDiffStr(ctx context.Context, source, exist *unstructured.Unstructured, ...) (string, error)
- func SetOperatorUser(ctx context.Context, c client.Client) (string, error)
- func SplitYAML(yamlData []byte) ([]*unstructured.Unstructured, error)
- func SplitYAMLToString(yamlData []byte) ([]string, error)
Constants ¶
const InClusterNamespacePath = "/var/run/secrets/kubernetes.io/serviceaccount/namespace"
Variables ¶
This section is empty.
Functions ¶
func AddOrSwapString ¶
AddOrSwapString Add an element to the string array, swap it with the last element if it is in the array, or append it directly to the end if it does not exist. Gives whether the array has changed
Example: [], "a" -> true, []string{"a"} ["a"], "b" -> true, []string{"a", "b"} ["a", "b"], "a" -> true, []string{"b", "a"} ["a", "b", "a"], "a" -> false, []string{"a", "b", "a"}
func ContainString ¶
func GetCronJobImage ¶
func GetCronJobImage(obj *unstructured.Unstructured) (image []string)
func GetDeploymentImage ¶
func GetDeploymentImage(obj *unstructured.Unstructured) (image []string)
func GetHTTPEntryName ¶ added in v0.1.6
func GetJobImage ¶
func GetJobImage(obj *unstructured.Unstructured) (image []string)
func GetNamespace ¶ added in v0.1.3
func GetOCIEntryName ¶ added in v0.1.4
func GetOperatorUser ¶ added in v0.1.3
func GetOperatorUser() string
func GetPodImage ¶
func GetPodImage(obj *unstructured.Unstructured) (image []string)
func GetStatefulSetImage ¶
func GetStatefulSetImage(obj *unstructured.Unstructured) (image []string)
func IgnoreNotFound ¶
IgnoreNotFound returns the supplied error, or nil if the error indicates a Kubernetes resource was not found.
func ParseContainerImage ¶
func ParseValues ¶
func ParseValues(dir string, reference *apiextensionsv1.JSON) (fileName string, err error)
ParseValues parses Values
func RemoveString ¶
func ResourceDiffStr ¶
func ResourceDiffStr(ctx context.Context, source, exist *unstructured.Unstructured, ignorePaths []string, c client.Client) (string, error)
func SetOperatorUser ¶ added in v0.1.3
func SplitYAML ¶
func SplitYAML(yamlData []byte) ([]*unstructured.Unstructured, error)
SplitYAML splits a YAML file into unstructured objects. Returns list of all unstructured objects found in the yaml. If an error occurs, returns objects that have been parsed so far too. inspire by github.com/argoproj/gitops-engine/pkg/utils/kube
func SplitYAMLToString ¶
SplitYAMLToString splits a YAML file into strings. Returns list of yamls found in the yaml. If an error occurs, returns objects that have been parsed so far too. inspire by github.com/argoproj/gitops-engine/pkg/utils/kube
Types ¶
This section is empty.