aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--dhall/server/service/plugin/Config.dhall10
-rw-r--r--dhall/server/service/plugin/mkRequestTransformer.dhall16
-rw-r--r--meta/main.yml8
-rw-r--r--tasks/plugins.yml4
4 files changed, 22 insertions, 16 deletions
diff --git a/dhall/server/service/plugin/Config.dhall b/dhall/server/service/plugin/Config.dhall
index 73a333f..d54436b 100644
--- a/dhall/server/service/plugin/Config.dhall
+++ b/dhall/server/service/plugin/Config.dhall
@@ -1,9 +1,9 @@
1< CorrelationId : 1< CorrelationId :
2 { header_name : Text, echo_downstream : Bool } 2 { header_name : Text, echo_downstream : Bool }
3| RequestTransformer : 3| RequestTransformer :
4 { `add.headers` : Text } 4 { add : { headers : List Text } }
5| RequestTermination : 5| RequestTermination :
6 { status_code : Natural, content_type : Text, body : Text } 6 { status_code : Natural, content_type : Text, body : Text }
7| IPRestriction : 7| IPRestriction :
8 { whitelist : Text } 8 { whitelist : Text }
9> 9> \ No newline at end of file
diff --git a/dhall/server/service/plugin/mkRequestTransformer.dhall b/dhall/server/service/plugin/mkRequestTransformer.dhall
index 90789c8..1d8d608 100644
--- a/dhall/server/service/plugin/mkRequestTransformer.dhall
+++ b/dhall/server/service/plugin/mkRequestTransformer.dhall
@@ -1,11 +1,11 @@
1 let Plugin = ./Plugin.dhall 1let Plugin = ./Plugin.dhall
2 2
3in let config = constructors ./Config.dhall 3in let config = constructors ./Config.dhall
4 4
5in λ(header : Text) 5 in λ(header : Text)
6 → { name = 6 → { name =
7 "request-transformer" 7 "request-transformer"
8 , config = 8 , config =
9 config.RequestTransformer { `add.headers` = header } 9 config.RequestTransformer { add = { headers = [ header ] } }
10 } 10 }
11 : Plugin 11 : Plugin \ No newline at end of file
diff --git a/meta/main.yml b/meta/main.yml
index a2ae975..af8b3f0 100644
--- a/meta/main.yml
+++ b/meta/main.yml
@@ -32,7 +32,13 @@ galaxy_info:
32 # 32 #
33 # platforms is a list of platforms, and each platform has a name and a list of versions. 33 # platforms is a list of platforms, and each platform has a name and a list of versions.
34 # 34 #
35 # platforms: 35 platforms:
36 - name: Debian
37 versions:
38 - all
39 - name: Ubuntu
40 version:
41 - all
36 # - name: Fedora 42 # - name: Fedora
37 # versions: 43 # versions:
38 # - all 44 # - all
diff --git a/tasks/plugins.yml b/tasks/plugins.yml
index cedbbd2..c64e5c9 100644
--- a/tasks/plugins.yml
+++ b/tasks/plugins.yml
@@ -23,7 +23,7 @@
23 current_config: "{{ kong_app_service_plugins_check.json.data | selectattr('name', 'equalto', plugin.name) | first |default({\"id\": ''}) }}" 23 current_config: "{{ kong_app_service_plugins_check.json.data | selectattr('name', 'equalto', plugin.name) | first |default({\"id\": ''}) }}"
24 current_id_hash: 24 current_id_hash:
25 id: "{{ current_config.id }}" 25 id: "{{ current_config.id }}"
26 current_body: "{{ (current_id_hash.id == '') | ternary({}, current_id_hash) }}" 26 current_body: "{{ not current_id_hash.id | ternary({}, current_id_hash) }}"
27 exists_plugin: "{{ current_id_hash.id == '' }}" 27 exists_plugin: "{{ not current_id_hash.id }}"
28 when: not kong_app_service_plugins_check is skipped 28 when: not kong_app_service_plugins_check is skipped
29 no_log: true 29 no_log: true