Skip to content
This repository was archived by the owner on Oct 14, 2020. It is now read-only.

Commit 8ac8d4d

Browse files
author
Daniel Patanin
committed
Merge branch 'master' into website-decision-adr
2 parents f73bf64 + 493f77e commit 8ac8d4d

File tree

4 files changed

+20
-3
lines changed

4 files changed

+20
-3
lines changed

.github/workflows/helm-charts.yaml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
- name: "Install yq"
1212
run: |
1313
sudo snap install yq
14-
- name: Parse Tag
14+
- name: Parse Tag
1515
run: echo ::set-env name=RELEASE_VERSION::${GITHUB_REF#refs/*/}
1616
- name: "Publish Helm3 Charts"
1717
env:
@@ -45,8 +45,9 @@ jobs:
4545
cd "${dir}" || exit
4646
mv Chart.yaml helm3.Chart.yaml
4747
mv helm2.Chart.yaml Chart.yaml
48-
if [ ${dir} = "operator" ]
48+
if [ "$(basename "$PWD")" = "operator" ]
4949
then
50+
echo "Copying CRDS to templates folder, as helm2 doesn't have native crds support."
5051
cp -R crds templates/crds
5152
fi
5253
echo "Restoring Helm2 Chart and replace Helm3 Chart temporary"
@@ -57,4 +58,4 @@ jobs:
5758
NAME=$(yq read - name < Chart.yaml)
5859
curl --silent --show-error --user "${USERNAME}:${PASSWORD}" --data-binary "@${NAME}-${RELEASE_VERSION}.tgz" "${HELM_REGISTRY}/api/charts"
5960
)
60-
done
61+
done

operator/controllers/execution/scans/hook_reconciler.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -376,6 +376,9 @@ func (r *ScanReconciler) createJobForHook(hook *executionv1.ScanCompletionHook,
376376
Annotations: map[string]string{
377377
"auto-discovery.experimental.securecodebox.io/ignore": "true",
378378
},
379+
Labels: map[string]string{
380+
"sidecar.istio.io/inject": "false",
381+
},
379382
},
380383
Spec: corev1.PodSpec{
381384
ServiceAccountName: serviceAccountName,

operator/controllers/execution/scans/parse_reconciler.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,9 @@ func (r *ScanReconciler) startParser(scan *executionv1.Scan) error {
9494
Annotations: map[string]string{
9595
"auto-discovery.experimental.securecodebox.io/ignore": "true",
9696
},
97+
Labels: map[string]string{
98+
"sidecar.istio.io/inject": "false",
99+
},
97100
},
98101
Spec: corev1.PodSpec{
99102
RestartPolicy: corev1.RestartPolicyNever,

operator/controllers/execution/scans/scan_reconciler.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,16 @@ func (r *ScanReconciler) constructJobForScan(scan *executionv1.Scan, scanType *e
187187
},
188188
})
189189

190+
// Ensuring that istio doesn't inject a sidecar proxy.
191+
// This currently messes with
192+
if job.Spec.Template.ObjectMeta.Labels != nil {
193+
job.Spec.Template.ObjectMeta.Labels["sidecar.istio.io/inject"] = "true"
194+
} else {
195+
job.Spec.Template.ObjectMeta.Labels = map[string]string{
196+
"sidecar.istio.io/inject": "false",
197+
}
198+
}
199+
190200
// merging volume mounts (for the primary scanner container) from ScanType (if existing) with standard results volume mount
191201
if job.Spec.Template.Spec.Containers[0].VolumeMounts == nil || len(job.Spec.Template.Spec.Containers[0].VolumeMounts) == 0 {
192202
job.Spec.Template.Spec.Containers[0].VolumeMounts = []corev1.VolumeMount{}

0 commit comments

Comments
 (0)