# Example PAISConfiguration
#
# Please review and edit where needed.
#
# Several dependencies, like ConfigMaps and Secrets, must be created too.
# All such dependencies must be in the same namespace as this PAISConfiguration.
#
# For detailed documentation of this API, use kubectl explain, e.g.
#   kubectl explain paisconfiguration.spec
# or
#   kubectl explain paisconfiguration.spec.database
---
apiVersion: pais.vmware.com/v1alpha1
kind: PAISConfiguration
metadata:
  name: default
  namespace: my-namespace-on-supervisor
spec:
  clientTls:
    # These are optional
    # Each should be a ConfigMap in this namespace with a single "ca.crt" field
    # containing one or more PEM-encoded certificates.
    caBundleRefs:
    - name: ca-trust-bundle-for-my-my-postgres-pgvector-db
    - name: ca-trust-bundle-for-my-harbor
    - name: ca-trust-bundle-for-my-data-sources
    # etc...
  database:
    host: my-postgres-with-pgvector-database-host-name
    username: my-postgres-username
    dbname: my-postgres-logical-db-name
    # This is a required reference to a Kubernetes Secret in this namespace
    passwordRef:
      name: postgres-credentials
      fieldPath: password
  auth:
    oidc:
      issuerUrl: https://my-oidc.example.com/issuer-pkce/
      scope:
      - openid
      - groups
      # Some IdPs require this in order to support refresh-tokens
      # but others don't.  Consult your IdP documentation.
      # - offline_access

      clientId: my-client-id-for-pais
      extraAudiences: []
      authorizedGroups: []
  ingress:
    serviceType: LoadBalancer
  vksControlPlane:
    virtualMachineClassName: my-vm-class-choice-eg-best-effort-large
    storageClassName: my-preferred-storage-class

  # This is an optional configuration block that will cause PAIS to install
  # the NVIDIA GPU Operator to enable GPU-accelerated model inferencing.
  # The licenseConfigRef and imagePullSecretRef correspond to the
  # licensing-config and ngc-secret resources that are documented
  # here: https://docs.nvidia.com/ai-enterprise/deployment/vmware/latest/tanzu.html#deploy-nvidia-gpu-operator
  nvidiaConfig:
    licenseConfigRef:
      # Name of a configmap with a gridd.conf and client_configuration_token.tok fields
      name: my-nvidia-licensing-configmap
    imagePullSecretRef:
      # Name of an image pull secret used for pulling the vGPU Driver Image and
      # other components of the GPU Operator.
      name: my-ngc-pull-secret
    gpuOperatorOverridesRef:
      # Optional ref to a ConfigMap containing a values.yaml
      # Use this to customize the gpu-operator Helm chart
      # see: https://docs.nvidia.com/datacenter/cloud-native/gpu-operator/latest/getting-started.html#common-chart-customization-options
      name: my-gpu-operator-chart-values

  # This will become a required field in future versions. All other storageClassName fields are now
  # optional and the respective components will default to the value of this field.
  defaultStorageClassName: my-preferred-storage-class

  # [Introduced in PAIS 2.1.0.]
  # Observability configuration is optional. Following prometheusRuntime configuration enables metrics
  # collection from various PAIS components into a prometheus-server deployed within the same namespace,
  # with specified metrics retention period on storage backed by a PVC provisioned from the given storage
  # class. See accompanying README.md "Observability: Metrics Configuration" section for more details.
  #observability:
  #  prometheusRuntime:
  #    metricsRetention: 30d
