dry-stack 0.1.17 → 0.1.18
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/dry-stack/stack.rb +6 -3
- data/lib/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 54829c262a7ebcc4f610e60677db92468afdc9ef8d0f96a40b25146586182906
|
4
|
+
data.tar.gz: a9aef297aa9089a01dec3dfba63b06eebd9ea8465f724fab13c2abb3c725f560
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0dc83172b86117389996574cfbd7a351b9dfb195037ee1727ec2510954daddb7970904ea2798d00632844041fecd611f1e1697a0d21b2a147a69300071f90953
|
7
|
+
data.tar.gz: 89e35595ec63f7005ce4427622171d657785c9092001db88d0807214566b3f05a5b9dcb32a04e722fb4cabd81ce5b882eeeca9de141265a65b8d738837bcc819
|
data/lib/dry-stack/stack.rb
CHANGED
@@ -206,23 +206,26 @@ module Dry
|
|
206
206
|
rule << "PathPrefix(`#{nginx_host2regexp ing[:path]}`)" if ing[:path]
|
207
207
|
rule << "#{ing[:rule]}" if ing[:rule]
|
208
208
|
|
209
|
+
middlewares = []
|
210
|
+
|
209
211
|
if ing[:basic_auth]
|
210
212
|
ba_user, ba_password, salt = ing[:basic_auth].split ':'
|
211
213
|
hashed_password = apr1_crypt ba_password, (salt || rand(36**8).to_s(36))
|
212
214
|
service[:deploy][:labels] << "traefik.http.middlewares.#{service_name}-#{index}_auth.basicauth.users=#{ba_user}:#{hashed_password.gsub('$','$$')}"
|
213
|
-
|
215
|
+
middlewares << "#{service_name}-#{index}_auth"
|
214
216
|
end
|
215
217
|
|
216
|
-
|
217
218
|
service[:deploy][:labels] << "traefik.http.routers.#{service_name}-#{index}.rule=#{rule.join ' && '}"
|
218
219
|
|
219
220
|
if ing[:path_sub]
|
221
|
+
middlewares << "#{service_name}-#{index}-path_sub"
|
220
222
|
service[:deploy][:labels] += [
|
221
|
-
"traefik.http.routers.#{service_name}-#{index}.middlewares=#{service_name}-#{index}-path_sub",
|
222
223
|
"traefik.http.middlewares.#{service_name}-#{index}-path_sub.replacepathregex.regex=#{ing[:path_sub][0]}",
|
223
224
|
"traefik.http.middlewares.#{service_name}-#{index}-path_sub.replacepathregex.replacement=#{ing[:path_sub][1].gsub('$','$$')}"
|
224
225
|
]
|
225
226
|
end
|
227
|
+
|
228
|
+
service[:deploy][:labels] << "traefik.http.routers.#{service_name}-#{index}.middlewares=#{middlewares.join ","}" unless middlewares.empty?
|
226
229
|
end
|
227
230
|
end
|
228
231
|
service.delete :ingress
|
data/lib/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dry-stack
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.18
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Artyom B
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-10-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|