Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Alpine image to fix security vulnerability and minor indentation fixes #154

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ RUN apt-get update && apt-get install -y \

RUN /tmp/fetch_binaries.sh

FROM alpine:3.18.0
FROM alpine:3.18.5

RUN set -ex \
&& echo "http://dl-cdn.alpinelinux.org/alpine/edge/main" >> /etc/apk/repositories \
&& echo "http://dl-cdn.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories \
&& echo "http://dl-cdn.alpinelinux.org/alpine/edge/community" >> /etc/apk/repositories \
&& echo "https://dl-cdn.alpinelinux.org/alpine/edge/main" >> /etc/apk/repositories \
&& echo "https://dl-cdn.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories \
&& echo "https://dl-cdn.alpinelinux.org/alpine/edge/community" >> /etc/apk/repositories \
&& apk update \
&& apk upgrade \
&& apk add --no-cache \
Expand Down
5 changes: 1 addition & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,5 @@ build-arm64:
build-all:
@docker buildx build --platform linux/amd64,linux/arm64 --output "type=image,push=false" --file ./Dockerfile .
push:
@docker push ${IMAGENAME}:${VERSION}
@docker push ${IMAGENAME}:${VERSION}
all: build-all push



4 changes: 2 additions & 2 deletions build/fetch_binaries.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ get_ctop() {
}

get_calicoctl() {
VERSION=$(get_latest_release projectcalico/calicoctl)
LINK="https://github.com/projectcalico/calicoctl/releases/download/${VERSION}/calicoctl-linux-${ARCH}"
VERSION=$(get_latest_release projectcalico/calico)
LINK="https://github.com/projectcalico/calico/releases/download/${VERSION}/calicoctl-linux-${ARCH}"
wget "$LINK" -O /tmp/calicoctl && chmod +x /tmp/calicoctl
}

Expand Down
17 changes: 8 additions & 9 deletions configs/netshoot-calico.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ spec:
containers:
- image: nicolaka/netshoot
name: netshoot
command: ["ping","localhost"]
command: ["ping", "localhost"]
volumeMounts:
- mountPath: /calico-secrets
name: etcd-certs
Expand All @@ -49,13 +49,12 @@ spec:
key: etcd_cert
name: calico-config
volumes:
- name: etcd-certs
secret:
defaultMode: 420
secretName: calico-etcd-secrets
- name: bird-ctl
hostPath:
path: /var/run/calico/bird.ctl
- name: etcd-certs
secret:
defaultMode: 420
secretName: calico-etcd-secrets
- name: bird-ctl
hostPath:
path: /var/run/calico/bird.ctl
nodeSelector:
node-role.kubernetes.io/master: ""

34 changes: 17 additions & 17 deletions configs/netshoot-sidecar.yaml
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: nginx-netshoot
labels:
app: nginx-netshoot
name: nginx-netshoot
labels:
app: nginx-netshoot
spec:
replicas: 1
selector:
replicas: 1
selector:
matchLabels:
app: nginx-netshoot
template:
app: nginx-netshoot
template:
metadata:
labels:
labels:
app: nginx-netshoot
spec:
containers:
- name: nginx
image: nginx:1.14.2
ports:
- containerPort: 80
- name: netshoot
image: nicolaka/netshoot
command: ["/bin/bash"]
args: ["-c", "while true; do ping localhost; sleep 60;done"]
containers:
- name: nginx
image: nginx:1.14.2
ports:
- containerPort: 80
- name: netshoot
image: nicolaka/netshoot
command: ["/bin/bash"]
args: ["-c", "while true; do ping localhost; sleep 60;done"]
2 changes: 1 addition & 1 deletion motd
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@
dP dP `88888P' dP `88888P' dP dP `88888P' `88888P' dP

Welcome to Netshoot! (github.com/nicolaka/netshoot)
Version: 0.11
Version: 0.12