Skip to content

Commit

Permalink
Merge pull request #4 from devops-ia/fix/default-env-opencti-connector
Browse files Browse the repository at this point in the history
Fix environment reference OPENCTI_TOKEN #3
Bump chart version 1.2.6
  • Loading branch information
ialejandro authored Jul 21, 2024
2 parents 0223023 + 98a4476 commit d64c8a3
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions opencti/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ maintainers:
url: https://ialejandro.rocks
sources:
- https://github.com/OpenCTI-Platform/opencti
version: 1.2.5
appVersion: "6.2.3"
version: 1.2.6
appVersion: "6.2.6"
home: https://www.filigran.io/en/solutions/products/opencti/
keywords:
- opencti
Expand Down
14 changes: 7 additions & 7 deletions opencti/templates/connector/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -68,13 +68,8 @@ spec:
{{- end }}
{{- end }}

{{- if and (not (hasKey $envList "OPENCTI_TOKEN")) (.env.APP__ADMIN__TOKEN) }}
- name: OPENCTI_TOKEN
value: "{{ .env.APP__ADMIN__TOKEN }}"
{{- end }}

# Special handling for OPENCTI_URL which is constructed from other values
{{- if not (hasKey $.Values.env "OPENCTI_URL") }}
{{- if not (hasKey $envList "OPENCTI_URL") }}
{{- if eq $.Values.env.APP__BASE_PATH "/" }}
- name: OPENCTI_URL
value: "http://{{ include "opencti.fullname" $ }}-server:{{ $.Values.service.port }}"
Expand All @@ -84,6 +79,11 @@ spec:
{{- end }}
{{- end }}

{{- if and (not (hasKey $envList "OPENCTI_TOKEN")) ($.Values.env.APP__ADMIN__TOKEN) }}
- name: OPENCTI_TOKEN
value: "{{ $.Values.env.APP__ADMIN__TOKEN }}"
{{- end }}

# Add Variables in plain text if they were not already added from secrets
{{- if .env }}
{{- range $key, $value := .env }}
Expand All @@ -94,7 +94,7 @@ spec:
{{- end }}
{{- end }}
{{- end }}

resources:
{{- toYaml .resources | nindent 12 }}
{{- with .nodeSelector }}
Expand Down

0 comments on commit d64c8a3

Please sign in to comment.