diff --git a/devops/azure/chart/templates/deployment.yaml b/devops/azure/chart/templates/deployment.yaml index f625bb35fa08968199f48c6f4e0488a0fec45450..788491ed0c315deef32d9d4faa6b860567e155ba 100644 --- a/devops/azure/chart/templates/deployment.yaml +++ b/devops/azure/chart/templates/deployment.yaml @@ -41,6 +41,11 @@ spec: imagePullPolicy: Always ports: - containerPort: 80 + resources: + requests: + cpu: "100m" + limits: + cpu: "500m" readinessProbe: httpGet: path: /api/indexer/v2/swagger-ui.html @@ -88,6 +93,11 @@ spec: secretKeyRef: name: central-logging key: appinsights + - name: REDIS_DATABASE + valueFrom: + configMapKeyRef: + name: redis-configmap + key: indexer-service - name: cosmosdb_database value: osdu-db - name: servicebus_topic_name diff --git a/devops/azure/chart/templates/hpa.yaml b/devops/azure/chart/templates/hpa.yaml new file mode 100644 index 0000000000000000000000000000000000000000..d9d00bfc65e3df192ca241337772c937dbc1ff9e --- /dev/null +++ b/devops/azure/chart/templates/hpa.yaml @@ -0,0 +1,34 @@ +# Source: indexer-service/templates/hpa.yaml +# Copyright © Microsoft Corporation +# +# Licensed 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: autoscaling/v2beta2 +kind: HorizontalPodAutoscaler +metadata: + name: {{ .Chart.Name }} + namespace: osdu +spec: + scaleTargetRef: + apiVersion: apps/v1 + kind: Deployment + name: {{ .Chart.Name }} + minReplicas: {{ .Values.global.replicaCount }} + maxReplicas: 5 + metrics: + - type: Resource + resource: + name: cpu + target: + type: Utilization + averageUtilization: 75 diff --git a/provider/indexer-azure/src/main/resources/application.properties b/provider/indexer-azure/src/main/resources/application.properties index f6cb597dbcc58293ffd9897faadace106a77c4f1..ad3d128f3d44475fa041143acb1b5df1f2860af8 100644 --- a/provider/indexer-azure/src/main/resources/application.properties +++ b/provider/indexer-azure/src/main/resources/application.properties @@ -13,9 +13,11 @@ # limitations under the License. LOG_PREFIX=indexer +LOG_LEVEL=DEBUG + server.servlet.contextPath=/api/indexer/v2/ REGION=centralus -logging.level.org.opendes.osdu=DEBUG +logging.level.org.opendes.osdu=${LOG_LEVEL} JAVA_OPTS=-Dserver.port=80 DEFAULT_DATA_COUNTRY=US