<commit_before>{
  "kind": "Template",
  "apiVersion": "v1",
  "metadata": {
    "name": "${NAME}-deployment-template",
    "annotations": {
      "description": "Deployment template for a django server connected to a PostGreSQL database.",
      "tags": "django",
      "iconClass": "icon-python"
    }
  },
  "objects": [
    {
      "kind": "Secret",
      "apiVersion": "v1",
      "metadata": {
        "name": "${NAME}",
        "labels": {
          "app": "${NAME}"
        }
      },
      "data": {
        "api-user": "${USER_ID}",
        "api-password": "${<PASSWORD>}",
        "admin-user": "${ADMIN_USER_ID}",
        "admin-password": <PASSWORD>}"
      },
      "type": "Opaque"
    },
    {
      "kind": "Service",
      "apiVersion": "v1",
      "metadata": {
        "name": "${NAME}",
        "annotations": {
          "description": "Exposes and load balances the application pods",
          "service.alpha.openshift.io/dependencies": "[{\"name\": \"${DATABASE_SERVICE_NAME}\", \"kind\": \"Service\"},{\"name\": \"${SOLR_SERVICE_NAME}\", \"kind\": \"Service\"}]"
        }
      },
      "spec": {
        "ports": [
          {
            "name": "8080-tcp",
            "port": 8080,
            "targetPort": 8080
          }
        ],
        "selector": {
          "name": "${NAME}"
        }
      }
    },
    {
      "kind": "Route",
      "apiVersion": "v1",
      "metadata": {
        "name": "${NAME}"
      },
      "spec": {
        "host": "${APPLICATION_DOMAIN}",
        "port": {
          "targetPort": "8080-tcp"
        },
        "tls": {
          "insecureEdgeTerminationPolicy": "Redirect",
          "termination": "edge"
        },
        "to": {
          "kind": "Service",
          "name": "${NAME}",
          "weight": 100
        }
      }
    },
    {
      "kind": "PersistentVolumeClaim",
      "apiVersion": "v1",
      "metadata": {
        "name": "${NAME}",
        "labels": {
          "app": "${NAME}",
          "template": "${NAME}-deployment-template"
        }
      },
      "spec": {
        "accessModes": [
          "ReadWriteOnce"
        ],
        "resources": {
          "requests": {
            "storage": "${PERSISTENT_VOLUME_SIZE}"
          }
        }
      }
    },
    {
      "kind": "DeploymentConfig",
      "apiVersion": "v1",
      "metadata": {
        "name": "${NAME}",
        "annotations": {
          "description": "Defines how to deploy the application server"
        }
      },
      "spec": {
        "strategy": {
          "type": "Rolling"
        },
        "triggers": [
          {
            "type": "ImageChange",
            "imageChangeParams": {
              "automatic": true,
              "containerNames": [
                "${NAME}"
              ],
              "from": {
                "kind": "ImageStreamTag",
                "namespace": "${IMAGE_NAMESPACE}",
                "name": "${NAME}:${TAG_NAME}"
              }
            }
          },
          {
            "type": "ConfigChange"
          }
        ],
        "replicas": 1,
        "selector": {
          "name": "${NAME}"
        },
        "template": {
          "metadata": {
            "name": "${NAME}",
            "labels": {
              "name": "${NAME}"
            }
          },
          "spec": {
            "volumes": [
              {
                "name": "${NAME}-data",
                "persistentVolumeClaim": {
                  "claimName": "${NAME}"
                }
              }
            ],
            "containers": [
              {
                "name": "${NAME}",
                "image": " ",
                "ports": [
                  {
                    "containerPort": 8080,
                    "protocol": "TCP"
                  }
                ],
                "readinessProbe": {
                  "failureThreshold": 5,
                  "periodSeconds": 30,
                  "initialDelaySeconds": 3,
                  "timeoutSeconds": 20,
                  "httpGet": {
                    "path": "/health",
                    "port": 8080
                  }
                },
                "livenessProbe": {
                  "failureThreshold": 5,
                  "periodSeconds": 60,
                  "initialDelaySeconds": 30,
                  "timeoutSeconds": 20,
                  "httpGet": {
                    "path": "/health",
                    "port": 8080
                  }
                },
                "volumeMounts": [
                  {
                    "name": "${NAME}-data",
                    "mountPath": "${MOUNT_PATH}"
                  }
                ],
                "env": [
                  {
                    "name": "DATABASE_SERVICE_NAME",
                    "value": "${DATABASE_SERVICE_NAME}"
                  },
                  {
                    "name": "DATABASE_ENGINE",
                    "value": "${DATABASE_ENGINE}"
                  },
                  {
                    "name": "DATABASE_NAME",
                    "value": "${DATABASE_NAME}"
                  },
                  {
                    "name": "DATABASE_USER",
                    "valueFrom": {
                      "secretKeyRef": {
                        "name": "${DATABASE_DEPLOYMENT_NAME}",
                        "key": "database-user"
                      }
                    }
                  },
                  {
                    "name": "DATABASE_PASSWORD",
                    "valueFrom": {
                      "secretKeyRef": {
                        "name": "${DATABASE_DEPLOYMENT_NAME}",
                        "key": "database-password"
                      }
                    }
                  },
                  {
                    "name": "APP_CONFIG",
                    "value": "${APP_CONFIG}"
                  },
                  {
                    "name": "DJANGO_SECRET_KEY",
                    "value": "${DJANGO_SECRET_KEY}"
                  },
                  {
                    "name": "DJANGO_DEBUG",
                    "value": "${DJANGO_DEBUG}"
                  },
                  {
                    "name": "SOLR_SERVICE_NAME",
                    "value": "${SOLR_SERVICE_NAME}"
                  },
                  {
                    "name": "SOLR_CORE_NAME",
                    "value": "${SOLR_CORE_NAME}"
                  },
                  {
                    "name": "INDY_WALLET_SEED",
                    "value": "${INDY_WALLET_SEED}"
                  },
                  {
                    "name": "LEDGER_URL",
                    "value": "${LEDGER_URL}"
                  },
                  {
                    "name": "INDY_WALLET_TYPE",
                    "value": "${INDY_WALLET_TYPE}"
                  },
                  {
                    "name": "USE_AUTHENTICATION",
                    "value": "${USE_AUTHENTICATION}"
                  },
                  {
                    "name": "USER_ID",
                    "valueFrom": {
                      "secretKeyRef": {
                        "name": "${NAME}",
                        "key": "api-user"
                      }
                    }
                  },
                  {
                    "name": "<PASSWORD>_PASSWORD",
                    "valueFrom": {
                      "secretKeyRef": {
                        "name": "${NAME}",
                        "key": "api-password"
                      }
                    }
                  },
                  {
                    "name": "ADMIN_USER_ID",
                    "valueFrom": {
                      "secretKeyRef": {
                        "name": "${NAME}",
                        "key": "admin-user"
                      }
                    }
                  },
                  {
                    "name": "<PASSWORD>",
                    "valueFrom": {
                      "secretKeyRef": {
                        "name": "${NAME}",
                        "key": "<PASSWORD>-password"
                      }
                    }
                  },
                  {
                    "name": "TOB_THEME",
                    "value": "${TOB_THEME}"
                  }
                ],
                "resources": {
                  "requests": {
                    "cpu": "${CPU_REQUEST}",
                    "memory": "${MEMORY_REQUEST}"
                  },
                  "limits": {
                    "cpu": "${CPU_LIMIT}",
                    "memory": "${MEMORY_LIMIT}"
                  }
                }
              }
            ]
          }
        }
      }
    },
    {
      "kind": "HorizontalPodAutoscaler",
      "apiVersion": "autoscaling/v1",
      "metadata": {
        "name": "${NAME}",
        "labels": {
          "app": "${NAME}"
        }
      },
      "spec": {
        "scaleTargetRef": {
          "kind": "DeploymentConfig",
          "name": "${NAME}"
        },
        "minReplicas": 1,
        "maxReplicas": 4
      }
    }    
  ],
  "parameters": [
    {
      "name": "NAME",
      "displayName": "Name",
      "description": "The name assigned to all of the OpenShift resources associated to the server instance.",
      "required": true,<commit_msg>remove auto-scaler from tob-api<commit_after>{
  "kind": "Template",
  "apiVersion": "v1",
  "metadata": {
    "name": "${NAME}-deployment-template",
    "annotations": {
      "description": "Deployment template for a django server connected to a PostGreSQL database.",
      "tags": "django",
      "iconClass": "icon-python"
    }
  },
  "objects": [
    {
      "kind": "Secret",
      "apiVersion": "v1",
      "metadata": {
        "name": "${NAME}",
        "labels": {
          "app": "${NAME}"
        }
      },
      "data": {
        "api-user": "${USER_ID}",
        "api-password": "${<PASSWORD>}",
        "admin-user": "${ADMIN_USER_ID}",
        "admin-password": "${<PASSWORD>}"
      },
      "type": "Opaque"
    },
    {
      "kind": "Service",
      "apiVersion": "v1",
      "metadata": {
        "name": "${NAME}",
        "annotations": {
          "description": "Exposes and load balances the application pods",
          "service.alpha.openshift.io/dependencies": "[{\"name\": \"${DATABASE_SERVICE_NAME}\", \"kind\": \"Service\"},{\"name\": \"${SOLR_SERVICE_NAME}\", \"kind\": \"Service\"}]"
        }
      },
      "spec": {
        "ports": [
          {
            "name": "8080-tcp",
            "port": 8080,
            "targetPort": 8080
          }
        ],
        "selector": {
          "name": "${NAME}"
        }
      }
    },
    {
      "kind": "Route",
      "apiVersion": "v1",
      "metadata": {
        "name": "${NAME}"
      },
      "spec": {
        "host": "${APPLICATION_DOMAIN}",
        "port": {
          "targetPort": "8080-tcp"
        },
        "tls": {
          "insecureEdgeTerminationPolicy": "Redirect",
          "termination": "edge"
        },
        "to": {
          "kind": "Service",
          "name": "${NAME}",
          "weight": 100
        }
      }
    },
    {
      "kind": "PersistentVolumeClaim",
      "apiVersion": "v1",
      "metadata": {
        "name": "${NAME}",
        "labels": {
          "app": "${NAME}",
          "template": "${NAME}-deployment-template"
        }
      },
      "spec": {
        "accessModes": [
          "ReadWriteOnce"
        ],
        "resources": {
          "requests": {
            "storage": "${PERSISTENT_VOLUME_SIZE}"
          }
        }
      }
    },
    {
      "kind": "DeploymentConfig",
      "apiVersion": "v1",
      "metadata": {
        "name": "${NAME}",
        "annotations": {
          "description": "Defines how to deploy the application server"
        }
      },
      "spec": {
        "strategy": {
          "type": "Rolling"
        },
        "triggers": [
          {
            "type": "ImageChange",
            "imageChangeParams": {
              "automatic": true,
              "containerNames": [
                "${NAME}"
              ],
              "from": {
                "kind": "ImageStreamTag",
                "namespace": "${IMAGE_NAMESPACE}",
                "name": "${NAME}:${TAG_NAME}"
              }
            }
          },
          {
            "type": "ConfigChange"
          }
        ],
        "replicas": 1,
        "selector": {
          "name": "${NAME}"
        },
        "template": {
          "metadata": {
            "name": "${NAME}",
            "labels": {
              "name": "${NAME}"
            }
          },
          "spec": {
            "volumes": [
              {
                "name": "${NAME}-data",
                "persistentVolumeClaim": {
                  "claimName": "${NAME}"
                }
              }
            ],
            "containers": [
              {
                "name": "${NAME}",
                "image": " ",
                "ports": [
                  {
                    "containerPort": 8080,
                    "protocol": "TCP"
                  }
                ],
                "readinessProbe": {
                  "failureThreshold": 5,
                  "periodSeconds": 30,
                  "initialDelaySeconds": 3,
                  "timeoutSeconds": 20,
                  "httpGet": {
                    "path": "/health",
                    "port": 8080
                  }
                },
                "livenessProbe": {
                  "failureThreshold": 5,
                  "periodSeconds": 60,
                  "initialDelaySeconds": 30,
                  "timeoutSeconds": 20,
                  "httpGet": {
                    "path": "/health",
                    "port": 8080
                  }
                },
                "volumeMounts": [
                  {
                    "name": "${NAME}-data",
                    "mountPath": "${MOUNT_PATH}"
                  }
                ],
                "env": [
                  {
                    "name": "DATABASE_SERVICE_NAME",
                    "value": "${DATABASE_SERVICE_NAME}"
                  },
                  {
                    "name": "DATABASE_ENGINE",
                    "value": "${DATABASE_ENGINE}"
                  },
                  {
                    "name": "DATABASE_NAME",
                    "value": "${DATABASE_NAME}"
                  },
                  {
                    "name": "DATABASE_USER",
                    "valueFrom": {
                      "secretKeyRef": {
                        "name": "${DATABASE_DEPLOYMENT_NAME}",
                        "key": "database-user"
                      }
                    }
                  },
                  {
                    "name": "DATABASE_PASSWORD",
                    "valueFrom": {
                      "secretKeyRef": {
                        "name": "${DATABASE_DEPLOYMENT_NAME}",
                        "key": "database-password"
                      }
                    }
                  },
                  {
                    "name": "APP_CONFIG",
                    "value": "${APP_CONFIG}"
                  },
                  {
                    "name": "DJANGO_SECRET_KEY",
                    "value": "${DJANGO_SECRET_KEY}"
                  },
                  {
                    "name": "DJANGO_DEBUG",
                    "value": "${DJANGO_DEBUG}"
                  },
                  {
                    "name": "SOLR_SERVICE_NAME",
                    "value": "${SOLR_SERVICE_NAME}"
                  },
                  {
                    "name": "SOLR_CORE_NAME",
                    "value": "${SOLR_CORE_NAME}"
                  },
                  {
                    "name": "INDY_WALLET_SEED",
                    "value": "${INDY_WALLET_SEED}"
                  },
                  {
                    "name": "LEDGER_URL",
                    "value": "${LEDGER_URL}"
                  },
                  {
                    "name": "INDY_WALLET_TYPE",
                    "value": "${INDY_WALLET_TYPE}"
                  },
                  {
                    "name": "USE_AUTHENTICATION",
                    "value": "${USE_AUTHENTICATION}"
                  },
                  {
                    "name": "USER_ID",
                    "valueFrom": {
                      "secretKeyRef": {
                        "name": "${NAME}",
                        "key": "api-user"
                      }
                    }
                  },
                  {
                    "name": "USER_PASSWORD",
                    "valueFrom": {
                      "secretKeyRef": {
                        "name": "${NAME}",
                        "key": "api-password"
                      }
                    }
                  },
                  {
                    "name": "ADMIN_USER_ID",
                    "valueFrom": {
                      "secretKeyRef": {
                        "name": "${NAME}",
                        "key": "admin-user"
                      }
                    }
                  },
                  {
                    "name": "ADMIN_PASSWORD",
                    "valueFrom": {
                      "secretKeyRef": {
                        "name": "${NAME}",
                        "key": "admin-password"
                      }
                    }
                  },
                  {
                    "name": "TOB_THEME",
                    "value": "${TOB_THEME}"
                  }
                ],
                "resources": {
                  "requests": {
                    "cpu": "${CPU_REQUEST}",
                    "memory": "${MEMORY_REQUEST}"
                  },
                  "limits": {
                    "cpu": "${CPU_LIMIT}",
                    "memory": "${MEMORY_LIMIT}"
                  }
                }
              }
            ]
          }
        }
      }
    }
  ],
  "parameters": [
    {
      "name": "NAME",
      "displayName": "Name",
      "description": "The name assigned to all of the OpenShift resources associated to the server instance.",
      "required": true,
{'fraction_non_alphanumeric': 0.1511545390032207, 'fraction_numerical': 0.00573175391669851, 'mean_word_length': 0.8439859084046301, 'pattern_counts': {'":': 396, '<': 10, '<?xml version=': 0, '>': 10, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3951021', 'n_tokens_mistral': 4957, 'n_tokens_neox': 4535, 'n_words': 738}