-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
72 lines (62 loc) · 1.72 KB
/
Dockerfile
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
FROM flant/shell-operator:latest
# Adding alpine coreutils, this is required for some bash script utilities
# like the date command to work as expected
RUN apk add --update coreutils
# Add the pods-hook file, and entrypoint script
ADD hooks /hooks
ADD operator /operator
RUN chmod 755 /hooks/*.sh && chmod +x /hooks/*.sh && \
chmod 755 /operator/*.sh && chmod +x /operator/*.sh
# Trigger the entrypoint script
ENTRYPOINT ["/sbin/tini", "--", "/operator/entrypoint.sh"]
CMD []
#
# Environment variables for usage
#
# This is required
#
ENV NAMESPACE="example-monitor-events"
#
# Regex rule, for matching against pod names
# Which the termination action will be limited to
#
# This is required
#
ENV TARGETPOD=""
#
# Delegate hook stdout/ stderr JSON logging to the hooks
# and act as a proxy that adds some extra fields before just printing the output.
# NOTE: It ignores LOG_TYPE for the output of the hooks;
# expects JSON lines to stdout/ stderr from the hooks
#
# Doesn't seem to work ? See link below
# https://github.com/flant/shell-operator/pull/383
#
ENV LOG_PROXY_HOOK_JSON="false"
#
#Logging formatter type: json, text or color.
#
# default is json
ENV LOG_TYPE="text"
#
# LOG_LEVEL for the shell-operator, use either
# debug, info, error
#
# default="info"
#
ENV LOG_LEVEL="info"
#
# Disable timestamp logging if flag is present.
# Useful when output is redirected to logging system that already adds timestamps.
#
# default = "false"
#
ENV LOG_NO_TIME="true"
#
# Enable the use of the main shell-operator workflow
# This helps react to event quicker in a "live" manner for pod completion events,
# however seems to sometimes "miss" event based on our observations in the field.
#
# default="true"
#
ENV SHELL_OPERATOR_ENABLE="true"