# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements.  See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License.  You may obtain a copy of the License at
#
#   http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

onEarthProxyIP: ""

insituAPI:
  enabled: true
  
rootWebpage:
  enabled: true

webapp:
  enabled: true
  distributed:
    image: apache/sdap-nexus-webapp:1.4.0
    ## Use any of the driver configuration options available at
    ## https://github.com/GoogleCloudPlatform/spark-on-k8s-operator/blob/master/docs/user-guide.md
    driver:
      cores: 1
      coreLimit: "1200m"
      memory: "512m"

    ## Use any of the executor configuration options available at
    ## https://github.com/GoogleCloudPlatform/spark-on-k8s-operator/blob/master/docs/user-guide.md
    executor:
      cores: 1
      instances: 2
      memory: "512m"

## This section deals with the ingestion components of SDAP
ingestion:

  # If ingestion.enabled=true, collections-ingester and granule-ingester will be deployed
  enabled: true

  granuleIngester:
    replicas: 2
    image: apache/sdap-granule-ingester:1.4.0

    ## cpu refers to both request and limit
    cpu: 1

    ## memory refers to both request and limit
    memory: 1Gi

  collectionManager:
    image: apache/sdap-collection-manager:1.4.0

    ## cpu refers to both request and limit
    cpu: 0.5

    ## memory refers to both request and limit
    memory: 0.5Gi

    ## Enable verbose logging
    verbose: false

  configOperator:
    image: nexusjpl/config-operator:0.0.1

  ## How to mount the granule files to ingest
  granules:

    ## mountPath is the path in the Collection Manager and Granule Ingester pods
    ## where the granule files will be mounted.
    ## IMPORTANT: the `path` property on all collections in the Collections Config file
    ## should have mountPath as the root.
    ## Example: if mountPath = /data, then every collection in the Collections
    ## Config file should have something like:
    ## path: /data/<some-directory>/<some-file-pattern>
    mountPath: /data

    ## Set nfsServer to an NFS host URL if you want to mount the granules from an NFS server.
    ## For S3 or local filesystem ingestion, leave nfsServer blank.
    nfsServer:

    ## path is the path on either local filesystem or NFS mount at which
    ## the granule files are stored. This will be ignored if S3 ingestion is enabled.
    path:

    s3:
      ## If bucket has a value, S3 ingestion will be enabled (and nfsServer will be ignored even if it has a value).
      bucket:

      ## If serviceAccountName has a value, credentials will be handled by the service account (awsCredsEnvs will be ignored
      ## even if it has a value).
      serviceAccountName: 

      ## awsCredsEnvs can include any environment variables that contain AWS credentials. Will be ignored if 
      ## serviceAccountName has a value.
      awsCredsEnvs: {}

  ## Where to find the Collections Config file
  ## ref: https://github.com/apache/incubator-sdap-ingester/tree/dev/collection_manager#the-collections-configuration-file
  ## Either localDir should be set, or the git options, but not both.
  collections:
    createCrd: false

    ## Name of a ConfigMap containing the Collections Config YAML.
    ## Leave this blank if Git is enabled below.
    configMap: collections-config

    ## Load the Collections Config file from a git repository.
    git:

      ## This should be an https repository url of the form https://github.com/username/repo.git
      url:
      branch: master
      # token: someToken

  ## Where to store ingestion history
  ## Defaults to Solr for ingestion history storage
  history:
    ## Whether to store ingestion history in a solr database instead of a filesystem directory
    solrEnabled: true

    ## storage class to use for ingestion history file only if solrEnabled = false
    storageClass: hostpath


## The values in this section are relevant if using Solr, Zookeeper, or Cassandra that were not deployed from this Helm chart
external:
  solrHostAndPort:
  zookeeperHostAndPort:
  cassandraHost:
  cassandraUsername:
  cassandraPassword:

## Configuration values for the Solr and Zookeeper dependencies
## ref: https://github.com/helm/charts/tree/master/incubator/solr
## ref: https://github.com/helm/charts/tree/master/incubator/zookeeper
solr:
  enabled: true
  initPodEnabled: true
  initImage: apache/sdap-solr-cloud-init:1.4.0
  image:
    repository: nexusjpl/solr
    tag: 8.11.1
  replicaCount: 1
  authentication:
    enabled: false
  persistence:
    enabled: true
    storageClass: hostpath
    size: 10Gi
  resources:
    requests:
      memory: 2Gi
      cpu: 1
    limits:
      memory: 2Gi
      cpu: 1
  zookeeper:
    replicaCount: 3
    persistence:
      storageClass: hostpath
    resources:
      limits:
        memory: 1Gi
        cpu: 0.5
      requests:
        memory: 1Gi
        cpu: 0.5



## Configuration values for the nginx-ingress dependency
## ref: https://github.com/helm/charts/tree/master/stable/nginx-ingress
ingress-nginx:
  enabled: false
  controller:
    scope:
      enabled: true
    kind: DaemonSet
    service:
      enabled: true
      type: LoadBalancer
  defaultBackend:
    enabled: false


## Configuration values for the rabbitmq dependency
## ref: https://github.com/bitnami/charts/tree/master/bitnami/rabbitmq
rabbitmq:
  ## fullnameOverride sets the name of the RabbitMQ service
  ## with which the ingestion components will communicate.
  enabled: true
  persistence:
    storageClass: hostpath
  fullnameOverride: rabbitmq
  replicaCount: 1
  auth:
    username: guest
    password: guest
  ingress:
    enabled: true

## Configuration values for the cassandra dependency
## ref: https://github.com/bitnami/charts/tree/master/bitnami/cassandra
cassandra:
  enabled: true
  initDBConfigMap: init-cassandra
  dbUser:
    user: cassandra
    password: cassandra
  replicaCount: 1
  persistence:
    storageClass: hostpath
    size: 8Gi
  resources:
    requests:
      cpu: 1
      memory: 8Gi
    limits:
      cpu: 1
      memory: 8Gi

cronJobs:
  domsPurge:
    enabled: true
    schedule: "0 0 * * *"
    keepBeforeMonths: "2"
    keepUncompleted: false
    image: "nexusjpl/domspurge:1.0.0"
    restartPolicy: Never
    concurrency: Forbid
