#Copyright (c)  WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
#
# WSO2 Inc. 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: v1
kind: ConfigMap
metadata:
  name: wso2am-operator-controller-config
  namespace: wso2-system
data:

  api-manager-version: "3.2.0"
  image-pull-secret-name: ""
  service-account-name: ""

  # common configs for apim-instances
  apim-deployment-replicas: "1"
  apim-deployment-image: "wso2/wso2am:3.2.0"
  apim-deployment-minReadySeconds: "240"
  apim-deployment-maxSurge: "1"
  apim-deployment-maxUnavailable: "0"
  apim-deployment-imagePullPolicy: "Always"
  apim-deployment-livenessProbe-initialDelaySeconds: "180"
  apim-deployment-livenessProbe-periodSeconds: "20"
  apim-deployment-livenessProbe-failureThreshold: "3"
  apim-deployment-readinessProbe-initialDelaySeconds: "180"
  apim-deployment-readinessProbe-periodSeconds: "20"
  apim-deployment-readinessProbe-failureThreshold: "3"
  apim-deployment-securityContext: "runAsUser: 802"
  apim-deployment-resources-jvm-heap-memory-xms: "1024m"
  apim-deployment-resources-jvm-heap-memory-xmx: "1024m"
  apim-deployment-resources-requests-cpu: "1000m"
  apim-deployment-resources-requests-memory: "1Gi"
  apim-deployment-resources-limits-cpu: "2000m"
  apim-deployment-resources-limits-memory: "2Gi"

  # common configs for apim-analytics
  apim-analytics-deployment-dashboard-image: "wso2/wso2am-analytics-dashboard:3.2.0"
  apim-analytics-deployment-worker-image: "wso2/wso2am-analytics-worker:3.2.0"
  apim-analytics-deployment-replicas: "1"
  apim-analytics-deployment-minReadySeconds: "30"
  apim-analytics-deployment-maxSurge: "1"
  apim-analytics-deployment-maxUnavailable: "0"
  apim-analytics-deployment-imagePullPolicy: "Always"
  apim-analytics-deployment-livenessProbe-initialDelaySeconds: "20"
  apim-analytics-deployment-livenessProbe-periodSeconds: "10"
  apim-analytics-deployment-livenessProbe-failureThreshold: "3"
  apim-analytics-deployment-readinessProbe-initialDelaySeconds: "20"
  apim-analytics-deployment-readinessProbe-periodSeconds: "10"
  apim-analytics-deployment-readinessProbe-failureThreshold: "3"
  apim-analytics-deployment-resources-jvm-heap-memory-xms: "2048m"
  apim-analytics-deployment-resources-jvm-heap-memory-xmx: "2048m"
  apim-analytics-deployment-securityContext-runAsUser: "802"
  apim-analytics-deployment-resources-requests-memory: "4Gi"
  apim-analytics-deployment-resources-requests-cpu: "2000m"
  apim-analytics-deployment-resources-limits-memory: "4Gi"
  apim-analytics-deployment-resources-limits-cpu: "2000m"

  # pattern specific configs for key manager instances
  p4-apim-km-deployment-replicas: "2"

  # pattern specific configs for external gateway instances
  p4-apim-external-gw-deployment-replicas: "2"
  p4-apim-external-gw-deployment-maxSurge: "2"
  p4-apim-external-gw-deployment-maxUnavailable: "0"

  # pattern specific configs for internal gateway instances
  p4-apim-internal-gw-deployment-replicas: "2"
  p4-apim-internal-gw-deployment-maxSurge: "2"
  p4-apim-internal-gw-deployment-maxUnavailable: "0"
  
  p2-apim-km-deployment-replicas: "2"

  p2-apim-gw-deployment-replicas: "2"
  p2-apim-gw-deployment-maxSurge: "2"
  p2-apim-gw-deployment-maxUnavailable: "0"

  # pattern specific configs for apim-gateway
  p3-apim-gw-deployment-maxSurge: "2"
  p3-apim-gw-deployment-maxUnavailable: "0"
  p3-apim-gw-deployment-replicas: "2"
  
  # pattern specific configs for apim-keymanager
  p3-apim-km-deployment-replicas: "2"

  # pattern specific configs for apim-keymanager
  p3-apim-tm-deployment-config: ""
  p3-apim-tm-deployment-replicas: "2"

  # custom pattern specific configs for apim-instances
  pX-apim-deployment-image: "wso2/wso2am:3.2.0"
  pX-apim-deployment-resources-requests-cpu: "2000m"
  pX-apim-deployment-resources-requests-memory: "2Gi"
  pX-apim-deployment-resources-limits-cpu: "2000m"
  pX-apim-deployment-resources-limits-memory: "2Gi"

  # custom pattern specific configs for apim-analytics
  pX-apim-analytics-deployment-dashboard-image: "wso2/wso2am-analytics-dashboard:3.2.0"
  pX-apim-analytics-deployment-worker-image: "wso2/wso2am-analytics-worker:3.2.0"
  pX-apim-analytics-deployment-resources-requests-cpu: "2000m"
  pX-apim-analytics-deployment-resources-requests-memory: "4Gi"
  pX-apim-analytics-deployment-resources-limits-cpu: "2000m"
  pX-apim-analytics-deployment-resources-limits-memory: "4Gi"

  mysql-replicas: "1"
  mysql-image: "mysql:5.7"
  mysql-imagePullPolicy: "IfNotPresent"


