common

package
v1.7.0 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2023 License: UPL-1.0 Imports: 59 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ArgoCDCompName      = "argoCD"
	ArgoCDName          = "argocd"
	ArgoCDIngressCAName = "tls-argocd-ingress"
	ArgoCDCACert        = "ca.crt"
	ArgoCDService       = "argocd-server"
	ArgoCDCM            = "argocd-cm"
	ArgoCDRBACCM        = "argocd-rbac-cm"
)

ArgoCD HTTPS Configuration

View Source
const (
	ArgoCDApplicationSetController = "argocd-applicationset-controller"
	ArgoCDNotificationController   = "argocd-notifications-controller"
	ArgoCDRedis                    = "argocd-redis"
	ArgoCDRepoServer               = "argocd-repo-server"
	ArgoCDServer                   = "argocd-server"
)

ArgoCD deployments

View Source
const (
	ArgoCDAPIGroup           = "argoproj.io"
	ArgoCDKindApplication    = "Application"
	ArgoCDKindAppProject     = "AppProject"
	ArgoCDKindApplicationSet = "ApplicationSet"
	ArgoCDAPIVersion         = "v1alpha1"
)

ArgoCD GVK

View Source
const (

	// IstioComponentName is the name of the Istio component
	IstioComponentName = "istio"

	// IstioNamespace is the default Istio namespace
	IstioNamespace = constants.IstioSystemNamespace

	// PrometheusOperatorComponentName is the name of the Prometheus Operator component
	PrometheusOperatorComponentName = "prometheus-operator"

	// PrometheusOperatorComponentNamespace is the namespace of the component
	PrometheusOperatorComponentNamespace = constants.VerrazzanoMonitoringNamespace

	OpenSearchComponentName = "opensearch"

	OpenSearchDashboardsComponentName = "opensearch-dashboards"
)
View Source
const (
	// RancherName is the name of the component
	RancherName = "rancher"
	// CattleSystem is the namespace of the component
	CattleSystem                            = "cattle-system"
	RancherIngressCAName                    = "tls-rancher-ingress"
	RancherAdminSecret                      = "rancher-admin-secret"
	RancherCACert                           = "ca.crt"
	AuthConfigKeycloakAttributeClientSecret = "clientSecret"
	APIGroupRancherManagement               = "management.cattle.io"
	APIGroupVersionRancherManagement        = "v3"
	AuthConfigKeycloak                      = "keycloakoidc"
	SettingFirstLogin                       = "first-login"
	KontainerDriverOCIName                  = "ociocneengine"
	KontainerDriverOKEName                  = "oraclecontainerengine"
	KontainerDriverOKECAPIName              = "okecapi"
	KontainerDriversResourceName            = "kontainerdrivers"
	KontainerDriverKind                     = "KontainerDriver"
)

Rancher HTTPS Configuration

View Source
const (
	VMIName               = "system"
	VMOComponentName      = "verrazzano-monitoring-operator"
	VMOComponentNamespace = constants.VerrazzanoSystemNamespace
)
View Source
const (
	PVCListingError = "Failed listing persistent volumes: %v"
)
View Source
const (
	SecuritySecretName = "securityconfig-secret"
)

Variables

View Source
var GVKAuthConfig = GetRancherMgmtAPIGVKForKind("AuthConfig")
View Source
var GVKSetting = GetRancherMgmtAPIGVKForKind("Setting")

Functions

func ActivateKontainerDriver added in v1.6.0

func ActivateKontainerDriver(ctx spi.ComponentContext, dynClient dynamic.Interface, name string) error

ActivateKontainerDriver - activate a kontainerdriver

func ApplyCRDYaml added in v1.3.0

func ApplyCRDYaml(ctx spi.ComponentContext, helmChartsDir string) error

func ApplyCRDYamlWithDirectoryName added in v1.7.0

func ApplyCRDYamlWithDirectoryName(ctx spi.ComponentContext, helmChartsDir, crdDir string) error

func ApplyManifestFile added in v1.7.0

func ApplyManifestFile(ctx spi.ComponentContext, fileName string, args map[string]interface{}) error

ApplyManifestFile applies the file present in the thirdparty/manifest directory with the given args

func AssociateHelmObject added in v1.3.0

func AssociateHelmObject(cli clipkg.Client, obj clipkg.Object, releaseName types.NamespacedName, namespacedName types.NamespacedName, keepResource bool) (clipkg.Object, error)

AssociateHelmObject annotates an object as being managed by the specified release Helm chart If the object was already associated with a different Helm release (e.g verrazzano), then that relationship will be broken

func BoolPtr added in v1.6.0

func BoolPtr(value bool) *bool

BoolPtr returns a pointer to the given bool value.

func BuildArgsForOpenSearchCR added in v1.7.0

func BuildArgsForOpenSearchCR(ctx spi.ComponentContext) (map[string]interface{}, error)

BuildArgsForOpenSearchCR gets the required values from VZ CR and converts them to yaml templates

func CertPool

func CertPool(certs ...[]byte) *x509.CertPool

func CheckCRDsExist added in v1.6.0

func CheckCRDsExist(crdNames []string) (bool, error)

func CheckExistingNamespace added in v1.5.0

func CheckExistingNamespace(ns []corev1.Namespace, includeNamespace func(*corev1.Namespace) bool) error

CheckExistingNamespace checks namespaces if there is an existing namespace that is not created by Verrazzano It compares the label of the namespace with the Verrazzano namespace label i.e verrazzano.io/namespace

func CheckIngressesAndCerts added in v1.3.0

func CheckIngressesAndCerts(ctx spi.ComponentContext, comp spi.Component) error

CheckIngressesAndCerts checks the Ingress and Certs for the VMI components in the Post- function

func CompareInstallArgs added in v1.3.0

func CompareInstallArgs(old []vzapi.InstallArgs, new []vzapi.InstallArgs, exceptions ...string) error

func ComparePorts added in v1.3.0

func ComparePorts(old []corev1.ServicePort, new []corev1.ServicePort) error

func CompareStorageOverrides added in v1.3.0

func CompareStorageOverrides(old *vzapi.Verrazzano, new *vzapi.Verrazzano, jsonName string) error

CompareStorageOverrides compares storage override settings for the VMI components

func CompareStorageOverridesV1Beta1 added in v1.4.0

func CompareStorageOverridesV1Beta1(old *v1beta1.Verrazzano, new *v1beta1.Verrazzano, jsonName string) error

CompareStorageOverridesV1Beta1 compares storage override settings for the VMI components

func ConstructAuthPolicyRule added in v1.6.1

func ConstructAuthPolicyRule(namespaces []string, fromPrincipals []string, toPorts []string) *securityv1beta1.Rule

func ConvertVerrazzanoCR added in v1.4.0

func ConvertVerrazzanoCR(vz *vzapi.Verrazzano, vzv1beta1 *v1beta1.Verrazzano) error

ConvertVerrazzanoCR converts older version of Verrzzano CR in v1alpha1.Verrazzano to newer version of v1beta1.Verrazzano

func CopyOCIDNSSecret added in v1.6.0

func CopyOCIDNSSecret(compContext spi.ComponentContext, targetNamespace string) error

func CopySecret added in v1.4.0

func CopySecret(ctx spi.ComponentContext, secretName string, destNamespace string, logMsg string) error

CopySecret copies a secret from the verrazzano-install namespace to the specified namespace. If the target secret already exists, then it will be updated if necessary.

func CreateAndLabelNamespaces added in v1.5.0

func CreateAndLabelNamespaces(ctx spi.ComponentContext) error

func CreateAndLabelVMINamespaces added in v1.3.0

func CreateAndLabelVMINamespaces(ctx spi.ComponentContext) error

CreateAndLabelVMINamespaces creates and labels the namespaces needed for the VMI resources

func CreateOrDeleteFluentbitFilterAndParser added in v1.6.0

func CreateOrDeleteFluentbitFilterAndParser(ctx spi.ComponentContext, fluentbitFilterAndParserTemplate, namespace string, delete bool) error

CreateOrDeleteFluentbitFilterAndParser create or delete the Fluentbit Filter & Parser Resource by applying/deleting the fluentbitFilterAndParserTemplate based on the delete flag.

func CreateOrUpdateProtobuf added in v1.5.0

CreateOrUpdateProtobuf is a derivative of the function CreateOrUpdate, copied from <a href="https://github.com/kubernetes-sigs/controller-runtime/blob/master/pkg/controller/controllerutil/controllerutil.go">Kubernetes-sigs</a> resource. CreateOrUpdateProtobuf is called on types that use protobuf, such as Istio types, for which equality.Semantic.DeepEqual is invalid, which was confirmed by this <a href="https://github.com/istio/istio/issues/43001">Istio</a> issue.

func CreateOrUpdateSystemComponentIngress added in v1.4.0

func CreateOrUpdateSystemComponentIngress(ctx spi.ComponentContext, props IngressProperties) error

CreateOrUpdateSystemComponentIngress creates or updates an ingress for a Verrazzano system component

func CreateOrUpdateVMI added in v1.3.0

func CreateOrUpdateVMI(ctx spi.ComponentContext, updateFunc VMIMutateFunc) error

CreateOrUpdateVMI instantiates the VMI resource

func DeleteExistingVolumeClaim added in v1.4.0

func DeleteExistingVolumeClaim(ctx spi.ComponentContext, pvcName types.NamespacedName) error

DeleteExistingVolumeClaim removes a persistent volume claim in order to allow the pv to be reclaimed by a new PVC.

func DeleteSystemComponentIngress added in v1.6.0

func DeleteSystemComponentIngress(ctx spi.ComponentContext, name string) error

DeleteSystemComponentIngress deletes an ingress for a Verrazzano system component

func DeleteVMI added in v1.6.2

func DeleteVMI(ctx spi.ComponentContext) error

DeleteVMI deletes the VMI resource

func DisassociateHelmObject added in v1.7.0

func DisassociateHelmObject(cli clipkg.Client, obj clipkg.Object, namespacedName types.NamespacedName, keepResource bool, managedByHelm bool) (clipkg.Object, error)

DisassociateHelmObject removes Helm release annotations from an object so that it is no longer managed by that Helm chart

func EnsureBackupSecret added in v1.3.0

func EnsureBackupSecret(cli client.Client) error

EnsureBackupSecret creates or updates the VMI backup secret

func EnsureGrafanaAdminSecret added in v1.3.0

func EnsureGrafanaAdminSecret(cli client.Client) error

EnsureGrafanaAdminSecret creates or updates the Grafana admin secret

func EnsureGrafanaDatabaseSecret added in v1.4.0

func EnsureGrafanaDatabaseSecret(ctx spi.ComponentContext) error

EnsureGrafanaDatabaseSecret ensures that the DB login secret provided in the verrazzano-install namespace is copied to the verrazzano-system namespace

func EnsureVMISecret added in v1.3.0

func EnsureVMISecret(cli client.Client) error

EnsureVMISecret creates or updates the VMI secret

func EnsureVerrazzanoMonitoringNamespace added in v1.4.0

func EnsureVerrazzanoMonitoringNamespace(ctx spi.ComponentContext) error

EnsureVerrazzanoMonitoringNamespace ensures that the verrazzano-monitoring namespace is created with the right labels.

func ExportVMOHelmChart added in v1.3.0

func ExportVMOHelmChart(ctx spi.ComponentContext) error

ExportVMOHelmChart adds necessary annotations to verrazzano-monitoring-operator objects which allows them to be managed by the verrazzano-monitoring-operator helm chart. This is needed for the case when VMO was previously installed by the verrazzano helm chart.

func GetAdditionalCA

func GetAdditionalCA(c client.Reader) []byte

GetAdditionalCA fetches the verrazzano-tls-ca secret returns empty byte array of the secret verrazzano-tls-ca is not found

func GetAdminSecret

func GetAdminSecret(c client.Reader) (string, error)

GetAdminSecret fetches the Rancher admin secret

func GetArgoProjAPIGVRForResource added in v1.5.4

func GetArgoProjAPIGVRForResource(kind string) schema.GroupVersionKind

func GetArgoProjAPIGVRForResource returns a argoproj.io/v1alpha1 GroupVersionResource structure for specified kind

func GetAuthProxyPrincipal added in v1.6.1

func GetAuthProxyPrincipal() string

func GetJaegerPrincipal added in v1.6.1

func GetJaegerPrincipal() string

func GetKialiPrincipal added in v1.6.1

func GetKialiPrincipal() string

func GetManagedClusterRegistrationSecret added in v1.5.0

func GetManagedClusterRegistrationSecret(client clipkg.Client) (*corev1.Secret, error)

GetManagedClusterRegistrationSecret fetches the managed cluster registration secret if it exists. returns nil if the secret is not found.

func GetPVCsBasedOnLabel added in v1.7.0

func GetPVCsBasedOnLabel(ctx spi.ComponentContext, labelKey, labelValue string) ([]v1.PersistentVolumeClaim, error)

GetPVCsBasedOnLabel return the list of PersistentVolumeClaims based on a certain label key-value pair

func GetPVsBasedOnLabel added in v1.7.0

func GetPVsBasedOnLabel(ctx spi.ComponentContext, labelKey, labelValue string) ([]v1.PersistentVolume, error)

GetPVsBasedOnLabel return the list of PersistentVolumes based on a certain label key-value pair

func GetPersistentVolumes added in v1.4.0

func GetPersistentVolumes(ctx spi.ComponentContext, componentName string) (*v1.PersistentVolumeList, error)

GetPersistentVolumes returns a volume list containing a persistent volume created by an older chart

func GetRancherMgmtAPIGVKForKind added in v1.3.7

func GetRancherMgmtAPIGVKForKind(kind string) schema.GroupVersionKind

GetRancherMgmtAPIGVKForKind returns a management.cattle.io/v3 GroupVersionKind structure for specified kind

func GetRancherMgmtAPIGVRForResource added in v1.6.0

func GetRancherMgmtAPIGVRForResource(resource string) schema.GroupVersionResource

GetRancherMgmtAPIGVRForResource returns a management.cattle.io/v3 GroupVersionResource structure for specified kind

func GetRootCA

func GetRootCA(c client.Reader) ([]byte, error)

GetRootCA gets the root CA certificate from the Rancher TLS secret. If the secret does not exist, we return a nil slice.

func GetThanosQueryPrincipal added in v1.6.1

func GetThanosQueryPrincipal() string

func GetVMOImagesOverrides added in v1.7.0

func GetVMOImagesOverrides() ([]bom.KeyValue, error)

GetVMOImagesOverrides returns the images under the verrazzano-monitoring-operator subcomponent

func GetVMOManagedDeployments added in v1.6.2

func GetVMOManagedDeployments(ctx spi.ComponentContext) (*appsv1.DeploymentList, error)

GetVMOManagedDeployments returns the list of deployments managed by VMO

func GetVMOManagedIngresses added in v1.6.2

func GetVMOManagedIngresses(ctx spi.ComponentContext) (*netv1.IngressList, error)

GetVMOManagedIngresses returns the list of ingresses managed by VMO

func GetVMOManagedServices added in v1.6.2

func GetVMOManagedServices(ctx spi.ComponentContext) (*corev1.ServiceList, error)

GetVMOManagedServices returns the list of services managed by VMO

func GetVMOManagedStatefulsets added in v1.6.2

func GetVMOManagedStatefulsets(ctx spi.ComponentContext) (*appsv1.StatefulSetList, error)

GetVMOManagedStatefulsets returns the list of statefulsets managed by VMO

func GetVMOPrincipal added in v1.6.1

func GetVMOPrincipal() string

func GetVerrazzanoMonitoringNamespace added in v1.4.0

func GetVerrazzanoMonitoringNamespace() *corev1.Namespace

GetVerrazzanoMonitoringNamespace creates and returns a namespace object for the Monitoring subcomponents' namespace

func Int32Ptr added in v1.5.4

func Int32Ptr(v int32) *int32

Int32Ptr returns a pointer to the given int32 value

func IsGrafanaAdminSecretReady added in v1.3.0

func IsGrafanaAdminSecretReady(ctx spi.ComponentContext) bool

IsGrafanaAdminSecretReady returns true if the Grafana admin secret is present in the system namespace

func IsLegacyOS added in v1.7.0

func IsLegacyOS(ctx spi.ComponentContext) (bool, error)

IsLegacyOS returns true if the OS that is running is managed by VMO

func IsLegacyOSD added in v1.7.0

func IsLegacyOSD(ctx spi.ComponentContext) (bool, error)

IsLegacyOSD returns true if the OSD that is running is managed by VMO

func IsMultiNodeOpenSearch added in v1.3.0

func IsMultiNodeOpenSearch(vz *vzapi.Verrazzano) (bool, error)

IsMultiNodeOpenSearch returns true if the VZ OpenSearch has more than 1 node.

func IsSingleDataNodeCluster added in v1.7.0

func IsSingleDataNodeCluster(ctx spi.ComponentContext) bool

IsSingleDataNodeCluster returns true if the cluster has a single data node

func IsSingleMasterNodeCluster added in v1.7.0

func IsSingleMasterNodeCluster(ctx spi.ComponentContext) bool

IsSingleMasterNodeCluster returns true if the cluster has a single master node

func IsUpgrade added in v1.7.0

func IsUpgrade(ctx spi.ComponentContext) bool

IsUpgrade returns true if we are upgrading from <=1.6.x to > 1.6

func IsVMISecretReady added in v1.3.0

func IsVMISecretReady(ctx spi.ComponentContext) bool

IsVMISecretReady returns true if the VMI secret is present in the system namespace

func LabelKubeSystemNamespace added in v1.5.0

func LabelKubeSystemNamespace(client clipkg.Client) error

LabelKubeSystemNamespace adds the label needed by network polices to kube-system

func MergeSecretData added in v1.7.0

func MergeSecretData(ctx spi.ComponentContext, helmManifestsDir string) error

MergeSecretData merges config.yml and internal_users.yml from the security config secret and the helm config present in manifests directory.

func MkDep added in v1.4.0

func MkDep(ns, name string) *appsv1.Deployment

func MkSvc added in v1.4.0

func MkSvc(ns, name string) *corev1.Service

func MockDynamicClient added in v1.5.0

func MockDynamicClient(objects ...runtime.Object) func() (dynamic.Interface, error)

MockDynamicClient mocks GetDynamicClient function

func MockGetAppsV1 added in v1.4.0

func MockGetAppsV1(objects ...runtime.Object) func(_ ...vzlog.VerrazzanoLogger) (appsv1Cli.AppsV1Interface, error)

MockGetAppsV1 mocks GetAppsV1Client function

func MockGetCoreV1 added in v1.4.0

func MockGetCoreV1(objects ...runtime.Object) func(_ ...vzlog.VerrazzanoLogger) (corev1Cli.CoreV1Interface, error)

MockGetCoreV1 mocks GetCoreV1Client function

func MockGetCoreV1WithNamespace added in v1.6.0

func MockGetCoreV1WithNamespace(namespace string, objects ...runtime.Object) func(_ ...vzlog.VerrazzanoLogger) (corev1Cli.CoreV1Interface, error)

MockGetCoreV1WithNamespace mocks GetCoreV1Client function with a Get for a verrazzano managed namespace

func MutateVerrazzanoMonitoringNamespace added in v1.4.0

func MutateVerrazzanoMonitoringNamespace(ctx spi.ComponentContext, namespace *corev1.Namespace)

MutateVerrazzanoMonitoringNamespace modifies the given namespace for the Monitoring subcomponents with the appropriate labels, in one location. If the provided namespace is not the Verrazzano monitoring namespace, it is ignored.

func NewVMI added in v1.3.0

NewVMI creates a new VerrazzanoMonitoringInstance object with default values

func ReassociateVMOResources added in v1.3.0

func ReassociateVMOResources(ctx spi.ComponentContext) error

ReassociateVMOResources updates the resources to ensure they are managed by the VMO release/component. The resource policy annotation is removed to ensure that helm manages the lifecycle of the resources (the resource policy annotation is added to ensure the resources are disassociated from the VZ chart which used to manage these resources)

func RemoveResourcePolicyAnnotation added in v1.3.0

func RemoveResourcePolicyAnnotation(cli clipkg.Client, obj clipkg.Object, namespacedName types.NamespacedName) (clipkg.Object, error)

RemoveResourcePolicyAnnotation removes the resource policy annotation to allow the resource to be managed by helm

func RenderTemplate added in v1.6.0

func RenderTemplate(templatePath string, args map[string]interface{}, outputFile *os.File) error

RenderTemplate to render the file provided in the specific path with the arguments provided. Store the output template in outputFile.

func ResetVolumeReclaimPolicy added in v1.4.0

func ResetVolumeReclaimPolicy(ctx spi.ComponentContext, componentName string) error

ResetVolumeReclaimPolicy resets the reclaim policy on a volume to its original value (prior to upgrade).

func RetainPersistentVolume added in v1.4.0

func RetainPersistentVolume(ctx spi.ComponentContext, pvc *v1.PersistentVolumeClaim, componentName string) error

RetainPersistentVolume locates the persistent volume associated with the provided pvc and sets the reclaim policy to "retain" so that it can be migrated to the new deployment/statefulset.

func Retry added in v1.5.0

func Retry(backoff wait.Backoff, log vzlog.VerrazzanoLogger, retryOnError bool, fn wait.ConditionFunc) error

Retry executes the provided function repeatedly, retrying until the function returns done = true, or exceeds the given timeout. errors will be logged, but will not trigger retry to stop unless retryOnError is false

func RunValidateInstallTest added in v1.4.0

func RunValidateInstallTest(t *testing.T, newComp func() spi.Component, tests ...ValidateInstallTest)

RunValidateInstallTest runs ValidateInstallTests

func SameSiteCookieAnnotations added in v1.4.0

func SameSiteCookieAnnotations(cookieName string) map[string]string

SameSiteCookieAnnotations creates annotations for same site cookies to enable sticky sessions on an ingress

func SetStorageSize added in v1.3.0

func SetStorageSize(storage *ResourceRequestValues, storageObject *vmov1.Storage)

SetStorageSize copies or defaults the storage size

func UpdateExistingVolumeClaims added in v1.4.0

func UpdateExistingVolumeClaims(ctx spi.ComponentContext, pvcName types.NamespacedName, newClaimName string, componentName string) error

UpdateExistingVolumeClaims removes a persistent volume claim from the volume if the status is "released". This allows the new deployment to bind to the existing volume.

func UpdateKeycloakOIDCAuthConfig added in v1.4.0

func UpdateKeycloakOIDCAuthConfig(ctx spi.ComponentContext, attributes map[string]interface{}) error

UpdateKeycloakOIDCAuthConfig updates the keycloakoidc AuthConfig CR with specified attributes

func UpdateKontainerDriverURLs added in v1.6.1

func UpdateKontainerDriverURLs(ctx spi.ComponentContext, dynClient dynamic.Interface) error

UpdateKontainerDriverURLs - Update the kontainerdriver URLs if the common-name has changed

func UpdatePrometheusAnnotations added in v1.4.0

func UpdatePrometheusAnnotations(ctx spi.ComponentContext, prometheusNamespace string, promOperComponentName string) error

UpdatePrometheusAnnotations updates annotations on the Prometheus CR to include the outbound IP for Keycloak

Types

type HTTPDoSig

type HTTPDoSig func(hc *http.Client, req *http.Request) (*http.Response, error)

HTTPDoSig provides a HTTP Client wrapper function for unit testing

var HTTPDo HTTPDoSig = func(hc *http.Client, req *http.Request) (*http.Response, error) {
	return hc.Do(req)
}

HTTPDo is the default HTTP Client wrapper implementation

type HelmManagedResource added in v1.3.0

type HelmManagedResource struct {
	Obj            clipkg.Object
	NamespacedName types.NamespacedName
}

HelmManagedResource provides an object type and name for a resource managed within a helm chart

func GetVMOHelmManagedResources added in v1.4.0

func GetVMOHelmManagedResources() []HelmManagedResource

GetVMOHelmManagedResources returns a list of resource types and their namespaced names that are managed by the VMO helm chart

type IngressProperties added in v1.4.0

type IngressProperties struct {
	IngressName      string
	HostName         string
	TLSSecretName    string
	ExtraAnnotations map[string]string
}

type NodePool added in v1.7.0

type NodePool struct {
	Component        string                      `json:"component"`
	Replicas         int32                       `json:"replicas"`
	DiskSize         string                      `json:"diskSize,omitempty"`
	Resources        corev1.ResourceRequirements `json:"resources,omitempty"`
	Jvm              string                      `json:"jvm,omitempty"`
	Roles            []string                    `json:"roles"`
	Persistence      *PersistenceConfig          `json:"persistence,omitempty"`
	AdditionalConfig map[string]string           `json:"additionalConfig,omitempty"`
}

type OpenSearch added in v1.7.0

type OpenSearch struct {
	OpenSearchCluster `json:"opensearchCluster"`
}

type OpenSearchCluster added in v1.7.0

type OpenSearchCluster struct {
	NodePools []NodePool `json:"nodePools" patchStrategy:"merge,retainKeys" patchMergeKey:"component"`
}

type PersistenceConfig added in v1.7.0

type PersistenceConfig struct {
	PersistenceSource `json:","`
}

PersistenceConfig defines options for data persistence

type PersistenceSource added in v1.7.0

type PersistenceSource struct {
	EmptyDir *corev1.EmptyDirVolumeSource `json:"emptyDir,omitempty"`
}

type ResourceRequestValues added in v1.3.0

type ResourceRequestValues struct {
	Memory  string `json:"memory,omitempty"`
	Storage string `json:"storage"` // Empty string allowed
}

ResourceRequestValues defines the storage information that will be passed to VMI instance

func FindStorageOverride added in v1.3.0

func FindStorageOverride(effectiveCR *vzapi.Verrazzano) (*ResourceRequestValues, error)

FindStorageOverride finds and returns the correct storage override from the effective CR

func FindStorageOverrideV1Beta1 added in v1.4.0

func FindStorageOverrideV1Beta1(effectiveCR *v1beta1.Verrazzano) (*ResourceRequestValues, error)

FindStorageOverrideV1Beta1 finds and returns the correct storage override from the effective CR

type VMIMutateFunc added in v1.3.0

VMIMutateFunc is the function used to populate the components in VMI

type ValidateInstallTest added in v1.4.0

type ValidateInstallTest struct {
	Name       string
	Vz         *vzapi.Verrazzano
	Corev1Cli  func(_ ...vzlog.VerrazzanoLogger) (corev1Cli.CoreV1Interface, error)
	Appsv1Cli  func(_ ...vzlog.VerrazzanoLogger) (appsv1Cli.AppsV1Interface, error)
	DynamicCli func() (dynamic.Interface, error)
	WantErr    string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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