Skip to content

Commit

Permalink
update docs and example
Browse files Browse the repository at this point in the history
  • Loading branch information
warroyo committed Oct 15, 2020
1 parent ec5fe96 commit d81b677
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 2 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# TKGs Proxy Injector

This can be used to add a proxy to guest clusters automatically. This will run as a native pod in the supervsior cluster and continously ssh out to the guest cluster nodes and make sure they have a proxy configured. This will run on a per namespace basis due to some limitiations with the default firewall rules applied between namespaces with NSX-T. This also leverages the `docker-registry` running in the supervisor cluster to store the `proxy-inject` docker image to reduce external dependencies on internal regsitries existing.
This can be used to add a proxy and/or a ca cert to guest clusters automatically. This will run as a native pod in the supervsior cluster and continously ssh out to the guest cluster nodes and make sure they have a proxy configured. This will run on a per namespace basis due to some limitiations with the default firewall rules applied between namespaces with NSX-T. This also leverages the `docker-registry` running in the supervisor cluster to store the `proxy-inject` docker image to reduce external dependencies on internal regsitries existing.


## Usage
Expand All @@ -21,6 +21,7 @@ all vars are set in `env.sh`
* `TKC_HTTPS_PROXY` - valid http proxy that you want to use
* `TKC_HTTP_PROXY` - valid https proxy that you want to use
* `TKC_NO_PROXY` - no proxy list
* `REG_CERT` - the registry ca cert to trust an untrusted registry
* `INTERVAL` - interval to run the script


Expand Down
25 changes: 24 additions & 1 deletion env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,29 @@ export DEPLOY_NS="test-ns2"
export TKC_HTTPS_PROXY="http://someproxy:8080"
export TKC_HTTP_PROXY="http://someproxy:8080"
export TKC_NO_PROXY="localhost"
export REG_CERT="" #the registry ca cert
export REG_CERT="-----BEGIN CERTIFICATE-----
MIIEFzCCAv+gAwIBAgIJAPGReZlu7FEvMA0GCSqGSIb3DQEBCwUAMIGWMQswCQYD
VQQDDAJDQTEXMBUGCgmSJomT8ixkARkWB3ZzcGhlcmUxFTATBgoJkiaJk/IsZAEZ
FgVsb2NhbDELMAkGA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pB2fZAM7nq27WblroOodKI8y43+gKX7huX
+TZ7azgxLrPVXQkjC6Pr5byxAFlke7FSjINZnq7DXY48UsOwvkCeXFTMVWqLCNEL
KFXW5I1HLVT62aMv72+0m5lfKRL+Y0FZSIs7g9SYhHvBxyUCABJictGDkxMxcAwG
4shrtA8wP+zx/UvtVYPR+egaZeD/5SYsrgLRvsxYXOvGJV+9+PdLMoSnaA==
-----END CERTIFICATE-----" #the registry ca cert
#Optional
#export INTERVAL="30"

0 comments on commit d81b677

Please sign in to comment.