Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Customize environment #13

Merged
merged 7 commits into from
Feb 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ jobs:
with:
name: vaas
repository: gdatasoftwareag/charts
tag: 1.0.3
tag: 1.0.4
path: charts/vaas
registry: ghcr.io
registry_username: ${{ secrets.REGISTRY_USERNAME }}
Expand Down
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,7 @@
*.log
*-locale.yaml
*.tgz
.fleet/
.fleet/
values-local.yaml
.output/
Chart.lock
4 changes: 2 additions & 2 deletions charts/vaas/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
apiVersion: v2
name: vaas
version: 1.0.3
version: 1.0.4
description: Deployment of a Verdict-as-a-Service on-premise instance
maintainers:
- name: G DATA CyberDefense AG
email: [email protected]
type: application
dependencies:
- name: redis
version: 18.13.0
version: 18.14.0
condition: redis.enabled
repository: https://charts.bitnami.com/bitnami
- name: gdscan
Expand Down
30 changes: 0 additions & 30 deletions charts/vaas/templates/gateway/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -59,33 +59,3 @@ Selector labels
app.kubernetes.io/name: {{ include "gateway.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}

{{/*
Create environment variables to configure gateway container.
*/}}
{{- define "gateway.env" }}
- name: Authentication__Schemes__Bearer__Authority
value: {{.Values.gateway.authentication.authority}}
- name: Authentication__Schemes__Bearer__RequireHttpsMetadata
value: "false"
- name: Upload__Endpoint
value: {{.Values.gateway.uploadUrl}}
- name: JwtSettings__Secret
value: {{ randAlphaNum 64 }}
- name: GDScanConfiguration__Url
value: "http://gdscan:8080/scan/body"
- name: RedisConfiguration__Configuration
value: "redis-master"
{{- if .Values.gateway.cloudhashlookup.enabled }}
- name: VerdictAsAService__Url
value: {{ .Values.gateway.options.url | quote }}
- name: VerdictAsAService__TokenUrl
value: {{ .Values.gateway.options.tokenurl | quote }}
- name: VerdictAsAService__Credentials__GrantType
value: {{ .Values.gateway.options.credentials.granttype | quote }}
- name: VerdictAsAService__Credentials__ClientId
value: {{ .Values.gateway.options.credentials.clientid | quote }}
- name: VerdictAsAService__Credentials__ClientSecret
{{ toYaml .Values.gateway.options.credentials.clientsecret }}
{{- end }}
{{- end }}
30 changes: 28 additions & 2 deletions charts/vaas/templates/gateway/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,34 @@ spec:
volumeMounts:
- mountPath: /tmp
name: gateway-tmp
env:
{{- include "gateway.env" . | nindent 12 }}
env:
{{- if .Values.gateway.extraEnvVars }}
{{- toYaml .Values.gateway.extraEnvVars | nindent 12 }}
{{- end }}
- name: Authentication__Schemes__Bearer__Authority
value: {{.Values.gateway.authentication.authority}}
- name: Authentication__Schemes__Bearer__RequireHttpsMetadata
value: "false"
- name: Upload__Endpoint
value: {{.Values.gateway.uploadUrl}}
- name: JwtSettings__Secret
value: {{ randAlphaNum 64 }}
- name: GDScanConfiguration__Url
value: "http://gdscan:8080/scan/body"
- name: RedisConfiguration__Configuration
value: "redis-master"
{{- if .Values.gateway.cloudhashlookup.enabled }}
- name: VerdictAsAService__Url
value: {{ .Values.gateway.options.url | quote }}
- name: VerdictAsAService__TokenUrl
value: {{ .Values.gateway.options.tokenurl | quote }}
- name: VerdictAsAService__Credentials__GrantType
value: {{ .Values.gateway.options.credentials.granttype | quote }}
- name: VerdictAsAService__Credentials__ClientId
value: {{ .Values.gateway.options.credentials.clientid | quote }}
- name: VerdictAsAService__Credentials__ClientSecret
{{ toYaml .Values.gateway.options.credentials.clientsecret }}
{{- end }}
ports:
- name: http
containerPort: {{ .Values.gateway.service.http.port }}
Expand Down
2 changes: 2 additions & 0 deletions charts/vaas/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,8 @@ gateway:
tolerations: []
affinity: {}

extraEnvVars: []

# This block is only for G DATA's internal usage.
hashlookup:
enabled: false
Expand Down
Loading