common

package
v4.3.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 18, 2025 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Overview

Copyright 2025 IBM Corporation

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckListDifference

func CheckListDifference(slice1 []string, slice2 []string) bool

func Contains

func Contains(list []string, s string) bool

func GetFirstNCharacter added in v4.2.10

func GetFirstNCharacter(str string, n int) string

func GetListDifference

func GetListDifference(slice1 []string, slice2 []string) []string

func GetOperatorNamespace

func GetOperatorNamespace() (string, error)

GetOperatorNamespace returns the namespace the operator should be running in.

func GetOwnerReferenceUIDs

func GetOwnerReferenceUIDs(ownerRefs []metav1.OwnerReference) []types.UID

func GetResourcesDynamically

func GetResourcesDynamically(ctx context.Context, dynamic dynamic.Interface, group string, version string, resource string, labelSelector metav1.LabelSelector) (
	[]unstructured.Unstructured, error)

func MakeSet

func MakeSet(strs []string) gset.Set

func NewNSSCache added in v4.3.1

func NewNSSCache(watchNamespaceList []string, opts ctrl.Options) ctrl.Options

NewCSCache implements a customized cache with a for CS

func Reverse

func Reverse(original []string) []string

func StringSliceContentEqual

func StringSliceContentEqual(slice1, slice2 []string) bool

StringSliceContentEqual checks if the contant from two string slice are the same

func ToStringSlice

func ToStringSlice(set gset.Set) []string

func UIDContains

func UIDContains(list []types.UID, s types.UID) bool

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL