Skip to content

Commit b4db839

Browse files
committed
pre-commit
1 parent c3940a9 commit b4db839

5 files changed

Lines changed: 13 additions & 12 deletions

File tree

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77
branches: ['main']
88
jobs:
99
tls:
10-
runs-on: ubuntu-latest
10+
runs-on: ubuntu-latest
1111
steps:
1212
- uses: actions/checkout@v2
1313
- name: install dependencies

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,8 +110,8 @@ Optionally you may configure your `user`/`password` via environment variables. T
110110

111111
### TLS
112112

113-
Transport Layer Security (TLS) can be enabled in Redis and within the Triton Redis Cache, to do so you will need a TLS
114-
enabled version of Redis, e.g. [OSS Redis](https://redis.io/docs/management/security/encryption/) or
113+
Transport Layer Security (TLS) can be enabled in Redis and within the Triton Redis Cache, to do so you will need a TLS
114+
enabled version of Redis, e.g. [OSS Redis](https://redis.io/docs/management/security/encryption/) or
115115
[Redis Enterprise](https://docs.redis.com/latest/rs/security/tls/enable-tls/). You will also need to configure Triton Server to use TLS with Redis
116116
through the following `--cache-config` TLS options.
117117

examples/tls/Dockerfile

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
FROM nvcr.io/nvidia/tritonserver:23.03-py3-sdk
1+
FROM nvcr.io/nvidia/tritonserver:23.06-py3-sdk
22

3-
RUN apt install -y lsb-release curl gpg
4-
RUN curl -fsSL https://packages.redis.io/gpg | gpg --dearmor -o /usr/share/keyrings/redis-archive-keyring.gpg
5-
RUN echo "deb [signed-by=/usr/share/keyrings/redis-archive-keyring.gpg] https://packages.redis.io/deb $(lsb_release -cs) main" | tee /etc/apt/sources.list.d/redis.list
6-
RUN apt-get update
3+
RUN apt install -y lsb-release curl gpg
4+
RUN curl -fsSL https://packages.redis.io/gpg | gpg --dearmor -o /usr/share/keyrings/redis-archive-keyring.gpg
5+
RUN echo "deb [signed-by=/usr/share/keyrings/redis-archive-keyring.gpg] https://packages.redis.io/deb $(lsb_release -cs) main" | tee /etc/apt/sources.list.d/redis.list
6+
RUN apt-get update
77
RUN apt-get install -y redis
88

99
CMD "/app/test.sh"

examples/tls/test.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ fi
99

1010
numKeys=$(redis-cli -h triton-redis --tls --cert /certs/redis.crt --key /certs/redis.key --cacert /certs/ca.crt DBSIZE) # check that there's only one key
1111

12-
if [[ $numKeys -eq 1 ]]; then
12+
if [[ $numKeys -eq 1 ]]; then
1313
exit 0
1414
else
1515
echo "Redis did not have the expected number of keys."

src/redis_cache.cc

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -146,9 +146,10 @@ RedisCache::Create(
146146
poolOptions.wait_timeout = std::chrono::milliseconds(1000);
147147
}
148148

149-
//tls options
150-
if(document.HasMember("tls_enabled")){
151-
options.tls.enabled = strcmp(document["tls_enabled"].GetString(), "true") == 0;
149+
// tls options
150+
if (document.HasMember("tls_enabled")) {
151+
options.tls.enabled =
152+
strcmp(document["tls_enabled"].GetString(), "true") == 0;
152153
setOption("cert", options.tls.cert, document);
153154
setOption("key", options.tls.key, document);
154155
setOption("cacert", options.tls.cacert, document);

0 commit comments

Comments
 (0)