Fix yaml bug

This commit is contained in:
Adrien Reslinger 2020-05-11 00:47:15 +02:00
parent 61afaf43e3
commit 7414baf2f5
2 changed files with 13 additions and 2 deletions

View file

@ -29,6 +29,17 @@ spec:
command: command:
- /home/weave/launch.sh - /home/weave/launch.sh
env: env:
- name: WEAVE_PASSWORD
valueFrom:
secretKeyRef:
name: weave-passwd
key: weave-passwd
- name: IPTABLES_BACKEND
value: nft
- name: WEAVE_MTU
value: "1376"
- name: IPALLOC_RANGE
value: 10.32.0.0/12
- name: HOSTNAME - name: HOSTNAME
valueFrom: valueFrom:
fieldRef: fieldRef:

View file

@ -21,7 +21,7 @@ rm -fr generated{,.log} net.yaml
# Configuration https://www.weave.works/docs/net/latest/kubernetes/kube-addon/ # Configuration https://www.weave.works/docs/net/latest/kubernetes/kube-addon/
line_nb=$(cat -n net/weave-net-DaemonSet.yaml | sed -n '/ - name: weave/,/ - name: weave-npc/p' | grep env: | cut -f1) line_nb=$(cat -n net/weave-net-DaemonSet.yaml | sed -n '/ - name: weave/,/ - name: weave-npc/p' | grep env: | cut -f1)
sed -e ${line_nb}' a\ - name: IPALLOC_RANGE\n value: 10.32.0.0/12' -i net/weave-net-DaemonSet.yaml sed -e ${line_nb}' a\ - name: IPALLOC_RANGE\n value: 10.32.0.0/12' -i net/weave-net-DaemonSet.yaml
sed -e ${line_nb}' a\ - name: WEAVE_MTU\n value: 1376' -i net/weave-net-DaemonSet.yaml sed -e ${line_nb}' a\ - name: WEAVE_MTU\n value: "1376"' -i net/weave-net-DaemonSet.yaml
sed -e ${line_nb}' a\ - name: IPTABLES_BACKEND\n value: nft' -i net/weave-net-DaemonSet.yaml sed -e ${line_nb}' a\ - name: IPTABLES_BACKEND\n value: nft' -i net/weave-net-DaemonSet.yaml
sed -e ${line_nb}' a\ - name: WEAVE_PASSWORD\n valueFrom:\n secretKeyRef:\n name: weave-passwd\n key: weave-passwd' -i net/weave-net-DaemonSet.yaml sed -e ${line_nb}' a\ - name: WEAVE_PASSWORD\n valueFrom:\n secretKeyRef:\n name: weave-passwd\n key: weave-passwd' -i net/weave-net-DaemonSet.yaml