-
Notifications
You must be signed in to change notification settings - Fork 56
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
feat: add custom ca certificate support for pongo image #632
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -78,6 +78,10 @@ Environment variables: | |
KONG_LICENSE_DATA | ||
set this variable with the Kong Enterprise license data | ||
|
||
PONGO_CUSTOM_CA_CERT | ||
set this to the absolute path of a custom CA to add to the | ||
container's truststore | ||
|
||
POSTGRES the version of the Postgres dependency to use (default 9.5) | ||
CASSANDRA the version of the Cassandra dependency to use (default 3.11) | ||
REDIS the version of the Redis dependency to use (default 6.2.6) | ||
|
@@ -465,6 +469,19 @@ Some helpfull examples: | |
|
||
[Back to ToC](#table-of-contents) | ||
|
||
## Custom CA | ||
|
||
If you are running pongo e.g. behind a corporate traffic-inspector, and that normally requires you to add | ||
a custom CA certificate into the operating system or container truststore, use the following flag: | ||
|
||
`PONGO_CUSTOM_CA_CERT=/path/to/custom/ca.crt` | ||
|
||
For example: | ||
|
||
```sh | ||
$ PONGO_CUSTOM_CA_CERT="$(pwd)/zscaler-root.crt" pongo up | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this is a bad example I think, though it would probably work if the container image still needs to be build.
|
||
``` | ||
|
||
## Debugging | ||
|
||
This section is about debugging plugin code. If you have trouble with the Pongo | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -758,6 +758,14 @@ function build_image { | |
fi | ||
|
||
msg "starting build of image '$KONG_TEST_IMAGE'" | ||
|
||
if [ -n "$PONGO_CUSTOM_CA_CERT" ]; then | ||
msg "custom CA is set: $PONGO_CUSTOM_CA_CERT" | ||
cp "$PONGO_CUSTOM_CA_CERT" "$LOCAL_PATH/custom_ca.crt" | ||
else | ||
echo -n '' > "$LOCAL_PATH/custom_ca.crt" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. can't we add it in some less visisble location? |
||
fi | ||
|
||
$WINPTY_PREFIX docker build \ | ||
-f "$DOCKER_FILE" \ | ||
--build-arg PONGO_VERSION="$PONGO_VERSION" \ | ||
|
@@ -769,7 +777,7 @@ function build_image { | |
--build-arg KONG_BASE="$KONG_IMAGE" \ | ||
--build-arg KONG_DEV_FILES="./kong-versions/$VERSION/kong" \ | ||
--tag "$KONG_TEST_IMAGE" \ | ||
"$LOCAL_PATH" || err "Error: failed to build test environment" | ||
"$LOCAL_PATH" || err "Error: failed to build test environment"; | ||
|
||
msg "image '$KONG_TEST_IMAGE' successfully build" | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since this is added in the container build, I think this should go in the help-docs of the
pongo build
command.