Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setting up custom config #508

Open
danielnaumau opened this issue Jun 11, 2024 · 2 comments
Open

Setting up custom config #508

danielnaumau opened this issue Jun 11, 2024 · 2 comments

Comments

@danielnaumau
Copy link

Is your feature request related to a problem? Please describe.
I want to disable writing to a journal and I don't see how it can be done with helm charts. As far as I understood I need to do it here https://bookkeeper.apache.org/docs/reference/config/ but I don't see any ways how to create custom configs in pulsar helm charts.

Describe the solution you'd like
It would be good to show some examples in documentation how it can be done

Describe alternatives you've considered
Maybe I can use pulsar admin to disable writing to a journal but I'd rather know how to create custom configs using helm charts.

@lhotari
Copy link
Member

lhotari commented Jun 12, 2024

You can achieve this by setting this config:

bookkeeper:
   configData:
      # this configures journalWriteData=false in /pulsar/conf/bookkeeper.conf
      PULSAR_PREFIX_journalWriteData: "false"

journalWriteData is documented in the default config file of Bookkeeper.

You will need to add PULSAR_PREFIX_ if the config key isn't included in default Pulsar provided conf files.
This is due to https://github.com/apache/pulsar/blob/master/docker/pulsar/scripts/apply-config-from-env.py script being used to apply configuration provided in environment variables.
For example this Helm chart uses apply-config-from-env.py for Bookie pods here:

bin/apply-config-from-env.py conf/bookkeeper.conf;
{{- include "pulsar.bookkeeper.zookeeper.tls.settings" . | nindent 10 }}
OPTS="${OPTS} -Dlog4j2.formatMsgNoLookups=true" exec bin/pulsar bookie;

The chart will create a separate journal volume. If you want to get rid of that, you can use this config:

bookkeeper:
   volumes:
      # optional step
      # this prevents the chart from creating a volume for the journal, don't set this for existing deployments
      useSingleCommonVolume: true
    common:
      name: common
      # size for common volume (only ledgers when journals are missing)
      size: 60Gi

@lhotari
Copy link
Member

lhotari commented Jun 12, 2024

@danielnaumau Would you like to contribute improvements to the README to document how to configure specific configuration options?

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

No branches or pull requests

2 participants