Skip to content

Commit

Permalink
Merge pull request #96 from snyk/fix/cra-charts-requiring-only-adequa…
Browse files Browse the repository at this point in the history
…te-values

fix: require the right input items for the right crType
  • Loading branch information
aarlaud authored Nov 27, 2023
2 parents f21d7f3 + 3089768 commit 126bf14
Show file tree
Hide file tree
Showing 25 changed files with 706 additions and 100 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.3.1
version: 2.4.0
description: A Helm chart for Kubernetes
type: application
8 changes: 8 additions & 0 deletions charts/snyk-broker/templates/broker_deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -292,26 +292,34 @@ spec:
value: http://cra-service{{if not .Values.disableSuffixes }}-{{ .Release.Name }}{{ end }}:{{ .Values.deployment.container.crSnykPort | toString }}
- name: CR_TYPE
value: {{ .Values.crType }}
{{- if not (has .Values.crType (list "ecr")) }}
- name: CR_BASE
value: {{ .Values.crBase }}
{{- end }}
{{- if not (has .Values.crType (list "ecr" "digitalocean-cr")) }}
- name: CR_USERNAME
value: {{ .Values.crUsername }}
- name: CR_PASSWORD
valueFrom:
secretKeyRef:
name: {{ .Values.scmType}}-token{{if not .Values.disableSuffixes }}-{{ .Release.Name }}{{ end }}
key: "{{ .Values.scmType}}-token-key"
{{- end }}
{{- if has .Values.crType (list "digitalocean-cr") }}
- name: CR_TOKEN
valueFrom:
secretKeyRef:
name: {{ .Values.scmType}}-token{{if not .Values.disableSuffixes }}-{{ .Release.Name }}{{ end }}
key: "{{ .Values.scmType}}-token-key"
{{- end }}
{{- if has .Values.crType (list "ecr") }}
- name: CR_ROLE_ARN
value: {{ .Values.crRoleArn }}
- name: CR_REGION
value: {{ .Values.crRegion }}
- name: CR_EXTERNAL_ID
value: {{ .Values.crExternalId }}
{{- end }}
- name: PORT
value: {{ .Values.deployment.container.containerPort | squote }}
- name: BROKER_CLIENT_URL
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.3.1
helm.sh/chart: snyk-broker-2.4.0
name: container-registry-agent-broker-RELEASE-NAME
namespace: NAMESPACE
spec:
Expand Down Expand Up @@ -38,21 +38,7 @@ with CRA:
- name: CR_AGENT_URL
value: http://cra-service-RELEASE-NAME:8081
- name: CR_TYPE
value: null
- name: CR_BASE
value: null
- name: CR_USERNAME
value: null
- name: CR_PASSWORD
valueFrom:
secretKeyRef:
key: container-registry-agent-token-key
name: container-registry-agent-token-RELEASE-NAME
- name: CR_TOKEN
valueFrom:
secretKeyRef:
key: container-registry-agent-token-key
name: container-registry-agent-token-RELEASE-NAME
value: ecr
- name: CR_ROLE_ARN
value: arn:aws-us-gov:iam::123456789012:role
- name: CR_REGION
Expand Down Expand Up @@ -120,7 +106,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.3.1
helm.sh/chart: snyk-broker-2.4.0
name: container-registry-agent-broker-service-RELEASE-NAME
namespace: NAMESPACE
spec:
Expand All @@ -147,6 +133,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.3.1
helm.sh/chart: snyk-broker-2.4.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.3.1
helm.sh/chart: snyk-broker-2.4.0
name: container-registry-agent-broker-RELEASE-NAME
namespace: NAMESPACE
spec:
Expand Down Expand Up @@ -38,21 +38,7 @@ with CRA:
- name: CR_AGENT_URL
value: http://cra-service-RELEASE-NAME:8081
- name: CR_TYPE
value: null
- name: CR_BASE
value: null
- name: CR_USERNAME
value: null
- name: CR_PASSWORD
valueFrom:
secretKeyRef:
key: container-registry-agent-token-key
name: container-registry-agent-token-RELEASE-NAME
- name: CR_TOKEN
valueFrom:
secretKeyRef:
key: container-registry-agent-token-key
name: container-registry-agent-token-RELEASE-NAME
value: ecr
- name: CR_ROLE_ARN
value: arn:aws-us-gov:iam::123456789012:role
- name: CR_REGION
Expand Down Expand Up @@ -120,7 +106,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.3.1
helm.sh/chart: snyk-broker-2.4.0
name: container-registry-agent-broker-service-RELEASE-NAME
namespace: NAMESPACE
spec:
Expand All @@ -147,6 +133,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.3.1
helm.sh/chart: snyk-broker-2.4.0
name: snyk-broker-RELEASE-NAME
namespace: NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ apprisk enabled:
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.3.1
helm.sh/chart: snyk-broker-2.4.0
name: github-com-broker-RELEASE-NAME
namespace: NAMESPACE
spec:
Expand Down Expand Up @@ -105,7 +105,7 @@ apprisk enabled:
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.3.1
helm.sh/chart: snyk-broker-2.4.0
name: github-com-broker-service-RELEASE-NAME
namespace: NAMESPACE
spec:
Expand All @@ -132,6 +132,6 @@ apprisk enabled:
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.3.1
helm.sh/chart: snyk-broker-2.4.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.3.1
helm.sh/chart: snyk-broker-2.4.0
name: github-com-broker
namespace: NAMESPACE
spec:
Expand Down Expand Up @@ -113,7 +113,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.3.1
helm.sh/chart: snyk-broker-2.4.0
name: github-com-broker-service
namespace: NAMESPACE
spec:
Expand Down Expand Up @@ -155,7 +155,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.3.1
helm.sh/chart: snyk-broker-2.4.0
name: RELEASE-NAME-snyk-broker-cacert-configmap
namespace: NAMESPACE
4: |
Expand All @@ -174,7 +174,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.3.1
helm.sh/chart: snyk-broker-2.4.0
name: snyk-broker
namespace: NAMESPACE
cacertfile:
Expand All @@ -186,7 +186,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.3.1
helm.sh/chart: snyk-broker-2.4.0
name: github-com-broker
namespace: NAMESPACE
spec:
Expand Down Expand Up @@ -282,7 +282,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.3.1
helm.sh/chart: snyk-broker-2.4.0
name: github-com-broker-service
namespace: NAMESPACE
spec:
Expand All @@ -303,7 +303,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.3.1
helm.sh/chart: snyk-broker-2.4.0
name: RELEASE-NAME-snyk-broker-cacert-configmap
namespace: NAMESPACE
4: |
Expand All @@ -322,6 +322,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.3.1
helm.sh/chart: snyk-broker-2.4.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.3.1
helm.sh/chart: snyk-broker-2.4.0
name: github-com-broker-RELEASE-NAME
namespace: NAMESPACE
spec:
Expand Down Expand Up @@ -113,7 +113,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.3.1
helm.sh/chart: snyk-broker-2.4.0
name: github-com-broker-service-RELEASE-NAME
namespace: NAMESPACE
spec:
Expand Down Expand Up @@ -155,7 +155,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.3.1
helm.sh/chart: snyk-broker-2.4.0
name: RELEASE-NAME-snyk-broker-cacert-configmap-RELEASE-NAME
namespace: NAMESPACE
4: |
Expand All @@ -174,7 +174,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.3.1
helm.sh/chart: snyk-broker-2.4.0
name: snyk-broker-RELEASE-NAME
namespace: NAMESPACE
cacertfile:
Expand All @@ -186,7 +186,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.3.1
helm.sh/chart: snyk-broker-2.4.0
name: github-com-broker-RELEASE-NAME
namespace: NAMESPACE
spec:
Expand Down Expand Up @@ -282,7 +282,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.3.1
helm.sh/chart: snyk-broker-2.4.0
name: github-com-broker-service-RELEASE-NAME
namespace: NAMESPACE
spec:
Expand All @@ -303,7 +303,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.3.1
helm.sh/chart: snyk-broker-2.4.0
name: RELEASE-NAME-snyk-broker-cacert-configmap-RELEASE-NAME
namespace: NAMESPACE
4: |
Expand All @@ -322,6 +322,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.3.1
helm.sh/chart: snyk-broker-2.4.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.3.1
helm.sh/chart: snyk-broker-2.4.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.3.1
helm.sh/chart: snyk-broker-2.4.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.3.1
helm.sh/chart: snyk-broker-2.4.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.3.1
helm.sh/chart: snyk-broker-2.4.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.3.1
helm.sh/chart: snyk-broker-2.4.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.3.1
helm.sh/chart: snyk-broker-2.4.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.3.1
helm.sh/chart: snyk-broker-2.4.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.3.1
helm.sh/chart: snyk-broker-2.4.0
name: snyk-broker-RELEASE-NAME
namespace: NAMESPACE
Loading

0 comments on commit 126bf14

Please sign in to comment.