Skip to content

Commit

Permalink
updating for new sv version that removes docker
Browse files Browse the repository at this point in the history
  • Loading branch information
warroyo committed Jan 8, 2021
1 parent 63f44c0 commit 2ca9259
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 8 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
*.tar.gz
*.tar.gz
*.tar
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ This can be used to add a proxy and/or a CA cert to guest clusters automatically
**NOTE: when upgrading the Supervisor Cluster it will role the nodes so the image for proxy-inject that is stored on the local registry will be removed. you will need to re-run the install script to re-upload the image otherwise you will get image pull errors**


## Compatibility

if you are running a supervisor cluster that is `v1.18.2-vsc0.0.6-17224208` or higher please use `1.3.0` and up. if you are only an older version use `1.2.0`


## Usage

1. ssh to vcenter and hop into shell
Expand Down
4 changes: 2 additions & 2 deletions build.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash

docker build -t proxy-inject:1.2.0 .
docker save proxy-inject:1.2.0 | gzip > proxy-inject.tar.gz
docker build -t proxy-inject:1.3.0 .
# docker save proxy-inject:1.3.0 | gzip > proxy-inject.tar.gz
9 changes: 6 additions & 3 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,11 @@ else
fi
echo "importing image into local registry"
sshpass -p "${sv_pass}" ssh -t -q -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null root@"${ip}" << EOF
docker load -i proxy-inject.tar.gz
docker tag proxy-inject:1.2.0 localhost:5002/vmware/proxy-inject:1.2.0
docker push localhost:5002/vmware/proxy-inject:1.2.0
source /etc/profile
gunzip -f proxy-inject.tar.gz
ctr image import proxy-inject.tar
ctr image tag proxy-inject:1.3.0 localhost:5002/vmware/proxy-inject:1.3.0
ctr image push localhost:5002/vmware/proxy-inject:1.3.0
EOF
if [ $? -eq 0 ] ;
then
Expand All @@ -67,6 +69,7 @@ fi
echo "cleanup image tar"
sshpass -p "${sv_pass}" ssh -t -q -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null root@"${ip}" << EOF
rm ./proxy-inject.tar.gz
rm ./proxy-inject.tar
EOF
ip=$(nextip $ip)
success=$((success+1))
Expand Down
2 changes: 1 addition & 1 deletion manifest-nsxt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ spec:
spec:
serviceAccountName: internal-kubectl
containers:
- image: docker-registry.kube-system.svc:5000/vmware/proxy-inject:1.2.0
- image: docker-registry.kube-system.svc:5000/vmware/proxy-inject:1.3.0
imagePullPolicy: Always
name: proxy-inject
env:
Expand Down
2 changes: 1 addition & 1 deletion manifest-vds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ spec:
runAsGroup: 1000
fsGroup: 1000
containers:
- image: localhost:5000/vmware/proxy-inject:1.2.0
- image: localhost:5000/vmware/proxy-inject:1.3.0
imagePullPolicy: Always
name: proxy-inject
env:
Expand Down

0 comments on commit 2ca9259

Please sign in to comment.