apiVersion: v1
kind: ConfigMap
metadata:
  name: atlas-config
data:
  atlas-application.properties: |
    atlas.graph.storage.backend=cql
    atlas.graph.storage.hostname={{ .Values.config_parameter.cassandra_hostnamename  }}
    atlas.graph.storage.cassandra.keyspace=atlas_graph
    atlas.graph.storage.clustername={{ .Values.config_parameter.cassandra_clustername  }}
    atlas.graph.storage.port={{ .Values.config_parameter.cassandra_storage_port  }}
    atlas.graph.storage.username={{ .Values.config_parameter.cassandra_user  }}
    atlas.graph.storage.password={{ .Values.config_parameter.cassandra_pass  }}

    atlas.EntityAuditRepository.impl=org.apache.atlas.repository.audit.CassandraBasedAuditRepository
    atlas.EntityAuditRepository.keyspace=atlas_audit
    atlas.EntityAuditRepository.replicationFactor=1

    atlas.graph.index.search.backend=solr
    atlas.graph.index.search.solr.mode=cloud
    atlas.graph.index.search.solr.zookeeper-url={{ .Release.Name }}-zookeeper:{{ .Values.zookeeper.ports.client.containerPort }}
    atlas.graph.index.search.solr.zookeeper-connect-timeout=60000
    atlas.graph.index.search.solr.zookeeper-session-timeout=60000
    atlas.graph.index.search.solr.wait-searcher=true

    atlas.graph.index.search.max-result-set-size=150

    atlas.notification.embedded=false
    atlas.kafka.data=${sys:atlas.home}/data/kafka
    atlas.kafka.zookeeper.connect={{ .Release.Name }}-zookeeper:2181
    atlas.kafka.bootstrap.servers={{ .Values.kafka.url  }}
    atlas.kafka.sasl.mechanism=PLAIN
    atlas.kafka.security.protocol=SASL_SSL
    atlas.kafka.zookeeper.session.timeout.ms=400
    atlas.kafka.zookeeper.connection.timeout.ms=200
    atlas.kafka.zookeeper.sync.time.ms=20
    atlas.kafka.auto.commit.interval.ms=1000
    atlas.kafka.hook.group.id=atlas
    
    atlas.kafka.enable.auto.commit=false
    atlas.kafka.auto.offset.reset=earliest
    atlas.kafka.session.timeout.ms=30000
    atlas.kafka.offsets.topic.replication.factor=1
    atlas.kafka.poll.timeout.ms=1000
    atlas.kafka.request.timeout.ms=60000

    atlas.notification.create.topics=true
    atlas.notification.replicas=1
    atlas.notification.topics=ATLAS_HOOK,ATLAS_ENTITIES
    atlas.notification.log.failed.messages=true
    atlas.notification.consumer.retry.interval=500
    atlas.notification.hook.retry.interval=1000

    atlas.enableTLS=false

    atlas.authentication.method.kerberos=false
    atlas.authentication.method.file=false

    atlas.authentication.method.keycloak=true
    atlas.authentication.method.keycloak.file=${sys:atlas.home}/conf/keycloak.json
    atlas.authentication.method.keycloak.ugi-groups=false

    atlas.authentication.method.ldap.type=none

    atlas.authentication.method.file.filename=${sys:atlas.home}/conf/users-credentials.properties


    atlas.rest.address=http://localhost:21000

    atlas.audit.hbase.tablename=apache_atlas_entity_audit
    atlas.audit.zookeeper.session.timeout.ms=1000
    atlas.audit.hbase.zookeeper.quorum=atlas-zookeeper:2181

    atlas.server.ha.enabled=false
    atlas.authorizer.impl=simple
    atlas.authorizer.simple.authz.policy.file=atlas-simple-authz-policy.json
    atlas.rest-csrf.enabled=true
    atlas.rest-csrf.browser-useragents-regex=^Mozilla.*,^Opera.*,^Chrome.*
    atlas.rest-csrf.methods-to-ignore=GET,OPTIONS,HEAD,TRACE
    atlas.rest-csrf.custom-header=X-XSRF-HEADER

    atlas.metric.query.cache.ttlInSecs=900

    #########  Gremlin Search Configuration  #########

    #Set to false to disable gremlin search.
    atlas.search.gremlin.enable=false



     
    atlas.jaas.KafkaClient.loginModuleName=org.apache.kafka.common.security.plain.PlainLoginModule
    atlas.jaas.KafkaClient.loginModuleControlFlag=required
    atlas.jaas.KafkaClient.option.username=$ConnectionString
    atlas.jaas.KafkaClient.option.password=Endpoint={{ .Values.kafka.connectionString  }}
    atlas.jaas.KafkaClient.option.mechanism=PLAIN
    atlas.jaas.KafkaClient.option.protocol=SASL_SSL
