Skip to content

Commit cce65ff

Browse files
committed
cni
Signed-off-by: Prabhjot <psb@tetrate.io>
1 parent 7178af8 commit cce65ff

2 files changed

Lines changed: 31 additions & 0 deletions

File tree

manifests/charts/istio-cni/templates/daemonset.yaml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,33 @@ spec:
142142
seccompProfile:
143143
{{ toYaml .Values.seccompProfile | trim | indent 14 }}
144144
{{- end }}
145+
{{- if .Values.bottlerocketFips }}
146+
command: ["/bin/sh", "-c"]
147+
args:
148+
- |
149+
set -e
150+
# Bottlerocket FIPS AMI sets GODEBUG=fips140=on in containerd's
151+
# systemd env. CNI plugins inherit this, which conflicts with
152+
# GOEXPERIMENT=boringcrypto. This shim strips GODEBUG before exec.
153+
SRC="/opt/cni/bin/istio-cni"
154+
HOST_RAW="/host/opt/cni/bin/istio-cni-raw"
155+
HOST_SHIM="/host/opt/cni/bin/istio-cni"
156+
cp "$SRC" "$HOST_RAW"
157+
cat <<'EOF' > "$HOST_SHIM"
158+
#!/usr/bin/env -S -u GODEBUG /opt/cni/bin/istio-cni-raw
159+
EOF
160+
chmod +x "$HOST_RAW" "$HOST_SHIM"
161+
cp "$HOST_SHIM" "$SRC"
162+
echo "[fips-shim] Deployed"
163+
exec install-cni \
164+
{{- if or .Values.logging.level .Values.global.logging.level }}
165+
--log_output_level={{ coalesce .Values.logging.level .Values.global.logging.level }} \
166+
{{- end }}
167+
{{- if .Values.global.logAsJson }}
168+
--log_as_json \
169+
{{- end }}
170+
171+
{{- else }}
145172
command: ["install-cni"]
146173
args:
147174
{{- if or .Values.logging.level .Values.global.logging.level }}
@@ -150,6 +177,7 @@ spec:
150177
{{- if .Values.global.logAsJson }}
151178
- --log_as_json
152179
{{- end}}
180+
{{- end }}
153181
envFrom:
154182
- configMapRef:
155183
name: {{ template "name" . }}-config

manifests/charts/istio-cni/values.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,9 @@ _internal_defaults_do_not_set:
142142
# For Helm compatibility.
143143
ownerName: ""
144144

145+
# Set to true for EKS with Bottlerocket FIPS AMI
146+
bottlerocketFips: false
147+
145148
global:
146149
# Default hub for Istio images.
147150
# Releases are published to docker hub under 'istio' project.

0 commit comments

Comments
 (0)