package
3.2.0+incompatible
Repository: https://github.com/blackducksoftware/synopsysctl.git
Documentation: pkg.go.dev

# Functions

Base64Decode will return a decoded string using a URL-compatible base64 format; decoding may return an error, which you can check if you don’t already know the input to be well-formed.
Base64Encode will return an encoded string using a URL-compatible base64 format.
BoolToPtr will convert bool to pointer.
CompareVersions returns an int representing version comparison if version1 < version2 -> -1 if version1 == version2 -> 0 if version1 > version2 -> 1.
CompareVersionsHelper ...
ConvertFilesFromChartToMap checks whether an file exist in the chart.
CreateExecContainerRequest will create the request to exec into Kubernetes pod.
CreateHelmActionConfiguration creates an action.Configuration that points to the specified cluster and namespace.
CreateKubeService will create the kubernetes service.
CreateNamespace will create the namespace.
CreatePersistentVolume will create the persistent volume.
CreateRoute creates an OpenShift routes.
CreateSecret will create the secret.
CreateSecretFromFile will create the secret from file.
CreateWithHelm3 uses the helm NewInstall action to create a resource in the cluster Modified from https://github.com/openshift/console/blob/cdf6b189b71e488033ecaba7d90258d9f9453478/pkg/helm/actions/install_chart.go Helm Actions: https://github.com/helm/helm/tree/9bc7934f350233fa72a11d2d29065aa78ab62792/pkg/action.
DeepCopyHelmValuesMap copies the src map to the dest map.
DeleteClusterRole delete a cluster role.
DeleteClusterRoleBinding delete a cluster role binding.
DeleteConfigMap will delete the config map.
DeleteDeployment will delete the deployment corresponding to a namespace and name.
DeleteNamespace will delete the namespace.
DeletePersistentVolume will delete the persistent volume.
DeletePod will delete the input pods corresponding to a namespace.
DeletePVC will delete the PVC information for the input pvc name inside the input namespace.
DeleteReplicationController will delete the replication controller corresponding to a namespace and name.
DeleteRole delete a role.
DeleteRoleBinding delete a role binding.
DeleteRoute deletes an OpenShift routes.
DeleteSecret will delete the secret.
DeleteService will delete the service information for the input service name inside the input namespace.
DeleteServiceAccount delete a service account.
DeleteWithHelm3 uses the helm NewUninstall action to delete a resource from the cluster.
EnsureFilterPodsByNamePrefixInNamespaceToZero filters the pods based on the prefix and make sure that it is zero.
ExecContainer will exec into the container and run the commands provided in the input.
FilterPodByNamePrefix will filter the pod based on pod name prefix from a list a pods.
FilterPodByNamePrefixInNamespace will filter the pod based on pod name prefix from a list a pods in a given namespace.
GeneratePemSelfSignedCertificateAndKey returns a self-signed certificate and its key.
GetActionConfigurations creates an action.Configuration that points to the specified cluster and namespace TODO - this function specifies more values than CreateHelmActionConfiguration(), consider using this.
GetChartURLs ..
GetClusterRole get a cluster role.
GetClusterRoleBinding get a cluster role.
GetConfigMap will get the config map.
GetDeployment will get the deployment corresponding to a namespace and name.
GetDeploymentResources reads the deployment resource file path and sets the Helm resource maps.
GetHelmValueFromMap returns an interface{} if the value exists in the map.
GetIndexFile ...
GetKubernetesVersion will return the kubernetes version.
GetKubeService will get the kubernetes service.
GetLatestChartURLForApp ...
GetLatestChartURLForAppVersion ...
GetLatestChartVersionForAppVersion ...
GetNamespace will get the namespace.
GetOpenShiftSecurityConstraint gets an OpenShift security constraints.
GetPod will get the input pods corresponding to a namespace.
GetPVC will get the PVC for the given name.
GetRandomString returns a random hexadecimal string of length n.
GetReleaseValues merges the default Chart Values with the user's set values and retuns that set of values.
GetReplicationController will get the replication controller corresponding to a namespace and name.
GetResourceName returns the name of the resource.
GetRole get a role.
GetRoleBinding get a role binding.
GetRoute gets an OpenShift routes.
GetRouteClient attempts to get a Route Client.
GetRouteComponent returns the route component.
GetSecret will create the secret.
GetService will get the service information for the input service name inside the input namespace.
GetServiceAccount get a service account.
GetServiceEndPoint will get the service endpoint information for the input service name inside the input namespace.
No description provided by the author
GetValueFromRelease merges the default Chart Values with the user's set values to find the value that is current set in the Release.
GetWithHelm3 uses the helm NewGet action to return a Release with information about a resource from the cluster.
InitAnnotations initialize the annotation.
InitLabels initialize the label.
Int32ToInt will convert from int32 to int.
IntToInt32 will convert from int to int32.
IntToInt64 will convert from int to int64.
IntToPtr will convert int to pointer.
IntToUInt32 will convert from int to uint32.
IsBlackDuckVersionSupportMultipleInstance returns whether it supports multiple instance in a single namespace.
IsClusterRoleBindingSubjectNamespaceExist checks whether the namespace is already exist in the subject of cluster role binding.
IsClusterRoleRefExistForOtherNamespace checks whether the cluster role exist for any cluster role bindings present in other namespace.
IsClusterRoleRuleExist checks whether the namespace is already exist in the rule of cluster role.
IsExistInStringSlice will check for the input string in the given slice.
IsExposeServiceValid validates the expose service type.
IsNotDefaultVersionGreaterThanOrEqualTo returns whether the given version is greater than or equal to the given inputs.
IsOpenshift will whether it is an openshift cluster.
IsSubjectExist checks whether the namespace is already exist in the subject of cluster role binding.
IsSubjectExistForOtherNamespace checks whether anyother namespace is exist in the subject of cluster role binding.
IsVersionEqualTo returns whether the given version is equal to the given year, month and dot release.
IsVersionGreaterThanOrEqualTo returns whether the given version is greater than or equal to the given year, month and dot release.
ListClusterRoleBindings list a cluster role binding.
ListClusterRoles list a cluster role.
ListConfigMaps will list the config map.
ListDeployments will get all the deployments corresponding to a namespace.
ListNamespaces will list the namespace.
ListPods will get all the pods corresponding to a namespace.
ListPodsWithLabels will get all the pods corresponding to a namespace and labels.
ListPVCs will list the PVC for the given label selector.
ListReplicationControllers will get the replication controllers corresponding to a namespace.
ListRoleBindings list a role binding.
ListRoles list a role.
ListRoutes list an OpenShift routes.
ListSecrets will list the secret.
ListServiceAccounts list a service account.
ListServices will list the service information for the input service name inside the input namespace.
ListStorageClasses will list all the storageClass in the cluster.
LoadChart returns a chart from the specified chartURL Modified from https://github.com/openshift/console/blob/master/pkg/helm/actions/template_test.go.
MapKeyToStringArray will return map keys.
MapToStringArrayJoinBySeparator converts the map to string array and each key and value of the map will be joined by separator.
MergeEnvMaps will merge the source and destination environs.
MergeEnvSlices will merge the source and destination environs.
MergeMaps Copied from https://github.com/helm/helm/blob/9b42702a4bced339ff424a78ad68dd6be6e1a80a/pkg/cli/values/options.go#L88.
NewStringReader will convert string array to string reader object.
ParseChartVersion ...
ParseImageName takes a docker image string and returns the name image := "docker.io/blackducksoftware/synopsys-operator:latest" subMatch = [blackducksoftware/synopsys-operator:latest docker.io/blackducksoftware/ synopsys-operator :latest].
ParseImageRepo takes a docker image string and returns the repo image := "docker.io/blackducksoftware/synopsys-operator:latest" subMatch = [blackducksoftware/synopsys-operator:latest docker.io/blackducksoftware/ synopsys-operator :latest].
ParseImageTag takes a docker image string and returns the tag image := "docker.io/blackducksoftware/synopsys-operator:latest" subMatch = [blackducksoftware/synopsys-operator:latest latest].
ParsePackageName returns {app-name, app-version, chart-num} synopsys-alert-5.3.1-12 -> [synopsys-alert-5.3.1-12 synopsys-alert 5.3.1 -12 12] blackduck-2020.4.2 -> [blackduck-2020.4.2 blackduck 2020.4.2 ].
PodContainersAreRunning ...
PodIsRunningOrComplete ...
PodIsTerminating ...
PrettyPrint will print the interface in string format.
RandomString will generate the random string.
ReadFileData returns the information within a file as a string.
ReadFromFile will read the file.
ReleaseExists verifies that a resources is deployed in the cluster.
RemoveFromStringSlice will remove the string from the slice and it will maintain the order.
RenderManifests converts a helm chart to a string of the kube manifest files Modified from https://github.com/openshift/console/blob/cdf6b189b71e488033ecaba7d90258d9f9453478/pkg/helm/actions/template_test.go.
SetHelmValueInMap adds the finalValue into the valueMapPointer at the location specified by the keyList valueMapPointer - a map for helm values (maps are pointers in Golang) - it is used to track the current map being updated keyList - an ordered list of keys that lead to the location in the valueMapPointer to place the finalValue finalValue - the value to set in the map.
StringArrayToMapSplitBySeparator converts the string array to map based on separator for each string in the array.
StringSliceToIntSlice ...
StringToPtr will convert string to pointer.
StringToStringSlice slices s into all substrings separated by sep.
TemplateWithHelm3 prints the kube manifest files for a resource.
UniqueStringSlice returns a unique subset of the string slice provided.
UniqueValues returns a unique subset of the string slice provided.
UpdateClusterRole updates the cluster role.
UpdateClusterRoleBinding updates the cluster role binding.
UpdateConfigMap updates a config map.
UpdateDeployment updates the deployment.
UpdateNamespace updates a namespace.
UpdateOpenShiftSecurityConstraint updates an OpenShift security constraints.
UpdatePVC will update the pvc information for the input pvc name inside the input namespace.
UpdateReplicationController updates the replication controller.
UpdateRole updates the role.
UpdateRoleBinding updates the role binding.
UpdateRoute updates an OpenShift routes.
UpdateSecret updates a secret.
UpdateService will update the service information for the input service name inside the input namespace.
UpdateServiceAccount updates a service account.
UpdateWithHelm3 uses the helm NewUpgrade action to update a resource in the cluster.
ValidateFullImageString takes a docker image string and verifies a repo, name, and tag were all provided image := "docker.io/blackducksoftware/synopsys-operator:latest" subMatch = [blackducksoftware/synopsys-operator:latest blackducksoftware synopsys-operator latest].
ValidateImageVersion takes a docker image version string and verifies that it follows the format x.x.x version := "2019.4.2" subMatch = [2019.4.2 2019 4 2].
WaitForMoreThanNPods ...
WaitForNamespaceToTerminate ...
WaitForPodsToAppear ...
WaitForPodsToBeDeletedOrComplete ...
WaitForPodsToBeRunningOrComplete ...
WaitForPodsToStartChanging ..
WaitForPodsToStopTerminating ...

# Constants

AlertName is the name of an Alert app.
BlackDuckName is the name of the Black Duck app.
LOADBALANCER denotes to create a LoadBalancer service.
NODEPORT denotes to create a NodePort service.
NONE denotes no exposed service.
OPENSHIFT denotes to create an OpenShift routes.
OpsSightName is the name of an OpsSight app.

# Structs

SecurityContext will contain the specifications of a security context.