Documentation
¶
Overview ¶
Package configmaps provides Kubernetes ConfigMap builders for OpenSearch components
Index ¶
- type DashboardConfigMapBuilder
- func (b *DashboardConfigMapBuilder) Build() (*corev1.ConfigMap, error)
- func (b *DashboardConfigMapBuilder) BuildWazuhConfigSecret() *corev1.Secret
- func (b *DashboardConfigMapBuilder) NeedsDefaultCredentials() bool
- func (b *DashboardConfigMapBuilder) WithAuthConfig(authConfig *wazuhv1.OpenSearchAuthConfigSpec) *DashboardConfigMapBuilder
- func (b *DashboardConfigMapBuilder) WithAuthSecrets(secrets map[string]string) *DashboardConfigMapBuilder
- func (b *DashboardConfigMapBuilder) WithCustomConfig(content string) *DashboardConfigMapBuilder
- func (b *DashboardConfigMapBuilder) WithEnableSSL(enabled bool) *DashboardConfigMapBuilder
- func (b *DashboardConfigMapBuilder) WithIndexerHost(host string) *DashboardConfigMapBuilder
- func (b *DashboardConfigMapBuilder) WithIndexerPort(port int32) *DashboardConfigMapBuilder
- func (b *DashboardConfigMapBuilder) WithManagerAPIURL(url string) *DashboardConfigMapBuilder
- func (b *DashboardConfigMapBuilder) WithResolvedCredentials(credentials map[string]string) *DashboardConfigMapBuilder
- func (b *DashboardConfigMapBuilder) WithServerHost(host string) *DashboardConfigMapBuilder
- func (b *DashboardConfigMapBuilder) WithServerPort(port int32) *DashboardConfigMapBuilder
- func (b *DashboardConfigMapBuilder) WithWazuhPlugin(pluginConfig *wazuhv1.WazuhPluginConfig) *DashboardConfigMapBuilder
- type IndexerConfigMapBuilder
- func (b *IndexerConfigMapBuilder) Build() *corev1.ConfigMap
- func (b *IndexerConfigMapBuilder) BuildSecurityConfigFromAuth() string
- func (b *IndexerConfigMapBuilder) WithActionGroups(content string) *IndexerConfigMapBuilder
- func (b *IndexerConfigMapBuilder) WithAnnotations(annotations map[string]string) *IndexerConfigMapBuilder
- func (b *IndexerConfigMapBuilder) WithAuthConfig(authConfig *v1.OpenSearchAuthConfigSpec) *IndexerConfigMapBuilder
- func (b *IndexerConfigMapBuilder) WithBinaryData(data map[string][]byte) *IndexerConfigMapBuilder
- func (b *IndexerConfigMapBuilder) WithData(data map[string]string) *IndexerConfigMapBuilder
- func (b *IndexerConfigMapBuilder) WithInternalUsers(content string) *IndexerConfigMapBuilder
- func (b *IndexerConfigMapBuilder) WithLabels(labels map[string]string) *IndexerConfigMapBuilder
- func (b *IndexerConfigMapBuilder) WithOpenSearchYML(content string) *IndexerConfigMapBuilder
- func (b *IndexerConfigMapBuilder) WithResolvedSecrets(secrets map[string]string) *IndexerConfigMapBuilder
- func (b *IndexerConfigMapBuilder) WithRoles(content string) *IndexerConfigMapBuilder
- func (b *IndexerConfigMapBuilder) WithRolesMapping(content string) *IndexerConfigMapBuilder
- func (b *IndexerConfigMapBuilder) WithSecurityConfig(content string) *IndexerConfigMapBuilder
- func (b *IndexerConfigMapBuilder) WithTenants(content string) *IndexerConfigMapBuilder
- func (b *IndexerConfigMapBuilder) WithVersion(version string) *IndexerConfigMapBuilder
- type NodePoolConfigMapBuilder
- func (b *NodePoolConfigMapBuilder) Build() *corev1.ConfigMap
- func (b *NodePoolConfigMapBuilder) WithAnnotations(annotations map[string]string) *NodePoolConfigMapBuilder
- func (b *NodePoolConfigMapBuilder) WithData(data map[string]string) *NodePoolConfigMapBuilder
- func (b *NodePoolConfigMapBuilder) WithLabels(labels map[string]string) *NodePoolConfigMapBuilder
- func (b *NodePoolConfigMapBuilder) WithOpenSearchYML(config string) *NodePoolConfigMapBuilder
- func (b *NodePoolConfigMapBuilder) WithVersion(version string) *NodePoolConfigMapBuilder
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 ¶
func (b *DashboardConfigMapBuilder) Build() (*corev1.ConfigMap, error)
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 ¶
func (b *DashboardConfigMapBuilder) WithAuthConfig(authConfig *wazuhv1.OpenSearchAuthConfigSpec) *DashboardConfigMapBuilder
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 ¶
func (b *DashboardConfigMapBuilder) WithIndexerHost(host string) *DashboardConfigMapBuilder
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 ¶
func (b *DashboardConfigMapBuilder) WithServerHost(host string) *DashboardConfigMapBuilder
WithServerHost sets the Dashboard server host
func (*DashboardConfigMapBuilder) WithServerPort ¶
func (b *DashboardConfigMapBuilder) WithServerPort(port int32) *DashboardConfigMapBuilder
WithServerPort sets the Dashboard server port
func (*DashboardConfigMapBuilder) WithWazuhPlugin ¶
func (b *DashboardConfigMapBuilder) WithWazuhPlugin(pluginConfig *wazuhv1.WazuhPluginConfig) *DashboardConfigMapBuilder
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 ¶
func (b *IndexerConfigMapBuilder) Build() *corev1.ConfigMap
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 ¶
func (b *IndexerConfigMapBuilder) WithAuthConfig(authConfig *v1.OpenSearchAuthConfigSpec) *IndexerConfigMapBuilder
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 ¶
func (b *IndexerConfigMapBuilder) WithData(data map[string]string) *IndexerConfigMapBuilder
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 ¶
func (b *IndexerConfigMapBuilder) WithRoles(content string) *IndexerConfigMapBuilder
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 ¶
func (b *NodePoolConfigMapBuilder) Build() *corev1.ConfigMap
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 ¶
func (b *NodePoolConfigMapBuilder) WithData(data map[string]string) *NodePoolConfigMapBuilder
WithData adds additional data entries
func (*NodePoolConfigMapBuilder) WithLabels ¶
func (b *NodePoolConfigMapBuilder) WithLabels(labels map[string]string) *NodePoolConfigMapBuilder
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