Skip to content

Commit

Permalink
feat(opencti): change /health path
Browse files Browse the repository at this point in the history
  • Loading branch information
ialejandro committed Mar 9, 2024
1 parent 1e4901c commit 40b2d1c
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 5 deletions.
2 changes: 1 addition & 1 deletion charts/opencti/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ helm show values devops-ia/opencti
| elasticsearch.master.persistence | object | `{"enabled":false}` | Enable persistence using Persistent Volume Claims ref: https://kubernetes.io/docs/user-guide/persistent-volumes/ |
| elasticsearch.master.persistence.enabled | bool | `false` | Enable persistence using a `PersistentVolumeClaim` |
| elasticsearch.master.replicaCount | int | `1` | Number of master-elegible replicas to deploy |
| env | object | `{"APP__ADMIN__EMAIL":"[email protected]","APP__ADMIN__PASSWORD":"ChangeMe","APP__ADMIN__TOKEN":"ChangeMe","APP__BASE_PATH":"/","APP__TELEMETRY__METRICS__ENABLED":true,"ELASTICSEARCH__URL":"http://release-name-elasticsearch:9200","MINIO__ENDPOINT":"release-name-minio:9000","RABBITMQ__HOSTNAME":"release-name-rabbitmq","RABBITMQ__PASSWORD":"ChangeMe","RABBITMQ__PORT":5672,"RABBITMQ__PORT_MANAGEMENT":15672,"RABBITMQ__USERNAME":"user","REDIS__HOSTNAME":"release-name-redis-master","REDIS__MODE":"single","REDIS__PORT":6379}` | Environment variables to configure application ref: https://docs.opencti.io/5.12.X/deployment/configuration/#platform |
| env | object | `{"APP__ADMIN__EMAIL":"[email protected]","APP__ADMIN__PASSWORD":"ChangeMe","APP__ADMIN__TOKEN":"ChangeMe","APP__BASE_PATH":"/","APP__HEALTH_ACCESS_KEY":"ChangeMe","APP__TELEMETRY__METRICS__ENABLED":true,"ELASTICSEARCH__URL":"http://release-name-elasticsearch:9200","MINIO__ENDPOINT":"release-name-minio:9000","RABBITMQ__HOSTNAME":"release-name-rabbitmq","RABBITMQ__PASSWORD":"ChangeMe","RABBITMQ__PORT":5672,"RABBITMQ__PORT_MANAGEMENT":15672,"RABBITMQ__USERNAME":"user","REDIS__HOSTNAME":"release-name-redis-master","REDIS__MODE":"single","REDIS__PORT":6379}` | Environment variables to configure application ref: https://docs.opencti.io/5.12.X/deployment/configuration/#platform |
| envFromSecrets | object | `{}` | Secrets from variables |
| fullnameOverride | string | `""` | String to fully override opencti.fullname template |
| global | object | `{"imagePullSecrets":[],"imageRegistry":""}` | Global configuration |
Expand Down
6 changes: 6 additions & 0 deletions charts/opencti/ci/ci-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,20 @@ replicaCount: 1
fullnameOverride: opencti-ci

env:
APP__ADMIN__EMAIL: [email protected]
APP__ADMIN__PASSWORD: test
APP__ADMIN__TOKEN: b1976749-8a53-4f49-bf04-cafa2a3458c1
APP__BASE_PATH: "/"
APP__HEALTH_ACCESS_KEY: f93747ff-2ea1-4717-900c-9df20b8e4429
APP__TELEMETRY__METRICS__ENABLED: true
ELASTICSEARCH__ENGINE_SELECTOR: elk
ELASTICSEARCH__URL: http://opencti-ci-elasticsearch:9200
MINIO__ENDPOINT: opencti-ci-minio
RABBITMQ__HOSTNAME: opencti-ci-rabbitmq
RABBITMQ__PASSWORD: ChangeMe
RABBITMQ__PORT_MANAGEMENT: 15672
RABBITMQ__PORT: 5672
RABBITMQ__USERNAME: user
REDIS__HOSTNAME: opencti-ci-redis-master
REDIS__MODE: single
REDIS__PORT: 6379
Expand Down
6 changes: 3 additions & 3 deletions charts/opencti/templates/server/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ spec:
{{- toYaml .Values.livenessProbeCustom | nindent 12 }}
{{- else }}
httpGet:
path: {{ .Values.service.healthPath | default "/health" }}
path: {{ .Values.service.healthPath | default (printf "/health?health_access_key=%s" .Values.env.APP__HEALTH_ACCESS_KEY) }}
port: {{ .Values.service.targetPort | default .Values.service.port }}
failureThreshold: {{ .Values.livenessProbe.failureThreshold }}
initialDelaySeconds: {{ .Values.livenessProbe.initialDelaySeconds }}
Expand All @@ -93,7 +93,7 @@ spec:
{{- toYaml .Values.readinessProbeCustom | nindent 12 }}
{{- else }}
httpGet:
path: {{ .Values.service.healthPath | default "/health" }}
path: {{ .Values.service.healthPath | default (printf "/health?health_access_key=%s" .Values.env.APP__HEALTH_ACCESS_KEY) }}
port: {{ .Values.service.targetPort | default .Values.service.port }}
failureThreshold: {{ .Values.readinessProbe.failureThreshold }}
initialDelaySeconds: {{ .Values.readinessProbe.initialDelaySeconds }}
Expand All @@ -108,7 +108,7 @@ spec:
{{- toYaml .Values.startupProbeCustom | nindent 12 }}
{{- else }}
httpGet:
path: {{ .Values.service.healthPath | default "/health" }}
path: {{ .Values.service.healthPath | default (printf "/health?health_access_key=%s" .Values.env.APP__HEALTH_ACCESS_KEY) }}
port: {{ .Values.service.targetPort | default .Values.service.port }}
failureThreshold: {{ .Values.startupProbe.failureThreshold }}
initialDelaySeconds: {{ .Values.startupProbe.initialDelaySeconds }}
Expand Down
3 changes: 2 additions & 1 deletion charts/opencti/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,9 @@ env:
REDIS__HOSTNAME: release-name-redis-master
REDIS__PORT: 6379
REDIS__MODE: single
# METRICS
# METRICS AND HEALTHCHECK
APP__TELEMETRY__METRICS__ENABLED: true
APP__HEALTH_ACCESS_KEY: ChangeMe

# -- Secrets from variables
envFromSecrets: {}
Expand Down

0 comments on commit 40b2d1c

Please sign in to comment.