This repository has been archived by the owner on Jul 1, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 16
/
.env-template
257 lines (182 loc) · 7.3 KB
/
.env-template
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
#----------------------------------------------------------
# Base Config
#---------------------------------------------------------
# Optional
# namespaces to scan,leave empty for all namespaces.
K8GUARD_NAMESPACE=
# Required
# unique name for the kubernetes cluster which k8guard is deployed on.
K8GUARD_CLUSTER_NAME=minikube
# Optional
# Safe mode only notifies the violations and won't take any actions.
# Default False
K8GUARD_ACTION_SAFE_MODE=TRUE
# Required
# Number of warnings (notifications) before taking hard actions.
K8GUARD_ACTION_WARNING_COUNT_BEFORE_ACTION=2
# Required
# Wait before notifying the violator again.
# Example 30s for notify violator every 30 seconds, 30m for every 30m, 24h for every day.
K8GUARD_ACTION_DURATION_BETWEEN_NOTIFYING_AGAIN=24h
# Required
# Violation Expiration Duration.
# From first time violation is discovered till end of this duration, no new violation will be registered for same source.
# Hint 120h is for 5 days. that means if violation not resolved by 5 days, it will create a new violation for the owner.
K8GUARD_ACTION_DURATION_VIOLATION_EXPIRES=120h
# Required
# Use of alpha functionality may not be included in some distributions such as Tectonic, or enabled by default
K8GUARD_INCLUDE_ALPHA=TRUE
#----------------------------------------------------------
# Whitelist/blacklist
#---------------------------------------------------------
# Required
# Allowed container registeries
# Example gcr.io/my-project,docker.mydomain.com
K8GUARD_APPROVED_IMAGE_REPOS=
# Required
# Max Image size in MB.
K8GUARD_APPROVED_IMAGE_SIZE=800
# Optional
# The ingress must have a suffix
# Example something.something.com
K8GUARD_APPROVED_INGRESS_SUFFIXES=
# Optional
# Ignore violations, comma separated values.
# To ignore the violation completely for everything, just add the violation name, e.g. 'PRIVILEGED'
# Alternatively, filter by namespace and/or entity type / name using the format `{namespace}:{entityType}:{entityName}:{value}`.
# When using the `{namespace}:{entityType}:{entityName}:{value}` format, optionally specify `*` to include all of that type, or prefix with `!` to exclude
# Example SINGLE_REPLICA,IMAGE_REPO,IMAGE_SIZE,HOST_VOLUMES,INGRESS_HOST_INVALID,PRIVILEGED,CAPABILITES,*:*:kube2iam:PRIVILEGED
K8GUARD_IGNORED_VIOLATIONS=
# Optional
# The namespaces to ignore, comma separated values
K8GUARD_IGNORE_NAMESPACES=
# Optional
# ignore pods with these prefix, comma separated values
K8GUARD_IGNORE_PODS_PREFIX=
# Optional
# Verify presence of specific annotations, comma separated values.
# Filter by namespace and/or entity type using the format `{namespace}:{entityType}:{entityName}:{value}`.
# Optionally specify `*` to include all of that type, or prefix with `!` to exclude
K8GUARD_REQUIRED_ANNOTATIONS=
# Optional
# Verify presence of specific labels, comma separated values.
# Filter by namespace and/or entity type using the format `{namespace}:{entityType}:{entityName}:{value}`.
# Optionally specify `*` to include all of that type, or prefix with `!` to exclude
K8GUARD_REQUIRED_LABELS=
# Optional
# Verify that the following entities are deployed within a specific namespace, comma separated.
# Filter by namespace and/or entity type using the format `{namespace}:{entityType}:{entityName}`.
# Optionally specify `*` to include all of that type, or prefix with `!` to exclude
# Supported entity types are namespace, deployment, daemonset and resourcequota
K8GUARD_REQUIRED_ENTITIES=
#----------------------------------------------------------
# Kafka Redis Cassandra Memcached
#---------------------------------------------------------
# Optional
# Which caching system to use? Supported values MEMCACHED and REDIS.
# Default MEMCACHED
K8GUARD_CACHE_TYPE=
# Required
# Memcached expiration in seconds for stuff like (image size, discover-api response)
K8GUARD_MEMCACHED_HOSTNAME=memcached
K8GUARD_CACHE_EXPIRATION_SECONDS=300
# Optional
# Which messaging system to use? Supported values KAFKA and RMQ.
# Default KAFKA
K8GUARD_MESSAGE_BROKER=
# Only required if `K8GUARD_MESSAGE_BROKER=RMQ`
K8GUARD_RMQ_BROKER=redis:6379
K8GUARD_RMQ_ACTION_TOPIC=k8guard-to-action
K8GUARD_RMQ_EVENT_TOPIC=k8guard-events
# Only required if `K8GUARD_MESSAGE_BROKER=KAFKA`
K8GUARD_KAFKA_BROKERS=kafka:9092
K8GUARD_KAFKA_ACTION_TOPIC=k8guard-to-action
# Optional, experimental feature
K8GUARD_KAFKA_EVENT_TOPIC=k8guard-events
# Required
# Cassandra hostname
K8GUARD_ACTION_CASSANDRA_HOSTS=cassandra
# Required
# Cassandra keyspace name
K8GUARD_ACTION_CASSANDRA_KEYSPACE=k8guardkeyspace
# Optional
# Cassandra username - set password in env-creds
K8GUARD_ACTION_CASSANDRA_USERNAME=cassandra
# Optional
K8GUARD_ACTION_CASSANDRA_SSL_HOST_VALIDATION=true
# Optional
# If specified, TLS will be enabled
K8GUARD_ACTION_CASSANDRA_CAPATH=
# Optional, default True
# if set to false it will not try to create a keyspace
K8GUARD_CASSANDRA_CREATE_KEYSPACE=true
# Optional, default True
# if set to false, does not attempt to create tables
K8GUARD_CASSANDRA_CREATE_TABLES=true
#----------------------------------------------------------
# NOTFICATIONS
# Dont forget to edit env-creds for credentials
#---------------------------------------------------------
# K8guard will get the email and hipchat handles from namespace annotations from the kubernetnes API.
# the annotation format:
# annotations:
# "team/email-ids" : "[email protected]"
# "team/hipchat-ids" : "JohnSmith,JohnBrown,JohnDeer"
# Optional
# Hipchat Room ID to send warning
# Example 3213213
K8GUARD_ACTION_HIPCHAT_ROOM_ID=
# Optional
# the hipchat api base url for your organization
# Example https://REPLACEWITHYOUROWN.hipchat.com/v2/
K8GUARD_ACTION_HIPCHAT_BASE_URL=
# Optional
# Tag the violator in the hipchat room message
# Default false
K8GUARD_ACTION_HIPCHAT_TAG_NAMESPACE_OWNER=FALSE
# Optional
# Slack channel to send warning
K8GUARD_ACTION_SLACK_CHANNEL=
# Optional
# The annotation to grab hipchat ID from the namespace annotations
# Default team/hipchat-ids
K8GUARD_ACTION_ANNOTATION_FORMAT_FOR_CHAT_IDS=team/hipchat-ids
# Optional
# The annotation to grab email from the namespace annotations
# Default team/email-ids
K8GUARD_ACTION_ANNOTATION_FORMAT_FOR_EMAILS=team/email-ids
# Required
# Enable or Disable Emailing
K8GUARD_ACTION_SMTP_SEND_TO_NAMESAPCE_OWNER=FALSE
# Optional
# The smtp server to use to send the emails
K8GUARD_ACTION_SMTP_SERVER=
# Optional
K8GUARD_ACTION_SMTP_PORT=25
# Optional
K8GUARD_ACTION_SMTP_USERNAME=
# Optional
# the email address to use to warning emails from
K8GUARD_ACTION_SMTP_SEND_FROM=donotreply.kubernetes@YOUR-DOMAIN.com
# Optional
# In case the emails fails to send, send fallback email to
K8GUARD_ACTION_SMTP_FALLBACK_SEND_TO=
# Optional
# Footer for emails, e.g. to include links to more information
K8GUARD_ACTION_VIOLATION_EMAIL_FOOTER=
#----------------------------------------------------------
# Internal Config
#---------------------------------------------------------
# Optional, Experimental feature.
# Writes the api response to a flat file
K8GUARD_OUTPUT_PODS_TO_FILE=FALSE
# Required
# Accepted values debug, info
K8GUARD_LOG_LEVEL=debug
# Optional
# Dry run, Does nothing. (No notification, No Hard Actions)
# Default False
K8GUARD_ACTION_DRY_RUN=FALSE
# Required
# Wait between consuming kafka messages to do action on
K8GUARD_ACTION_DURATION_BETWEEN_CONSUMING_VIOLATIONS=1s