Documentation
¶
Index ¶
- Variables
- func CalculateHashes(fromCluster *unstructured.Unstructured, ...) (string, string, error)
- func CheckCRD(config *rest.Config, apiGroupVersion string, kind string) (bool, error)
- func CombineData(dataStructs ...interface{}) map[string]interface{}
- func Concat(s ...string) string
- func GetHost(ctx context.Context, k8sClient client.Client, name string, ns string) (string, error)
- func GetImage(imageName string) string
- func GetOperatorNamespace() string
- func GetSecretData(ctx context.Context, k8sClient client.Client, secretName, ns, dataKey string) (string, error)
- func GetWatchNamespace() string
- func IndentCert(cert string, indentSpaces int) string
- func InsertColonInURL(redisURL string) string
- func MergeCR(defaultCR, changedCR []byte) map[string]interface{}
- func MergeResources(fromCluster, fromTemplate *unstructured.Unstructured) (*unstructured.Unstructured, error)
- func NewUnstructured(group, kind, version string) *unstructured.Unstructured
- func RandStrings(lengths ...int) ([][]byte, error)
- func ReplaceImages(resource string) (result string)
- func ResourceExists(dc discovery.DiscoveryInterface, apiGroupVersion, kind string) (bool, error)
- func SetHashAnnotation(obj *unstructured.Unstructured, hash string)
- func WaitForDeploymentReady(ctx context.Context, k8sClient client.Client, ns, label string) error
- func WaitForJob(ctx context.Context, k8sClient client.Client, ns, name string) error
- func WaitForOperandReady(ctx context.Context, k8sClient client.Client, opreqName, ns string) error
- func WaitForOperatorReady(ctx context.Context, k8sClient client.Client, opreqName, ns string) error
- func WaitForRediscp(ctx context.Context, k8sClient client.Client, ...) error
Constants ¶
This section is empty.
Variables ¶
var (
ImageList = []string{"RELATED_IMAGE_MCSP_UTILS", "RELATED_IMAGE_ACCOUNT_IAM", "RELATED_IMAGE_MCSP_IM_CONFIG_JOB", "RELATED_IMAGE_INSTANCE_MANAGEMENT_SERVICE", "RELATED_IMAGE_API_SERVICE"}
)
Functions ¶
func CalculateHashes ¶
func CalculateHashes(fromCluster *unstructured.Unstructured, fromTemplate *unstructured.Unstructured) (string, string, error)
CalculateHashes calculates the hash for the existing cluster resource and the new template resource
func CombineData ¶
func CombineData(dataStructs ...interface{}) map[string]interface{}
func GetOperatorNamespace ¶
func GetOperatorNamespace() string
GetOperatorNamespace returns the Namespace of the operator
func GetSecretData ¶
func GetSecretData(ctx context.Context, k8sClient client.Client, secretName, ns, dataKey string) (string, error)
GetSecretData gets the data from a secret
func GetWatchNamespace ¶
func GetWatchNamespace() string
GetWatchNamespace returns the Namespace of the operator
func IndentCert ¶
indentCertificate to add indentation to each line of the certificate
func InsertColonInURL ¶
InsertColonInRedisURL inserts colon in the redis URL SSL
func MergeResources ¶
func MergeResources(fromCluster, fromTemplate *unstructured.Unstructured) (*unstructured.Unstructured, error)
MergeResources merges two complete unstructured Kubernetes resources
func NewUnstructured ¶
func NewUnstructured(group, kind, version string) *unstructured.Unstructured
NewUnstructured return Unstructured object
func RandStrings ¶
RandStrings generates series of random strings by given lengths
func ReplaceImages ¶
func ResourceExists ¶
func ResourceExists(dc discovery.DiscoveryInterface, apiGroupVersion, kind string) (bool, error)
ResourceExists returns true if the given resource kind exists in the given api groupversion
func SetHashAnnotation ¶
func SetHashAnnotation(obj *unstructured.Unstructured, hash string)
SetHashAnnotation sets the hash annotation in the object
func WaitForDeploymentReady ¶
WaitForDeploymentReady waits for the deployment to be ready
func WaitForJob ¶
WaitForJob waits for the job to be succeeded
func WaitForOperandReady ¶
WaitForOperandReady checks if all services in OperandRequest are ready
func WaitForOperatorReady ¶
WaitForOperatorReady check operator status in OperandRequest
Types ¶
This section is empty.