File tree Expand file tree Collapse file tree 1 file changed +15
-2
lines changed Expand file tree Collapse file tree 1 file changed +15
-2
lines changed Original file line number Diff line number Diff line change 67
67
kubectl annotate ingressclass nginx "ingressclass.kubernetes.io/is-default-class=true"
68
68
kubectl -n ingress-nginx wait --timeout=300s --for=condition=Available deployments --all
69
69
70
- - name : Add ${{ inputs.node-hostname }} host to machine hosts
70
+ - name : Setup Dnsmasq to resolve hostnames with domain name ${{ inputs.node-hostname }}
71
71
shell : bash
72
- run : echo "127.0.0.1 ${{ inputs.node-hostname }}" | sudo tee -a /etc/hosts
72
+ run : |
73
+ # Based on https://sixfeetup.com/blog/local-development-with-wildcard-dns-on-linux
74
+ sudo apt-get install dnsmasq
75
+
76
+ sudo sed -i -E "s/#DNS=/DNS=127.0.0.2/" /etc/systemd/resolved.conf
77
+ sudo sed -i -E "s/#Domains=/Domains=~${{ inputs.node-hostname }}/" /etc/systemd/resolved.conf
78
+ sudo systemctl restart systemd-resolved
79
+
80
+ sudo sed -i -E "s/#IGNORE_RESOLVCONF=yes/IGNORE_RESOLVCONF=yes/" /etc/default/dnsmasq
81
+ sudo sed -i -E "s/#listen-address=/listen-address=127.0.0.2/" /etc/dnsmasq.conf
82
+ sudo sed -i -E "s/#bind-interfaces/bind-interfaces/" /etc/dnsmasq.conf
83
+ sudo sed -i -E "s|#(address=).*|\1/${{ inputs.node-hostname }}/127.0.0.1|" /etc/dnsmasq.conf
84
+ sudo systemctl restart dnsmasq
85
+ systemctl status dnsmasq
73
86
74
87
- name : Set env variables for tests to properly leverage KinD cluster
75
88
shell : bash
You can’t perform that action at this time.
0 commit comments