-
-
Save jrnt30/6e6b94d9caa7af0c663208fabef39344 to your computer and use it in GitHub Desktop.
Revisions
-
jrnt30 revised this gist
May 15, 2018 . 1 changed file with 2 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -3,6 +3,8 @@ set -e set -u set -x # Ensure that a failure to reach the API server short-circuits the reconciliation loop set -o pipefail while true; do curl -H "Accept: application/json" http://localhost:6784/report | jq -r .IPAM.Entries[].Nickname > /tmp/nicknames -
mikebryant revised this gist
Feb 23, 2017 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -17,7 +17,7 @@ spec: spec: containers: - name: rmpeers image: hub.docker.tech.lastmile.com/mikebryant/rmpeers:v6 resources: requests: cpu: "0.01" -
mikebryant revised this gist
Feb 23, 2017 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -5,8 +5,8 @@ set -u set -x while true; do curl -H "Accept: application/json" http://localhost:6784/report | jq -r .IPAM.Entries[].Nickname > /tmp/nicknames kubectl get node -o custom-columns=name:.metadata.name --no-headers > /tmp/node-names grep -v -f /tmp/node-names /tmp/nicknames | xargs -n 1 -I '{}' curl -H "Accept: application/json" -X DELETE 'http://localhost:6784/peer/{}' sleep 60 done -
mikebryant created this gist
Feb 23, 2017 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,9 @@ FROM mirror-hub.docker.tech.lastmile.com/alpine:3.5 RUN apk add --no-cache curl jq RUN curl -o /usr/local/bin/kubectl https://storage.googleapis.com/kubernetes-release/release/v1.5.3/bin/linux/amd64/kubectl && chmod +x /usr/local/bin/kubectl COPY rmpeers / CMD ["/rmpeers"] This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,12 @@ #!/bin/sh set -e set -u set -x while true; do kubectl get node -o custom-columns=name:.metadata.name --no-headers > /tmp/node-names curl -H "Accept: application/json" http://localhost:6784/report | jq -r .IPAM.Entries[].Nickname > /tmp/nicknames grep -v -f /tmp/node-names /tmp/nicknames | xargs -n 1 -I '{}' curl -H "Accept: application/json" -X DELETE 'http://localhost:6784/peer/{}' sleep 60 done This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,47 @@ --- apiVersion: extensions/v1beta1 kind: Deployment metadata: name: weave-net-rmpeers namespace: kube-system spec: replicas: 1 strategy: rollingUpdate: maxSurge: 0 maxUnavailable: 1 template: metadata: labels: app: weave-net-rmpeers spec: containers: - name: rmpeers image: hub.docker.tech.lastmile.com/mikebryant/rmpeers:v5 resources: requests: cpu: "0.01" memory: "20Mi" limits: cpu: "0.1" memory: "20Mi" volumeMounts: - name: fence mountPath: /unused hostNetwork: true volumes: - name: fence persistentVolumeClaim: claimName: weave-net-rmpeers-fence --- kind: PersistentVolumeClaim apiVersion: v1 metadata: name: weave-net-rmpeers-fence namespace: kube-system spec: accessModes: - ReadWriteOnce resources: requests: storage: 10Gi