global:
  _hopsworks:
    ray:
      enabled: true
    imagePullPolicy: IfNotPresent
    vpaEnabled: true
    serviceAccountAnnotations: &saAnnotations {
      # hopsworks.ai/palceholder: "PLACEHOLDER_GLOBAL"
    }
  externalLoadBalancers:
      enabled: &lbEnabled true


persistence:
  enabled: true
  size: 3400Gi
  storageClass: local-storage

olk:
  prometheus-elasticsearch-exporter:
  opensearch:
    externalLoadBalancer:
      enabled: *lbEnabled
      annotations:
        metallb.universe.tf/loadBalancerIPs: "10.87.16.5"
        metallb.universe.tf/allow-shared-ip: "shared-lb"
    service:
      ports:
        - port: 9200
          targetPort: 9200
          protocol: TCP
          name: http
    backup:
      enabled: false
    replicas: 1
    logstash:
      workers: 1
      replicas: 1
    dashboard:
      deleteKibanaIndexIfPrevious: true

certs-operator:
  ca:
    httpTimeout: 120s
  controller:
    manager:
        requests:
          cpu: 10m
          memory: 512Mi

hops-istio:
kubernetes@snurran:~/resources/hopsworks-helm$ more values.snurran.yaml
more
kubernetes@snurran:~/resources/hopsworks-helm$ vi values.snurran.yaml
kubernetes@snurran:~/resources/hopsworks-helm$ cat values.snurran.yaml
global:
  _hopsworks:
    ray:
      enabled: true
    imagePullPolicy: IfNotPresent
    vpaEnabled: true
    serviceAccountAnnotations: &saAnnotations {
      # hopsworks.ai/palceholder: "PLACEHOLDER_GLOBAL"
    }
  externalLoadBalancers:
      enabled: &lbEnabled true


persistence:
  enabled: true
  size: 3400Gi
  storageClass: local-storage

olk:
  prometheus-elasticsearch-exporter:
  opensearch:
    externalLoadBalancer:
      enabled: *lbEnabled
      annotations:
        metallb.universe.tf/loadBalancerIPs: "10.87.16.5"
        metallb.universe.tf/allow-shared-ip: "shared-lb"
    service:
      ports:
        - port: 9200
          targetPort: 9200
          protocol: TCP
          name: http
    backup:
      enabled: false
    replicas: 1
    logstash:
      workers: 1
      replicas: 1
    dashboard:
      deleteKibanaIndexIfPrevious: true

certs-operator:
  ca:
    httpTimeout: 120s
  controller:
    manager:
        requests:
          cpu: 10m
          memory: 512Mi

hops-istio:
  gateways:
    externalLoadBalancer:
      enabled: *lbEnabled
      annotations:
        metallb.universe.tf/loadBalancerIPs: "10.87.16.5"
        metallb.universe.tf/allow-shared-ip: "shared-lb"
    service:
      ports:
        - port: 443
          targetPort: 8443
          protocol: TCP
          name: https
# Less consul workers
consul:
  global:
    acls:
  consul:
    server:
      enabled: true
      replicas: 2
  syncCatalog:
    k8sAllowNamespaces: ["hopsworks"]

docker-registry:
  enabled: true
  replicas: 1
  hpa:
    enabled: false

  tamperContainerEngine:
    enabled: true
    # Comment if default configuration to trust the registry works
    patchOS: true

  # More resources if single instance
  resources:
    requests:
      cpu: "500m"
      memory: "4G"
    limits:
      cpu: "1"
      memory: "6G"

hopsfs:
  datanode:
    count: 1
    storage:
      namespace: hopsworks
      size: 2000Gi
  namenode:
    resources:
      requests:
        cpu: "500m"
        memory: "1024Mi"
      limits:
        memory: "3048Mi"
  objectStorage:
    enabled: false

hive:
  metastore:
    deployment:
      resources:
        requests:
          memory: "1500Mi"
          cpu: "350m"
      replicas: 1
      jvm_resources:
        xms: 1g
        xmx: 1g


hopsworks:
  externalLoadBalancer:
    enabled: *lbEnabled
    annotations:
      metallb.universe.tf/loadBalancerIPs: "10.87.16.5"
      metallb.universe.tf/allow-shared-ip: "shared-lb"
    service:
      ports:
        - port: 8181
          targetPort: 8181
          protocol: TCP
          name: http
  defaultQuota:
    enabled: false
  hopsworksCA:
    ca_count: 1
    startWaitTimeout: 900
    shutdownWait: 300
  replicaCount:
    worker: 1
  payara:
    debug: true
  # This is better for debug
  dockerRegistry:
    preset:
      usePullPush: false
      restartPolicy: Never

  resources:
    admin:
      auto_jvm: true
      jvm:
        memory:
          heap: 2048
          metaspace: 2048
          compressedClassSpaceSize: 512
          nonMethodCodeHeapSize: 5
          profiledCodeHeapSize: 48
          nonProfiledCodeHeapSize: 48
          buffer: 2048
        container:
          requests:
            cpu: "500m"
    worker:
      auto_jvm: true
      jvm:
        memory:
          heap: 2048
          metaspace: 2048
          compressedClassSpaceSize: 512
          nonMethodCodeHeapSize: 5
          profiledCodeHeapSize: 48
          nonProfiledCodeHeapSize: 48
          buffer: 256
      container:
        requests:
          cpu: "500m"
  probs:
    worker:
      livenessProbe:
        initialDelaySeconds: 0
        periodSeconds: 10
        timeoutSeconds: 20
        failureThreshold: 100
      readinessProbe:
        initialDelaySeconds: 60
        periodSeconds: 10
      startupProbe:
        failureThreshold: 30
  ingress:
    enabled: true
    annotations:
      nginx.ingress.kubernetes.io/rewrite-target: /
      nginx.ingress.kubernetes.io/ssl-redirect: "true"
      nginx.ingress.kubernetes.io/affinity: "cookie"
      nginx.ingress.kubernetes.io/affinity-mode: "persistent"
      nginx.ingress.kubernetes.io/proxy-body-size: "0"
      nginx.ingress.kubernetes.io/proxy-redirect-from: "http:"
      nginx.ingress.kubernetes.io/proxy-redirect-to: "https:"
      nginx.ingress.kubernetes.io/session-cookie-max-age: "5259600"
      nginx.ingress.kubernetes.io/session-cookie-expires: "5259600"
      nginx.ingress.kubernetes.io/proxy-read-timeout: "600"
      nginx.ingress.kubernetes.io/proxy-send-timeout: "600"
      cert-manager.io/cluster-issuer: "letsencrypt-prod"
    ingressClassName: nginx
    host: &ingressHost snurran.hops.works
    hosts:
      - *ingressHost
    tls:
      - hosts:
        - *ingressHost
        secretName: hopsworks-ingress-letsencrypt-cert
  variables:
    hdfs_base_storage_policy: "HOT"
    hdfs_log_storage_policy: "HOT"

# Using a small RonDB setup
rondb:
  serviceAccountAnnotations: *saAnnotations
  meta:
    mysqld:
      externalLoadBalancer:
        enabled: *lbEnabled
        annotations:
          metallb.universe.tf/loadBalancerIPs: "10.87.16.5"
          metallb.universe.tf/allow-shared-ip: "shared-lb"
        service:
          ports:
            - port: 3306
              targetPort: 3306
              protocol: TCP
              name: mysql
    rdrs:
      externalLoadBalancer:
        enabled: *lbEnabled
        annotations:
          metallb.universe.tf/loadBalancerIPs: "10.87.16.5"
          metallb.universe.tf/allow-shared-ip: "shared-lb"
        service:
          ports:
            - port: 1186
              targetPort: 1186
              protocol: TCP
              name: rdrs
  clusterSize:
    activeDataReplicas: 1
    numNodeGroups: 1
    minNumMySQLServers: 1
    maxNumMySQLServers: 1
    minNumRdrs: 1
    maxNumRdrs: 1
  resources:
    limits:
      cpus:
        ndbmtds: 4
        mysqlds: 1
        rdrs: 1
      memory:
        # The standard data node configuration is only used with >5GiB
        # container memory.
        ndbmtdsMiB: 10000
        mysqldMiB: 1400
        rdrsMiB: 500
    requests:
      cpus:
        ndbmtds: 4
        mysqlds: 0.2
        rdrs: 0.2
      memory:
        ndbmtdsMiB: 12000
        mysqldMiB: 1024
        rdrsMiB: 100
      storage:
        diskColumnGiB: 100
        redoLogGiB: 2
        undoLogsGiB: 2
        slackGiB: 1
        logGiB: 2
  rondbConfig:
    EmptyApiSlots: 4
  ndbmtd:
  mysqld:
  mgmd:


onlinefs:
  deployment:
    # To make it available even when VPA
    replicas: 1
    resources:
      requests:
        memory: "1G"
        cpu: "200m"

arrowflight:
  externalLoadBalancer:
    enabled: *lbEnabled
    annotations:
      metallb.universe.tf/loadBalancerIPs: "10.87.16.5"
      metallb.universe.tf/allow-shared-ip: "shared-lb"
    service:
      ports:
        - port: 32010
          targetPort: 32010
          protocol: TCP
          name: flight
  deployment:
    replicas: 1
    resources:
      requests:
        memory: "4G"
        cpu: "250m"
  hpa:
    enabled: false

prometheus:
  prometheus:
    alertmanager:
      replicaCount: 1
    server:
      global:
        scrape_interval: 1m
      retention: "1d"
      persistentVolume:
        enabled: true
        size: 50Gi
      resources:
        requests:
          cpu: 500m
          memory: 2Gi
        limits:
          memory: 4Gi


spark:
  #historyServer:
  #  enabled: true
  rss:
    shuffleServer:
      replicas: 1
    coordinator:
      count: 1
      resources:
        requests:
          cpu: "1"

airflow:
  enabled: true

minio:
  enabled: false
  replicas: 1
  storage: 10Gi

hw-kyverno:
  enabled: true
  policies:
    prohibitHostPath:
      enabled: true
  kyverno:
    admissionController:
      replicas: 1

kserve:
  knative:
    netIstioController:
      resources:
        requests:
          cpu: 30m
          memory: 40Mi
        limits:
          cpu: 300m
          memory: 500Mi
kafka:
  strimzi-kafka-operator:
  cluster:
    kafka:
      externalLoadBalancer:
        enabled: *lbEnabled
        annotations:
          metallb.universe.tf/loadBalancerIPs: "10.87.16.5"
          metallb.universe.tf/allow-shared-ip: "shared-lb"
        service:
          ports:
            - port: 19093
              targetPort: 9093
              protocol: TCP
              name: kafka
      replicas: 1
      config:
        log.retention.hours: 2
        log.roll.hours: 1
      resources:
        requests:
          cpu: "500m"
          memory: "4G"
        limits:
          cpu: "1"
          memory: "4G"
