---
# Secret containing MinIO/S3-compatible storage credentials
# In production, use a secrets management solution (e.g., External Secrets Operator)
apiVersion: v1
kind: Secret
metadata:
  name: minio-credentials
  namespace: default
type: Opaque
stringData:
  access-key-id: "minioadmin"
  secret-access-key: "minioadmin"
  # Optional: CA certificate for custom TLS verification
  # ca-certificate: |
  #   -----BEGIN CERTIFICATE-----
  #   ...
  #   -----END CERTIFICATE-----

---
# NetBoxEnterprise with MinIO/S3-compatible storage
# This example demonstrates custom S3 endpoint configuration for:
# - MinIO
# - Garage
# - Ceph RadosGW
# - Other S3-compatible object storage
apiVersion: netboxlabs.com/v1alpha1
kind: NetBoxEnterprise
metadata:
  name: netbox-with-minio
  namespace: default
spec:
  imagePullPolicy: IfNotPresent
  netbox:
    replicas: 1
    image:
      pullPolicy: IfNotPresent
    worker:
      replicas: 1
    # S3-compatible storage configuration
    config:
      storage:
        s3:
          enabled: true
          bucketName: "netbox"
          # Custom S3 endpoint URL for MinIO or other S3-compatible services
          # The operator automatically configures signature_version='s3v4' and
          # addressing_style='path' when a custom endpoint is specified
          endpointUrl: "https://minio.minio.svc.cluster.local:9000"
          # Region is still required even for custom endpoints
          regionName: "us-east-1"
          # Reference to Secret containing credentials
          accessKeyId:
            name: minio-credentials
            key: access-key-id
          secretAccessKey:
            name: minio-credentials
            key: secret-access-key
          # For self-signed certificates in development/testing
          # Set to true to disable SSL certificate verification
          # WARNING: Do not use in production!
          sslNoVerify: false
          # Optional: Custom CA certificate for TLS verification
          # Uncomment if using self-signed certificates with proper CA
          # caCertificate:
          #   name: minio-credentials
          #   key: ca-certificate
  diode:
    enabled: false
  postgresql:
    external: false
  redis:
    external: false
