Documentation ¶
Index ¶
- Constants
- func GetConfigMapName(kb *kibanacrd.Kibana) (configMapName string)
- func GetContainerImage(kb *kibanacrd.Kibana) string
- func GetDeploymentName(kb *kibanacrd.Kibana) (name string)
- func GetExporterUrl(kb *kibanacrd.Kibana) string
- func GetIngressName(kb *kibanacrd.Kibana) (ingressName string)
- func GetLoadBalancerName(kb *kibanacrd.Kibana) (serviceName string)
- func GetMetricbeatName(kb *kibanacrd.Kibana) (name string)
- func GetNetworkPolicyElasticsearchName(kb *kibanacrd.Kibana) string
- func GetNetworkPolicyName(kb *kibanacrd.Kibana) string
- func GetPDBName(kb *kibanacrd.Kibana) (serviceName string)
- func GetPodMonitorName(kb *kibanacrd.Kibana) string
- func GetSecretNameForCAElasticsearch(kb *kibanacrd.Kibana) (secretName string)
- func GetSecretNameForCredentials(kb *kibanacrd.Kibana) (secretName string)
- func GetSecretNameForKeystore(kb *kibanacrd.Kibana) (secretName string)
- func GetSecretNameForPki(kb *kibanacrd.Kibana) (secretName string)
- func GetSecretNameForTls(kb *kibanacrd.Kibana) (secretName string)
- func GetServiceName(kb *kibanacrd.Kibana) (serviceName string)
- func NewKibanaReconciler(client client.Client, logger *logrus.Entry, recorder record.EventRecorder) (multiPhaseReconciler controller.Controller)
- func TestBuildCAElasticsearchSecret(t *testing.T)
- type KibanaReconciler
- func (h *KibanaReconciler) Delete(ctx context.Context, o object.MultiPhaseObject, data map[string]any) (err error)
- func (h *KibanaReconciler) OnError(ctx context.Context, o object.MultiPhaseObject, data map[string]any, ...) (res ctrl.Result, err error)
- func (h *KibanaReconciler) OnSuccess(ctx context.Context, r object.MultiPhaseObject, data map[string]any) (res ctrl.Result, err error)
- func (r *KibanaReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
- func (h *KibanaReconciler) SetupWithManager(mgr ctrl.Manager) error
Constants ¶
const ( ConfigmapCondition shared.ConditionName = "ConfigmapReady" ConfigmapPhase shared.PhaseName = "Configmap" )
const ( DeploymentCondition shared.ConditionName = "DeploymentReady" DeploymentPhase shared.PhaseName = "Deployment" )
const ( IngressCondition shared.ConditionName = "IngressReady" IngressPhase shared.PhaseName = "Ingress" )
const ( LoadBalancerCondition shared.ConditionName = "LoadBalancerReady" LoadBalancerPhase shared.PhaseName = "LoadBalancer" )
const ( MetricbeatCondition shared.ConditionName = "MetricbeatReady" MetricbeatPhase shared.PhaseName = "Metricbeat" )
const ( NetworkPolicyCondition shared.ConditionName = "NetworkPolicyReady" NetworkPolicyPhase shared.PhaseName = "NetworkPolicy" )
const ( PdbCondition shared.ConditionName = "PodDisruptionBudgetReady" PdbPhase shared.PhaseName = "PodDisruptionBudget" )
const ( PodMonitorCondition shared.ConditionName = "PodMonitorReady" PodMonitorPhase shared.PhaseName = "PodMonitor" )
const ( CAElasticsearchCondition shared.ConditionName = "CAElasticsearchReady" CAElasticsearchPhase shared.PhaseName = "CAElasticsearch" )
const ( CredentialCondition shared.ConditionName = "CredentialReady" CredentialPhase shared.PhaseName = "Credential" )
const ( TlsCondition shared.ConditionName = "TlsReady" TlsPhase shared.PhaseName = "Tls" DefaultRenewCertificate = -time.Hour * 24 * 30 // 30 days before expired )
const ( ServiceCondition shared.ConditionName = "ServiceReady" ServicePhase shared.PhaseName = "Service" )
Variables ¶
This section is empty.
Functions ¶
func GetConfigMapName ¶
GetConfigMapName permit to get the configMap name that store the config of Kibana
func GetContainerImage ¶
GetContainerImage permit to get the image name
func GetDeploymentName ¶
GetDeploymentName permit to get the deployement name
func GetExporterUrl ¶
GetExporterUrl permit to get the URL to download Kibana plugin for prometheus exporter
func GetIngressName ¶
GetIngressName permit to get the ingress name
func GetLoadBalancerName ¶
GetLoadBalancerName permit to get the load balancer name
func GetMetricbeatName ¶
GetMetricbeatName return the metricbeat namme
func GetNetworkPolicyElasticsearchName ¶
GetNetworkPolicyName return the name for network policy
func GetNetworkPolicyName ¶
GetNetworkPolicyName return the name for network policy
func GetPDBName ¶
GetPDBName permit to get the pdb name
func GetPodMonitorName ¶
GetPodMonitorName return the name for podMonitor
func GetSecretNameForCAElasticsearch ¶
GetSecretNameForCAElasticsearch permit to get the secret name that store all Elasticsearch CA It return the secret name as string
func GetSecretNameForCredentials ¶
GetSecretNameForCredentials permit to get the secret name that store the credentials
func GetSecretNameForKeystore ¶
GetSecretNameForKeystore permit to get the secret name that store the secret It will inject each key on keystore It return empty string if not secret provided
func GetSecretNameForPki ¶
GetSecretNameForPki permit to get the secret name that store PKI It return the secret name as string
func GetSecretNameForTls ¶
GetSecretNameForTls permit to get the secret name that store all certificates for Kibana It return the secret name as string
func GetServiceName ¶
GetServiceName permit to get the service name for Kibana
func NewKibanaReconciler ¶
func NewKibanaReconciler(client client.Client, logger *logrus.Entry, recorder record.EventRecorder) (multiPhaseReconciler controller.Controller)
Types ¶
type KibanaReconciler ¶
type KibanaReconciler struct { controller.Controller controller.MultiPhaseReconcilerAction controller.MultiPhaseReconciler controller.BaseReconciler // contains filtered or unexported fields }
KibanaReconciler reconciles a Kibana object
func (*KibanaReconciler) Delete ¶
func (h *KibanaReconciler) Delete(ctx context.Context, o object.MultiPhaseObject, data map[string]any) (err error)
func (*KibanaReconciler) OnSuccess ¶
func (h *KibanaReconciler) OnSuccess(ctx context.Context, r object.MultiPhaseObject, data map[string]any) (res ctrl.Result, err error)
func (*KibanaReconciler) Reconcile ¶
Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state. TODO(user): Modify the Reconcile function to compare the state specified by the Kibana object against the actual cluster state, and then perform operations to make the cluster state reflect the state specified by the user.
For more details, check Reconcile and its Result here: - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.12.2/pkg/reconcile
func (*KibanaReconciler) SetupWithManager ¶
func (h *KibanaReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
Source Files ¶
- configmap_builder.go
- configmap_reconciler.go
- deployment_builder.go
- deployment_reconciler.go
- helper.go
- ingress_builder.go
- ingress_reconciler.go
- kibana_controller.go
- kibana_watcher.go
- loadbalancer_builder.go
- loadbalancer_reconciler.go
- metricbeat_builder.go
- metricbeat_reconciler.go
- networkpolicy_builder.go
- networkpolicy_reconciler.go
- pdb_builder.go
- pdb_reconciler.go
- podmonitor_builder.go
- podmonitor_reconciler.go
- secret_ca_elasticsearch_builder.go
- secret_ca_elasticsearch_builder_test..go
- secret_ca_elasticsearch_reconciler.go
- secret_credential_builder.go
- secret_credential_reconciler.go
- secret_tls_builder.go
- secret_tls_reconciler.go
- service_builder.go
- service_reconciler.go