Documentation ¶
Index ¶
- Constants
- Variables
- func ActivateKontainerDriver(ctx spi.ComponentContext, dynClient dynamic.Interface, name string) error
- func ApplyCRDYaml(ctx spi.ComponentContext, helmChartsDir string) error
- func ApplyCRDYamlWithDirectoryName(ctx spi.ComponentContext, helmChartsDir, crdDir string) error
- func ApplyManifestFile(ctx spi.ComponentContext, fileName string, args map[string]interface{}) error
- func AssociateHelmObject(cli clipkg.Client, obj clipkg.Object, releaseName types.NamespacedName, ...) (clipkg.Object, error)
- func BoolPtr(value bool) *bool
- func BuildArgsForOpenSearchCR(ctx spi.ComponentContext) (map[string]interface{}, error)
- func CertPool(certs ...[]byte) *x509.CertPool
- func CheckCRDsExist(crdNames []string) (bool, error)
- func CheckExistingNamespace(ns []corev1.Namespace, includeNamespace func(*corev1.Namespace) bool) error
- func CheckIngressesAndCerts(ctx spi.ComponentContext, comp spi.Component) error
- func CompareInstallArgs(old []vzapi.InstallArgs, new []vzapi.InstallArgs, exceptions ...string) error
- func ComparePorts(old []corev1.ServicePort, new []corev1.ServicePort) error
- func CompareStorageOverrides(old *vzapi.Verrazzano, new *vzapi.Verrazzano, jsonName string) error
- func CompareStorageOverridesV1Beta1(old *v1beta1.Verrazzano, new *v1beta1.Verrazzano, jsonName string) error
- func ConstructAuthPolicyRule(namespaces []string, fromPrincipals []string, toPorts []string) *securityv1beta1.Rule
- func ConvertVerrazzanoCR(vz *vzapi.Verrazzano, vzv1beta1 *v1beta1.Verrazzano) error
- func CopyOCIDNSSecret(compContext spi.ComponentContext, targetNamespace string) error
- func CopySecret(ctx spi.ComponentContext, secretName string, destNamespace string, ...) error
- func CreateAndLabelNamespaces(ctx spi.ComponentContext) error
- func CreateAndLabelVMINamespaces(ctx spi.ComponentContext) error
- func CreateOrDeleteFluentbitFilterAndParser(ctx spi.ComponentContext, fluentbitFilterAndParserTemplate, namespace string, ...) error
- func CreateOrUpdateProtobuf(ctx context.Context, c client.Client, obj client.Object, ...) (controllerutil.OperationResult, error)
- func CreateOrUpdateSystemComponentIngress(ctx spi.ComponentContext, props IngressProperties) error
- func CreateOrUpdateVMI(ctx spi.ComponentContext, updateFunc VMIMutateFunc) error
- func DeleteExistingVolumeClaim(ctx spi.ComponentContext, pvcName types.NamespacedName) error
- func DeleteSystemComponentIngress(ctx spi.ComponentContext, name string) error
- func DeleteVMI(ctx spi.ComponentContext) error
- func DisassociateHelmObject(cli clipkg.Client, obj clipkg.Object, namespacedName types.NamespacedName, ...) (clipkg.Object, error)
- func EnsureBackupSecret(cli client.Client) error
- func EnsureGrafanaAdminSecret(cli client.Client) error
- func EnsureGrafanaDatabaseSecret(ctx spi.ComponentContext) error
- func EnsureVMISecret(cli client.Client) error
- func EnsureVerrazzanoMonitoringNamespace(ctx spi.ComponentContext) error
- func ExportVMOHelmChart(ctx spi.ComponentContext) error
- func GetAdditionalCA(c client.Reader) []byte
- func GetAdminSecret(c client.Reader) (string, error)
- func GetArgoProjAPIGVRForResource(kind string) schema.GroupVersionKind
- func GetAuthProxyPrincipal() string
- func GetJaegerPrincipal() string
- func GetKialiPrincipal() string
- func GetManagedClusterRegistrationSecret(client clipkg.Client) (*corev1.Secret, error)
- func GetPVCsBasedOnLabel(ctx spi.ComponentContext, labelKey, labelValue string) ([]v1.PersistentVolumeClaim, error)
- func GetPVsBasedOnLabel(ctx spi.ComponentContext, labelKey, labelValue string) ([]v1.PersistentVolume, error)
- func GetPersistentVolumes(ctx spi.ComponentContext, componentName string) (*v1.PersistentVolumeList, error)
- func GetRancherMgmtAPIGVKForKind(kind string) schema.GroupVersionKind
- func GetRancherMgmtAPIGVRForResource(resource string) schema.GroupVersionResource
- func GetRootCA(c client.Reader) ([]byte, error)
- func GetThanosQueryPrincipal() string
- func GetVMOImagesOverrides() ([]bom.KeyValue, error)
- func GetVMOManagedDeployments(ctx spi.ComponentContext) (*appsv1.DeploymentList, error)
- func GetVMOManagedIngresses(ctx spi.ComponentContext) (*netv1.IngressList, error)
- func GetVMOManagedServices(ctx spi.ComponentContext) (*corev1.ServiceList, error)
- func GetVMOManagedStatefulsets(ctx spi.ComponentContext) (*appsv1.StatefulSetList, error)
- func GetVMOPrincipal() string
- func GetVerrazzanoMonitoringNamespace() *corev1.Namespace
- func Int32Ptr(v int32) *int32
- func IsGrafanaAdminSecretReady(ctx spi.ComponentContext) bool
- func IsLegacyOS(ctx spi.ComponentContext) (bool, error)
- func IsLegacyOSD(ctx spi.ComponentContext) (bool, error)
- func IsMultiNodeOpenSearch(vz *vzapi.Verrazzano) (bool, error)
- func IsSingleDataNodeCluster(ctx spi.ComponentContext) bool
- func IsSingleMasterNodeCluster(ctx spi.ComponentContext) bool
- func IsUpgrade(ctx spi.ComponentContext) bool
- func IsVMISecretReady(ctx spi.ComponentContext) bool
- func LabelKubeSystemNamespace(client clipkg.Client) error
- func MergeSecretData(ctx spi.ComponentContext, helmManifestsDir string) error
- func MkDep(ns, name string) *appsv1.Deployment
- func MkSvc(ns, name string) *corev1.Service
- func MockDynamicClient(objects ...runtime.Object) func() (dynamic.Interface, error)
- func MockGetAppsV1(objects ...runtime.Object) func(_ ...vzlog.VerrazzanoLogger) (appsv1Cli.AppsV1Interface, error)
- func MockGetCoreV1(objects ...runtime.Object) func(_ ...vzlog.VerrazzanoLogger) (corev1Cli.CoreV1Interface, error)
- func MockGetCoreV1WithNamespace(namespace string, objects ...runtime.Object) func(_ ...vzlog.VerrazzanoLogger) (corev1Cli.CoreV1Interface, error)
- func MutateVerrazzanoMonitoringNamespace(ctx spi.ComponentContext, namespace *corev1.Namespace)
- func NewVMI() *vmov1.VerrazzanoMonitoringInstance
- func ReassociateVMOResources(ctx spi.ComponentContext) error
- func RemoveResourcePolicyAnnotation(cli clipkg.Client, obj clipkg.Object, namespacedName types.NamespacedName) (clipkg.Object, error)
- func RenderTemplate(templatePath string, args map[string]interface{}, outputFile *os.File) error
- func ResetVolumeReclaimPolicy(ctx spi.ComponentContext, componentName string) error
- func RetainPersistentVolume(ctx spi.ComponentContext, pvc *v1.PersistentVolumeClaim, componentName string) error
- func Retry(backoff wait.Backoff, log vzlog.VerrazzanoLogger, retryOnError bool, ...) error
- func RunValidateInstallTest(t *testing.T, newComp func() spi.Component, tests ...ValidateInstallTest)
- func SameSiteCookieAnnotations(cookieName string) map[string]string
- func SetStorageSize(storage *ResourceRequestValues, storageObject *vmov1.Storage)
- func UpdateExistingVolumeClaims(ctx spi.ComponentContext, pvcName types.NamespacedName, newClaimName string, ...) error
- func UpdateKeycloakOIDCAuthConfig(ctx spi.ComponentContext, attributes map[string]interface{}) error
- func UpdateKontainerDriverURLs(ctx spi.ComponentContext, dynClient dynamic.Interface) error
- func UpdatePrometheusAnnotations(ctx spi.ComponentContext, prometheusNamespace string, ...) error
- type HTTPDoSig
- type HelmManagedResource
- type IngressProperties
- type NodePool
- type OpenSearch
- type OpenSearchCluster
- type PersistenceConfig
- type PersistenceSource
- type ResourceRequestValues
- type VMIMutateFunc
- type ValidateInstallTest
Constants ¶
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
const ( ArgoCDApplicationSetController = "argocd-applicationset-controller" ArgoCDNotificationController = "argocd-notifications-controller" ArgoCDRedis = "argocd-redis" ArgoCDRepoServer = "argocd-repo-server" ArgoCDServer = "argocd-server" )
ArgoCD deployments
const ( ArgoCDAPIGroup = "argoproj.io" ArgoCDKindApplication = "Application" ArgoCDKindAppProject = "AppProject" ArgoCDKindApplicationSet = "ApplicationSet" ArgoCDAPIVersion = "v1alpha1" )
ArgoCD GVK
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" )
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
const ( VMIName = "system" VMOComponentName = "verrazzano-monitoring-operator" VMOComponentNamespace = constants.VerrazzanoSystemNamespace )
const (
PVCListingError = "Failed listing persistent volumes: %v"
)
const (
SecuritySecretName = "securityconfig-secret"
)
Variables ¶
var GVKAuthConfig = GetRancherMgmtAPIGVKForKind("AuthConfig")
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 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 CheckCRDsExist ¶ added in v1.6.0
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
func CreateOrUpdateProtobuf(ctx context.Context, c client.Client, obj client.Object, f controllerutil.MutateFn) (controllerutil.OperationResult, error)
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
EnsureBackupSecret creates or updates the VMI backup secret
func EnsureGrafanaAdminSecret ¶ added in v1.3.0
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
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 ¶
GetAdditionalCA fetches the verrazzano-tls-ca secret returns empty byte array of the secret verrazzano-tls-ca is not found
func GetAdminSecret ¶
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
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 ¶
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
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
GetVerrazzanoMonitoringNamespace creates and returns a namespace object for the Monitoring subcomponents' namespace
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
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 MockDynamicClient ¶ added in v1.5.0
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
func NewVMI() *vmov1.VerrazzanoMonitoringInstance
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
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
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 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 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
type VMIMutateFunc func(ctx spi.ComponentContext, storage *ResourceRequestValues, vmi *vmov1.VerrazzanoMonitoringInstance, existingVMI *vmov1.VerrazzanoMonitoringInstance) error
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 }
Source Files ¶
- argocd.go
- authorization_policy.go
- compare.go
- constants.go
- controller_runtime.go
- crds.go
- externaldns.go
- fluentOperator_utils.go
- helm.go
- http.go
- ingress.go
- managed_cluster.go
- namespace.go
- opensearch_operator.go
- prometheus.go
- pvc.go
- rancher.go
- secret.go
- serviceaccount.go
- test_utils.go
- verrazzano_monitoring.go
- vmi.go