# 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.
#

apiVersion: nuvolaris.org/v1
kind: WhiskUser
metadata:
  name: ${USERNAME}
  namespace: nuvolaris
spec:
  email: ${EMAIL}
  password: ${PASSWORD}
  namespace: ${USERNAME}
  auth: ${SECRET_USER_AUTH}
  redis:
    enabled: ${REDIS_ENABLED}
    prefix: ${USERNAME}
    password: ${USER_SECRET_REDIS}
  mongodb:
    enabled: ${MONGODB_ENABLED}
    database: ${USERNAME}
    password: ${USER_SECRET_MONGODB}
  postgres:
    enabled: ${POSTGRES_ENABLED}
    database: ${USERNAME}
    password: ${USER_SECRET_POSTGRES}
  object-storage:        
    password: ${USER_SECRET_MINIO}
    quota: "${MINIO_STORAGE_QUOTA:-auto}"
    data:
      enabled: ${MINIO_DATA_ENABLED}
      bucket: ${USERNAME}-data
    route:
      enabled: ${MINIO_STATIC_ENABLED}
      bucket: ${USERNAME}-web      
  milvus:
    enabled: ${MILVUS_ENABLED}
    database: ${USERNAME}
    password: ${USER_SECRET_MILVUS}      
