#
# ThingsBoard, Inc. ("COMPANY") CONFIDENTIAL
#
# Copyright © 2016-2019 ThingsBoard, Inc. All Rights Reserved.
#
# NOTICE: All information contained herein is, and remains
# the property of ThingsBoard, Inc. and its suppliers,
# if any.  The intellectual and technical concepts contained
# herein are proprietary to ThingsBoard, Inc.
# and its suppliers and may be covered by U.S. and Foreign Patents,
# patents in process, and are protected by trade secret or copyright law.
#
# Dissemination of this information or reproduction of this material is strictly forbidden
# unless prior written permission is obtained from COMPANY.
#
# Access to the source code contained herein is hereby forbidden to anyone except current COMPANY employees,
# managers or contractors who have executed Confidentiality and Non-disclosure agreements
# explicitly covering such access.
#
# The copyright notice above does not evidence any actual or intended publication
# or disclosure  of  this source code, which includes
# information that is confidential and/or proprietary, and is a trade secret, of  COMPANY.
# ANY REPRODUCTION, MODIFICATION, DISTRIBUTION, PUBLIC  PERFORMANCE,
# OR PUBLIC DISPLAY OF OR THROUGH USE  OF THIS  SOURCE CODE  WITHOUT
# THE EXPRESS WRITTEN CONSENT OF COMPANY IS STRICTLY PROHIBITED,
# AND IN VIOLATION OF APPLICABLE LAWS AND INTERNATIONAL TREATIES.
# THE RECEIPT OR POSSESSION OF THIS SOURCE CODE AND/OR RELATED INFORMATION
# DOES NOT CONVEY OR IMPLY ANY RIGHTS TO REPRODUCE, DISCLOSE OR DISTRIBUTE ITS CONTENTS,
# OR TO MANUFACTURE, USE, OR SELL ANYTHING THAT IT  MAY DESCRIBE, IN WHOLE OR IN PART.
#

apiVersion: v1
kind: Pod
metadata:
  name: tb-performance-run
  namespace: thingsboard
spec:
  nodeSelector:
    nodeType: tb-performance
  imagePullSecrets:
    - name: regcred
  securityContext:
    sysctls:
    - name: net.ipv4.ip_local_port_range
      value: "10000 61000"
    - name: net.ipv4.tcp_fin_timeout
      value: "30"
  containers:
  - name: tb-performance
    imagePullPolicy: Always
    image: thingsboard/tb-performance-test:latest
    env:
    - name: TEST_ENABLED
      value: "true"
    - name: MESSAGES_PER_SECOND
      value: "10000"
    - name: DURATION_IN_SECONDS
      value: "14400"
    - name: DEVICE_START_IDX
      value: "0"
    - name: DEVICE_END_IDX
      value: "500000"
    - name: GATEWAY_START_IDX
      value: "0"
    - name: GATEWAY_END_IDX
      value: "50000"
    - name: DEVICE_CREATE_ON_START
      value: "false"
    - name: DEVICE_DELETE_ON_COMPLETE
      value: "false"
    - name: GATEWAY_CREATE_ON_START
      value: "false"
    - name: GATEWAY_DELETE_ON_COMPLETE
      value: "false"
    - name: ALARM_STORM_START_SECOND
      value: "60"
    - name: ALARM_STORM_END_SECOND
      value: "360"
    - name: ALARMS_PER_SECOND
      value: "100"
    - name: WARMUP_ENABLED
      value: "true"
    - name: CUSTOMER_END_IDX
      value: "0"
    - name: DASHBOARD_CREATE_ON_START
      value: "false"
    - name: CUSTOMER_CREATE_ON_START
      value: "false"
    - name: UPDATE_ROOT_RULE_CHAIN
      value: "false"
    - name: REVERT_ROOT_RULE_CHAIN
      value: "false"
    envFrom:
    - configMapRef:
        name: tb-performance-config
  restartPolicy: Never
