apiVersion: v1
kind: ConfigMap
metadata:
  name: configs-configmap
data:
  log4j.properties: |
        status = warn
        monitorInterval = 5
        name = nfsrods_properties_config

        # Console appender config.
        appender.console.type = Console
        appender.console.name = stdout
        appender.console.layout.type = PatternLayout
        appender.console.layout.pattern = %d{yyyy-MM-dd HH:mm:ss.SSS} %-5p Thread-%T [%c{1}] - %m%n

        # NFSRODS logging config.
        logger.nfsrods.name = org.irods.nfsrods
        logger.nfsrods.level = trace
        logger.nfsrods.additivity = false
        logger.nfsrods.appenderRef.stdout.ref = stdout

        # Jargon logging config.
        logger.jargon.name = org.irods.jargon
        logger.jargon.level = warn
        logger.jargon.additivity = false
        logger.jargon.appenderRef.stdout.ref = stdout

        # Root logger config.
        rootLogger.level = warn
        rootLogger.appenderRef.stdout.ref = stdout
  exports: |
        / *(rw,sec=sys,acl,no_root_squash)
  server.json: |
        {
            "nfs_server": {
                "port": {{ .Values.server.nfs_server.port }},
                "irods_mount_point": "{{ .Values.server.nfs_server.irods_mount_point }}",
                "user_information_refresh_time_in_milliseconds": {{ .Values.server.nfs_server.user_information_refresh_time_in_milliseconds }},
                "file_information_refresh_time_in_milliseconds": {{ .Values.server.nfs_server.file_information_refresh_time_in_milliseconds }},
                "user_access_refresh_time_in_milliseconds": {{ .Values.server.nfs_server.user_access_refresh_time_in_milliseconds }}
            },

            "irods_client": {
                "zone": "{{ .Values.server.irods_client.zone }}",
                "host": "{{ .Values.server.irods_client.host }}",
                "port": {{ .Values.server.irods_client.port }},
                "default_resource": "{{ .Values.server.irods_client.default_resource }}",
                "ssl_negotiation_policy": "{{ .Values.server.irods_client.ssl_negotiation_policy }}",
                "proxy_admin_account": {
                    "username": "{{ .Values.server.irods_client.proxy_admin_account.username }}",
                    "password": "{{ .Values.server.irods_client.proxy_admin_account.password }}"
                }
            }
        }
