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

Allow to set user defined environment variables. #38

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
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
4 changes: 4 additions & 0 deletions charts/snyk-broker/templates/broker_deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,10 @@ spec:
- name: ACCEPT
value: /home/node/accept.json
{{- end }}
# Additional Environment Variables
{{- if .Values.brokerAdditionalEnvironmentVariables }}
{{- toYaml .Values.brokerAdditionalEnvironmentVariables | nindent 12 }}
{{- end }}

# Mount Accept.json and Certs
volumes:
Expand Down
11 changes: 9 additions & 2 deletions charts/snyk-broker/templates/cra_deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,19 @@ spec:
containerPort: {{ .Values.deployment.container.crSnykPort }}
env:
- name: SNYK_PORT
value: {{ .Values.deployment.container.crSnykPort | squote }}
{{- if .Values.tlsRejectUnauthorized }}
value: {{ .Values.deployment.container.crSnykPort | squote }}
{{- if .Values.crSnykMaxImageSizeBytes }}
- name: SNYK_MAX_IMAGE_SIZE_IN_BYTES
value: {{ .Values.crSnykMaxImageSizeBytes | squote }}
{{- end }}
{{- if .Values.tlsRejectUnauthorized }}
# Troubleshooting - Set to 0 for SSL inspection testing
- name: NODE_TLS_REJECT_UNAUTHORIZED
value: "0"
{{- end }}
{{- if .Values.crAdditionalEnvironmentVariables }}
{{- toYaml .Values.crAdditionalEnvironmentVariables | nindent 12 }}
{{- end }}


---
Expand Down
10 changes: 10 additions & 0 deletions charts/snyk-broker/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,11 @@ crToken: ""
# CRA Image tag. Do not adjust unless instructed by Snyk Representative
crImage: "latest"

##### Container Registry Additional Environment Variables #####
# crAdditionalEnvironmentVariables:
# - name: foo
# value: bar


##### Code Agent #####

Expand Down Expand Up @@ -244,6 +249,11 @@ brokerResources:
cpu: 1
memory: "256Mi"

##### Broker Additional Environment Variables #####
# brokerAdditionalEnvironmentVariables:
# - name: foo
# value: bar


##### Container Registry Agent Resource Values #####

Expand Down