-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #134 from snyk/feat/external-secrets
feat: support external secrets [HYB-597]
- Loading branch information
Showing
17 changed files
with
1,090 additions
and
473 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
apiVersion: v2 | ||
name: snyk-broker | ||
version: 2.7.6 | ||
version: 2.8.0 | ||
description: A Helm chart for Kubernetes | ||
type: application |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,15 @@ | ||
Thank you for installing the Snyk Broker | ||
|
||
{{- if eq .Values.brokerServerUrl "https://broker.snyk.io" }} | ||
Login to the Snyk UI to start onboarding projects: https://app.snyk.io | ||
{{ else }} | ||
{{ $tenant := regexFind "[a-z]+.snyk.io" .Values.brokerServerUrl }} | ||
{{ printf "Login to the Snyk UI to start onboarding projects: https://app.%s" $tenant }} | ||
{{ end }} | ||
{{- if not .Values.useExternalSecrets}} | ||
### Secret Creation Disabled ### | ||
|
||
Ensure secrets are present on your cluster in the {{.Release.Namespace}} namespace: | ||
|
||
-> NAME:KEY <VALUE> | ||
{{- include "snyk-broker.requiredSecrets" . }} | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
{{/* | ||
*/}} | ||
{{- define "snyk-broker.requiredSecrets" -}} | ||
{{- $scmTemplates := (list "scmTokenOrPool") }} | ||
{{- $artifactoryTemplates := (list "artifactoryUrl" "brokerClientValidationUrl" ) }} | ||
{{- $nexusTemplates := (list "baseNexusUrl" "nexusUrl" "brokerClientValidationUrl" )}} | ||
{{- $containerRegistryAgentTemplates := (list "scmToken" )}} | ||
{{- $templatesPerType := (dict "github.com" $scmTemplates "github-enterprise" $scmTemplates "gitlab" $scmTemplates "bitbucket-server" $scmTemplates "bitbucket-server-bearer-auth" $scmTemplates "azure-repos" $scmTemplates "artifactory" $artifactoryTemplates "nexus" $nexusTemplates "jira" $scmTemplates "jira-bearer-auth" $scmTemplates "container-registry-agent" $containerRegistryAgentTemplates ) }} | ||
{{- if not .Values.useExternalSecrets -}} | ||
{{- range (get $templatesPerType .Values.scmType ) }} | ||
{{- $secretObject := (first (fromYamlArray (include (printf "snyk-broker.%s" . ) $ ))) }} | ||
{{- $envName := $secretObject.name }} | ||
{{- $name := $secretObject.valueFrom.secretKeyRef.name }} | ||
{{- $key := $secretObject.valueFrom.secretKeyRef.key }} | ||
{{ printf "-> %s:%s <%s>" $name $key $envName }} | ||
{{- end }} | ||
{{- if .Values.httpsSecret.name }} | ||
{{ printf "-> %s:%s <your-certificate>" .Values.httpsSecret.name "tls.crt" }} | ||
{{ printf "-> %s:%s <your-certificate-key>" .Values.httpsSecret.name "tls.key" }} | ||
{{- end }} | ||
{{- if (and .Values.caCertFileSecret.name .Values.caCertFileSecret.key ) }} | ||
{{ printf "-> %s:%s <your-pem-certificate-material>" .Values.caCertFileSecret.name .Values.caCertFileSecret.key }} | ||
{{- end }} | ||
{{- end }} | ||
{{- end }} |
Oops, something went wrong.