Skip to content
This repository has been archived by the owner on Aug 19, 2020. It is now read-only.

Commit

Permalink
Revert docker base image and fix dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
Steven Sheehy committed Nov 28, 2018
1 parent e37095b commit cad9b14
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion build/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

FROM gcr.io/google-containers/debian-base-amd64:0.4.0
FROM quay.io/kubernetes-ingress-controller/debian-base-amd64:0.1

COPY build.sh /build.sh

Expand Down
20 changes: 10 additions & 10 deletions pkg/controller/keepalived.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,15 +69,14 @@ func (k *keepalived) WriteCfg(svcs []vip) error {
defer w.Close()

k.vips = getVIPs(svcs)
k.Cleanup()

conf := make(map[string]interface{})
conf["iptablesChain"] = iptablesChain
conf["iface"] = k.iface
conf["myIP"] = k.ip
conf["netmask"] = k.netmask
conf["svcs"] = svcs
conf["vips"] = getVIPs(svcs)
conf["vips"] = k.vips
conf["nodes"] = k.neighbors
conf["priority"] = k.priority
conf["useUnicast"] = k.useUnicast
Expand Down Expand Up @@ -166,6 +165,7 @@ func (k *keepalived) Reload() error {
return nil
}

k.Cleanup()
glog.Info("reloading keepalived")
err := syscall.Kill(k.cmd.Process.Pid, syscall.SIGHUP)
if err != nil {
Expand All @@ -177,14 +177,14 @@ func (k *keepalived) Reload() error {

func (k *keepalived) Cleanup() {
glog.Infof("Cleanup: %s", k.vips)
for _, vip := range k.vips {
k.removeVIP(vip)
}

err := k.ipt.FlushChain(iptables.TableFilter, iptables.Chain(iptablesChain))
if err != nil {
glog.V(2).Infof("unexpected error flushing iptables chain %v: %v", err, iptablesChain)
}
for _, vip := range k.vips {
k.removeVIP(vip)
}

err := k.ipt.FlushChain(iptables.TableFilter, iptables.Chain(iptablesChain))
if err != nil {
glog.V(2).Infof("unexpected error flushing iptables chain %v: %v", err, iptablesChain)
}
}

// Stop stop keepalived process
Expand Down
4 changes: 2 additions & 2 deletions rootfs/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

FROM gcr.io/google-containers/debian-base-amd64:0.4.0
FROM quay.io/kubernetes-ingress-controller/debian-base-amd64:0.1

RUN clean-install \
libssl1.1 \
Expand All @@ -23,7 +23,7 @@ RUN clean-install \
libxtables12 \
libnfnetlink0 \
libiptcdata0 \
libipset3 \
libipset11 \
libipset-dev \
libsnmp30 \
kmod \
Expand Down

0 comments on commit cad9b14

Please sign in to comment.