Skip to content
This repository has been archived by the owner on Nov 7, 2018. It is now read-only.

ConfigMap example #58

Open
shaneog opened this issue Oct 9, 2016 · 7 comments
Open

ConfigMap example #58

shaneog opened this issue Oct 9, 2016 · 7 comments

Comments

@shaneog
Copy link

shaneog commented Oct 9, 2016

I've just set up this with a ConfigMap so as to be able to add more settings than permitted in the default configuration.
Would you like a PR to add an example of this to the repo?

@pires
Copy link
Owner

pires commented Oct 9, 2016

That would be cool.

@pires
Copy link
Owner

pires commented Nov 22, 2016

@puja108 another one for you, maybe? 👍

@puja108
Copy link
Contributor

puja108 commented Nov 22, 2016

Yeah, I was also thinking of making the ES config a Config Map.

@shaneog ping me if you do a PR

@pires
Copy link
Owner

pires commented Jan 10, 2017

@puja108 want to own this?

@puja108
Copy link
Contributor

puja108 commented Jan 11, 2017

@pires I can take it. Was looking through the yamls to see how to slice the Config Maps. There's two options:

  • 1 for each deployment (master, data, client)
  • 1 shared one (with cluster name etc in it) + 1 additional for the differences in envs for each deployment

First option is easier and maybe adds clarity. Second option removes redundancy and reduces the chance to have typos in e.g. cluster names. WDYT?

@pires
Copy link
Owner

pires commented Jan 11, 2017

@puja108 the second one as it will make things easier for me when implementing the operator.

@dev-e
Copy link

dev-e commented Aug 17, 2017

Hi! I am trying to set up with a ConfigMap and instantly getting the error:

2017-08-17 15:04:56,039 main ERROR Could not register mbeans java.security.AccessControlException: access denied ("javax.management.MBeanTrustPermission" "register") at java.security.AccessControlContext.checkPermission(AccessControlContext.java:472) at java.lang.SecurityManager.checkPermission(SecurityManager.java:585) at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.checkMBeanTrustPermission(DefaultMBeanServerInterceptor.java:1848) at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerMBean(DefaultMBeanServerInterceptor.java:322) at com.sun.jmx.mbeanserver.JmxMBeanServer.registerMBean(JmxMBeanServer.java:522) at org.apache.logging.log4j.core.jmx.Server.register(Server.java:389) at org.apache.logging.log4j.core.jmx.Server.reregisterMBeansAfterReconfigure(Server.java:167) at org.apache.logging.log4j.core.jmx.Server.reregisterMBeansAfterReconfigure(Server.java:140) at org.apache.logging.log4j.core.LoggerContext.setConfiguration(LoggerContext.java:556) at org.apache.logging.log4j.core.LoggerContext.start(LoggerContext.java:261) at org.apache.logging.log4j.core.impl.Log4jContextFactory.getContext(Log4jContextFactory.java:206) at org.apache.logging.log4j.core.config.Configurator.initialize(Configurator.java:221) at org.apache.logging.log4j.core.config.Configurator.initialize(Configurator.java:197) at org.elasticsearch.common.logging.LogConfigurator.configureStatusLogger(LogConfigurator.java:175) at org.elasticsearch.common.logging.LogConfigurator.configureWithoutConfig(LogConfigurator.java:99) at org.elasticsearch.cli.Command.main(Command.java:85) at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:91) at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:84) Exception in thread "main" java.lang.IllegalStateException: status logger logged an error before logging was configured at org.elasticsearch.common.logging.LogConfigurator.checkErrorListener(LogConfigurator.java:128) at org.elasticsearch.common.logging.LogConfigurator.configure(LogConfigurator.java:117) at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:316) at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:123) at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:114) at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:67) at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:122) at org.elasticsearch.cli.Command.main(Command.java:88) at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:91) at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:84) Refer to the log for complete error details.

Part of elasticsearch RC:

        volumeMounts:
        - name: data
          mountPath: /usr/share/elasticsearch/data
        - name: config
          mountPath: /usr/share/elasticsearch/config
      volumes:
      - name: data
        persistentVolumeClaim:
          claimName: elasticsearch-data
      - name: config
        configMap:
          name: elasticsearch
          defaultMode: 0777
➜ kubectl describe configmap elasticsearch 
Name:		elasticsearch
Namespace:	default
Labels:		<none>
Annotations:	<none>

Data
====
elasticsearch.yml:
----
cluster.name: "k8s-cluster"
network.host: 0.0.0.0

# minimum_master_nodes need to be explicitly set when bound on a public IP
# set to 1 to allow single node clusters
# Details: https://github.com/elastic/elasticsearch/pull/17288
discovery.zen.minimum_master_nodes: 1
Events:	<none>

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants