# Default values for klogs-viewer

# Namespace to install the chart into
# If not provided, the namespace will be set to the release namespace
namespace: ""

replicaCount: 1

image:
  repository: ghcr.io/rogosprojects/klogs-viewer
  pullPolicy: IfNotPresent
  # Overrides the image tag whose default is the chart appVersion. (recommended)
  # If you want to use a specific version, set the tag to the version number. Example: tag: "0.1.5"
  # tag: "latest"

imagePullSecrets: []
# - name: registry-pull-secret
nameOverride: ""
fullnameOverride: ""

serviceAccount:
  # Specifies whether a service account should be created
  create: true
  # Annotations to add to the service account
  annotations: {}

  # The name of the service account to use.
  name: "klogs-viewer"

# ClusterRole vs. Role
# If watchAllNamespaces is true, a ClusterRole will be created
# If watchAllNamespaces is false, a Role will be created for the release namespace only
rbac:
  # Set this to true to watch all namespaces (requires ClusterRole)
  # or false to watch only the release namespace (requires Role)
  watchAllNamespaces: true
  clusterRole:
    name: ""
  role:
    name: ""

podAnnotations: {}

podSecurityContext: {}
  # fsGroup: 2000

securityContext: {}
  # capabilities:
  #   drop:
  #   - ALL
  # readOnlyRootFilesystem: true
  # runAsNonRoot: true
  # runAsUser: 1000

service:
  type: ClusterIP
  port: 8080
  containerPort: 8080
  name: klogs-viewer

application:
  # Base path for the application (e.g., "/logs")
  basePath: "/logs"
  # Label selector for pods, in the format key1=value1,key2=value2
  # If not specified, all pods will be shown
  podSelector: "app=nginx"
  # Enable authentication with a token
  authEnabled: false
  # Token to use for authentication (will be stored in a secret)
  # If authEnabled is true and token is not provided, a random token will be generated
  authToken: "random"
  # Label to omit in the logs viewer for the pod selector.
  # If not specified, the label will be "app="
  # It improves the UI by removing the label from the logs viewer
  replaceLabel: ""
  # Comma-separated list of allowed WebSocket origins
  # Leave empty to enforce same-origin policy
  # Example: "https://example.com,https://another-domain.com"
  # For testing/development only: set to "*" (not recommended for production)
  allowedOrigins: ""

ingress:
  enabled: true
  className: ""
  annotations: {}
    # kubernetes.io/ingress.class: nginx
    # kubernetes.io/tls-acme: "true"
    #
    # set those annotation if using WebSocket with nginx ingress
    # nginx.ingress.kubernetes.io/affinity: cookie
    # nginx.ingress.kubernetes.io/proxy-buffer-size: 8k
    # nginx.ingress.kubernetes.io/proxy-connect-timeout: "60"
    # nginx.ingress.kubernetes.io/proxy-read-timeout: "3600"
    # nginx.ingress.kubernetes.io/proxy-send-timeout: "3600"
    # nginx.ingress.kubernetes.io/session-cookie-expires: "172800"
    # nginx.ingress.kubernetes.io/session-cookie-max-age: "172800"
    # nginx.ingress.kubernetes.io/session-cookie-name: route
    # nginx.ingress.kubernetes.io/websocket-services: klogs-viewer
  hosts:
    - host: chart-example.local
      paths:
        - path: /logs
          pathType: ImplementationSpecific
  tls: []
  #  - secretName: chart-example-tls
  #    hosts:
  #      - chart-example.local

kgateway:
  enabled: false
  annotations: {}
  # References to parent Gateway resources (required)
  parentRefs:
    - name: envoy-gateway
      namespace: kgateway-system
      # sectionName: https
  # Hostnames to match (leave empty to inherit from the Gateway listener)
  hostnames: []
  #  - chart-example.local
  # Path rules — pathType: Exact | PathPrefix | RegularExpression
  paths:
    - path: /logs
      pathType: PathPrefix

resources:
  limits:
    cpu: 900m
    memory: 128Mi
  requests:
    cpu: 100m
    memory: 64Mi

nodeSelector: {}

tolerations: []

affinity: {}
