---
updatedAt: 2026-05-21T09:14:56.000Z
agentTools:
  siteIndex: https://docs.jfrog.com/llms.txt
  projectIndex: https://docs.jfrog.com/installation/llms.txt
---

# Use ConfigMaps to Store Non-confidential Data

Use Kubernetes ConfigMaps in Artifactory Helm to mount config files: logback.xml, mimetypes.xml, and init scripts.

A ConfigMap is a Kubernetes API object used to store non-confidential data in key-value pairs. Use this option to mount a custom file to Artifactory, such as an init shell script or a configuration file (for example, `logback.xml` or `mimetypes.xml`).

**Create Custom configMaps for Artifactory**

Create a `configmaps.yaml` file as shown, then apply it to your Helm installation. The chart will:

1. Create a volume pointing to the configMap with the name `artifactory-configmaps`.

2. Mount this configMap onto `/tmp/my-config-map` using `customVolumeMounts`.

3. Set the shell script we mounted as the `lifecycle.postStart.exec.command`.

4. Copy the `logback.xml` file to `$ARTIFACTORY_HOME/etc/artifactory` directory.

   ```yaml
   artifactory:
     configMaps: |
       logback.xml: |
         <configuration debug="false">
             <appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender">
                 <encoder class="ch.qos.logback.core.encoder.LayoutWrappingEncoder">
                     <layout class="org.artifactory.logging.layout.BackTracePatternLayout">
                         <pattern>%date [%-5level] \(%-20c{3}:%L\) %message%n</pattern>
                     </layout>
                 </encoder>
             </appender>

             <logger name="/artifactory">
                 <level value="INFO"/>
                 <appender-ref ref="CONSOLE"/>
             </logger>
             <logger name="org.eclipse.jetty">
                 <level value="WARN"/>
                 <appender-ref ref="CONSOLE"/>
             </logger>
         </configuration>

       my-custom-post-start-hook.sh: |
         echo "This is my custom post start hook"

     customVolumeMounts: |
       - name: artifactory-configmaps
         mountPath: /tmp/my-config-map

     lifecycle: |
        postStart: |
          exec: |
            commandpostStartCommand: "post_hook_temp=/tmp/post-hook-temp; mkdir ${post_hook_temp}; cp -fv /tmp/my-config-map/my-custom-post-start-hook.sh ${post_hook_temp}; chmod +x ${post_hook_temp}/my-custom-post-start-hook.sh;bash ${post_hook_temp}/my-custom-post-start-hook.sh > ${post_hook_temp}/my-custom-post-start-hook.log 2>&1"

     copyOnEveryStartup:
       - source: /tmp/my-config-map/logback.xml
         target: etc/artifactory
   ```

   **Artifactory**

   ```bash
   helm upgrade --install artifactory -f configmaps.yaml --namespace artifactory jfrog/artifactory
   ```

   **Artifactory HA**

   ```bash
   helm upgrade --install artifactory-ha jfrog/artifactory-ha --namespace artifactory-ha -f values.yaml
   ```

**Create a Custom nginx.conf Using Nginx**

1. Create the `nginx.conf` file:

   ```bash
   ...
   kubectl create configmap nginx-config --from-file=nginx.conf
   ```

2. Pass the configMap to the Helm installation:

   **Artifactory**

   ```bash
   helm upgrade --install artifactory --set nginx.customConfigMap=nginx-config --namespace artifactory jfrog/artifactory
   ```

   **Artifactory HA**

   ```bash
   helm upgrade --install artifactory-ha jfrog/artifactory-ha --namespace artifactory-ha -f values.yaml
   ```

## Related Topics

* [Artifactory Advanced Options](artifactory-advanced-options)
* [Custom Volumes in Helm Installation](add-custom-volumes-in-helm-installation)
* [Artifactory Bootstrap](bootstraps-artifactory)
* [Use Custom Secrets in Helm Installation](use-custom-secrets-in-helm-installation)
* [Helm Charts for Advanced Users](helm-charts-for-advanced-users)