Skip to content

Commit

Permalink
Merge pull request #85 from snyk/feat/add-bearer-scheme-option-for-jira
Browse files Browse the repository at this point in the history
feat: add jira bearer auth flavor
  • Loading branch information
aarlaud authored Oct 18, 2023
2 parents bb3550f + 797a0e8 commit e461cca
Show file tree
Hide file tree
Showing 16 changed files with 98 additions and 65 deletions.
2 changes: 1 addition & 1 deletion charts/snyk-broker/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
apiVersion: v2
name: snyk-broker
version: 2.1.0
version: 2.2.0
description: A Helm chart for Kubernetes
type: application
19 changes: 19 additions & 0 deletions charts/snyk-broker/templates/broker_deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,25 @@ spec:
- name: BROKER_CLIENT_URL
value: {{ .Values.brokerClientUrl }}
{{- end }}
{{- if eq .Values.scmType "jira-bearer-auth" }}
# Jira
- name: BROKER_TOKEN
valueFrom:
secretKeyRef:
name: {{ .Values.scmType}}-broker-token{{if not .Values.disableSuffixes }}-{{ .Release.Name }}{{ end }}
key: "{{ .Values.scmType}}-broker-token-key"
- name: JIRA_PAT
valueFrom:
secretKeyRef:
name: {{ .Values.scmType}}-token{{if not .Values.disableSuffixes }}-{{ .Release.Name }}{{ end }}
key: "{{ .Values.scmType}}-token-key"
- name: JIRA_HOSTNAME
value: {{ .Values.jiraHostname }}
- name: PORT
value: {{ .Values.deployment.container.containerPort | squote }}
- name: BROKER_CLIENT_URL
value: {{ .Values.brokerClientUrl }}
{{- end }}
{{- if eq .Values.scmType "container-registry-agent" }}
# Container Registry Agent
- name: BROKER_TOKEN
Expand Down
10 changes: 10 additions & 0 deletions charts/snyk-broker/templates/secrets.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,16 @@ data:
"{{ .Values.scmType}}-token-key": {{ .Values.jiraPassword | b64enc | quote }}
---
{{- end }}
{{- if .Values.jiraPat }}
apiVersion: v1
kind: Secret
metadata:
name: {{ .Values.scmType}}-token{{if not .Values.disableSuffixes }}-{{ .Release.Name }}{{ end }}
type: Opaque
data:
"{{ .Values.scmType}}-token-key": {{ .Values.jiraPat | b64enc | quote }}
---
{{- end }}
{{- if .Values.crPassword }}
apiVersion: v1
kind: Secret
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ with CRA:
app.kubernetes.io/instance: RELEASE-NAME
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/name: snyk-broker-RELEASE-NAME
helm.sh/chart: snyk-broker-2.1.0
helm.sh/chart: snyk-broker-2.2.0
name: container-registry-agent-broker-RELEASE-NAME
namespace: NAMESPACE
spec:
Expand Down Expand Up @@ -120,7 +120,7 @@ with CRA:
app.kubernetes.io/instance: RELEASE-NAME
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/name: snyk-broker-RELEASE-NAME
helm.sh/chart: snyk-broker-2.1.0
helm.sh/chart: snyk-broker-2.2.0
name: container-registry-agent-broker-service-RELEASE-NAME
namespace: NAMESPACE
spec:
Expand All @@ -147,6 +147,6 @@ with CRA:
app.kubernetes.io/instance: RELEASE-NAME
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/name: snyk-broker-RELEASE-NAME
helm.sh/chart: snyk-broker-2.1.0
helm.sh/chart: snyk-broker-2.2.0
name: snyk-broker-RELEASE-NAME
namespace: NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ with CRA:
app.kubernetes.io/instance: RELEASE-NAME
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/name: snyk-broker-RELEASE-NAME
helm.sh/chart: snyk-broker-2.1.0
helm.sh/chart: snyk-broker-2.2.0
name: container-registry-agent-broker-RELEASE-NAME
namespace: NAMESPACE
spec:
Expand Down Expand Up @@ -120,7 +120,7 @@ with CRA:
app.kubernetes.io/instance: RELEASE-NAME
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/name: snyk-broker-RELEASE-NAME
helm.sh/chart: snyk-broker-2.1.0
helm.sh/chart: snyk-broker-2.2.0
name: container-registry-agent-broker-service-RELEASE-NAME
namespace: NAMESPACE
spec:
Expand All @@ -147,6 +147,6 @@ with CRA:
app.kubernetes.io/instance: RELEASE-NAME
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/name: snyk-broker-RELEASE-NAME
helm.sh/chart: snyk-broker-2.1.0
helm.sh/chart: snyk-broker-2.2.0
name: snyk-broker-RELEASE-NAME
namespace: NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ cacert:
app.kubernetes.io/instance: RELEASE-NAME
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/name: snyk-broker
helm.sh/chart: snyk-broker-2.1.0
helm.sh/chart: snyk-broker-2.2.0
name: github-com-broker
namespace: NAMESPACE
spec:
Expand Down Expand Up @@ -111,7 +111,7 @@ cacert:
app.kubernetes.io/instance: RELEASE-NAME
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/name: snyk-broker
helm.sh/chart: snyk-broker-2.1.0
helm.sh/chart: snyk-broker-2.2.0
name: github-com-broker-service
namespace: NAMESPACE
spec:
Expand Down Expand Up @@ -153,7 +153,7 @@ cacert:
app.kubernetes.io/instance: RELEASE-NAME
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/name: snyk-broker
helm.sh/chart: snyk-broker-2.1.0
helm.sh/chart: snyk-broker-2.2.0
name: RELEASE-NAME-snyk-broker-cacert-configmap
namespace: NAMESPACE
4: |
Expand All @@ -172,7 +172,7 @@ cacert:
app.kubernetes.io/instance: RELEASE-NAME
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/name: snyk-broker
helm.sh/chart: snyk-broker-2.1.0
helm.sh/chart: snyk-broker-2.2.0
name: snyk-broker
namespace: NAMESPACE
cacertfile:
Expand All @@ -184,7 +184,7 @@ cacertfile:
app.kubernetes.io/instance: RELEASE-NAME
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/name: snyk-broker
helm.sh/chart: snyk-broker-2.1.0
helm.sh/chart: snyk-broker-2.2.0
name: github-com-broker
namespace: NAMESPACE
spec:
Expand Down Expand Up @@ -280,7 +280,7 @@ cacertfile:
app.kubernetes.io/instance: RELEASE-NAME
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/name: snyk-broker
helm.sh/chart: snyk-broker-2.1.0
helm.sh/chart: snyk-broker-2.2.0
name: github-com-broker-service
namespace: NAMESPACE
spec:
Expand All @@ -301,7 +301,7 @@ cacertfile:
app.kubernetes.io/instance: RELEASE-NAME
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/name: snyk-broker
helm.sh/chart: snyk-broker-2.1.0
helm.sh/chart: snyk-broker-2.2.0
name: RELEASE-NAME-snyk-broker-cacert-configmap
namespace: NAMESPACE
4: |
Expand All @@ -320,6 +320,6 @@ cacertfile:
app.kubernetes.io/instance: RELEASE-NAME
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/name: snyk-broker
helm.sh/chart: snyk-broker-2.1.0
helm.sh/chart: snyk-broker-2.2.0
name: snyk-broker
namespace: NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ cacert:
app.kubernetes.io/instance: RELEASE-NAME
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/name: snyk-broker-RELEASE-NAME
helm.sh/chart: snyk-broker-2.1.0
helm.sh/chart: snyk-broker-2.2.0
name: github-com-broker-RELEASE-NAME
namespace: NAMESPACE
spec:
Expand Down Expand Up @@ -111,7 +111,7 @@ cacert:
app.kubernetes.io/instance: RELEASE-NAME
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/name: snyk-broker-RELEASE-NAME
helm.sh/chart: snyk-broker-2.1.0
helm.sh/chart: snyk-broker-2.2.0
name: github-com-broker-service-RELEASE-NAME
namespace: NAMESPACE
spec:
Expand Down Expand Up @@ -153,7 +153,7 @@ cacert:
app.kubernetes.io/instance: RELEASE-NAME
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/name: snyk-broker-RELEASE-NAME
helm.sh/chart: snyk-broker-2.1.0
helm.sh/chart: snyk-broker-2.2.0
name: RELEASE-NAME-snyk-broker-cacert-configmap-RELEASE-NAME
namespace: NAMESPACE
4: |
Expand All @@ -172,7 +172,7 @@ cacert:
app.kubernetes.io/instance: RELEASE-NAME
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/name: snyk-broker-RELEASE-NAME
helm.sh/chart: snyk-broker-2.1.0
helm.sh/chart: snyk-broker-2.2.0
name: snyk-broker-RELEASE-NAME
namespace: NAMESPACE
cacertfile:
Expand All @@ -184,7 +184,7 @@ cacertfile:
app.kubernetes.io/instance: RELEASE-NAME
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/name: snyk-broker-RELEASE-NAME
helm.sh/chart: snyk-broker-2.1.0
helm.sh/chart: snyk-broker-2.2.0
name: github-com-broker-RELEASE-NAME
namespace: NAMESPACE
spec:
Expand Down Expand Up @@ -280,7 +280,7 @@ cacertfile:
app.kubernetes.io/instance: RELEASE-NAME
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/name: snyk-broker-RELEASE-NAME
helm.sh/chart: snyk-broker-2.1.0
helm.sh/chart: snyk-broker-2.2.0
name: github-com-broker-service-RELEASE-NAME
namespace: NAMESPACE
spec:
Expand All @@ -301,7 +301,7 @@ cacertfile:
app.kubernetes.io/instance: RELEASE-NAME
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/name: snyk-broker-RELEASE-NAME
helm.sh/chart: snyk-broker-2.1.0
helm.sh/chart: snyk-broker-2.2.0
name: RELEASE-NAME-snyk-broker-cacert-configmap-RELEASE-NAME
namespace: NAMESPACE
4: |
Expand All @@ -320,6 +320,6 @@ cacertfile:
app.kubernetes.io/instance: RELEASE-NAME
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/name: snyk-broker-RELEASE-NAME
helm.sh/chart: snyk-broker-2.1.0
helm.sh/chart: snyk-broker-2.2.0
name: snyk-broker-RELEASE-NAME
namespace: NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ customaccept values:
app.kubernetes.io/instance: RELEASE-NAME
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/name: snyk-broker
helm.sh/chart: snyk-broker-2.1.0
helm.sh/chart: snyk-broker-2.2.0
name: RELEASE-NAME-snyk-broker-accept-configmap
namespace: NAMESPACE
2: |
Expand All @@ -20,7 +20,7 @@ customaccept values:
app.kubernetes.io/instance: RELEASE-NAME
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/name: snyk-broker
helm.sh/chart: snyk-broker-2.1.0
helm.sh/chart: snyk-broker-2.2.0
name: github-com-broker
namespace: NAMESPACE
spec:
Expand Down Expand Up @@ -120,7 +120,7 @@ customaccept values:
app.kubernetes.io/instance: RELEASE-NAME
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/name: snyk-broker
helm.sh/chart: snyk-broker-2.1.0
helm.sh/chart: snyk-broker-2.2.0
name: github-com-broker-service
namespace: NAMESPACE
spec:
Expand All @@ -147,6 +147,6 @@ customaccept values:
app.kubernetes.io/instance: RELEASE-NAME
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/name: snyk-broker
helm.sh/chart: snyk-broker-2.1.0
helm.sh/chart: snyk-broker-2.2.0
name: snyk-broker
namespace: NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ customaccept values:
app.kubernetes.io/instance: RELEASE-NAME
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/name: snyk-broker-RELEASE-NAME
helm.sh/chart: snyk-broker-2.1.0
helm.sh/chart: snyk-broker-2.2.0
name: RELEASE-NAME-snyk-broker-accept-configmap-RELEASE-NAME
namespace: NAMESPACE
2: |
Expand All @@ -20,7 +20,7 @@ customaccept values:
app.kubernetes.io/instance: RELEASE-NAME
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/name: snyk-broker-RELEASE-NAME
helm.sh/chart: snyk-broker-2.1.0
helm.sh/chart: snyk-broker-2.2.0
name: github-com-broker-RELEASE-NAME
namespace: NAMESPACE
spec:
Expand Down Expand Up @@ -120,7 +120,7 @@ customaccept values:
app.kubernetes.io/instance: RELEASE-NAME
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/name: snyk-broker-RELEASE-NAME
helm.sh/chart: snyk-broker-2.1.0
helm.sh/chart: snyk-broker-2.2.0
name: github-com-broker-service-RELEASE-NAME
namespace: NAMESPACE
spec:
Expand All @@ -147,6 +147,6 @@ customaccept values:
app.kubernetes.io/instance: RELEASE-NAME
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/name: snyk-broker-RELEASE-NAME
helm.sh/chart: snyk-broker-2.1.0
helm.sh/chart: snyk-broker-2.2.0
name: snyk-broker-RELEASE-NAME
namespace: NAMESPACE
Loading

0 comments on commit e461cca

Please sign in to comment.