diff --git a/NOTICE b/NOTICE index 989516e6fd80dae99f5539c6ee8e4bee64c90ee6..c560b8a4b549d7d67fa7c03fb5aaee1de314a1d4 100644 --- a/NOTICE +++ b/NOTICE @@ -51,6 +51,7 @@ Apache-2.0 ======================================================================== The following software have components provided under the terms of this license: +- AHC/Client (from https://repo1.maven.org/maven2/org/asynchttpclient/async-http-client) - AMQP 1.0 JMS Spring Boot AutoConfiguration (from https://repo1.maven.org/maven2/org/amqphub/spring/amqp-10-jms-spring-boot-autoconfigure) - AMQP 1.0 JMS Spring Boot Starter (from https://repo1.maven.org/maven2/org/amqphub/spring/amqp-10-jms-spring-boot-starter) - ASM Analysis (from http://asm.ow2.io/) @@ -360,7 +361,6 @@ The following software have components provided under the terms of this license: - Apache Maven Wagon :: Providers :: SSH Provider (from https://repo1.maven.org/maven2/org/apache/maven/wagon/wagon-ssh) - Apache Velocity (from http://velocity.apache.org/engine/devel/, http://velocity.apache.org/engine/releases/velocity-1.6.1/, http://velocity.apache.org/engine/releases/velocity-1.6.2/) - AssertJ Core (from ${project.organization.url}#${project.artifactId}) -- Asynchronous Http Client (from https://repo1.maven.org/maven2/org/asynchttpclient/async-http-client) - Asynchronous Http Client Netty Utils (from https://repo1.maven.org/maven2/org/asynchttpclient/async-http-client-netty-utils) - AutoValue Annotations (from https://github.com/google/auto/tree/master/value, https://repo1.maven.org/maven2/com/google/auto/value/auto-value-annotations) - BSON (from http://bsonspec.org, https://bsonspec.org) diff --git a/devops/gc/deploy/README.md b/devops/gc/deploy/README.md index 056b832dfe0e334b72deb8ad16265feccbf0f933..3d49b2f9d9b72cb4bbb27d22c2ee6c321651a3d0 100644 --- a/devops/gc/deploy/README.md +++ b/devops/gc/deploy/README.md @@ -35,12 +35,12 @@ First you need to set variables in **values.yaml** file using any code editor. S **data.indexerQueueHost** | indexer-queue host | string | "http://indexer-queue" | yes **data.logLevel** | logging level | string | INFO | yes **data.partitionHost** | partition host | string | "http://partition" | yes -**data.redisGroupHost** | redis group host | string | redis-group-master | yes -**data.redisSearchHost** | redis search host | string | redis-search-master | yes **data.schemaHost** | schema host | string | "http://schema" | yes **data.securityHttpsCertificateTrust** | whether https is enabled | boolean | true | yes **data.springProfilesActive** | active spring profile | string | gcp | yes **data.storageHost** | storage host | string | "http://storage" | yes +**data.redisIndexerHost** | The host for redis instance. If empty (by default), helm installs an internal redis instance | string | - | yes +**data.redisIndexerPort** | The port for redis instance | digit | 6379 | yes ### Deploy variables @@ -53,6 +53,7 @@ First you need to set variables in **values.yaml** file using any code editor. S **data.image** | service image | string | - | yes **data.imagePullPolicy** | when to pull image | string | IfNotPresent | yes **data.serviceAccountName** | name of your service account | string | indexer | yes +**data.redisImage** | service image | string | `redis:7` | yes ### Config variables @@ -65,6 +66,7 @@ First you need to set variables in **values.yaml** file using any code editor. S **conf.rabbitmqSecretName** | secret for rabbitmq | string | `rabbitmq-secret` | yes **conf.onPremEnabled** | whether on-prem is enabled | boolean | false | yes **conf.domain** | your domain | string | - | yes +**conf.indexerRedisSecretName** | indexer Redis secret that contains redis password with REDIS_PASSWORD key | string | `indexer-redis-secret` | yes ### ISTIO variables @@ -75,7 +77,6 @@ First you need to set variables in **values.yaml** file using any code editor. S **istio.proxyMemory** | memory request for Envoy sidecars | string | 64Mi | yes **istio.proxyMemoryLimit** | memory limit for Envoy sidecars | string | 512Mi | yes - ### Install the helm chart Run this command from within this directory: diff --git a/devops/gc/deploy/templates/variables.yaml b/devops/gc/deploy/templates/configmap.yaml similarity index 60% rename from devops/gc/deploy/templates/variables.yaml rename to devops/gc/deploy/templates/configmap.yaml index 8ed43c4128e8fb300faea9b27c2801576409daaa..3ca6fe5812d03b62c52b480ac8df345f8f57a187 100644 --- a/devops/gc/deploy/templates/variables.yaml +++ b/devops/gc/deploy/templates/configmap.yaml @@ -10,10 +10,16 @@ data: INDEXER_QUEUE_BASE_HOST: {{ .Values.data.indexerQueueHost | quote }} LOG_LEVEL: {{ .Values.data.logLevel | quote }} PARTITION_HOST: {{ .Values.data.partitionHost | quote }} - REDIS_GROUP_HOST: {{ .Values.data.redisGroupHost | quote }} - REDIS_SEARCH_HOST: {{ .Values.data.redisSearchHost | quote }} + {{- if .Values.data.redisIndexerHost }} + REDIS_GROUP_HOST: {{ .Values.data.redisIndexerHost | quote }} + REDIS_SEARCH_HOST: {{ .Values.data.redisIndexerHost | quote }} + {{- else }} + REDIS_GROUP_HOST: {{ printf "redis-%s" .Values.conf.appName | quote }} + REDIS_SEARCH_HOST: {{ printf "redis-%s" .Values.conf.appName | quote }} + {{- end }} + REDIS_SEARCH_PORT: {{ .Values.data.redisIndexerPort | quote }} + REDIS_GROUP_PORT: {{ .Values.data.redisIndexerPort | quote }} SCHEMA_BASE_HOST: {{ .Values.data.schemaHost | quote }} SECURITY_HTTPS_CERTIFICATE_TRUST: {{ .Values.data.securityHttpsCertificateTrust | quote }} SPRING_PROFILES_ACTIVE: {{ .Values.data.springProfilesActive | quote }} STORAGE_HOST: {{ .Values.data.storageHost | quote }} - diff --git a/devops/gc/deploy/templates/deploy-redis.yaml b/devops/gc/deploy/templates/deploy-redis.yaml new file mode 100644 index 0000000000000000000000000000000000000000..0e7dd33349e512ec204668d0d1d452905521cbb6 --- /dev/null +++ b/devops/gc/deploy/templates/deploy-redis.yaml @@ -0,0 +1,35 @@ +{{ if not .Values.data.redisIndexerHost }} +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ printf "redis-%s" .Values.conf.appName | quote }} + namespace: {{ .Release.Namespace | quote }} +spec: + replicas: 1 + selector: + matchLabels: + app: {{ printf "redis-%s" .Values.conf.appName | quote }} + template: + metadata: + labels: + app: {{ printf "redis-%s" .Values.conf.appName | quote }} + annotations: + sidecar.istio.io/proxyCPU: 30m + spec: + containers: + - args: + - --requirepass + - $(REDIS_PASSWORD) + envFrom: + - secretRef: + name: {{ .Values.conf.indexerRedisSecretName | quote }} + image: {{ .Values.data.redisImage | quote }} + imagePullPolicy: {{ .Values.data.imagePullPolicy | quote }} + name: {{ printf "redis-%s" .Values.conf.appName | quote }} + ports: + - containerPort: 6379 + protocol: TCP + resources: + requests: + memory: 100Mi +{{ end }} diff --git a/devops/gc/deploy/templates/deployment.yaml b/devops/gc/deploy/templates/deployment.yaml index adc1bac534505f9633659327919975f81f168901..cfd362ebc14567bc617e7ed710cba93156b1f5a3 100644 --- a/devops/gc/deploy/templates/deployment.yaml +++ b/devops/gc/deploy/templates/deployment.yaml @@ -25,6 +25,17 @@ spec: - name: {{ .Values.conf.appName | quote }} image: {{ .Values.data.image | quote }} imagePullPolicy: {{ .Values.data.imagePullPolicy | quote }} + env: + - name: REDIS_GROUP_PASSWORD + valueFrom: + secretKeyRef: + name: {{ .Values.conf.indexerRedisSecretName | quote }} + key: REDIS_PASSWORD + - name: REDIS_SEARCH_PASSWORD + valueFrom: + secretKeyRef: + name: {{ .Values.conf.indexerRedisSecretName | quote }} + key: REDIS_PASSWORD envFrom: - configMapRef: name: {{ .Values.conf.configmap | quote }} diff --git a/devops/gc/deploy/templates/service-redis.yaml b/devops/gc/deploy/templates/service-redis.yaml new file mode 100644 index 0000000000000000000000000000000000000000..abc86bf979808eec89b273afe2ea711e74995c84 --- /dev/null +++ b/devops/gc/deploy/templates/service-redis.yaml @@ -0,0 +1,14 @@ +{{ if not .Values.data.redisIndexerHost }} +apiVersion: v1 +kind: Service +metadata: + name: {{ printf "redis-%s" .Values.conf.appName | quote }} + namespace: {{ .Release.Namespace | quote }} +spec: + ports: + - port: {{ .Values.data.redisIndexerPort }} + protocol: TCP + targetPort: 6379 + selector: + app: {{ printf "redis-%s" .Values.conf.appName | quote }} +{{ end }} diff --git a/devops/gc/deploy/values.yaml b/devops/gc/deploy/values.yaml index bc4ffb820ba48b3c51498a7862772b396905c147..c6a8de8a2e4470621db58c1614baed51b45d97db 100644 --- a/devops/gc/deploy/values.yaml +++ b/devops/gc/deploy/values.yaml @@ -8,20 +8,22 @@ data: indexerQueueHost: "http://indexer-queue" logLevel: "ERROR" partitionHost: "http://partition" - redisGroupHost: "redis-group-master" - redisSearchHost: "redis-search-master" schemaHost: "http://schema" securityHttpsCertificateTrust: "true" springProfilesActive: "gcp" storageHost: "http://storage" # Deployment - requestsCpu: "0.1" + requestsCpu: "75m" requestsMemory: "640M" limitsCpu: "1" limitsMemory: "1G" image: "" imagePullPolicy: "IfNotPresent" serviceAccountName: "indexer" + # redis connection. Change it if you want to use external redis + redisIndexerHost: "" + redisIndexerPort: 6379 + redisImage: "redis:7" conf: appName: "indexer" @@ -31,9 +33,10 @@ conf: rabbitmqSecretName: "rabbitmq-secret" onPremEnabled: false domain: "" + indexerRedisSecretName: "indexer-redis-secret" istio: - proxyCPU: "50m" - proxyCPULimit: "500m" + proxyCPU: "25m" + proxyCPULimit: "200m" proxyMemory: "64Mi" - proxyMemoryLimit: "512Mi" + proxyMemoryLimit: "256Mi" diff --git a/provider/indexer-gc/pom.xml b/provider/indexer-gc/pom.xml index 4d835b4bd0c71eb516eda175e4794a5c0e547d5c..6e27bb6bcadcb845ddf0009f7ec35d354d94a40d 100644 --- a/provider/indexer-gc/pom.xml +++ b/provider/indexer-gc/pom.xml @@ -15,6 +15,10 @@ <description>Indexer Service Google Cloud</description> <packaging>jar</packaging> + <properties> + <os-core-common.version>0.19.0-rc3</os-core-common.version> + </properties> + <dependencies> <dependency> <groupId>org.opengroup.osdu</groupId>