Documentation ¶
Overview ¶
Copyright (c) 2021, Oracle and/or its affiliates. Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.
Copyright (c) 2021, 2022, Oracle and/or its affiliates. Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.
Index ¶
- Constants
- Variables
- func APIExtensionsClientSet() (*apiextv1.ApiextensionsV1Client, error)
- func AddAccessTokenToRancherForLoggedInUser(log *zap.SugaredLogger, ...) (string, error)
- func AssertBearerAuthorized(httpClient *retryablehttp.Client, url string) bool
- func AssertFluentdURLAndSecret(expectedURL, expectedSecret string) bool
- func AssertOauthURLAccessibleAndUnauthorized(httpClient *retryablehttp.Client, url string) bool
- func AssertURLAccessibleAndAuthorized(client *retryablehttp.Client, url string, credentials *UsernamePassword) bool
- func BodyContains(expected string) types.GomegaMatcher
- func BodyDoesNotContain(unexpected string) types.GomegaMatcher
- func BodyEquals(expected string) types.GomegaMatcher
- func BodyNotEmpty() types.GomegaMatcher
- func CalculateSeconds(age string) (int64, error)
- func CanI(userOCID string, namespace string, verb string, resource string) (bool, string, error)
- func CanIForAPIGroup(userOCID string, namespace string, verb string, resource string, group string) (bool, string, error)
- func CanIForAPIGroupForServiceAccountOrUser(saOrUserOCID string, namespace string, verb string, resource string, ...) (bool, string, error)
- func CheckAllImagesPulled(pods *v1.PodList, events *v1.EventList, namePrefixes []string) bool
- func CheckForDataStream(name string) bool
- func CheckISMPolicy() (bool, error)
- func CheckNSFinalizerRemoved(ns string, clientset *kubernetes.Clientset) bool
- func CheckNamespaceFinalizerRemoved(ns string) bool
- func CheckNoServerHeader(resp *HTTPResponse) bool
- func CheckPodsForEnvoySidecar(namespace string, imageName string) bool
- func CheckStatusAndResponseHeaderAbsent(httpClient *retryablehttp.Client, req *retryablehttp.Request, ...) error
- func Concurrently(assertions ...func())
- func ConditionalSpec(description string, skipMessage string, condition ConditionalCheckFunc, ...)
- func ContainerHasExpectedArgs(namespace string, deploymentName string, containerName string, ...) (bool, error)
- func ContainerImagePullWait(namespace string, namePrefixes []string) bool
- func ContainerImagePullWaitInCluster(namespace string, namePrefixes []string, kubeconfigPath string) bool
- func ContainsDocsOlderThanRetentionPeriod(indexName string, retentionPeriod string) (bool, error)
- func ContainsIndicesOlderThanRetentionPeriod(indexMetadataList []IndexMetadata, oldestTimestamp int64) (bool, error)
- func CreateArgoCDGitApplication() error
- func CreateConfigMap(configMap *corev1.ConfigMap) error
- func CreateCredentialsSecret(namespace string, name string, username string, pw string, ...) (*corev1.Secret, error)
- func CreateCredentialsSecretFromMap(namespace string, name string, values, labels map[string]string) (*corev1.Secret, error)
- func CreateCredentialsSecretFromMapInCluster(namespace string, name string, values, labels map[string]string, ...) (*corev1.Secret, error)
- func CreateCredentialsSecretInCluster(namespace string, name string, username string, pw string, ...) (*corev1.Secret, error)
- func CreateDockerSecret(namespace string, name string, server string, username string, password string) (*corev1.Secret, error)
- func CreateDockerSecretInCluster(namespace string, name string, server string, username string, password string, ...) (*corev1.Secret, error)
- func CreateIndexPattern(pattern string) map[string]interface{}
- func CreateLogFile(filename string, content string) error
- func CreateNamespace(name string, labels map[string]string) (*corev1.Namespace, error)
- func CreateNamespaceWithAnnotations(name string, labels map[string]string, annotations map[string]string) (*corev1.Namespace, error)
- func CreateNamespaceWithClientSet(name string, labels map[string]string, clientset *kubernetes.Clientset, ...) (*corev1.Namespace, error)
- func CreateNewRancherConfig(log *zap.SugaredLogger, kubeconfigPath string) (*rancherutil.RancherConfig, error)
- func CreateNewRancherConfigForUser(log *zap.SugaredLogger, kubeconfigPath string, username string, ...) (*rancherutil.RancherConfig, error)
- func CreateOrUpdateNamespace(name string, labels map[string]string, annotations map[string]string) (*corev1.Namespace, error)
- func CreateOverridesOrDie(yamlString string) []v1beta1.Overrides
- func CreatePasswordSecret(namespace string, name string, pw string, labels map[string]string) (*corev1.Secret, error)
- func CreateRoleBinding(userOCID string, namespace string, rolebindingname string, ...) error
- func CreateSecret(secret *corev1.Secret) error
- func DeleteApplicationDataStream(datastreamName string) error
- func DeleteConfigMap(namespace string, name string) error
- func DeleteNamespace(name string) error
- func DeleteNamespaceInCluster(name string, kubeconfigPath string) error
- func DeleteNamespaceWithClientSet(name string, clientset *kubernetes.Clientset) error
- func DeleteSecret(namespace string, name string) error
- func DeployHelloHelidonApplication(namespace string, ociLogID string, istioInjection string, ...)
- func DeploySpringBootApplication(namespace string, istioInjection string)
- func DoesCRDExist(crdName string) (bool, error)
- func DoesClusterRoleBindingExist(name string) (bool, error)
- func DoesClusterRoleExist(name string) (bool, error)
- func DoesCronJobExist(kubeconfigPath, namespace string, name string) (bool, error)
- func DoesDeploymentExist(namespace string, name string) (bool, error)
- func DoesLoggingSidecarExist(kubeconfigPath string, name types.NamespacedName, containerName string) (bool, error)
- func DoesNamespaceExist(name string) (bool, error)
- func DoesNamespaceExistInCluster(name string, kubeconfigPath string) (bool, error)
- func DoesNamespaceHasVerrazzanoLabel(ns string) (bool, error)
- func DoesPodExist(namespace string, name string) (bool, error)
- func DoesRoleBindingContainSubject(namespace, name, subjectKind, subjectName string) (bool, error)
- func DoesRoleBindingExist(name string, namespace string) (bool, error)
- func DoesSecretExist(namespace string, name string) (bool, error)
- func DoesServiceAccountExist(namespace, name string) (bool, error)
- func DoesServiceExist(namespace string, name string) (bool, error)
- func DoesStatefulSetExist(namespace string, name string) (bool, error)
- func DoesVerrazzanoProjectExistInCluster(name string, kubeconfigPath string) (bool, error)
- func DoesVirtualServiceExist(namespace string, name string) (bool, error)
- func EventuallyGetAccessToken(kubeconfigPath string, isOIDCProviderDex bool) *string
- func EventuallyGetIngressHost(log *zap.SugaredLogger, api *APIEndpoint, namespace string, name string) string
- func EventuallyGetKialiHost(cs *kubernetes.Clientset) string
- func EventuallyGetRancherHost(log *zap.SugaredLogger, api *APIEndpoint) (string, error)
- func EventuallyGetURLForIngress(log *zap.SugaredLogger, api *APIEndpoint, namespace string, name string, ...) string
- func EventuallyPodsReady(log *zap.SugaredLogger, master, data, ingest int)
- func EventuallyVerrazzanoRetryableHTTPClient() *retryablehttp.Client
- func Execute(podName, containerName, namespace string, command []string) (string, string, error)
- func ExecuteDeleteRequestForToken(log *zap.SugaredLogger, ...) error
- func ExecuteGetRequestToReturnAllTokens(log *zap.SugaredLogger, ...) ([]byte, error)
- func ExecutePostRequestToAddAToken(log *zap.SugaredLogger, ...) ([]byte, error)
- func FindAnyLog(index string, match []Match, mustNot []Match) bool
- func FindLog(index string, match []Match, mustNot []Match) bool
- func FindTestDataFile(file string) (string, error)
- func GenerateNamespace(name string) string
- func GenerateTrafficForTraces(namespace, appConfigName, urlPath, kubeconfigPath string) error
- func GetACMEEnvironment(kubeconfigPath string) (string, error)
- func GetAndDeleteTokenNamesForLoggedInUserBasedOnClusterID(log *zap.SugaredLogger, ...) error
- func GetAppConfig(namespace string, name string) (*unstructured.Unstructured, error)
- func GetAppServiceMonitorName(namespace string, appName string, component string) string
- func GetApplicationDataStreamNames() ([]string, error)
- func GetApplicationsWithClient(log *zap.SugaredLogger, argoCDURL string, token string) (bool, error)
- func GetBOMDoc() (*bom.BomDoc, error)
- func GetCACertFromSecret(secretName string, namespace string, caKey string, kubeconfigPath string) ([]byte, error)
- func GetCertificate(namespace string, name string) (*unstructured.Unstructured, error)
- func GetCertificateList(namespace string) (*certmanagerv1.CertificateList, error)
- func GetCertificates(url string) ([]*x509.Certificate, error)
- func GetClusterKubeconfig(log *zap.SugaredLogger, httpClient *retryablehttp.Client, ...) (string, error)
- func GetClusterNameMetricLabel(kubeconfigPath string) (string, error)
- func GetClusterOperatorClientset(kubeconfigPath string) (*vcoClient.Clientset, error)
- func GetClusterRole(name string) (*rbacv1.ClusterRole, error)
- func GetClusterRoleBinding(name string) (*rbacv1.ClusterRoleBinding, error)
- func GetConfigMap(configMapName string, namespace string) (*corev1.ConfigMap, error)
- func GetContainerEnv(namespace string, deploymentName string, containerName string) ([]corev1.EnvVar, error)
- func GetContainerImage(namespace string, deploymentName string, containerName string) (string, error)
- func GetDNS(cr *vzapi.Verrazzano) string
- func GetDaemonSet(namespace string, daemonSetName string) (*appsv1.DaemonSet, error)
- func GetDeployment(namespace string, deploymentName string) (*appsv1.Deployment, error)
- func GetDeploymentLabelSelector(namespace, deploymentName string) (*metav1.LabelSelector, error)
- func GetDynamicClient() (dynamic.Interface, error)
- func GetDynamicClientInCluster(kubeconfigPath string) (dynamic.Interface, error)
- func GetEffectiveKeyCloakPersistenceOverride(kubeconfigPath string) (*v1beta1.VolumeClaimSpecTemplate, error)
- func GetEffectiveVMIPersistenceOverride(kubeconfigPath string) (*v1beta1.VolumeClaimSpecTemplate, error)
- func GetEnvFallback(envVar, fallback string) string
- func GetEnvFallbackBool(envVar string, fallback bool) bool
- func GetEnvFallbackInt(envVar string, fallback int) int
- func GetEnvName(kubeconfigPath string) (string, error)
- func GetEnvironmentName(cr *vzapi.Verrazzano) string
- func GetExternalOpenSearchURL(kubeconfigPath string) string
- func GetISMRolloverPeriod(policyName string) (string, error)
- func GetImagePrefix() string
- func GetIngress(namespace string, ingressName string) (*netv1.Ingress, error)
- func GetIngressIP(cr *vzapi.Verrazzano) string
- func GetIngressList(namespace string) (*netv1.IngressList, error)
- func GetIssuerList(namespace string) (*certmanagerv1.IssuerList, error)
- func GetJaegerCollectorDeployments(kubeconfigPath, jaegerCRName string) ([]appsv1.Deployment, error)
- func GetJaegerQueryDeployments(kubeconfigPath, jaegerCRName string) ([]appsv1.Deployment, error)
- func GetJaegerSpanIndexName(kubeconfigPath string) (string, error)
- func GetJaegerSystemServicesInAdminCluster() []string
- func GetJaegerSystemServicesInManagedCluster() []string
- func GetKubernetesClientsetForCluster(kubeconfigPath string) (*kubernetes.Clientset, error)
- func GetNamespace(name string) (*corev1.Namespace, error)
- func GetNamespaceInCluster(name string, kubeconfigPath string) (*corev1.Namespace, error)
- func GetNamespaceWithClientSet(name string, clientset *kubernetes.Clientset) (*corev1.Namespace, error)
- func GetNodeCount() (uint32, error)
- func GetNodeCountInCluster(kubeconfigPath string) (int, error)
- func GetOpenSearchAppIndex(namespace string) (string, error)
- func GetOpenSearchAppIndexWithKC(namespace, kubeconfigPath string) (string, error)
- func GetOpenSearchSystemIndex(name string) (string, error)
- func GetOpenSearchSystemIndexWithKC(name, kubeconfigPath string) (string, error)
- func GetPersistentVolumeClaims(namespace string) (map[string]*corev1.PersistentVolumeClaim, error)
- func GetPersistentVolumes() (map[string]*corev1.PersistentVolume, error)
- func GetPodsFromSelector(selector *metav1.LabelSelector, namespace string) ([]corev1.Pod, error)
- func GetPrometheusConfig() (*v1.ConfigMap, []interface{}, map[interface{}]interface{}, error)
- func GetPrometheusIngressHost(kubeconfigPath string) string
- func GetQueryStoreIngressHost(kubeconfigPath string) string
- func GetRancherAdminToken(log *zap.SugaredLogger, httpClient *retryablehttp.Client, rancherURL string) string
- func GetReplicaCounts(expectedDeployments []types.NamespacedName, ...) (map[string]uint32, error)
- func GetRequiredEnvVarOrFail(name string) string
- func GetRetentionPeriod(policyName string) (string, error)
- func GetRetryPolicy() func(ctx context.Context, resp *http.Response, err error) (bool, error)
- func GetRulesFromThanosRuler(kubeconfigPath string) (interface{}, error)
- func GetSchedulableNodeCount() (uint32, error)
- func GetScrapePools(namespace, appName string, componentNames []string, isMinVersion140 bool) []string
- func GetSecret(namespace string, name string) (*corev1.Secret, error)
- func GetSecretInCluster(namespace string, name string, kubeconfigPath string) (*corev1.Secret, error)
- func GetService(namespace string, serviceName string) (*corev1.Service, error)
- func GetServiceAccount(namespace, name string) (*corev1.ServiceAccount, error)
- func GetServiceMonitor(namespace, name string) (*promoperapi.ServiceMonitor, error)
- func GetStatefulSet(namespace string, stsName string) (*appsv1.StatefulSet, error)
- func GetSystemGrafanaIngressURL(kubeconfigPath string) string
- func GetSystemOpenSearchIngressURL(kubeconfigPath string) string
- func GetSystemThanosRulerURL(kubeconfigPath string) string
- func GetThanosQueryIngressHost(kubeconfigPath string) string
- func GetTokenForServiceAccount(sa string, namespace string) ([]byte, error)
- func GetURLForIngress(log *zap.SugaredLogger, api *APIEndpoint, namespace string, name string, ...) (string, error)
- func GetV1Beta1ControllerRuntimeClient(config *restclient.Config) (client.Client, error)
- func GetVerrazzano() (*v1alpha1.Verrazzano, error)
- func GetVerrazzanoApplicationOperatorClientSet() (*vaoClient.Clientset, error)
- func GetVerrazzanoClientset() (*vpoClient.Clientset, error)
- func GetVerrazzanoHTTPClient(kubeconfigPath string) (*retryablehttp.Client, error)
- func GetVerrazzanoInstallResourceInCluster(kubeconfigPath string) (*v1alpha1.Verrazzano, error)
- func GetVerrazzanoInstallResourceInClusterV1beta1(kubeconfigPath string) (*v1beta1.Verrazzano, error)
- func GetVerrazzanoNoRetryHTTPClient(kubeconfigPath string) (*http.Client, error)
- func GetVerrazzanoPassword() (string, error)
- func GetVerrazzanoPasswordInCluster(kubeconfigPath string) (string, error)
- func GetVerrazzanoProjectClientsetInCluster(kubeconfigPath string) (*vaoClient.Clientset, error)
- func GetVerrazzanoRetentionPolicy(retentionPolicyName string) (v12.IndexManagementPolicy, error)
- func GetVerrazzanoRetryableHTTPClient() (*retryablehttp.Client, error)
- func GetVerrazzanoRolloverPolicy(rolloverPolicyName string) (v12.RolloverPolicy, error)
- func GetVerrazzanoV1beta1() (*v1beta1.Verrazzano, error)
- func GetVerrazzanoVersion(kubeconfigPath string) (string, error)
- func GetVirtualServiceList(namespace string) (*istionetv1beta1.VirtualServiceList, error)
- func GetWildcardDNS(s string) string
- func GvkToGvr(gvk schema.GroupVersionKind) schema.GroupVersionResource
- func HasStatus(expected int) types.GomegaMatcher
- func HasWildcardDNS(s string) bool
- func ISMPolicyExists(policyName string) (bool, error)
- func IndicesNotExists(patterns []string) bool
- func Ingress() string
- func IngressesExist(vz *v1beta1.Verrazzano, namespace string, ingressNames []string) (bool, error)
- func InstallOrUpdateOpenSearchOperator(log *zap.SugaredLogger, master, data, ingest int) error
- func IsArgoCDEnabled(kubeconfigPath string) bool
- func IsCAIssuerConfig(certConfig v1beta1.Certificate) (isCAConfig bool, err error)
- func IsCertManagerEnabled(kubeconfigPath string) bool
- func IsClusterAPIEnabled(kubeconfigPath string) bool
- func IsClusterAgentEnabled(kubeconfigPath string) bool
- func IsCoherenceOperatorEnabled(kubeconfigPath string) bool
- func IsDataStreamSupported() bool
- func IsDefaultDNS(dns *vzapi.DNSComponent) bool
- func IsDevProfile() bool
- func IsDexEnabled(kubeconfigPath string) bool
- func IsGrafanaEnabled(kubeconfigPath string) bool
- func IsIngressEnabled(kubeconfigPath string) bool
- func IsIstioEnabled(kubeconfigPath string) bool
- func IsJaegerInstanceCreated(kubeconfigPath string) (bool, error)
- func IsJaegerOperatorEnabled(kubeconfigPath string) bool
- func IsKeycloakEnabled(kubeconfigPath string) bool
- func IsKubeStateMetricsEnabled(kubeconfigPath string) bool
- func IsManagedClusterProfile() bool
- func IsMinVersion(vzVersion, minVersion string) (bool, error)
- func IsMySQLOperatorEnabled(kubeconfigPath string) bool
- func IsOCIDNSEnabled(kubeconfigPath string) bool
- func IsOCIDNSWebhookEnabled(kubeconfigPath string) bool
- func IsOpenSearchDashboardsEnabled(kubeconfigPath string) bool
- func IsOpenSearchEnabled(kubeconfigPath string) (bool, error)
- func IsOpensearchEnabled(kubeconfigPath string) bool
- func IsProdProfile() bool
- func IsPrometheusAdapterEnabled(kubeconfigPath string) bool
- func IsPrometheusEnabled(kubeconfigPath string) bool
- func IsPrometheusNodeExporterEnabled(kubeconfigPath string) bool
- func IsPrometheusOperatorEnabled(kubeconfigPath string) bool
- func IsPrometheusPushgatewayEnabled(kubeconfigPath string) bool
- func IsRancherBackupEnabled(kubeconfigPath string) bool
- func IsRancherEnabled(kubeconfigPath string) bool
- func IsVeleroEnabled(kubeconfigPath string) bool
- func IsVerrazzanoManaged(labels map[string]string) bool
- func IsVerrazzanoMinVersion(minVersion string, kubeconfigPath string) (bool, error)
- func IsWebLogicOperatorEnabled(kubeconfigPath string) bool
- func JTq(jtext string, path ...string) interface{}
- func JaegerSpanRecordFoundInOpenSearch(kubeconfigPath string, after time.Time, serviceName string) bool
- func Jq(node interface{}, path ...string) interface{}
- func ListApplicationIndices() []string
- func ListCRDs() (*apiext.CustomResourceDefinitionList, error)
- func ListClusterRoleBindings() (*rbacv1.ClusterRoleBindingList, error)
- func ListCronJobNamesMatchingLabels(kubeconfigPath, namespace string, matchLabels map[string]string) ([]string, error)
- func ListDeployments(namespace string) (*appsv1.DeploymentList, error)
- func ListDeploymentsMatchingLabelsInCluster(kubeconfigPath, namespace string, matchLabels map[string]string) (*appsv1.DeploymentList, error)
- func ListIndexPatterns(kubeconfigPath string) []string
- func ListIngresses(namespace string) (*networkingv1.IngressList, error)
- func ListJaegerTracesWithTags(kubeconfigPath string, start time.Time, serviceName string, ...) []string
- func ListNamespaces(opts metav1.ListOptions) (*corev1.NamespaceList, error)
- func ListNodes() (*corev1.NodeList, error)
- func ListPods(namespace string, opts metav1.ListOptions) (*corev1.PodList, error)
- func ListPodsInCluster(namespace string, clientset *kubernetes.Clientset) (*corev1.PodList, error)
- func ListPodsWithLabelsInCluster(namespace, labels string, clientset *kubernetes.Clientset) (*corev1.PodList, error)
- func ListSecrets(namespace string) (*corev1.SecretList, error)
- func ListServices(namespace string) (*corev1.ServiceList, error)
- func ListServicesInJaeger(kubeconfigPath string) []string
- func ListStatefulSets(namespace string) (*appsv1.StatefulSetList, error)
- func ListSystemIndices() []string
- func Log(level LogLevel, message string)
- func LogIndexFound(indexName string) bool
- func LogIndexFoundInCluster(indexName, kubeconfigPath string) bool
- func LogIndexPatternFound(indexName string) bool
- func LogIndexPatternFoundInCluster(indexName, kubeconfigPath string) bool
- func LogRecordFound(indexName string, after time.Time, fields map[string]string) bool
- func LogRecordFoundInCluster(indexName string, after time.Time, fields map[string]string, ...) bool
- func MinVersionSpec(description string, minVersion string, specFunc interface{})
- func NoLog(index string, match []Match, mustNot []Match) bool
- func NodeIsSchedulable(node corev1.Node) bool
- func PodsNotRunning(namespace string, namePrefixes []string) (bool, error)
- func PodsRunning(namespace string, namePrefixes []string) (bool, error)
- func PodsRunningInCluster(namespace string, namePrefixes []string, kubeconfigPath string) (bool, error)
- func PodsRunningInClusterWithClient(namespace string, namePrefixes []string, client *kubernetes.Clientset) (bool, error)
- func PolicyRulesEqual(rule1, rule2 rbacv1.PolicyRule) bool
- func RemoveNamespaceFinalizers(namespace *corev1.Namespace) error
- func RetrieveArgoCDPassword(namespace, name string) (string, error)
- func ScrapeTargets() ([]interface{}, error)
- func ScrapeTargetsFromExec() ([]interface{}, error)
- func ScrapeTargetsHealthy(scrapePools []string) (bool, error)
- func ScrapeTargetsHealthyFromExec(scrapePools []string) (bool, error)
- func SearchLog(index string, query OpensearchQuery) map[string]interface{}
- func SecretsCreated(namespace string, names ...string) bool
- func SliceContainsPolicyRule(ruleSlice []rbacv1.PolicyRule, rule rbacv1.PolicyRule) bool
- func SlicesContainSameStrings(strings1, strings2 []string) bool
- func SlicesContainSubsetSubstring(strings1, strings2 []string) bool
- func SpecificPodsPodsNotRunningInClusterWithClient(namespace string, clientset *kubernetes.Clientset, namePrefixes []string) (bool, error)
- func SpecificPodsRunning(namespace, labels string) (bool, error)
- func SpecificPodsRunningInCluster(namespace, labels string, kubeconfigPath string) (bool, error)
- func SpecificPodsRunningInClusterWithClient(namespace, labels string, client *kubernetes.Clientset) (bool, error)
- func TestGrafanaTestDashboard(testDashboard DashboardMetadata, pollingInterval time.Duration, ...)
- func TestOpenSearchGrafanaDashBoard(pollingInterval time.Duration, timeout time.Duration)
- func TestOpenSearchPlugins(pollingInterval time.Duration, waitTimeout time.Duration)
- func TestSearchGrafanaDashboard(pollingInterval time.Duration, timeout time.Duration)
- func TestSystemHealthGrafanaDashboard(pollingInterval time.Duration, timeout time.Duration)
- func UndeployHelloHelidonApplication(namespace string, customComponent string, customAppConfig string)
- func UndeploySpringBootApplication(namespace string)
- func UninstallOpenSearchOperator() error
- func UpdateConfigMap(configMap *corev1.ConfigMap) error
- func UpdateSecret(secret *corev1.Secret) error
- func UseExternalOpensearch() bool
- func ValidateApplicationTracesInCluster(kubeconfigPath string, start time.Time, appServiceName, clusterName string) func() (bool, error)
- func ValidateApplicationTracesInOS(start time.Time, appServiceName string) func() bool
- func ValidateDeploymentContainerImage(namespace, deploymentName, containerName, version string) (bool, error)
- func ValidateEsIndexCleanerCronJobFunc() func() (bool, error)
- func ValidateJaegerAgentMetricFunc(metricsTest MetricsTest) func() bool
- func ValidateJaegerCollectorMetricFunc(metricsTest MetricsTest) func() bool
- func ValidateJaegerOperatorMetricFunc(metricsTest MetricsTest) func() bool
- func ValidateJaegerQueryMetricFunc(metricsTest MetricsTest) func() bool
- func ValidateOpensearchHits(searchResults map[string]interface{}, hitValidator OpensearchHitValidator, ...) bool
- func ValidateSystemTracesFuncInCluster(kubeconfigPath string, start time.Time, clusterName string) func() (bool, error)
- func ValidateSystemTracesInOSFunc(start time.Time) func() bool
- func VerifyArgoCDAccess(log *zap.SugaredLogger) error
- func VerifyArgoCDApplicationAccess(log *zap.SugaredLogger) error
- func VerifyGrafanaComponent(log *zap.SugaredLogger, api *APIEndpoint, ...) bool
- func VerifyKeycloakAccess(log *zap.SugaredLogger) error
- func VerifyOpenSearchComponent(log *zap.SugaredLogger, api *APIEndpoint, ...) bool
- func VerifyOpenSearchDashboardsComponent(log *zap.SugaredLogger, api *APIEndpoint, ...) bool
- func VerifyOpenSearchPlugins() error
- func VerifyPrometheusComponent(log *zap.SugaredLogger, api *APIEndpoint, ...) bool
- func VerifyRancherAccess(log *zap.SugaredLogger) error
- func VerifyRancherKeycloakAuthConfig(log *zap.SugaredLogger) error
- func VerifySystemVMIComponent(log *zap.SugaredLogger, api *APIEndpoint, ...) bool
- func VzReadyV1beta1() (bool, error)
- func WaitForISMPolicyUpdate(pollingInterval time.Duration, timeout time.Duration)
- func WaitForVZCondition(conditionType v1beta1.ConditionType, pollingInterval, timeout time.Duration)
- type APIEndpoint
- func (api *APIEndpoint) Delete(path string) (*HTTPResponse, error)
- func (api *APIEndpoint) Get(path string) (*HTTPResponse, error)
- func (api *APIEndpoint) GetIngress(namespace, name string) (*networkingv1.Ingress, error)
- func (api *APIEndpoint) GetOpensearchURL() (string, error)
- func (api *APIEndpoint) GetVerrazzanoIngressURL() (string, error)
- func (api *APIEndpoint) Patch(path string, body io.Reader) (*HTTPResponse, error)
- func (api *APIEndpoint) Post(path string, body io.Reader) (*HTTPResponse, error)
- func (api *APIEndpoint) Request(method, path string, body io.Reader) (*HTTPResponse, error)
- type Action
- type ConditionalCheckFunc
- type DashboardMetadata
- type DataStream
- type HTTPResponse
- func CreateGrafanaDashboard(body string) (*HTTPResponse, error)
- func Delete(url string, hostHeader string) (*HTTPResponse, error)
- func GetGrafanaDashboard(uid string) (*HTTPResponse, error)
- func GetWebPage(url string, hostHeader string) (*HTTPResponse, error)
- func GetWebPageInCluster(url string, hostHeader string, kubeconfigPath string) (*HTTPResponse, error)
- func GetWebPageWithBasicAuth(url string, hostHeader string, username string, password string, ...) (*HTTPResponse, error)
- func GetWebPageWithClient(httpClient *retryablehttp.Client, url string, hostHeader string) (*HTTPResponse, error)
- func PostOpensearch(path string, body string) (*HTTPResponse, error)
- func PostOpensearchDashboards(path string, body string, additionalHeaders ...string) (*HTTPResponse, error)
- func PostWithHostHeader(url, contentType string, hostHeader string, body io.Reader) (*HTTPResponse, error)
- func ProcessHTTPResponse(resp *http.Response) (*HTTPResponse, error)
- func PutISMPolicy(policyData, policyName string) (*HTTPResponse, error)
- func PutWithHostHeader(url, contentType string, hostHeader string, body io.Reader) (*HTTPResponse, error)
- func PutWithHostHeaderInCluster(url, contentType string, hostHeader string, body io.Reader, ...) (*HTTPResponse, error)
- func SearchGrafanaDashboard(searchParams map[string]string) (*HTTPResponse, error)
- type ISMPolicy
- type IndexListData
- type IndexMetadata
- func GetApplicationIndices() ([]IndexMetadata, error)
- func GetBackingIndicesForDataStream(dataStreamName string) ([]IndexMetadata, error)
- func GetIndexMetadata(indexName string) (IndexMetadata, error)
- func GetIndexMetadataForDataStream(dataStreamName string) ([]IndexMetadata, error)
- func GetIndexMetadataList(indexNames []string) ([]IndexMetadata, error)
- func GetSystemIndices() ([]IndexMetadata, error)
- type IndexPattern
- type IndexSettings
- type InlinePolicy
- type IsmTemplate
- type JaegerTraceData
- type JaegerTraceDataWrapper
- type KeycloakRESTClient
- func (c *KeycloakRESTClient) CreateUser(userRealm string, userName string, firstName string, lastName string, ...) (string, error)
- func (c *KeycloakRESTClient) DeleteUser(userRealm string, userID string) error
- func (c *KeycloakRESTClient) GetRealm(realm string) (map[string]interface{}, error)
- func (c *KeycloakRESTClient) GetToken(realm string, username string, password string, clientid string, ...) (string, error)
- func (c *KeycloakRESTClient) SetPassword(userRealm string, userID string, password string) error
- func (c *KeycloakRESTClient) VerifyUserExists(userRealm string, userID string) (bool, error)
- type ListOfTokenOutputFromRancher
- type LogLevel
- type Match
- type MetricSource
- type MetricsTest
- type NameGenerator
- type OSOperatorOverrides
- type OpenSearchISMPolicyAddModifier
- type OpenSearchISMPolicyRemoveModifier
- type OpensearchHit
- type OpensearchHitValidator
- type OpensearchQuery
- type Payload
- type PolicyList
- type PrometheusSource
- type SearchResult
- type State
- type ThanosSource
- type TokenPostResponse
- type Transition
- type UsernamePassword
Constants ¶
const ( // NumRetries - maximum number of retries NumRetries = 10 // RetryWaitMinimum - minimum retry wait RetryWaitMinimum = 1 * time.Second // RetryWaitMaximum - maximum retry wait RetryWaitMaximum = 30 * time.Second // VerrazzanoNamespace - namespace hosting verrazzano resources VerrazzanoNamespace = "verrazzano-system" // VerrzzanoSecretName - name of the secret for verrazzano user VerrzzanoSecretName = "verrazzano" // SystemIndexPatternPrefix - prefix for verrazzano system logs SystemIndexPatternPrefix = "verrazzano-system" // ApplicationIndexPatternPrefix - prefix for verrazzano application logs ApplicationIndexPatternPrefix = "verrazzano-application" // kubeConfigErrorFmt - error format for reporting kubeconfig related errors KubeConfigErrorFmt = "Error getting kubeconfig, error: %v" )
const ( CrashLoopBackOff = "CrashLoopBackOff" ImagePullBackOff = "ImagePullBackOff" InitContainerPrefix = "Init" )
const ( NipDomain = "nip.io" SslipDomain = "sslip.io" )
const ( SystemLogIsmPolicyName = "verrazzano-system" ApplicationLogIsmPolicyName = "verrazzano-application" )
Retention/Rollover policy names in ISM plugin
const ( // ClusterTypeKind represents a Kind cluster ClusterTypeKind = "kind" // ClusterTypeOlcne represents an OCNE cluster ClusterTypeOlcne = "OCNE" )
const ( TestKeycloakMasterUserIDKey = "TEST_KEYCLOAK_MASTER_USERID" TestKeycloakVerrazzanoUserIDKey = "TEST_KEYCLOAK_VZ_USERID" TestKeycloakNamespace = "keycloak-test-ns" TestKeycloakConfigMap = "keycloak-test-cm" )
const (
// ISO8601Layout defines the timestamp format
ISO8601Layout = "2006-01-02T15:04:05.999999999-07:00"
)
const (
KialiName = "vmi-system-kiali"
)
const (
// Username - the username of the Verrazzano admin user
Username = "verrazzano"
)
const VmiESInternalSecret = "verrazzano-es-internal" //nolint:gosec //#gosec G101
const VmiESLegacySecret = "verrazzano" //nolint:gosec //#gosec G101
const VmiESURL = "http://verrazzano-authproxy-opensearch:8775"
Variables ¶
var ( DefaultRetentionPeriod = "7d" DefaultRolloverPeriod = "1d" )
Default values for Retention period and Rollover period
var SimpleNameGenerator = newNameGenerator()
Functions ¶
func APIExtensionsClientSet ¶
func APIExtensionsClientSet() (*apiextv1.ApiextensionsV1Client, error)
APIExtensionsClientSet returns a Kubernetes ClientSet for this cluster.
func AddAccessTokenToRancherForLoggedInUser ¶ added in v1.6.4
func AddAccessTokenToRancherForLoggedInUser(log *zap.SugaredLogger, adminKubeConfig, managedClusterName, usernameForRancher, ttl string) (string, error)
This function adds an access token to Rancher gven that a ttl and clusterID string is provided
func AssertBearerAuthorized ¶ added in v1.1.0
func AssertFluentdURLAndSecret ¶ added in v1.1.0
AssertFluentdURLAndSecret makes sure that expectedURL and expectedSecret are the same as what is configured in the fluentd daemonset. empty string expectedURL means skip comparing URL. Verrazzano prior to 1.1 could configure URL differently.
func AssertOauthURLAccessibleAndUnauthorized ¶ added in v1.1.0
func AssertURLAccessibleAndAuthorized ¶
func AssertURLAccessibleAndAuthorized(client *retryablehttp.Client, url string, credentials *UsernamePassword) bool
AssertURLAccessibleAndAuthorized - Assert that a URL is accessible using the provided credentials
func BodyContains ¶ added in v0.17.0
func BodyContains(expected string) types.GomegaMatcher
BodyContains asserts that an HTTPResponse body contains a given substring.
func BodyDoesNotContain ¶ added in v0.17.0
func BodyDoesNotContain(unexpected string) types.GomegaMatcher
BodyDoesNotContain asserts that an HTTPResponse body does not contain a given substring.
func BodyEquals ¶ added in v0.17.0
func BodyEquals(expected string) types.GomegaMatcher
BodyEquals asserts that an HTTPResponse body equals a given string.
func BodyNotEmpty ¶ added in v0.17.0
func BodyNotEmpty() types.GomegaMatcher
BodyNotEmpty asserts that an HTTPResponse body is not empty.
func CalculateSeconds ¶ added in v1.3.0
CalculateSeconds validates the duration pattern and if valid calculates the seconds for the given duration. eg: 1d returns integer of value 1 * 24 * 60 * 60
func CanIForAPIGroup ¶ added in v0.13.0
func CanIForAPIGroupForServiceAccountOrUser ¶ added in v0.15.0
func CheckAllImagesPulled ¶ added in v1.3.0
CheckAllImagesPulled checks if all the images of the target pods have been pulled or not. The idea here is to periodically enumerate the containers from the target pods and watch the events related image pulls, such that we can make a smarter decision about pod deployment i.e. keep waiting if the process is slow, and stop waiting in case of unrecoverable failures.
func CheckForDataStream ¶ added in v1.3.0
func CheckISMPolicy ¶ added in v1.5.3
func CheckNSFinalizerRemoved ¶ added in v1.3.0
func CheckNSFinalizerRemoved(ns string, clientset *kubernetes.Clientset) bool
CheckNamespaceFinalizerRemoved checks whether namespace finalizers are removed, using the given Clientset
func CheckNamespaceFinalizerRemoved ¶ added in v1.3.0
CheckNamespaceFinalizerRemoved checks whether namespace finalizers are removed
func CheckNoServerHeader ¶ added in v0.16.0
func CheckNoServerHeader(resp *HTTPResponse) bool
CheckNoServerHeader validates that the response does not include a Server header.
func CheckPodsForEnvoySidecar ¶ added in v1.1.0
CheckPodsForEnvoySidecar checks if a pods which have Envoy sidecars, have the specified image
func CheckStatusAndResponseHeaderAbsent ¶ added in v1.2.0
func CheckStatusAndResponseHeaderAbsent(httpClient *retryablehttp.Client, req *retryablehttp.Request, badRespHeader string, statusCode int) error
CheckStatusAndResponseHeaderAbsent checks that the given header name is not present in the http response, and that the response status code is as expected. If the statusCode is <= 0, the status code check is skipped. If the badRespHeader is "", the response headers are not checked.
func Concurrently ¶
func Concurrently(assertions ...func())
Concurrently executes the given assertions in parallel and waits for them all to complete
func ConditionalSpec ¶ added in v1.1.0
func ConditionalSpec(description string, skipMessage string, condition ConditionalCheckFunc, specFunc interface{})
ConditionalSpec Executes the specified test spec/func when the condition function passes without error
func ContainerHasExpectedArgs ¶ added in v1.3.0
func ContainerHasExpectedArgs(namespace string, deploymentName string, containerName string, arguments []string) (bool, error)
ContainerHasExpectedArgs returns true if each of the arguments matches a substring of one of the arguments found in the deployment
func ContainerImagePullWait ¶ added in v1.3.0
func ContainerImagePullWaitInCluster ¶ added in v1.3.0
func ContainsDocsOlderThanRetentionPeriod ¶ added in v1.3.0
ContainsDocsOlderThanRetentionPeriod returns true if the given index contains any doc that is older than the retention period, returns false otherwise.
func ContainsIndicesOlderThanRetentionPeriod ¶ added in v1.3.0
func ContainsIndicesOlderThanRetentionPeriod(indexMetadataList []IndexMetadata, oldestTimestamp int64) (bool, error)
ContainsIndicesOlderThanRetentionPeriod returns true if there are any old (backing) indices present for the given data stream that is older than the retention period. Returns false otherwise.
func CreateArgoCDGitApplication ¶ added in v1.5.0
func CreateArgoCDGitApplication() error
CreateArgoCDGitApplication creates an application in Argo CD by connecting to the Git repo Applies the Argo CD Application to the kubernetes cluster
func CreateConfigMap ¶ added in v1.3.1
CreateConfigMap creates the ConfigMap
func CreateCredentialsSecret ¶
func CreateCredentialsSecret(namespace string, name string, username string, pw string, labels map[string]string) (*corev1.Secret, error)
CreateCredentialsSecret creates opaque secret
func CreateCredentialsSecretFromMap ¶
func CreateCredentialsSecretFromMap(namespace string, name string, values, labels map[string]string) (*corev1.Secret, error)
CreateCredentialsSecretFromMap creates opaque secret from the given map of values
func CreateCredentialsSecretFromMapInCluster ¶ added in v1.1.0
func CreateCredentialsSecretFromMapInCluster(namespace string, name string, values, labels map[string]string, kubeconfigPath string) (*corev1.Secret, error)
CreateCredentialsSecretFromMapInCluster creates opaque secret from the given map of values
func CreateCredentialsSecretInCluster ¶ added in v1.1.0
func CreateCredentialsSecretInCluster(namespace string, name string, username string, pw string, labels map[string]string, kubeconfigPath string) (*corev1.Secret, error)
CreateCredentialsSecretInCluster creates opaque secret
func CreateDockerSecret ¶
func CreateDockerSecret(namespace string, name string, server string, username string, password string) (*corev1.Secret, error)
CreateDockerSecret creates docker secret
func CreateDockerSecretInCluster ¶ added in v1.1.0
func CreateDockerSecretInCluster(namespace string, name string, server string, username string, password string, kubeconfigPath string) (*corev1.Secret, error)
CreateDockerSecretInCluster creates docker secret
func CreateIndexPattern ¶ added in v1.3.0
CreateIndexPattern creates the specified index pattern in OpenSearch Dashboards
func CreateLogFile ¶
CreateLogFile creates a file with the given name (or truncates the file if it already exists) and writes the given content string to the file.
func CreateNamespace ¶
CreateNamespace creates a namespace
func CreateNamespaceWithAnnotations ¶ added in v1.2.0
func CreateNamespaceWithClientSet ¶ added in v1.3.0
func CreateNamespaceWithClientSet(name string, labels map[string]string, clientset *kubernetes.Clientset, annotations map[string]string) (*corev1.Namespace, error)
CreateNamespaceWithClientSet creates a namespace using the given Clientset
func CreateNewRancherConfig ¶ added in v1.5.0
func CreateNewRancherConfig(log *zap.SugaredLogger, kubeconfigPath string) (*rancherutil.RancherConfig, error)
func CreateNewRancherConfigForUser ¶ added in v1.5.0
func CreateNewRancherConfigForUser(log *zap.SugaredLogger, kubeconfigPath string, username string, password string) (*rancherutil.RancherConfig, error)
func CreateOrUpdateNamespace ¶ added in v1.5.0
func CreateOrUpdateNamespace(name string, labels map[string]string, annotations map[string]string) (*corev1.Namespace, error)
CreateOrUpdateNamespace creates or updates a namespace
func CreateOverridesOrDie ¶ added in v1.4.0
CreateOverridesOrDie converts the yaml string to JSON object
func CreatePasswordSecret ¶
func CreatePasswordSecret(namespace string, name string, pw string, labels map[string]string) (*corev1.Secret, error)
CreatePasswordSecret creates opaque secret
func CreateRoleBinding ¶ added in v0.13.0
func CreateSecret ¶ added in v1.3.1
CreateSecret creates the given secret
func DeleteApplicationDataStream ¶ added in v1.3.0
DeleteApplicationDataStream deletes the given applicatoin data stream
func DeleteConfigMap ¶ added in v1.3.1
DeleteConfigMap to delete the ConfigMap with the given name and namespace
func DeleteNamespace ¶
DeleteNamespace deletes a namespace in the cluster specified in the environment
func DeleteNamespaceInCluster ¶ added in v0.14.0
func DeleteNamespaceWithClientSet ¶ added in v1.3.0
func DeleteNamespaceWithClientSet(name string, clientset *kubernetes.Clientset) error
DeleteNamespaceWithClientSet deletes the namespace using the given Clientset
func DeleteSecret ¶
DeleteSecret deletes the specified secret in the specified namespace
func DeployHelloHelidonApplication ¶ added in v1.2.0
func DeployHelloHelidonApplication(namespace string, ociLogID string, istioInjection string, customComponent string, customAppConfig string)
DeployHelloHelidonApplication deploys the Hello Helidon example application. It accepts an optional OCI Log ID that is added as an annotation on the namespace to test the OCI Logging service integration.
func DeploySpringBootApplication ¶ added in v1.2.0
DeploySpringBootApplication deploys the Springboot example application.
func DoesCRDExist ¶
DoesCRDExist returns whether a CRD with the given name exists for the cluster
func DoesClusterRoleBindingExist ¶
DoesClusterRoleBindingExist returns whether a cluster role with the given name exists in the cluster
func DoesClusterRoleExist ¶
DoesClusterRoleExist returns whether a cluster role with the given name exists in the cluster
func DoesCronJobExist ¶ added in v1.4.0
DoesCronJobExist returns whether a cronjob with the given name and namespace exists for the cluster
func DoesDeploymentExist ¶ added in v1.2.0
DoesDeploymentExist returns whether a deployment with the given name and namespace exists for the cluster
func DoesLoggingSidecarExist ¶ added in v1.1.0
func DoesNamespaceExist ¶
DoesNamespaceExist returns whether a namespace with the given name exists for the cluster set in the environment
func DoesNamespaceExistInCluster ¶ added in v0.14.0
DoesNamespaceExistInCluster returns whether a namespace with the given name exists in the specified cluster
func DoesNamespaceHasVerrazzanoLabel ¶ added in v1.6.1
DoesNamespaceHasVerrazzanoLabel checks whether the namespace has the verrazzano.io/namespace label
func DoesPodExist ¶
DoesPodExist returns whether a pod with the given name and namespace exists for the cluster
func DoesRoleBindingContainSubject ¶ added in v0.13.0
DoesRoleBindingContainSubject returns true if the RoleBinding exists and it contains the specified subject
func DoesRoleBindingExist ¶ added in v0.13.0
DoesRoleBindingExist returns whether a cluster role with the given name exists in the cluster
func DoesSecretExist ¶ added in v1.5.0
DoesSecretExist returns whether a Secret with the given name and namespace exists for the cluster
func DoesServiceAccountExist ¶ added in v0.13.0
DoesServiceAccountExist returns whether a service account with the given name and namespace exists in the cluster
func DoesServiceExist ¶
DoesServiceExist returns whether a Service with the given name and namespace exists for the cluster
func DoesStatefulSetExist ¶ added in v1.4.0
DoesStatefulSetExist returns whether a StatefulSet with the given name and namespace exists for the cluster
func DoesVerrazzanoProjectExistInCluster ¶ added in v1.1.0
DoesVerrazzanoProjectExistInCluster returns whether a VerrazzanoProject with the given name exists in the specified cluster
func DoesVirtualServiceExist ¶ added in v1.5.0
DoesVirtualServiceExist returns whether a VirtualService with the given name and namespace exists for the cluster
func EventuallyGetAccessToken ¶ added in v1.7.0
EventuallyGetAccessToken eventually returns the AccessToken from the OIDC provider in the given cluster
func EventuallyGetIngressHost ¶ added in v1.5.0
func EventuallyGetIngressHost(log *zap.SugaredLogger, api *APIEndpoint, namespace string, name string) string
func EventuallyGetKialiHost ¶ added in v1.4.0
func EventuallyGetKialiHost(cs *kubernetes.Clientset) string
func EventuallyGetRancherHost ¶ added in v1.5.0
func EventuallyGetRancherHost(log *zap.SugaredLogger, api *APIEndpoint) (string, error)
func EventuallyGetURLForIngress ¶ added in v1.4.0
func EventuallyGetURLForIngress(log *zap.SugaredLogger, api *APIEndpoint, namespace string, name string, scheme string) string
func EventuallyPodsReady ¶ added in v1.6.0
func EventuallyPodsReady(log *zap.SugaredLogger, master, data, ingest int)
EventuallyPodsReady check whether the required number of master, data and ingest pods are ready or not
func EventuallyVerrazzanoRetryableHTTPClient ¶ added in v1.4.0
func EventuallyVerrazzanoRetryableHTTPClient() *retryablehttp.Client
func Execute ¶ added in v0.15.0
Execute executes the given command on the pod and container identified by the given names and returns the resulting stdout and stderr
func ExecuteDeleteRequestForToken ¶ added in v1.6.4
func ExecuteDeleteRequestForToken(log *zap.SugaredLogger, adminKubeconfig, managedClusterName, usernameForRancher, tokenName string) error
This function is a wrapper function to delete a given token for a specified user in Rancher
func ExecuteGetRequestToReturnAllTokens ¶ added in v1.6.4
func ExecuteGetRequestToReturnAllTokens(log *zap.SugaredLogger, adminKubeconfig, managedClusterName, usernameForRancher string) ([]byte, error)
This function is a wrapper function that executes a GET Request to return all tokens in Rancher for a given user
func ExecutePostRequestToAddAToken ¶ added in v1.6.4
func ExecutePostRequestToAddAToken(log *zap.SugaredLogger, adminKubeconfig, managedClusterName, usernameForRancher, ttl string) ([]byte, error)
This function is a wrapper function that executes a POST Request to add a token in Rancher for a given user
func FindAnyLog ¶ added in v0.15.0
FindAnyLog returns true if a log record of any time can be found in the index with matching filters.
func FindLog ¶ added in v0.14.0
FindLog returns true if a recent log record can be found in the index with matching filters.
func FindTestDataFile ¶
FindTestDataFile finds a test data file by searching up from the working directory looking for a relative file. This is done to simplify the execution of tests in both local and remote environments.
func GenerateNamespace ¶ added in v1.2.0
GenerateNamespace takes a string and combines that with a UUID to generate a namespace
func GenerateTrafficForTraces ¶ added in v1.4.0
GenerateTrafficForTraces creates some HTTP requests to the application so that the corresponding traces would be generated for them.
func GetACMEEnvironment ¶ added in v1.1.0
GetACMEEnvironment returns true if
func GetAndDeleteTokenNamesForLoggedInUserBasedOnClusterID ¶ added in v1.6.4
func GetAndDeleteTokenNamesForLoggedInUserBasedOnClusterID(log *zap.SugaredLogger, adminKubeConfig, managedClusterName, usernameForRancher string) error
This function returns the list of token names that correspond to the cluster ID and this user before when this is called If no error occurs, this means that these tokens were found and deleted in Rancher
func GetAppConfig ¶ added in v1.2.0
func GetAppConfig(namespace string, name string) (*unstructured.Unstructured, error)
GetAppConfig returns the specified appconfig in a given namespace
func GetAppServiceMonitorName ¶ added in v1.4.0
GetAppServiceMonitorName returns the service monitor name used in VZ 1.4+ for the given namespace and app name
func GetApplicationDataStreamNames ¶ added in v1.3.0
GetApplicationDataStreamNames returns the data stream names of all application logs having prefix 'verrazzano-application-'
func GetApplicationsWithClient ¶ added in v1.5.0
func GetApplicationsWithClient(log *zap.SugaredLogger, argoCDURL string, token string) (bool, error)
GetApplicationsWithClient returns true if the user is able to access the applications page post Argo CD install
func GetBOMDoc ¶ added in v1.4.0
Get the BOM from the platform operator in the cluster and build the BOM structure from it
func GetCACertFromSecret ¶ added in v1.5.0
func GetCACertFromSecret(secretName string, namespace string, caKey string, kubeconfigPath string) ([]byte, error)
GetCACertFromSecret returns the CA cert from the specified kubernetes secret in the given cluster
func GetCertificate ¶ added in v1.1.0
func GetCertificate(namespace string, name string) (*unstructured.Unstructured, error)
GetCertificate returns the a cert in a given namespace for the cluster specified in the environment
func GetCertificateList ¶ added in v1.3.0
func GetCertificateList(namespace string) (*certmanagerv1.CertificateList, error)
GetCertificateList returns a list of certificates in the given namespace
func GetCertificates ¶
func GetCertificates(url string) ([]*x509.Certificate, error)
GetCertificates will return the server SSL certificates for the given URL.
func GetClusterKubeconfig ¶ added in v1.5.0
func GetClusterKubeconfig(log *zap.SugaredLogger, httpClient *retryablehttp.Client, rc *rancherutil.RancherConfig, clusterID string) (string, error)
func GetClusterNameMetricLabel ¶ added in v1.1.0
GetClusterNameMetricLabel returns the label name used for labeling metrics with the Verrazzano cluster This is different in pre-1.1 VZ releases versus later releases
func GetClusterOperatorClientset ¶ added in v1.5.0
GetClusterOperatorClientset returns the Kubernetes clientset for the Verrazzano Cluster Operator for a given kubeconfig
func GetClusterRole ¶
func GetClusterRole(name string) (*rbacv1.ClusterRole, error)
GetClusterRole returns the cluster role with the given name
func GetClusterRoleBinding ¶
func GetClusterRoleBinding(name string) (*rbacv1.ClusterRoleBinding, error)
GetClusterRoleBinding returns the cluster role with the given name
func GetConfigMap ¶
GetConfigMap returns the config map for the passed in ConfigMap Name and Namespace
func GetContainerEnv ¶ added in v1.3.0
func GetContainerEnv(namespace string, deploymentName string, containerName string) ([]corev1.EnvVar, error)
GetContainerEnv returns an array of environment variables in the specified container for the specified deployment
func GetContainerImage ¶ added in v1.3.0
func GetContainerImage(namespace string, deploymentName string, containerName string) (string, error)
GetContainerImage returns the image used by the specified container for the specified deployment
func GetDNS ¶ added in v1.5.0
func GetDNS(cr *vzapi.Verrazzano) string
GetDNS gets the DNS configured in the CR
func GetDaemonSet ¶ added in v1.3.0
GetDaemonSet returns a GetDaemonSet with the given name and namespace
func GetDeployment ¶ added in v1.2.0
func GetDeployment(namespace string, deploymentName string) (*appsv1.Deployment, error)
GetDeployment returns a deployment with the given name and namespace
func GetDeploymentLabelSelector ¶ added in v1.4.0
func GetDeploymentLabelSelector(namespace, deploymentName string) (*metav1.LabelSelector, error)
func GetDynamicClient ¶ added in v0.15.0
GetDynamicClient returns a dynamic client needed to access Unstructured data
func GetDynamicClientInCluster ¶ added in v1.1.0
GetDynamicClientInCluster returns a dynamic client needed to access Unstructured data
func GetEffectiveKeyCloakPersistenceOverride ¶ added in v1.1.0
func GetEffectiveKeyCloakPersistenceOverride(kubeconfigPath string) (*v1beta1.VolumeClaimSpecTemplate, error)
GetEffectiveKeyCloakPersistenceOverride returns the effective PVC override for Keycloak, if it exists
func GetEffectiveVMIPersistenceOverride ¶ added in v1.1.0
func GetEffectiveVMIPersistenceOverride(kubeconfigPath string) (*v1beta1.VolumeClaimSpecTemplate, error)
GetEffectiveVMIPersistenceOverride returns the effective PVC override for the VMI components, if it exists
func GetEnvFallback ¶ added in v1.6.2
GetEnvFallback returns the value of the desired environment variable, but returns a fallback value if the environment variable is not set
func GetEnvFallbackBool ¶ added in v1.6.2
GetEnvFallbackBool returns the value of the desired boolean environment variable, but returns a fallback value if the environment variable is not set or isn't a bool value
func GetEnvFallbackInt ¶ added in v1.6.2
GetEnvFallbackInt returns the value of the desired integer environment variable, but returns a fallback value if the environment variable is not set or isn't an int value
func GetEnvName ¶ added in v1.1.0
func GetEnvironmentName ¶ added in v1.5.0
func GetEnvironmentName(cr *vzapi.Verrazzano) string
GetEnvironmentName returns the name of the Verrazzano install environment
func GetExternalOpenSearchURL ¶ added in v1.3.0
GetExternalOpenSearchURL gets the external Opensearch URL
func GetISMRolloverPeriod ¶ added in v1.3.0
func GetImagePrefix ¶ added in v1.3.0
func GetImagePrefix() string
GetImagePrefix Gets the image prefix for container images (accounts for private registry)
func GetIngress ¶ added in v1.4.0
GetIngress returns the ingress given a namespace and ingress name
func GetIngressIP ¶ added in v1.6.0
func GetIngressIP(cr *vzapi.Verrazzano) string
GetIngressIP returns the externalIP required to create ingress
func GetIngressList ¶ added in v1.3.0
func GetIngressList(namespace string) (*netv1.IngressList, error)
GetIngressList returns a list of ingresses in the given namespace
func GetIssuerList ¶ added in v1.3.0
func GetIssuerList(namespace string) (*certmanagerv1.IssuerList, error)
GetIssuerList returns a list of cluster issuers
func GetJaegerCollectorDeployments ¶ added in v1.4.0
func GetJaegerCollectorDeployments(kubeconfigPath, jaegerCRName string) ([]appsv1.Deployment, error)
GetJaegerCollectorDeployments returns the deployment object of the Jaeger collector corresponding to the given
Jaeger instance. If no instance name is provided, then it returns all Jaeger collector pods in the
// verrazzano-monitoring namespace.
func GetJaegerQueryDeployments ¶ added in v1.4.0
func GetJaegerQueryDeployments(kubeconfigPath, jaegerCRName string) ([]appsv1.Deployment, error)
GetJaegerQueryDeployments returns the deployment object of the Jaeger query corresponding to the given
Jaeger instance. If no Jaeger instance name is provided, then it returns all Jaeger query pods in the verrazzano-monitoring namespace
func GetJaegerSpanIndexName ¶ added in v1.4.0
GetJaegerSpanIndexName returns the index name used in OpenSearch used for storage
func GetJaegerSystemServicesInAdminCluster ¶ added in v1.4.0
func GetJaegerSystemServicesInAdminCluster() []string
GetJaegerSystemServicesInAdminCluster returns the system services that needs to be running in a admin cluster
func GetJaegerSystemServicesInManagedCluster ¶ added in v1.4.0
func GetJaegerSystemServicesInManagedCluster() []string
GetJaegerSystemServicesInManagedCluster returns the system services that needs to be running in a managed cluster
func GetKubernetesClientsetForCluster ¶ added in v0.14.0
func GetKubernetesClientsetForCluster(kubeconfigPath string) (*kubernetes.Clientset, error)
GetKubernetesClientsetForCluster returns the Kubernetes clientset for the cluster whose kubeconfig path is specified
func GetNamespace ¶
GetNamespace returns a namespace
func GetNamespaceInCluster ¶ added in v0.14.0
GetNamespaceInCluster returns a namespace in the cluster whose kubeconfigPath is specified
func GetNamespaceWithClientSet ¶ added in v1.3.0
func GetNamespaceWithClientSet(name string, clientset *kubernetes.Clientset) (*corev1.Namespace, error)
GetNamespaceWithClientSet returns a namespace for the given Clientset
func GetNodeCount ¶ added in v1.3.1
GetNodeCount returns the number of nodes for the cluster
func GetNodeCountInCluster ¶ added in v1.6.1
Gets the number of nodes in the cluster specified by kubeconfigPath. If an error occurs, returns 0 for the number of nodes.
func GetOpenSearchAppIndex ¶ added in v1.3.0
GetOpenSearchAppIndex in Verrazzano 1.3.0, application indices have been migrated to data streams following the pattern 'verrazzano-application-<application name>'
func GetOpenSearchAppIndexWithKC ¶ added in v1.3.0
GetOpenSearchAppIndexWithKC is the same as GetOpenSearchAppIndex but kubeconfig may be specified for MC tests
func GetOpenSearchSystemIndex ¶ added in v1.3.0
GetOpenSearchSystemIndex in Verrazzano 1.3.0, indices in the verrazzano-system namespace have been migrated to the verrazzano-system data stream
func GetOpenSearchSystemIndexWithKC ¶ added in v1.3.0
GetOpenSearchSystemIndexWithKC is the same as GetOpenSearchSystemIndex but the kubeconfig may be specified for MC tests
func GetPersistentVolumeClaims ¶ added in v1.3.0
func GetPersistentVolumeClaims(namespace string) (map[string]*corev1.PersistentVolumeClaim, error)
func GetPersistentVolumes ¶ added in v0.15.1
func GetPersistentVolumes() (map[string]*corev1.PersistentVolume, error)
func GetPodsFromSelector ¶ added in v0.15.0
GetPodsFromSelector returns a collection of pods for the given namespace and selector
func GetPrometheusConfig ¶ added in v1.3.0
GetPrometheusConfig - Returns the Prometehus Configmap, Marshalled prometehus.yml and the scrape config list
func GetPrometheusIngressHost ¶ added in v1.4.0
GetPrometheusIngressHost gets the host used for ingress to the system Prometheus in the given cluster
func GetQueryStoreIngressHost ¶ added in v1.6.0
GetQueryStoreIngressHost gets the host used for ingress to Thanos Query Store in the given cluster
func GetRancherAdminToken ¶ added in v1.4.0
func GetRancherAdminToken(log *zap.SugaredLogger, httpClient *retryablehttp.Client, rancherURL string) string
func GetReplicaCounts ¶ added in v1.3.0
func GetReplicaCounts(expectedDeployments []types.NamespacedName, optsBuilder func(name types.NamespacedName) (metav1.ListOptions, error)) (map[string]uint32, error)
GetReplicaCounts Builds a map of pod counts for a list of deployments expectedDeployments - a list of namespaced names for deployments to look for optsBuilder - a callback func to build the right set of options to select pods for the deployment
func GetRequiredEnvVarOrFail ¶
GetRequiredEnvVarOrFail returns the values of the provided environment variable name or fails.
func GetRetentionPeriod ¶ added in v1.3.0
func GetRetryPolicy ¶
GetRetryPolicy returns the standard retry policy
func GetRulesFromThanosRuler ¶ added in v1.7.0
GetRulesFromThanosRuler returns the rule data from the Thanos Ruler API given a kubeconfig
func GetSchedulableNodeCount ¶ added in v1.5.0
GetSchedulableNodeCount returns the number of schedulabe nodes in the cluster
func GetScrapePools ¶ added in v1.6.0
func GetSecret ¶
GetSecret returns the secret in a given namespace for the cluster specified in the environment
func GetSecretInCluster ¶ added in v0.14.0
func GetSecretInCluster(namespace string, name string, kubeconfigPath string) (*corev1.Secret, error)
GetSecretInCluster returns the secret in a given namespace for the given cluster
func GetService ¶
GetService returns a Service with the given name and namespace
func GetServiceAccount ¶ added in v0.14.0
func GetServiceAccount(namespace, name string) (*corev1.ServiceAccount, error)
func GetServiceMonitor ¶ added in v1.4.0
func GetServiceMonitor(namespace, name string) (*promoperapi.ServiceMonitor, error)
GetServiceMonitor returns the ServiceMonitor identified by namespace and name
func GetStatefulSet ¶ added in v1.3.0
func GetStatefulSet(namespace string, stsName string) (*appsv1.StatefulSet, error)
GetStatefulSet returns a StatefulSet with the given name and namespace
func GetSystemGrafanaIngressURL ¶ added in v1.4.0
GetSystemGrafanaIngressURL gets the system Grafana Ingress host in the given cluster
func GetSystemOpenSearchIngressURL ¶ added in v1.3.0
GetSystemOpenSearchIngressURL gets the system Opensearch Ingress host in the given cluster
func GetSystemThanosRulerURL ¶ added in v1.7.0
GetSystemThanosRulerURL gets the system Thanos Ingress host in the given cluster
func GetThanosQueryIngressHost ¶ added in v1.6.0
GetThanosQueryIngressHost gets the host used for ingress to Thanos Query in the given cluster
func GetTokenForServiceAccount ¶ added in v0.15.0
GetTokenForServiceAccount returns the token associated with service account
func GetURLForIngress ¶ added in v1.5.0
func GetURLForIngress(log *zap.SugaredLogger, api *APIEndpoint, namespace string, name string, scheme string) (string, error)
func GetV1Beta1ControllerRuntimeClient ¶ added in v1.7.0
func GetV1Beta1ControllerRuntimeClient(config *restclient.Config) (client.Client, error)
GetV1Beta1ControllerRuntimeClient, given a kubeconfig, returns a controller runtime client with verrazzano v1beta1 as part of its scheme.
func GetVerrazzano ¶ added in v1.3.0
func GetVerrazzano() (*v1alpha1.Verrazzano, error)
GetVerrazzano returns the installed Verrazzano
func GetVerrazzanoApplicationOperatorClientSet ¶ added in v1.4.0
GetVerrazzanoApplicationOperatorClientSet returns the Kubernetes clientset for the Verrazzano Application Operator
func GetVerrazzanoClientset ¶ added in v1.3.0
GetVerrazzanoClientset returns the Kubernetes clientset for the Verrazzano CRD
func GetVerrazzanoHTTPClient ¶
GetVerrazzanoHTTPClient returns a retryable Http client configured with the Verrazzano CA cert
func GetVerrazzanoInstallResourceInCluster ¶ added in v0.14.0
func GetVerrazzanoInstallResourceInCluster(kubeconfigPath string) (*v1alpha1.Verrazzano, error)
GetVerrazzanoInstallResourceInCluster returns the installed Verrazzano CR in the given cluster (there should only be 1 per cluster)
func GetVerrazzanoInstallResourceInClusterV1beta1 ¶ added in v1.4.0
func GetVerrazzanoInstallResourceInClusterV1beta1(kubeconfigPath string) (*v1beta1.Verrazzano, error)
GetVerrazzanoInstallResourceInClusterV1beta1 returns the installed Verrazzano CR in the given cluster (there should only be 1 per cluster)
func GetVerrazzanoNoRetryHTTPClient ¶
GetVerrazzanoNoRetryHTTPClient returns an Http client configured with the Verrazzano CA cert
func GetVerrazzanoPassword ¶
GetVerrazzanoPassword returns the password credential for the Verrazzano secret
func GetVerrazzanoPasswordInCluster ¶ added in v0.14.0
GetVerrazzanoPasswordInCluster returns the password credential for the Verrazzano secret in the "verrazzano-system" namespace for the given cluster
func GetVerrazzanoProjectClientsetInCluster ¶ added in v1.1.0
GetVerrazzanoProjectClientsetInCluster returns the Kubernetes clientset for the VerrazzanoProject
func GetVerrazzanoRetentionPolicy ¶ added in v1.3.0
func GetVerrazzanoRetentionPolicy(retentionPolicyName string) (v12.IndexManagementPolicy, error)
GetVerrazzanoRetentionPolicy returns the retention policy configured in the VZ CR If not explicitly configured, it returns the default retention policy with retention period of 7 days.
func GetVerrazzanoRetryableHTTPClient ¶ added in v1.3.0
func GetVerrazzanoRetryableHTTPClient() (*retryablehttp.Client, error)
GetVerrazzanoRetryableHTTPClient returns a retryable HTTP client configured with the CA cert
func GetVerrazzanoRolloverPolicy ¶ added in v1.3.0
func GetVerrazzanoRolloverPolicy(rolloverPolicyName string) (v12.RolloverPolicy, error)
GetVerrazzanoRolloverPolicy returns the rollover policy configured in the VZ CR
func GetVerrazzanoV1beta1 ¶ added in v1.4.0
func GetVerrazzanoV1beta1() (*v1beta1.Verrazzano, error)
GetVerrazzanoV1beta1 returns the installed Verrazzano using v1beta1 API client
func GetVerrazzanoVersion ¶ added in v1.1.0
GetVerrazzanoVersion returns the Verrazzano Version
func GetVirtualServiceList ¶ added in v1.3.0
func GetVirtualServiceList(namespace string) (*istionetv1beta1.VirtualServiceList, error)
GetVirtualServiceList returns a list of virtual services in the given namespace
func GetWildcardDNS ¶ added in v0.14.0
Returns well-known wildcard DNS name is used
func GvkToGvr ¶ added in v1.3.7
func GvkToGvr(gvk schema.GroupVersionKind) schema.GroupVersionResource
GvkToGvr converts a GroupVersionKind to corresponding GroupVersionResource
func HasStatus ¶ added in v0.17.0
func HasStatus(expected int) types.GomegaMatcher
HasStatus asserts that an HTTPResponse has a given status.
func HasWildcardDNS ¶ added in v0.14.0
Returns true if string has DNS wildcard name
func ISMPolicyExists ¶ added in v1.3.0
func IndicesNotExists ¶ added in v1.3.0
func IngressesExist ¶ added in v1.6.0
func InstallOrUpdateOpenSearchOperator ¶ added in v1.6.0
func InstallOrUpdateOpenSearchOperator(log *zap.SugaredLogger, master, data, ingest int) error
InstallOrUpdateOpenSearchOperator creates or updates the CM for the dev-controller to install or upgrade the opensearch-operator helm chart
func IsArgoCDEnabled ¶ added in v1.5.0
IsArgoCDEnabled returns false if the Argocd component is not set, or the value of its Enabled field otherwise
func IsCAIssuerConfig ¶ added in v1.6.0
func IsCAIssuerConfig(certConfig v1beta1.Certificate) (isCAConfig bool, err error)
func IsCertManagerEnabled ¶ added in v1.5.0
IsCertManagerEnabled returns true if the Cert Manager component is not set, or the value of its Enabled field otherwise
func IsClusterAPIEnabled ¶ added in v1.6.0
IsClusterAPIEnabled returns true if the ClusterAPI component is not set, or the value of its Enabled field otherwise
func IsClusterAgentEnabled ¶ added in v1.6.0
IsClusterAgentEnabled returns true if the Cluster Agent component is not set, or the value of its Enabled field otherwise
func IsCoherenceOperatorEnabled ¶ added in v1.1.0
IsCoherenceOperatorEnabled returns true if the COH operator component is not set, or the value of its Enabled field otherwise
func IsDataStreamSupported ¶ added in v1.3.0
func IsDataStreamSupported() bool
IsDataStreamSupported returns true if data stream is supported false otherwise
func IsDefaultDNS ¶ added in v1.4.0
func IsDefaultDNS(dns *vzapi.DNSComponent) bool
func IsDevProfile ¶ added in v0.13.0
func IsDevProfile() bool
IsDevProfile returns true if the deployed resource is a 'dev' profile
func IsDexEnabled ¶ added in v1.7.0
IsDexEnabled returns true if the Dex component is enabled, false otherwise
func IsGrafanaEnabled ¶ added in v1.4.0
IsGrafanaEnabled returns false if the Grafana component is not set, or the value of its Enabled field otherwise
func IsIngressEnabled ¶ added in v1.6.0
IsIngressEnabled returns false if the IngressNGINX component is not set and the IngressNGINX is enabled, or the value of its Enabled field otherwise
func IsIstioEnabled ¶ added in v1.6.0
IsIstioEnabled returns true if the Istio component is not set, or the value of its Enabled field otherwise
func IsJaegerInstanceCreated ¶ added in v1.4.0
IsJaegerInstanceCreated checks whether the default Jaeger CR is created
func IsJaegerOperatorEnabled ¶ added in v1.3.0
IsJaegerOperatorEnabled returns false if the Jaeger Operator component is not set, or the value of its Enabled field otherwise
func IsKeycloakEnabled ¶ added in v1.4.0
IsKeycloakEnabled returns false if the Keycloak component is not set, or the value of its Enabled field otherwise
func IsKubeStateMetricsEnabled ¶ added in v1.3.0
IsKubeStateMetricsEnabled returns false if the Kube State Metrics component is not set, or the value of its Enabled field otherwise
func IsManagedClusterProfile ¶ added in v0.13.0
func IsManagedClusterProfile() bool
IsManagedClusterProfile returns true if the deployed resource is a 'managed-cluster' profile
func IsMinVersion ¶ added in v1.4.0
IsMinVersion returns true if the given version >= minVersion
func IsMySQLOperatorEnabled ¶ added in v1.5.0
IsMySQLOperatorEnabled returns false if the MySQLOperator component is not set, or the value of its Enabled field otherwise
func IsOCIDNSEnabled ¶ added in v1.6.0
IsOCIDNSEnabled returns true if OCI DNS is enabled in the configuration
func IsOCIDNSWebhookEnabled ¶ added in v1.6.0
IsOCIDNSWebhookEnabled returns true if the Cert Manager component is not set, or the value of its Enabled field otherwise
func IsOpenSearchDashboardsEnabled ¶ added in v1.3.0
IsOpenSearchDashboardsEnabled returns true if the OpenSearchDashboards component is not set, or the value of its Enabled field otherwise
func IsOpenSearchEnabled ¶ added in v1.3.0
IsOpenSearchEnabled returns true if the OpenSearch component is not set, or the value of its Enabled field otherwise
func IsOpensearchEnabled ¶ added in v1.3.0
func IsProdProfile ¶ added in v0.13.0
func IsProdProfile() bool
IsProdProfile returns true if the deployed resource is a 'prod' profile
func IsPrometheusAdapterEnabled ¶ added in v1.3.0
IsPrometheusAdapterEnabled returns false if the Prometheus Adapter component is not set, or the value of its Enabled field otherwise
func IsPrometheusEnabled ¶ added in v1.4.0
IsPrometheusEnabled returns true if the Prometheus component is not set and the Prometheus Operator is enabled, or the value of its Enabled field otherwise
func IsPrometheusNodeExporterEnabled ¶ added in v1.3.0
IsPrometheusNodeExporterEnabled returns false if the Prometheus Node Exporter component is not set, or the value of its Enabled field otherwise
func IsPrometheusOperatorEnabled ¶ added in v1.3.0
IsPrometheusOperatorEnabled returns false if the Prometheus Operator component is not set, or the value of its Enabled field otherwise
func IsPrometheusPushgatewayEnabled ¶ added in v1.3.0
IsPrometheusPushgatewayEnabled returns false if the Prometheus Pushgateway component is not set, or the value of its Enabled field otherwise
func IsRancherBackupEnabled ¶ added in v1.4.0
IsRancherBackupEnabled returns false if the Rancher Backup component is not set, or the value of its Enabled field otherwise
func IsRancherEnabled ¶ added in v1.6.0
IsRancherEnabled returns false if the Rancher component is not set, or the value of its Enabled field otherwise
func IsVeleroEnabled ¶ added in v1.4.0
IsVeleroEnabled returns false if the Velero component is not set, or the value of its Enabled field otherwise
func IsVerrazzanoManaged ¶ added in v1.5.0
func IsVerrazzanoMinVersion ¶ added in v1.1.0
IsVerrazzanoMinVersion returns true if the installed Verrazzano version >= minVersion
func IsWebLogicOperatorEnabled ¶ added in v1.1.0
IsWebLogicOperatorEnabled returns true if the WKO operator component is not set, or the value of its Enabled field otherwise
func JaegerSpanRecordFoundInOpenSearch ¶ added in v1.4.0
func JaegerSpanRecordFoundInOpenSearch(kubeconfigPath string, after time.Time, serviceName string) bool
JaegerSpanRecordFoundInOpenSearch checks if jaeger span records are found in OpenSearch storage
func Jq ¶
func Jq(node interface{}, path ...string) interface{}
Jq queries JSON nodes with a JSON path
func ListApplicationIndices ¶ added in v1.3.0
func ListApplicationIndices() []string
func ListCRDs ¶ added in v1.4.0
func ListCRDs() (*apiext.CustomResourceDefinitionList, error)
ListCRDs returns the list of CRDs in a cluster
func ListClusterRoleBindings ¶ added in v0.14.0
func ListClusterRoleBindings() (*rbacv1.ClusterRoleBindingList, error)
ListClusterRoleBindings returns the list of cluster role bindings for the cluster
func ListCronJobNamesMatchingLabels ¶ added in v1.4.0
func ListCronJobNamesMatchingLabels(kubeconfigPath, namespace string, matchLabels map[string]string) ([]string, error)
ListCronJobNamesMatchingLabels returns the list of cronjobs in a given namespace matching the given labels for the cluster
func ListDeployments ¶
func ListDeployments(namespace string) (*appsv1.DeploymentList, error)
ListDeployments returns the list of deployments in a given namespace for the cluster
func ListDeploymentsMatchingLabelsInCluster ¶ added in v1.4.0
func ListDeploymentsMatchingLabelsInCluster(kubeconfigPath, namespace string, matchLabels map[string]string) (*appsv1.DeploymentList, error)
ListDeploymentsMatchingLabelsInCluster returns the list of deployments in a given namespace matching the given labels for the cluster
func ListIndexPatterns ¶ added in v1.3.0
ListIndexPatterns gets the configured index patterns in OpenSearch Dashboards
func ListIngresses ¶
func ListIngresses(namespace string) (*networkingv1.IngressList, error)
ListIngresses lists ingresses in namespace
func ListJaegerTracesWithTags ¶ added in v1.4.0
func ListJaegerTracesWithTags(kubeconfigPath string, start time.Time, serviceName string, tags map[string]string) []string
ListJaegerTracesWithTags lists all trace ids for a given service with the given tags
func ListNamespaces ¶
func ListNamespaces(opts metav1.ListOptions) (*corev1.NamespaceList, error)
ListNamespaces returns a namespace list for the given list options
func ListPodsInCluster ¶ added in v0.14.0
ListPodsInCluster returns the list of pods in a given namespace for the cluster
func ListPodsWithLabelsInCluster ¶ added in v1.4.0
func ListPodsWithLabelsInCluster(namespace, labels string, clientset *kubernetes.Clientset) (*corev1.PodList, error)
ListPodsWithLabelsInCluster returns the list of pods in a given namespace that matches a specific label for the cluster
func ListSecrets ¶
func ListSecrets(namespace string) (*corev1.SecretList, error)
ListSecrets returns the list of secrets in a given namespace for the cluster
func ListServices ¶
func ListServices(namespace string) (*corev1.ServiceList, error)
ListServices returns the list of services in a given namespace for the cluster
func ListServicesInJaeger ¶ added in v1.4.0
ListServicesInJaeger lists the services whose traces are available in Jaeger
func ListStatefulSets ¶ added in v1.4.0
func ListStatefulSets(namespace string) (*appsv1.StatefulSetList, error)
ListStatefulSets returns the list of StatefulSets in a given namespace for the cluster
func ListSystemIndices ¶ added in v1.3.0
func ListSystemIndices() []string
func Log ¶
Log prints out a log message in a standard format and filters out messages based on the global log level
func LogIndexFound ¶
LogIndexFound confirms a named index can be found in Opensearch in the cluster specified in the environment
func LogIndexFoundInCluster ¶ added in v0.14.0
LogIndexFoundInCluster confirms a named index can be found in Opensearch on the given cluster
func LogIndexPatternFound ¶ added in v1.3.0
LogIndexPatternFound confirms a named index pattern can be found in OpenSearch Dashboards in the cluster specified in the environment
func LogIndexPatternFoundInCluster ¶ added in v1.3.0
LogIndexFoundInCluster confirms a named index pattern can be found in OpenSearch Dashboards on the given cluster
func LogRecordFound ¶
LogRecordFound confirms a recent log record for the index with matching fields can be found in the cluster specified in the environment
func LogRecordFoundInCluster ¶ added in v0.14.0
func LogRecordFoundInCluster(indexName string, after time.Time, fields map[string]string, kubeconfigPath string) bool
LogRecordFoundInCluster confirms a recent log record for the index with matching fields can be found in the given cluster
func MinVersionSpec ¶ added in v1.1.0
MinVersionSpec Executes the specified test spec/func when the Verrazzano version meets the minimum specified version
func NoLog ¶ added in v0.15.0
NoLog returns true if no matched log record can be found in the index.
func NodeIsSchedulable ¶ added in v1.5.0
NodeIsSchedulable returns false if a node has the control-plane/master taint and is unschedulable, true otherwise
func PodsNotRunning ¶
PodsNotRunning returns true if all pods in namePrefixes are not running
func PodsRunning ¶
PodsRunning is identical to PodsRunningInCluster, except that it uses the cluster specified in the environment
func PodsRunningInCluster ¶ added in v0.14.0
func PodsRunningInCluster(namespace string, namePrefixes []string, kubeconfigPath string) (bool, error)
PodsRunningInCluster checks if all the pods identified by namePrefixes are ready and running in the given cluster
func PodsRunningInClusterWithClient ¶ added in v1.6.1
func PodsRunningInClusterWithClient(namespace string, namePrefixes []string, client *kubernetes.Clientset) (bool, error)
PodsRunningInClusterWithClient checks if all the pods identified by namePrefixes are ready and running in the given cluster
func PolicyRulesEqual ¶
func PolicyRulesEqual(rule1, rule2 rbacv1.PolicyRule) bool
PolicyRulesEqual compares two RBAC PolicyRules for semantic equality
func RemoveNamespaceFinalizers ¶ added in v1.1.1
func RetrieveArgoCDPassword ¶ added in v1.6.4
This function retrieves the ArgoCD password to log into rancher, based on the provided name and namespace of a secret that holds this information
func ScrapeTargets ¶ added in v1.3.0
func ScrapeTargets() ([]interface{}, error)
ScrapeTargets queries Prometheus API /api/v1/targets to list scrape targets
func ScrapeTargetsFromExec ¶ added in v1.6.0
func ScrapeTargetsFromExec() ([]interface{}, error)
func ScrapeTargetsHealthy ¶ added in v1.5.0
ScrapeTargetsHealthy validates the health of the scrape targets for the given scrapePools
func ScrapeTargetsHealthyFromExec ¶ added in v1.6.0
ScrapeTargetsHealthyFromExec validates the health of the scrape targets for the given scrapePools by execing into the prometheus pod
func SearchLog ¶ added in v0.14.0
func SearchLog(index string, query OpensearchQuery) map[string]interface{}
SearchLog search recent log records for the index with matching filters.
func SecretsCreated ¶
SecretsCreated checks if all the secrets identified by names are created
func SliceContainsPolicyRule ¶
func SliceContainsPolicyRule(ruleSlice []rbacv1.PolicyRule, rule rbacv1.PolicyRule) bool
SliceContainsPolicyRule determines if a given rule is in a slice of rules
func SlicesContainSameStrings ¶
SlicesContainSameStrings compares two slices and returns true if they contain the same strings in any order
func SlicesContainSubsetSubstring ¶ added in v1.3.0
SlicesContainSubsetSubstring returns true if the strings in the first slice are substrings of any string in the second slice
func SpecificPodsPodsNotRunningInClusterWithClient ¶ added in v1.6.1
func SpecificPodsPodsNotRunningInClusterWithClient(namespace string, clientset *kubernetes.Clientset, namePrefixes []string) (bool, error)
SpecificPodsPodsNotRunningInClusterWithClient returns true if all pods in namePrefixes are not running
func SpecificPodsRunning ¶ added in v1.4.0
SpecificPodsRunning is identical to SpecificPodsRunningCluster, except that it uses the cluster specified in the environment
func SpecificPodsRunningInCluster ¶ added in v1.4.0
SpecificPodsRunningInCluster checks if all the pods identified by labels and are ready and running in the given cluster
func SpecificPodsRunningInClusterWithClient ¶ added in v1.6.1
func SpecificPodsRunningInClusterWithClient(namespace, labels string, client *kubernetes.Clientset) (bool, error)
SpecificPodsRunningInClusterWithClient checks if all the pods identified by labels and are ready and running in the given cluster
func TestGrafanaTestDashboard ¶ added in v1.5.0
func TestGrafanaTestDashboard(testDashboard DashboardMetadata, pollingInterval time.Duration, timeout time.Duration)
func TestOpenSearchGrafanaDashBoard ¶ added in v1.5.0
func TestOpenSearchPlugins ¶ added in v1.5.0
func TestSearchGrafanaDashboard ¶ added in v1.5.0
func TestSystemHealthGrafanaDashboard ¶ added in v1.5.0
func UndeployHelloHelidonApplication ¶ added in v1.2.0
func UndeployHelloHelidonApplication(namespace string, customComponent string, customAppConfig string)
UndeployHelloHelidonApplication undeploys the Hello Helidon example application.
func UndeploySpringBootApplication ¶ added in v1.2.0
func UndeploySpringBootApplication(namespace string)
UndeploySpringBootApplication undeploys the Springboot example application.
func UninstallOpenSearchOperator ¶ added in v1.6.0
func UninstallOpenSearchOperator() error
UninstallOpenSearchOperator delete the CM so that the dev-controller can uninstall opensearch-operator helm
func UpdateConfigMap ¶ added in v1.3.0
UpdateConfigMap updates the config map
func UpdateSecret ¶ added in v1.3.1
UpdateSecret updates the given secret
func UseExternalOpensearch ¶ added in v1.5.0
func UseExternalOpensearch() bool
func ValidateApplicationTracesInCluster ¶ added in v1.4.0
func ValidateApplicationTracesInCluster(kubeconfigPath string, start time.Time, appServiceName, clusterName string) func() (bool, error)
ValidateApplicationTracesInCluster returns a function that validates if application traces can be successfully queried from Jaeger
func ValidateApplicationTracesInOS ¶ added in v1.4.0
ValidateApplicationTracesInOS returns a function that validates if application traces are stored successfully in OS backend storage
func ValidateDeploymentContainerImage ¶ added in v1.6.7
func ValidateEsIndexCleanerCronJobFunc ¶ added in v1.4.0
ValidateEsIndexCleanerCronJobFunc returns a function that validates if cron job for periodically cleaning the OS indices are created.
func ValidateJaegerAgentMetricFunc ¶ added in v1.4.0
func ValidateJaegerAgentMetricFunc(metricsTest MetricsTest) func() bool
ValidateJaegerAgentMetricFunc returns a function that validates if metrics of Jaeger agent is scraped by prometheus.
func ValidateJaegerCollectorMetricFunc ¶ added in v1.4.0
func ValidateJaegerCollectorMetricFunc(metricsTest MetricsTest) func() bool
ValidateJaegerCollectorMetricFunc returns a function that validates if metrics of Jaeger collector is scraped by prometheus.
func ValidateJaegerOperatorMetricFunc ¶ added in v1.4.0
func ValidateJaegerOperatorMetricFunc(metricsTest MetricsTest) func() bool
ValidateJaegerOperatorMetricFunc returns a function that validates if metrics of Jaeger operator is scraped by prometheus.
func ValidateJaegerQueryMetricFunc ¶ added in v1.4.0
func ValidateJaegerQueryMetricFunc(metricsTest MetricsTest) func() bool
ValidateJaegerQueryMetricFunc returns a function that validates if metrics of Jaeger query is scraped by prometheus.
func ValidateOpensearchHits ¶ added in v1.5.0
func ValidateOpensearchHits(searchResults map[string]interface{}, hitValidator OpensearchHitValidator, exceptions []*regexp.Regexp) bool
ValidateOpensearchHits invokes the HitValidator on every hit in the searchResults. The first invalid hit found will return in false being returned. Otherwise true will be returned.
func ValidateSystemTracesFuncInCluster ¶ added in v1.4.0
func ValidateSystemTracesFuncInCluster(kubeconfigPath string, start time.Time, clusterName string) func() (bool, error)
ValidateSystemTracesFuncInCluster returns a function that validates if system traces for the given cluster can be successfully queried from Jaeger
func ValidateSystemTracesInOSFunc ¶ added in v1.4.0
ValidateSystemTracesInOSFunc returns a function that validates if system traces are stored successfully in OS backend storage
func VerifyArgoCDAccess ¶ added in v1.5.0
func VerifyArgoCDAccess(log *zap.SugaredLogger) error
VerifyArgoCDAccess verifies that Argocd is accessible.
func VerifyArgoCDApplicationAccess ¶ added in v1.5.0
func VerifyArgoCDApplicationAccess(log *zap.SugaredLogger) error
func VerifyGrafanaComponent ¶ added in v1.4.0
func VerifyGrafanaComponent(log *zap.SugaredLogger, api *APIEndpoint, sysVmiHTTPClient *retryablehttp.Client, vmiCredentials *UsernamePassword) bool
func VerifyKeycloakAccess ¶ added in v1.4.0
func VerifyKeycloakAccess(log *zap.SugaredLogger) error
VerifyKeycloakAccess verifies access to Keycloak
func VerifyOpenSearchComponent ¶ added in v1.4.0
func VerifyOpenSearchComponent(log *zap.SugaredLogger, api *APIEndpoint, sysVmiHTTPClient *retryablehttp.Client, vmiCredentials *UsernamePassword) bool
func VerifyOpenSearchDashboardsComponent ¶ added in v1.4.0
func VerifyOpenSearchDashboardsComponent(log *zap.SugaredLogger, api *APIEndpoint, sysVmiHTTPClient *retryablehttp.Client, vmiCredentials *UsernamePassword) bool
func VerifyOpenSearchPlugins ¶ added in v1.5.0
func VerifyOpenSearchPlugins() error
VerifyOpenSearchPlugins checks that the OpenSearch plugins are installed
func VerifyPrometheusComponent ¶ added in v1.4.0
func VerifyPrometheusComponent(log *zap.SugaredLogger, api *APIEndpoint, sysVmiHTTPClient *retryablehttp.Client, vmiCredentials *UsernamePassword) bool
func VerifyRancherAccess ¶ added in v1.4.0
func VerifyRancherAccess(log *zap.SugaredLogger) error
VerifyRancherAccess verifies that Rancher is accessible.
func VerifyRancherKeycloakAuthConfig ¶ added in v1.4.0
func VerifyRancherKeycloakAuthConfig(log *zap.SugaredLogger) error
VerifyRancherKeycloakAuthConfig verifies that Rancher/Keycloak AuthConfig is correctly populated
func VerifySystemVMIComponent ¶ added in v1.4.0
func VerifySystemVMIComponent(log *zap.SugaredLogger, api *APIEndpoint, sysVmiHTTPClient *retryablehttp.Client, vmiCredentials *UsernamePassword, ingressName, expectedURLPrefix string) bool
func VzReadyV1beta1 ¶ added in v1.6.3
func WaitForISMPolicyUpdate ¶ added in v1.3.0
WaitForISMPolicyUpdate waits for the VMO reconcile to complete and the ISM policies are created
func WaitForVZCondition ¶ added in v1.3.0
func WaitForVZCondition(conditionType v1beta1.ConditionType, pollingInterval, timeout time.Duration)
WaitForVZCondition waits till the VZ CR reaches the given condition
Types ¶
type APIEndpoint ¶
type APIEndpoint struct { AccessToken string `json:"access_token"` APIURL string HTTPClient *retryablehttp.Client }
APIEndpoint contains information needed to access an API
func EventuallyGetAPIEndpoint ¶ added in v1.4.0
func EventuallyGetAPIEndpoint(kubeconfigPath string) *APIEndpoint
func GetAPIEndpoint ¶
func GetAPIEndpoint(kubeconfigPath string) (*APIEndpoint, error)
GetAPIEndpoint returns the APIEndpoint stub with AccessToken, from the given cluster
func (*APIEndpoint) Delete ¶
func (api *APIEndpoint) Delete(path string) (*HTTPResponse, error)
Delete Invoke DELETE API Request
func (*APIEndpoint) Get ¶
func (api *APIEndpoint) Get(path string) (*HTTPResponse, error)
Get Invoke GET API Request
func (*APIEndpoint) GetIngress ¶
func (api *APIEndpoint) GetIngress(namespace, name string) (*networkingv1.Ingress, error)
GetIngress fetches ingress from api
func (*APIEndpoint) GetOpensearchURL ¶ added in v1.5.0
func (api *APIEndpoint) GetOpensearchURL() (string, error)
GetOpensearchURL fetches OpenSearch endpoint URL
func (*APIEndpoint) GetVerrazzanoIngressURL ¶ added in v1.3.0
func (api *APIEndpoint) GetVerrazzanoIngressURL() (string, error)
GetVerrazzanoIngressURL fetches Verrazzano-Ingress endpoint URL
func (*APIEndpoint) Patch ¶
func (api *APIEndpoint) Patch(path string, body io.Reader) (*HTTPResponse, error)
Patch Invoke POST API Request
func (*APIEndpoint) Post ¶
func (api *APIEndpoint) Post(path string, body io.Reader) (*HTTPResponse, error)
Post Invoke POST API Request
func (*APIEndpoint) Request ¶
func (api *APIEndpoint) Request(method, path string, body io.Reader) (*HTTPResponse, error)
Request Invoke API
type Action ¶ added in v1.3.0
type Action struct { Rollover struct { MinIndexAge string `json:"min_index_age"` } `json:"rollover,omitempty"` Delete struct { MinIndexAge string `json:"min_index_age"` } `json:"delete,omitempty"` }
Rollover or Delete action defined in ISM policy
type ConditionalCheckFunc ¶ added in v1.1.0
ConditionalCheckFunc Test function for conditional specs
type DashboardMetadata ¶ added in v1.5.0
type DataStream ¶ added in v1.3.0
type DataStream struct { Name string `json:"name"` TimestampField struct { Name string `json:"name"` } `json:"timestamp_field"` Indices []struct { IndexName string `json:"index_name"` IndexUUID string `json:"index_uuid"` } `json:"indices"` Generation int `json:"generation"` Status string `json:"status"` Template string `json:"template"` }
DataStream details
func GetDataStream ¶ added in v1.3.0
func GetDataStream(dataStreamName string) (DataStream, error)
GetDataStream return the data stream object with the given
type HTTPResponse ¶
HTTPResponse represents an HTTP response including the read body
func CreateGrafanaDashboard ¶ added in v1.4.0
func CreateGrafanaDashboard(body string) (*HTTPResponse, error)
CreateGrafanaDashboard creates a grafana dashboard using the JSON string provided
func Delete ¶
func Delete(url string, hostHeader string) (*HTTPResponse, error)
Delete executes an HTTP DELETE
func GetGrafanaDashboard ¶ added in v1.4.0
func GetGrafanaDashboard(uid string) (*HTTPResponse, error)
GetGrafanaDashboard returns the dashboard metadata for the given uid.
func GetWebPage ¶ added in v0.17.0
func GetWebPage(url string, hostHeader string) (*HTTPResponse, error)
GetWebPage makes an HTTP GET request using a retryable client configured with the Verrazzano cert bundle
func GetWebPageInCluster ¶ added in v1.1.0
func GetWebPageInCluster(url string, hostHeader string, kubeconfigPath string) (*HTTPResponse, error)
GetWebPageInCluster makes an HTTP GET request using a retryable client configured with the Verrazzano cert bundle
func GetWebPageWithBasicAuth ¶
func GetWebPageWithBasicAuth(url string, hostHeader string, username string, password string, kubeconfigPath string) (*HTTPResponse, error)
GetWebPageWithBasicAuth gets a web page using basic auth, using a given kubeconfig
func GetWebPageWithClient ¶ added in v0.17.0
func GetWebPageWithClient(httpClient *retryablehttp.Client, url string, hostHeader string) (*HTTPResponse, error)
GetWebPageWithClient submits a GET request using the specified client.
func PostOpensearch ¶ added in v1.5.0
func PostOpensearch(path string, body string) (*HTTPResponse, error)
PostOpensearch POST the request entity body to Opensearch API path The provided path is appended to the Opensearch base URL
func PostOpensearchDashboards ¶ added in v1.3.0
func PostOpensearchDashboards(path string, body string, additionalHeaders ...string) (*HTTPResponse, error)
PostOpensearchDashboards POST the request entity body to Opensearch API path The provided path is appended to the OpenSearchDashboards base URL
func PostWithHostHeader ¶
func PostWithHostHeader(url, contentType string, hostHeader string, body io.Reader) (*HTTPResponse, error)
PostWithHostHeader posts a request with a specified Host header
func ProcessHTTPResponse ¶ added in v0.17.0
func ProcessHTTPResponse(resp *http.Response) (*HTTPResponse, error)
ProcessHTTPResponse processes the HTTP response by reading and closing the body, then returning the HTTPResponse object. This function is used to prevent file descriptor leaks and other problems. See https://github.com/golang/go/blob/master/src/net/http/response.go
Params
resp: Http response returned by http call httpErr: Http error returned by the http call
Returns
HttpReponse which has the body and status code.
func PutISMPolicy ¶ added in v1.5.3
func PutISMPolicy(policyData, policyName string) (*HTTPResponse, error)
func PutWithHostHeader ¶
func PutWithHostHeader(url, contentType string, hostHeader string, body io.Reader) (*HTTPResponse, error)
PutWithHostHeader PUTs a request with a specified Host header
func PutWithHostHeaderInCluster ¶ added in v1.1.0
func PutWithHostHeaderInCluster(url, contentType string, hostHeader string, body io.Reader, kubeconfigPath string) (*HTTPResponse, error)
PutWithHostHeaderInCluster PUTs a request with a specified Host header
func SearchGrafanaDashboard ¶ added in v1.4.0
func SearchGrafanaDashboard(searchParams map[string]string) (*HTTPResponse, error)
SearchGrafanaDashboard returns the dashboard metadata for the given uid.
type ISMPolicy ¶ added in v1.3.0
type ISMPolicy struct { PolicyID string `json:"policy_id"` Description string `json:"description"` LastUpdatedTime int64 `json:"last_updated_time"` SchemaVersion int `json:"schema_version"` DefaultState string `json:"default_state"` States []State `json:"states"` IsmTemplate IsmTemplate `json:"ism_template"` }
ISMPolicy definition
func GetISMPolicy ¶ added in v1.3.0
type IndexListData ¶ added in v1.3.0
type IndexListData struct { Health string `json:"health"` Status string `json:"status"` Index string `json:"index"` UUID string `json:"uuid"` Pri string `json:"pri"` Rep string `json:"rep"` DocsCount string `json:"docsCount"` DocsDeleted string `json:"docsDeleted"` StoreSize string `json:"storeSize"` PriStoreSize string `json:"priStoreSize"` }
IndexListData represents the row of /_cat/indices?format=json output
type IndexMetadata ¶ added in v1.3.0
type IndexMetadata struct { Mapping struct { TotalFields struct { Limit string `json:"limit"` } `json:"total_fields"` } `json:"mapping"` RefreshInterval string `json:"refresh_interval"` Hidden string `json:"hidden"` NumberOfShards string `json:"number_of_shards"` AutoExpandReplicas string `json:"auto_expand_replicas"` ProvidedName string `json:"provided_name"` CreationDate string `json:"creation_date"` NumberOfReplicas string `json:"number_of_replicas"` UUID string `json:"uuid"` Version struct { Created string `json:"created"` } `json:"version"` }
IndexMetadata contains information about a particular
func GetApplicationIndices ¶ added in v1.3.0
func GetApplicationIndices() ([]IndexMetadata, error)
GetApplicationIndices returns the metadata of indices used by application indices
func GetBackingIndicesForDataStream ¶ added in v1.3.0
func GetBackingIndicesForDataStream(dataStreamName string) ([]IndexMetadata, error)
GetBackingIndicesForDataStream returns metadata of all backing indices for a given data stream
func GetIndexMetadata ¶ added in v1.3.0
func GetIndexMetadata(indexName string) (IndexMetadata, error)
GetIndexMetadata returns the metadata of the index
func GetIndexMetadataForDataStream ¶ added in v1.3.0
func GetIndexMetadataForDataStream(dataStreamName string) ([]IndexMetadata, error)
GetIndexMetadataForDataStream returns the metadata of all backing indices of a given datastream
func GetIndexMetadataList ¶ added in v1.3.0
func GetIndexMetadataList(indexNames []string) ([]IndexMetadata, error)
func GetSystemIndices ¶ added in v1.3.0
func GetSystemIndices() ([]IndexMetadata, error)
GetSystemIndices returns metadata of indices of all system indices
type IndexPattern ¶ added in v1.3.0
type IndexPattern struct {
Name string
}
type IndexSettings ¶ added in v1.3.0
type IndexSettings struct { Settings struct { Index IndexMetadata `json:"index"` } `json:"settings"` }
IndexSettings parent object containing the index metadata
type InlinePolicy ¶ added in v1.5.3
type IsmTemplate ¶ added in v1.3.0
type IsmTemplate []struct { IndexPatterns []string `json:"index_patterns"` Priority int `json:"priority"` LastUpdatedTime int64 `json:"last_updated_time"` }
IsmTemplate defined in ISM policy
type JaegerTraceData ¶ added in v1.4.0
type JaegerTraceData struct { TraceID string `json:"traceID"` Spans []struct { TraceID string `json:"traceID"` SpanID string `json:"spanID"` Flags int `json:"flags"` OperationName string `json:"operationName"` References []struct { RefType string `json:"refType"` TraceID string `json:"traceID"` SpanID string `json:"spanID"` } `json:"references"` StartTime int64 `json:"startTime"` Duration int `json:"duration"` Tags []struct { Key string `json:"key"` Type string `json:"type"` Value interface{} `json:"value"` } `json:"tags"` Logs []struct { Timestamp int64 `json:"timestamp"` Fields []struct { Key string `json:"key"` Type string `json:"type"` Value string `json:"value"` } `json:"fields"` } `json:"logs"` ProcessID string `json:"processID"` Warnings interface{} `json:"warnings"` } `json:"spans"` Processes struct { P1 struct { ServiceName string `json:"serviceName"` Tags []struct { Key string `json:"key"` Type string `json:"type"` Value string `json:"value"` } `json:"tags"` } `json:"p1"` } `json:"processes"` Warnings interface{} `json:"warnings"` }
type JaegerTraceDataWrapper ¶ added in v1.4.0
type JaegerTraceDataWrapper struct { Data []JaegerTraceData `json:"data"` Total int `json:"total"` Limit int `json:"limit"` Offset int `json:"offset"` Errors interface{} `json:"errors"` }
type KeycloakRESTClient ¶ added in v0.14.0
type KeycloakRESTClient struct {
// contains filtered or unexported fields
}
func NewKeycloakAdminRESTClient ¶ added in v0.15.0
func NewKeycloakAdminRESTClient() (*KeycloakRESTClient, error)
NewKeycloakRESTClient creates a new Keycloak REST client.
func (*KeycloakRESTClient) CreateUser ¶ added in v0.14.0
func (c *KeycloakRESTClient) CreateUser(userRealm string, userName string, firstName string, lastName string, password string) (string, error)
CreateUser creates a user in Keycloak curl -v http://localhost:8080/auth/admin/realms/apiv2/users -H "Content-Type: application/json" -H "Authorization: bearer $TOKEN" --data '{"username":"someuser", "firstName":"xyz", "lastName":"xyz", "email":"demo2@gmail.com", "enabled":"true"}'
func (*KeycloakRESTClient) DeleteUser ¶ added in v0.14.0
func (c *KeycloakRESTClient) DeleteUser(userRealm string, userID string) error
DeleteUser deletes a user from Keycloak DELETE /auth/admin/realms/<realm>/users/<userID>
func (*KeycloakRESTClient) GetRealm ¶ added in v0.14.0
func (c *KeycloakRESTClient) GetRealm(realm string) (map[string]interface{}, error)
GetRealm gets realm data from Keycloak.
func (*KeycloakRESTClient) GetToken ¶ added in v1.3.1
func (c *KeycloakRESTClient) GetToken(realm string, username string, password string, clientid string, log *zap.SugaredLogger) (string, error)
GetRealm gets a bearer token from a realm.
func (*KeycloakRESTClient) SetPassword ¶ added in v0.14.0
func (c *KeycloakRESTClient) SetPassword(userRealm string, userID string, password string) error
SetPassword sets a user's password in Keycloak PUT /auth/admin/realms/{realm}/users/{id}/reset-password { "type": "password", "temporary": false, "value": "..." }
func (*KeycloakRESTClient) VerifyUserExists ¶ added in v1.4.0
func (c *KeycloakRESTClient) VerifyUserExists(userRealm string, userID string) (bool, error)
VerifyUserExists verifies the user exists in Keycloak GET /auth/admin/realms/<realm>/users/<userID>
type ListOfTokenOutputFromRancher ¶ added in v1.6.4
type LogLevel ¶
type LogLevel int
LogLevel is the logging level used to control log output
const ( // Error level designates error events that might still allow the application to continue running Error LogLevel = 1 // Info level designates informational messages that highlight the progress of the application at coarse-grained level Info LogLevel = 4 // Debug level designates fine-grained informational events that are most useful to debug an application Debug LogLevel = 7 )
type MetricSource ¶ added in v1.6.0
type MetricSource interface { GetHost() string GetTargets() ([]interface{}, error) // contains filtered or unexported methods }
MetricSource implements an interface to interact with metrics sources
type MetricsTest ¶ added in v1.6.0
type MetricsTest struct { Source MetricSource DefaultLabels map[string]string }
func NewMetricsTest ¶ added in v1.6.0
func NewMetricsTest(kubeconfigPath string, defaultLabels map[string]string, extraKubeconfigs ...string) (MetricsTest, error)
NewMetricsTest returns a metric test object with which to query metrics Parameters: kubeconfigs a list of kubeconfigs from all clusters kubeconfigPath this is the kubeconfigPath for the cluster we want to search metrics from defaultLabels the default labels will be added to the test metric when the query begins
func (MetricsTest) MetricsExist ¶ added in v1.6.0
func (m MetricsTest) MetricsExist(metricName string, labels map[string]string) bool
func (MetricsTest) QueryMetric ¶ added in v1.6.0
type NameGenerator ¶ added in v1.7.0
type NameGenerator struct {
// contains filtered or unexported fields
}
func (NameGenerator) New ¶ added in v1.7.0
func (n NameGenerator) New(prefix string) string
type OSOperatorOverrides ¶ added in v1.6.0
type OSOperatorOverrides struct { EnvironmentName string DNSSuffix string MasterReplicas int DataReplicas int IngestReplicas int }
OSOperatorOverrides are overrides to the opensearch-operator helm
type OpenSearchISMPolicyAddModifier ¶ added in v1.5.0
type OpenSearchISMPolicyAddModifier struct{}
func (OpenSearchISMPolicyAddModifier) ModifyCR ¶ added in v1.5.0
func (u OpenSearchISMPolicyAddModifier) ModifyCR(cr *vzapi.Verrazzano)
type OpenSearchISMPolicyRemoveModifier ¶ added in v1.5.0
type OpenSearchISMPolicyRemoveModifier struct{}
func (OpenSearchISMPolicyRemoveModifier) ModifyCR ¶ added in v1.5.0
func (u OpenSearchISMPolicyRemoveModifier) ModifyCR(cr *vzapi.Verrazzano)
type OpensearchHit ¶ added in v1.5.0
type OpensearchHit map[string]interface{}
OpensearchHit is the type used for a Opensearch hit returned in a search query result
type OpensearchHitValidator ¶ added in v1.5.0
type OpensearchHitValidator func(hit OpensearchHit) bool
OpensearchHitValidator is a function that validates a hit returned in a search query result
type OpensearchQuery ¶ added in v1.5.0
OpensearchQuery describes an Opensearch Query
type PolicyList ¶ added in v1.5.3
type PolicyList struct { Policies []InlinePolicy `json:"policies"` TotalPolicies int `json:"total_policies"` }
type PrometheusSource ¶ added in v1.6.0
type PrometheusSource struct {
// contains filtered or unexported fields
}
PrometheusSource provides a struct to interact with Prometheus metric source
func NewPrometheusSource ¶ added in v1.6.0
func NewPrometheusSource(kubeconfigPath string) (PrometheusSource, error)
func (PrometheusSource) GetHost ¶ added in v1.6.0
func (p PrometheusSource) GetHost() string
GetHost returns the host for the Prometheus ingress
func (PrometheusSource) GetTargets ¶ added in v1.6.0
func (p PrometheusSource) GetTargets() ([]interface{}, error)
GetTargets returns the Prometheus targets
type SearchResult ¶ added in v1.3.0
type SearchResult struct { Took int `json:"took"` TimedOut bool `json:"timed_out"` Shards struct { Total int `json:"total"` Successful int `json:"successful"` Skipped int `json:"skipped"` Failed int `json:"failed"` } `json:"_shards"` Hits struct { Total struct { Value int `json:"value"` Relation string `json:"relation"` } `json:"total"` MaxScore interface{} `json:"max_score"` Hits []interface{} `json:"hits"` } `json:"hits"` }
SearchResult represents the result of an Opensearch search query
type State ¶ added in v1.3.0
type State struct { Name string `json:"name"` Actions []Action `json:"actions"` Transitions []Transition `json:"transitions"` }
State defined in ISM policy
type ThanosSource ¶ added in v1.6.0
type ThanosSource struct {
// contains filtered or unexported fields
}
ThanosSource provides a struct to interact with the Thanos metric source
func NewThanosSource ¶ added in v1.6.0
func NewThanosSource(kubeconfigPath string) (ThanosSource, error)
func (ThanosSource) GetHost ¶ added in v1.6.0
func (t ThanosSource) GetHost() string
GetHost returns the host for the Thanos ingress
func (ThanosSource) GetTargets ¶ added in v1.6.0
func (t ThanosSource) GetTargets() ([]interface{}, error)
GetTargets returns the Thanos store targets
type TokenPostResponse ¶ added in v1.6.4
type Transition ¶ added in v1.3.0
type Transition struct { StateName string `json:"state_name"` Conditions map[string]string `json:"conditions"` }
Transition defined in ISM policy
type UsernamePassword ¶
UsernamePassword - Username and Password credentials
func EventuallyGetSystemVMICredentials ¶ added in v1.4.0
func EventuallyGetSystemVMICredentials() *UsernamePassword
func GetSystemVMICredentials ¶
func GetSystemVMICredentials() (*UsernamePassword, error)
GetSystemVMICredentials - Obtain VMI system credentials
Source Files ¶
- acme_ca_certs.go
- api.go
- argocd.go
- bom.go
- certs.go
- common.go
- conditional_spec.go
- dns.go
- elasticsearch.go
- environment.go
- fluentd.go
- grafana.go
- hello_helidon.go
- jaeger.go
- keycloak.go
- kiali.go
- kubernetes.go
- logging.go
- loggingtrait.go
- metric_source.go
- metrics.go
- names.go
- oam.go
- opensearch_dashboards.go
- opensearch_operator.go
- rancher.go
- secrets.go
- springboot.go
- testdata.go
- thanos.go
- upgrade.go
- vmi.go
- web.go