Skip to content

Commit

Permalink
Adding quotes in macvtap.yaml.in, namespace.yaml.in,scc.yaml.in (#24)
Browse files Browse the repository at this point in the history
Missing quotation marks aroung {{ }} cause issues when the yaml is being processed with yq.
Adding single quotes to templates/* and updating hack/generate-manifests.sh
accordingly to not propagat the single quotes to manifests/*

Signed-off-by: Radim Hrazdil <[email protected]>
  • Loading branch information
rhrazdil authored Sep 10, 2020
1 parent 295ff33 commit 4dcfd03
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
2 changes: 2 additions & 0 deletions hack/generate-manifests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ DESTINATION=${DESTINATION:-manifests}
for template in templates/*.in; do
name=$(basename ${template%.in})
sed \
-e "s#'{{#{{#g" \
-e "s#}}'#}}#g" \
-e "s#{{ .MacvtapImage }}#${MACVTAP_IMG}#g" \
-e "s#{{ .CniMountPath }}#${CNI_MOUNT_PATH}#g" \
-e "s#{{ .Namespace }}#${NAMESPACE}#g" \
Expand Down
12 changes: 6 additions & 6 deletions templates/macvtap.yaml.in
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: apps/v1
kind: DaemonSet
metadata:
name: macvtap-cni
namespace: {{ .Namespace }}
namespace: '{{ .Namespace }}'
spec:
selector:
matchLabels:
Expand All @@ -20,8 +20,8 @@ spec:
envFrom:
- configMapRef:
name: macvtap-deviceplugin-config
image: {{ .MacvtapImage }}
imagePullPolicy: {{ .ImagePullPolicy }}
image: '{{ .MacvtapImage }}'
imagePullPolicy: '{{ .ImagePullPolicy }}'
resources:
requests:
cpu: "60m"
Expand All @@ -34,8 +34,8 @@ spec:
initContainers:
- name: install-cni
command: ['cp', '/macvtap-cni', '/host/opt/cni/bin/macvtap']
image: {{ .MacvtapImage }}
imagePullPolicy: {{ .ImagePullPolicy }}
image: '{{ .MacvtapImage }}'
imagePullPolicy: '{{ .ImagePullPolicy }}'
securityContext:
privileged: true
volumeMounts:
Expand All @@ -48,4 +48,4 @@ spec:
path: /var/lib/kubelet/device-plugins
- name: cni
hostPath:
path: {{ .CniMountPath }}
path: '{{ .CniMountPath }}'

0 comments on commit 4dcfd03

Please sign in to comment.