configmaps

package
v0.0.0-...-47f04a7 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2026 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package configmaps provides Kubernetes ConfigMap builders for OpenSearch components

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DashboardConfigMapBuilder

type DashboardConfigMapBuilder struct {
	// contains filtered or unexported fields
}

DashboardConfigMapBuilder builds ConfigMaps for OpenSearch Dashboard configuration

func NewDashboardConfigMapBuilder

func NewDashboardConfigMapBuilder(clusterName, namespace string) *DashboardConfigMapBuilder

NewDashboardConfigMapBuilder creates a new DashboardConfigMapBuilder

func (*DashboardConfigMapBuilder) Build

Build creates the ConfigMap for OpenSearch Dashboard

func (*DashboardConfigMapBuilder) BuildWazuhConfigSecret

func (b *DashboardConfigMapBuilder) BuildWazuhConfigSecret() *corev1.Secret

BuildWazuhConfigSecret creates a Secret containing wazuh.yml. This is kept in a Secret (not a ConfigMap) because wazuh.yml contains Wazuh API credentials and Secrets are encrypted at rest when etcd encryption is enabled.

func (*DashboardConfigMapBuilder) NeedsDefaultCredentials

func (b *DashboardConfigMapBuilder) NeedsDefaultCredentials() bool

NeedsDefaultCredentials returns true if the default API endpoint password has not been resolved yet (no wazuhPlugin config or no explicit credentials)

func (*DashboardConfigMapBuilder) WithAuthConfig

WithAuthConfig sets the authentication configuration from CRD This will be used to generate SSO settings in opensearch_dashboards.yml

func (*DashboardConfigMapBuilder) WithAuthSecrets

func (b *DashboardConfigMapBuilder) WithAuthSecrets(secrets map[string]string) *DashboardConfigMapBuilder

WithAuthSecrets sets the resolved secrets for auth config Keys: "oidc_client_secret", "oidc_cookie_password", "saml_exchange_key"

func (*DashboardConfigMapBuilder) WithCustomConfig

func (b *DashboardConfigMapBuilder) WithCustomConfig(content string) *DashboardConfigMapBuilder

WithCustomConfig sets custom configuration content

func (*DashboardConfigMapBuilder) WithEnableSSL

func (b *DashboardConfigMapBuilder) WithEnableSSL(enabled bool) *DashboardConfigMapBuilder

WithEnableSSL sets whether the dashboard server should use SSL

func (*DashboardConfigMapBuilder) WithIndexerHost

WithIndexerHost sets the OpenSearch Indexer host

func (*DashboardConfigMapBuilder) WithIndexerPort

func (b *DashboardConfigMapBuilder) WithIndexerPort(port int32) *DashboardConfigMapBuilder

WithIndexerPort sets the OpenSearch Indexer port

func (*DashboardConfigMapBuilder) WithManagerAPIURL

func (b *DashboardConfigMapBuilder) WithManagerAPIURL(url string) *DashboardConfigMapBuilder

WithManagerAPIURL sets the default manager API URL

func (*DashboardConfigMapBuilder) WithResolvedCredentials

func (b *DashboardConfigMapBuilder) WithResolvedCredentials(credentials map[string]string) *DashboardConfigMapBuilder

WithResolvedCredentials sets the resolved credentials for API endpoints The map keys are "endpointID:username" and "endpointID:password"

func (*DashboardConfigMapBuilder) WithServerHost

WithServerHost sets the Dashboard server host

func (*DashboardConfigMapBuilder) WithServerPort

WithServerPort sets the Dashboard server port

func (*DashboardConfigMapBuilder) WithWazuhPlugin

WithWazuhPlugin sets the Wazuh plugin configuration

type IndexerConfigMapBuilder

type IndexerConfigMapBuilder struct {
	// contains filtered or unexported fields
}

IndexerConfigMapBuilder builds ConfigMaps for OpenSearch Indexer

func NewIndexerConfigMapBuilder

func NewIndexerConfigMapBuilder(clusterName, namespace string) *IndexerConfigMapBuilder

NewIndexerConfigMapBuilder creates a new IndexerConfigMapBuilder

func (*IndexerConfigMapBuilder) Build

Build creates the ConfigMap

func (*IndexerConfigMapBuilder) BuildSecurityConfigFromAuth

func (b *IndexerConfigMapBuilder) BuildSecurityConfigFromAuth() string

BuildSecurityConfigFromAuth generates security config.yml from auth configuration

func (*IndexerConfigMapBuilder) WithActionGroups

func (b *IndexerConfigMapBuilder) WithActionGroups(content string) *IndexerConfigMapBuilder

WithActionGroups sets the action_groups.yml content

func (*IndexerConfigMapBuilder) WithAnnotations

func (b *IndexerConfigMapBuilder) WithAnnotations(annotations map[string]string) *IndexerConfigMapBuilder

WithAnnotations adds custom annotations

func (*IndexerConfigMapBuilder) WithAuthConfig

WithAuthConfig sets the authentication configuration from CRD This will be used to generate the security config.yml

func (*IndexerConfigMapBuilder) WithBinaryData

func (b *IndexerConfigMapBuilder) WithBinaryData(data map[string][]byte) *IndexerConfigMapBuilder

WithBinaryData adds binary data entries

func (*IndexerConfigMapBuilder) WithData

WithData adds raw data entries

func (*IndexerConfigMapBuilder) WithInternalUsers

func (b *IndexerConfigMapBuilder) WithInternalUsers(content string) *IndexerConfigMapBuilder

WithInternalUsers sets the internal_users.yml content

func (*IndexerConfigMapBuilder) WithLabels

func (b *IndexerConfigMapBuilder) WithLabels(labels map[string]string) *IndexerConfigMapBuilder

WithLabels adds custom labels

func (*IndexerConfigMapBuilder) WithOpenSearchYML

func (b *IndexerConfigMapBuilder) WithOpenSearchYML(content string) *IndexerConfigMapBuilder

WithOpenSearchYML sets the opensearch.yml content

func (*IndexerConfigMapBuilder) WithResolvedSecrets

func (b *IndexerConfigMapBuilder) WithResolvedSecrets(secrets map[string]string) *IndexerConfigMapBuilder

WithResolvedSecrets sets the resolved secrets for auth config Keys: "oidc_client_secret", "saml_exchange_key", "ldap_bind_password"

func (*IndexerConfigMapBuilder) WithRoles

WithRoles sets the roles.yml content

func (*IndexerConfigMapBuilder) WithRolesMapping

func (b *IndexerConfigMapBuilder) WithRolesMapping(content string) *IndexerConfigMapBuilder

WithRolesMapping sets the roles_mapping.yml content

func (*IndexerConfigMapBuilder) WithSecurityConfig

func (b *IndexerConfigMapBuilder) WithSecurityConfig(content string) *IndexerConfigMapBuilder

WithSecurityConfig sets the security config content

func (*IndexerConfigMapBuilder) WithTenants

func (b *IndexerConfigMapBuilder) WithTenants(content string) *IndexerConfigMapBuilder

WithTenants sets the tenants.yml content

func (*IndexerConfigMapBuilder) WithVersion

func (b *IndexerConfigMapBuilder) WithVersion(version string) *IndexerConfigMapBuilder

WithVersion sets the OpenSearch version

type NodePoolConfigMapBuilder

type NodePoolConfigMapBuilder struct {
	// contains filtered or unexported fields
}

NodePoolConfigMapBuilder builds ConfigMaps for OpenSearch nodePools Each nodePool requires its own ConfigMap with role-specific opensearch.yml

func NewNodePoolConfigMapBuilder

func NewNodePoolConfigMapBuilder(clusterName, namespace, poolName string) *NodePoolConfigMapBuilder

NewNodePoolConfigMapBuilder creates a new NodePoolConfigMapBuilder

func (*NodePoolConfigMapBuilder) Build

Build creates the ConfigMap for this nodePool

func (*NodePoolConfigMapBuilder) WithAnnotations

func (b *NodePoolConfigMapBuilder) WithAnnotations(annotations map[string]string) *NodePoolConfigMapBuilder

WithAnnotations adds custom annotations

func (*NodePoolConfigMapBuilder) WithData

WithData adds additional data entries

func (*NodePoolConfigMapBuilder) WithLabels

WithLabels adds custom labels

func (*NodePoolConfigMapBuilder) WithOpenSearchYML

func (b *NodePoolConfigMapBuilder) WithOpenSearchYML(config string) *NodePoolConfigMapBuilder

WithOpenSearchYML sets the opensearch.yml content This should include role-specific configuration (node.roles, node.attr.*)

func (*NodePoolConfigMapBuilder) WithVersion

func (b *NodePoolConfigMapBuilder) WithVersion(version string) *NodePoolConfigMapBuilder

WithVersion sets the Wazuh version

Jump to

Keyboard shortcuts

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