-
Notifications
You must be signed in to change notification settings - Fork 18
/
gatewayd_plugins.yaml
88 lines (75 loc) · 4.37 KB
/
gatewayd_plugins.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
# GatewayD Plugin Configuration
# The compatibility policy controls how GatewayD treats plugins' requirements. If a plugin
# requires a specific version of another plugin, the compatibility policy controls whether to
# allow or reject the plugin.
# - "strict" (default): the plugin is rejected if it requires a specific version of another
# plugin and that version is not the one currently loaded.
# - "loose": the plugin is allowed to run even if it requires a specific version of another
# plugin and that version is not the one currently loaded.
compatibilityPolicy: "strict"
# The metrics policy controls whether to collect and merge metrics from plugins or not.
# The Prometheus metrics are collected from the plugins via a Unix domain socket. The metrics
# are merged and exposed via the GatewayD metrics endpoint via HTTP.
enableMetricsMerger: True
# The metrics merger period controls how often the metrics merger should collect and merge
# metrics from plugins.
metricsMergerPeriod: 5s
# The health check period controls how often the health check should be performed. The health
# check is performed by pinging each plugin. Unhealthy plugins are removed.
healthCheckPeriod: 5s
# If the plugin crashes, should GatewayD restart it? The crash is detected by the health check.
reloadOnCrash: True
# The timeout controls how long to wait for a plugin to respond to a request before timing out.
timeout: 30s
# The start timeout controls how long to wait for a plugin to start before timing out.
startTimeout: 1m
# The policy timeout controls how long to wait for the evluation of the policy before timing out.
policyTimeout: 30s
# The action timeout is the default timeout for actions that do not specify a timeout themselves.
actionTimeout: 30s
# action redis configures a Redis connection for the async actions to be published to.
actionRedis:
# enabled controls whether to enable redis as async action queue
enabled: false
# if enabled, the url and channel are used to connect to the Redis server.
address: localhost:6379
channel: gatewayd-actions
# The policy is a list of policies to apply to the signals received from the plugins.
policies: []
# The plugin configuration is a list of plugins to load. Each plugin is defined by a name,
# a path to the plugin's executable, and a list of arguments to pass to the plugin. The
# plugin's executable is expected to be a Go plugin that implements the GatewayD plugin
# interface via the GatewayD plugin SDK using gRPC. The args field is optional and is passed
# as command line arguments to the plugin's executable. The env field is used to pass extra
# environment variables to the running instance of the plugin. The MAGIC_COOKIE_KEY and
# MAGIC_COOKIE_VALUE environment variables are used to verify the identity of the plugin and
# are required. The env field is optional if the MAGIC_COOKIE_KEY and MAGIC_COOKIE_VALUE are
# hardcoded in the plugin's executable. The checksum field is mandatoryy and is used to verify
# the integrity of the plugin's executable. The checksum is a SHA256 hash of the plugin's
# executable. Checksum verification will change in the future for better security and automation.
# The DEFAULT_DB_NAME environment variable is used to specify the default database name to
# use when connecting to the database. The DEFAULT_DB_NAME environment variable is optional
# and should only be used if one only has a single database in their PostgreSQL instance.
plugins:
- name: gatewayd-plugin-cache
enabled: True
url: github.com/gatewayd-io/gatewayd-plugin-cache@latest
localPath: ../gatewayd-plugin-cache/gatewayd-plugin-cache
args: ["--log-level", "info"]
env:
- MAGIC_COOKIE_KEY=GATEWAYD_PLUGIN
- MAGIC_COOKIE_VALUE=5712b87aa5d7e9f9e9ab643e6603181c5b796015cb1c09d6f5ada882bf2a1872
- REDIS_URL=redis://localhost:6379/0
- EXPIRY=1h
# - DEFAULT_DB_NAME=postgres
- METRICS_ENABLED=True
- METRICS_UNIX_DOMAIN_SOCKET=/tmp/gatewayd-plugin-cache.sock
- METRICS_PATH=/metrics
- API_GRPC_ADDRESS=localhost:19090
- PERIODIC_INVALIDATOR_ENABLED=True
- PERIODIC_INVALIDATOR_INTERVAL=1m
- PERIODIC_INVALIDATOR_START_DELAY=1m
- EXIT_ON_STARTUP_ERROR=False
- SENTRY_DSN=https://70eb1abcd32e41acbdfc17bc3407a543@o4504550475038720.ingest.sentry.io/4505342961123328
- CACHE_CHANNEL_BUFFER_SIZE=100
checksum: 054e7dba9c1e3e3910f4928a000d35c8a6199719fad505c66527f3e9b1993833