Skip to content

Commit 042bf91

Browse files
Kubernetes Enterprise Operator Release 1.22.0 (#263)
Co-authored-by: nam <[email protected]>
1 parent 76b4155 commit 042bf91

File tree

10 files changed

+310
-14
lines changed

10 files changed

+310
-14
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
.idea
22
*.iml
3+
.DS_Store

crds.yaml

Lines changed: 91 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2011,29 +2011,75 @@ spec:
20112011
applicationDatabase:
20122012
properties:
20132013
additionalMongodConfig:
2014-
description: 'AdditionalMongodConfig is additional configuration
2014+
description: 'AdditionalMongodConfig are additional configurations
20152015
that can be passed to each data-bearing mongod at runtime. Uses
20162016
the same structure as the mongod configuration file: https://docs.mongodb.com/manual/reference/configuration-options/'
20172017
type: object
20182018
x-kubernetes-preserve-unknown-fields: true
20192019
agent:
2020-
description: specify startup flags for the AutomationAgent and
2021-
MonitoringAgent
2020+
description: specify configuration like startup flags and automation
2021+
config settings for the AutomationAgent and MonitoringAgent
20222022
properties:
20232023
logLevel:
20242024
type: string
2025+
logRotate:
2026+
description: LogRotate if enabled, will enable LogRotate for
2027+
all processes.
2028+
properties:
2029+
includeAuditLogsWithMongoDBLogs:
2030+
description: set to 'true' to have the Automation Agent
2031+
rotate the audit files along with mongodb log files
2032+
type: boolean
2033+
numTotal:
2034+
description: maximum number of log files to have total
2035+
type: integer
2036+
numUncompressed:
2037+
description: maximum number of log files to leave uncompressed
2038+
type: integer
2039+
percentOfDiskspace:
2040+
description: Maximum percentage of the total disk space
2041+
these log files should take up. The string needs to
2042+
be able to be converted to float64
2043+
type: string
2044+
sizeThresholdMB:
2045+
description: Maximum size for an individual log file before
2046+
rotation. The string needs to be able to be converted
2047+
to float64. Fractional values of MB are supported.
2048+
type: string
2049+
timeThresholdHrs:
2050+
description: maximum hours for an individual log file
2051+
before rotation
2052+
type: integer
2053+
required:
2054+
- sizeThresholdMB
2055+
- timeThresholdHrs
2056+
type: object
20252057
maxLogFileDurationHours:
20262058
type: integer
20272059
startupOptions:
20282060
additionalProperties:
20292061
type: string
20302062
type: object
2063+
systemLog:
2064+
description: SystemLog configures system log of mongod
2065+
properties:
2066+
destination:
2067+
type: string
2068+
logAppend:
2069+
type: boolean
2070+
path:
2071+
type: string
2072+
required:
2073+
- destination
2074+
- logAppend
2075+
- path
2076+
type: object
20312077
type: object
20322078
automationConfig:
20332079
description: AutomationConfigOverride holds any fields that will
20342080
be merged on top of the Automation Config that the operator
2035-
creates for the AppDB. Currently only the process.disabled field
2036-
is recognized.
2081+
creates for the AppDB. Currently only the process.disabled and
2082+
logRotate field is recognized.
20372083
properties:
20382084
processes:
20392085
items:
@@ -2042,6 +2088,43 @@ spec:
20422088
properties:
20432089
disabled:
20442090
type: boolean
2091+
logRotate:
2092+
description: CrdLogRotate is the crd definition of LogRotate
2093+
including fields in strings while the agent supports
2094+
them as float64
2095+
properties:
2096+
includeAuditLogsWithMongoDBLogs:
2097+
description: set to 'true' to have the Automation
2098+
Agent rotate the audit files along with mongodb
2099+
log files
2100+
type: boolean
2101+
numTotal:
2102+
description: maximum number of log files to have
2103+
total
2104+
type: integer
2105+
numUncompressed:
2106+
description: maximum number of log files to leave
2107+
uncompressed
2108+
type: integer
2109+
percentOfDiskspace:
2110+
description: Maximum percentage of the total disk
2111+
space these log files should take up. The string
2112+
needs to be able to be converted to float64
2113+
type: string
2114+
sizeThresholdMB:
2115+
description: Maximum size for an individual log
2116+
file before rotation. The string needs to be able
2117+
to be converted to float64. Fractional values
2118+
of MB are supported.
2119+
type: string
2120+
timeThresholdHrs:
2121+
description: maximum hours for an individual log
2122+
file before rotation
2123+
type: integer
2124+
required:
2125+
- sizeThresholdMB
2126+
- timeThresholdHrs
2127+
type: object
20452128
name:
20462129
type: string
20472130
required:
@@ -2206,8 +2289,9 @@ spec:
22062289
minimum: 3
22072290
type: integer
22082291
monitoringAgent:
2209-
description: specify startup flags for just the MonitoringAgent.
2210-
These take precedence over the flags set in AutomationAgent
2292+
description: Specify configuration like startup flags just for
2293+
the MonitoringAgent. These take precedence over the flags set
2294+
in AutomationAgent
22112295
properties:
22122296
logLevel:
22132297
type: string
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
ARG imagebase
2+
FROM ${imagebase} as base
3+
4+
FROM registry.access.redhat.com/ubi8/ubi-minimal
5+
6+
ARG version
7+
LABEL name="MongoDB Enterprise Init AppDB" \
8+
version="mongodb-enterprise-init-appdb-${version}" \
9+
summary="MongoDB Enterprise AppDB Init Image" \
10+
description="Startup Scripts for MongoDB Enterprise Application Database for Ops Manager" \
11+
release="1" \
12+
vendor="MongoDB" \
13+
maintainer="[email protected]"
14+
15+
COPY --from=base /data/readinessprobe /probes/readinessprobe
16+
COPY --from=base /data/probe.sh /probes/probe.sh
17+
COPY --from=base /data/scripts/ /scripts/
18+
COPY --from=base /data/licenses /licenses/
19+
COPY --from=base /data/version-upgrade-hook /probes/version-upgrade-hook
20+
21+
22+
RUN microdnf update --nodocs \
23+
&& microdnf -y install --nodocs tar gzip \
24+
&& microdnf clean all
25+
26+
COPY --from=base /data/mongodb_tools_ubi.tgz /tools/mongodb_tools.tgz
27+
28+
29+
RUN tar xfz /tools/mongodb_tools.tgz --directory /tools \
30+
&& rm /tools/mongodb_tools.tgz
31+
32+
USER 2000
33+
ENTRYPOINT [ "/bin/cp", "-f", "-r", "/scripts/agent-launcher.sh", "/scripts/agent-launcher-lib.sh", "/probes/readinessprobe", "/probes/probe.sh", "/tools", "/opt/scripts/" ]
34+
35+
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
ARG imagebase
2+
FROM ${imagebase} as base
3+
4+
FROM registry.access.redhat.com/ubi8/ubi-minimal
5+
6+
ARG version
7+
LABEL name="MongoDB Enterprise Init Database" \
8+
version="mongodb-enterprise-init-database-${version}" \
9+
summary="MongoDB Enterprise Database Init Image" \
10+
description="Startup Scripts for MongoDB Enterprise Database" \
11+
release="1" \
12+
vendor="MongoDB" \
13+
maintainer="[email protected]"
14+
15+
COPY --from=base /data/readinessprobe /probes/readinessprobe
16+
COPY --from=base /data/probe.sh /probes/probe.sh
17+
COPY --from=base /data/scripts/ /scripts/
18+
COPY --from=base /data/licenses /licenses/
19+
20+
21+
RUN microdnf update --nodocs \
22+
&& microdnf -y install --nodocs tar gzip \
23+
&& microdnf clean all
24+
25+
COPY --from=base /data/mongodb_tools_ubi.tgz /tools/mongodb_tools.tgz
26+
27+
28+
RUN tar xfz /tools/mongodb_tools.tgz --directory /tools \
29+
&& rm /tools/mongodb_tools.tgz
30+
31+
USER 2000
32+
ENTRYPOINT [ "/bin/cp", "-f", "-r", "/scripts/agent-launcher.sh", "/scripts/agent-launcher-lib.sh", "/probes/readinessprobe", "/probes/probe.sh", "/tools", "/opt/scripts/" ]
33+
34+
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
ARG imagebase
2+
FROM ${imagebase} as base
3+
4+
FROM registry.access.redhat.com/ubi8/ubi-minimal
5+
6+
LABEL name="MongoDB Enterprise Ops Manager Init" \
7+
maintainer="[email protected]" \
8+
vendor="MongoDB" \
9+
version="mongodb-enterprise-init-ops-manager-1.0.12" \
10+
release="1" \
11+
summary="MongoDB Enterprise Ops Manager Init Image" \
12+
description="Startup Scripts for MongoDB Enterprise Ops Manager"
13+
14+
15+
COPY --from=base /data/scripts /scripts
16+
COPY --from=base /data/licenses /licenses
17+
18+
19+
RUN microdnf update --nodocs \
20+
&& microdnf clean all
21+
22+
23+
USER 2000
24+
ENTRYPOINT [ "/bin/cp", "-f", "/scripts/docker-entry-point.sh", "/scripts/backup-daemon-liveness-probe.sh", "/scripts/mmsconfiguration", "/scripts/backup-daemon-readiness-probe", "/opt/scripts/" ]
25+
26+
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
#
2+
# Base Template Dockerfile for Operator Image.
3+
#
4+
5+
ARG imagebase
6+
FROM ${imagebase} as base
7+
8+
FROM registry.access.redhat.com/ubi8/ubi-minimal
9+
10+
11+
LABEL name="MongoDB Enterprise Operator" \
12+
maintainer="[email protected]" \
13+
vendor="MongoDB" \
14+
version="1.22.0" \
15+
release="1" \
16+
summary="MongoDB Enterprise Operator Image" \
17+
description="MongoDB Enterprise Operator Image"
18+
19+
20+
# Building an UBI-based image: https://red.ht/3n6b9y0
21+
RUN microdnf update \
22+
--disableplugin=subscription-manager \
23+
--disablerepo=* --enablerepo=ubi-8-appstream-rpms --enablerepo=ubi-8-baseos-rpms -y \
24+
&& rm -rf /var/cache/yum
25+
26+
27+
28+
29+
COPY --from=base /data/mongodb-enterprise-operator /usr/local/bin/mongodb-enterprise-operator
30+
COPY --from=base /data/om_version_mapping.json /usr/local/om_version_mapping.json
31+
COPY --from=base /data/licenses /licenses/
32+
33+
USER 2000
34+
35+
36+
37+
ENTRYPOINT exec /usr/local/bin/mongodb-enterprise-operator
38+
39+
Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
ARG imagebase
2+
FROM ${imagebase} as base
3+
4+
FROM registry.access.redhat.com/ubi8/ubi-minimal
5+
6+
7+
LABEL name="MongoDB Enterprise Ops Manager" \
8+
maintainer="[email protected]" \
9+
vendor="MongoDB" \
10+
version="6.0.18" \
11+
release="1" \
12+
summary="MongoDB Enterprise Ops Manager Image" \
13+
description="MongoDB Enterprise Ops Manager"
14+
15+
16+
ENV MMS_HOME /mongodb-ops-manager
17+
ENV MMS_PROP_FILE ${MMS_HOME}/conf/conf-mms.properties
18+
ENV MMS_CONF_FILE ${MMS_HOME}/conf/mms.conf
19+
ENV MMS_LOG_DIR ${MMS_HOME}/logs
20+
ENV MMS_TMP_DIR ${MMS_HOME}/tmp
21+
22+
EXPOSE 8080
23+
24+
# OpsManager docker image needs to have the MongoDB dependencies because the
25+
# backup daemon is running its database locally
26+
27+
RUN microdnf install --disableplugin=subscription-manager -y \
28+
cyrus-sasl \
29+
cyrus-sasl-gssapi \
30+
cyrus-sasl-plain \
31+
krb5-libs \
32+
libcurl \
33+
libpcap \
34+
lm_sensors-libs \
35+
net-snmp \
36+
net-snmp-agent-libs \
37+
openldap \
38+
openssl \
39+
tar \
40+
rpm-libs \
41+
net-tools \
42+
procps-ng \
43+
ncurses
44+
45+
46+
COPY --from=base /data/licenses /licenses/
47+
48+
49+
50+
RUN curl --fail -L -o ops_manager.tar.gz https://downloads.mongodb.com/on-prem-mms/tar/mongodb-mms-6.0.18.100.20230905T1424Z.tar.gz \
51+
&& tar -xzf ops_manager.tar.gz \
52+
&& rm ops_manager.tar.gz \
53+
&& mv mongodb-mms* "${MMS_HOME}"
54+
55+
56+
# permissions
57+
RUN chmod -R 0777 "${MMS_LOG_DIR}" \
58+
&& chmod -R 0777 "${MMS_TMP_DIR}" \
59+
&& chmod -R 0775 "${MMS_HOME}/conf" \
60+
&& chmod -R 0775 "${MMS_HOME}/jdk" \
61+
&& mkdir "${MMS_HOME}/mongodb-releases/" \
62+
&& chmod -R 0775 "${MMS_HOME}/mongodb-releases" \
63+
&& chmod -R 0777 "${MMS_CONF_FILE}" \
64+
&& chmod -R 0777 "${MMS_PROP_FILE}"
65+
66+
# The "${MMS_HOME}/conf" will be populated by the docker-entry-point.sh.
67+
# For now we need to move into the templates directory.
68+
RUN cp -r "${MMS_HOME}/conf" "${MMS_HOME}/conf-template"
69+
70+
USER 2000
71+
72+
# operator to change the entrypoint to: /mongodb-ops-manager/bin/mongodb-mms start_mms (or a wrapper around this)
73+
ENTRYPOINT [ "sleep infinity" ]
74+
75+

mongodb-enterprise-multi-cluster.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ spec:
137137
runAsUser: 2000
138138
containers:
139139
- name: mongodb-enterprise-operator-multi-cluster
140-
image: "quay.io/mongodb/mongodb-enterprise-operator-ubi:1.21.0"
140+
image: "quay.io/mongodb/mongodb-enterprise-operator-ubi:1.22.0"
141141
imagePullPolicy: Always
142142
args:
143143
- -watch-resource=mongodb

0 commit comments

Comments
 (0)