Skip to content

Commit bc48cd8

Browse files
Release MCK version 1.8.0 (#961)
# Summary Pre-req changes for MCK release 1.8.0.
1 parent 8d4eb20 commit bc48cd8

15 files changed

Lines changed: 515 additions & 44 deletions

File tree

config/manager/manager.yaml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ spec:
2222
serviceAccountName: mongodb-kubernetes-operator
2323
containers:
2424
- name: mongodb-kubernetes-operator
25-
image: "quay.io/mongodb/mongodb-kubernetes:1.7.0"
25+
image: "quay.io/mongodb/mongodb-kubernetes:1.8.0"
2626
imagePullPolicy: Always
2727
args:
2828
- -watch-resource=mongodb
@@ -72,16 +72,16 @@ spec:
7272
- name: INIT_DATABASE_IMAGE_REPOSITORY
7373
value: quay.io/mongodb/mongodb-kubernetes-init-database
7474
- name: INIT_DATABASE_VERSION
75-
value: "1.7.0"
75+
value: "1.8.0"
7676
- name: DATABASE_VERSION
77-
value: "1.7.0"
77+
value: "1.8.0"
7878
# Ops Manager
7979
- name: OPS_MANAGER_IMAGE_REPOSITORY
8080
value: quay.io/mongodb/mongodb-enterprise-ops-manager-ubi
8181
- name: INIT_OPS_MANAGER_IMAGE_REPOSITORY
8282
value: quay.io/mongodb/mongodb-kubernetes-init-ops-manager
8383
- name: INIT_OPS_MANAGER_VERSION
84-
value: "1.7.0"
84+
value: "1.8.0"
8585
- name: OPS_MANAGER_IMAGE_PULL_POLICY
8686
value: Always
8787
- name: AGENT_IMAGE
@@ -118,12 +118,12 @@ spec:
118118
- name: MDB_COMMUNITY_IMAGE_TYPE
119119
value: "ubi8"
120120
# Community Env Vars End
121-
- name: RELATED_IMAGE_MONGODB_ENTERPRISE_DATABASE_IMAGE_1_7_0
122-
value: "quay.io/mongodb/mongodb-kubernetes-database:1.7.0"
123-
- name: RELATED_IMAGE_INIT_DATABASE_IMAGE_REPOSITORY_1_7_0
124-
value: "quay.io/mongodb/mongodb-kubernetes-init-database:1.7.0"
125-
- name: RELATED_IMAGE_INIT_OPS_MANAGER_IMAGE_REPOSITORY_1_7_0
126-
value: "quay.io/mongodb/mongodb-kubernetes-init-ops-manager:1.7.0"
121+
- name: RELATED_IMAGE_MONGODB_ENTERPRISE_DATABASE_IMAGE_1_8_0
122+
value: "quay.io/mongodb/mongodb-kubernetes-database:1.8.0"
123+
- name: RELATED_IMAGE_INIT_DATABASE_IMAGE_REPOSITORY_1_8_0
124+
value: "quay.io/mongodb/mongodb-kubernetes-init-database:1.8.0"
125+
- name: RELATED_IMAGE_INIT_OPS_MANAGER_IMAGE_REPOSITORY_1_8_0
126+
value: "quay.io/mongodb/mongodb-kubernetes-init-ops-manager:1.8.0"
127127
- name: RELATED_IMAGE_AGENT_IMAGE_107_0_12_8669_1
128128
value: "quay.io/mongodb/mongodb-agent:107.0.12.8669-1"
129129
- name: RELATED_IMAGE_AGENT_IMAGE_107_0_13_8702_1

config/manifests/bases/mongodb-kubernetes.clusterserviceversion.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ metadata:
1212
capabilities: Deep Insights
1313
categories: Database
1414
certified: "true"
15-
containerImage: quay.io/mongodb/mongodb-kubernetes:1.7.0
15+
containerImage: quay.io/mongodb/mongodb-kubernetes:1.8.0
1616
createdAt: ""
1717
description: The MongoDB Controllers for Kubernetes enable easy deploys of
1818
MongoDB into Kubernetes clusters, using our management, monitoring and
@@ -478,5 +478,5 @@ spec:
478478
maturity: stable
479479
provider:
480480
name: MongoDB, Inc
481-
replaces: mongodb-kubernetes.v1.6.1
481+
replaces: mongodb-kubernetes.v1.7.0
482482
version: 0.0.0

helm_chart/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: |
44
MongoDB Controllers for Kubernetes translate the human knowledge of
55
creating a MongoDB instance into a scalable, repeatable, and standardized
66
method.
7-
version: 1.7.0
7+
version: 1.8.0
88
kubeVersion: '>=1.16-0'
99
type: application
1010
keywords:

helm_chart/values-openshift.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ operator:
3434
# Environment variables prefixed with RELATED_IMAGE_ are used by operator-sdk to generate relatedImages section
3535
# with sha256 digests pinning for the certified operator bundle with disconnected environment feature enabled.
3636
# https://docs.openshift.com/container-platform/4.14/operators/operator_sdk/osdk-generating-csvs.html#olm-enabling-operator-for-restricted-network_osdk-generating-csvs
37-
version: 1.7.0
37+
version: 1.8.0
3838
relatedImages:
3939
opsManager:
4040
- 6.0.26

helm_chart/values.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ operator:
1717
operator_image_name: mongodb-kubernetes
1818

1919
# Version of mongodb-kubernetes-operator
20-
version: 1.7.0
20+
version: 1.8.0
2121

2222
# The Custom Resources that will be watched by the Operator. Needs to be changed if only some of the CRDs are installed
2323
watchedResources:
@@ -131,19 +131,19 @@ operator:
131131
## Database
132132
database:
133133
name: mongodb-kubernetes-database
134-
version: 1.7.0
134+
version: 1.8.0
135135

136136
initDatabase:
137137
name: mongodb-kubernetes-init-database
138-
version: 1.7.0
138+
version: 1.8.0
139139

140140
## Ops Manager
141141
opsManager:
142142
name: mongodb-enterprise-ops-manager-ubi
143143

144144
initOpsManager:
145145
name: mongodb-kubernetes-init-ops-manager
146-
version: 1.7.0
146+
version: 1.8.0
147147

148148
agent:
149149
name: mongodb-agent
Lines changed: 113 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
FROM --platform=${BUILDPLATFORM} registry.access.redhat.com/ubi9/ubi-minimal AS tools_downloader
2+
3+
ARG TARGETPLATFORM
4+
ARG mongodb_tools_url
5+
ARG mongodb_tools_version_s390x
6+
ARG mongodb_tools_version_ppc64le
7+
ARG mongodb_tools_version_amd64
8+
ARG mongodb_tools_version_arm64
9+
10+
RUN microdnf -y update --nodocs \
11+
&& microdnf -y install --nodocs tar gzip \
12+
&& microdnf clean all
13+
14+
RUN case ${TARGETPLATFORM} in \
15+
"linux/amd64") export MONGODB_TOOLS_VERSION=${mongodb_tools_version_amd64} ;; \
16+
"linux/arm64") export MONGODB_TOOLS_VERSION=${mongodb_tools_version_arm64} ;; \
17+
"linux/s390x") export MONGODB_TOOLS_VERSION=${mongodb_tools_version_s390x} ;; \
18+
"linux/ppc64le") export MONGODB_TOOLS_VERSION=${mongodb_tools_version_ppc64le} ;; \
19+
esac \
20+
&& mkdir -p /tools \
21+
&& curl -o /tools/mongodb_tools.tgz "${mongodb_tools_url}/${MONGODB_TOOLS_VERSION}"
22+
23+
RUN tar xfz /tools/mongodb_tools.tgz \
24+
&& mv mongodb-database-tools-*/bin/* /tools \
25+
&& chmod +x /tools/* \
26+
&& rm /tools/mongodb_tools.tgz \
27+
&& rm -r mongodb-database-tools-*
28+
29+
FROM --platform=${BUILDPLATFORM} registry.access.redhat.com/ubi9/ubi-minimal AS agent_downloader
30+
31+
ARG TARGETPLATFORM
32+
ARG mongodb_agent_url
33+
ARG mongodb_agent_version_s390x
34+
ARG mongodb_agent_version_ppc64le
35+
ARG mongodb_agent_version_amd64
36+
ARG mongodb_agent_version_arm64
37+
38+
RUN microdnf -y update --nodocs \
39+
&& microdnf -y install --nodocs tar gzip \
40+
&& microdnf clean all
41+
42+
RUN case ${TARGETPLATFORM} in \
43+
"linux/amd64") export MONGODB_AGENT_VERSION=${mongodb_agent_version_amd64} ;; \
44+
"linux/arm64") export MONGODB_AGENT_VERSION=${mongodb_agent_version_arm64} ;; \
45+
"linux/s390x") export MONGODB_AGENT_VERSION=${mongodb_agent_version_s390x} ;; \
46+
"linux/ppc64le") export MONGODB_AGENT_VERSION=${mongodb_agent_version_ppc64le} ;; \
47+
esac \
48+
&& mkdir -p /agent \
49+
&& curl -o /agent/mongodb_agent.tgz "${mongodb_agent_url}/${MONGODB_AGENT_VERSION}"
50+
51+
RUN tar xfz /agent/mongodb_agent.tgz \
52+
&& mv mongodb-mms-automation-agent-*/mongodb-mms-automation-agent /agent/mongodb-agent \
53+
&& chmod +x /agent/mongodb-agent \
54+
&& rm /agent/mongodb_agent.tgz \
55+
&& rm -r mongodb-mms-automation-agent-*
56+
57+
FROM registry.access.redhat.com/ubi9/ubi-minimal
58+
59+
# Replace libcurl-minimal and curl-minimal with the full versions
60+
# https://bugzilla.redhat.com/show_bug.cgi?id=1994521
61+
RUN microdnf install -y libssh libpsl libbrotli \
62+
&& microdnf download curl libcurl \
63+
&& rpm -Uvh --nodeps --replacefiles "*curl*$( uname -i ).rpm" \
64+
&& microdnf remove -y libcurl-minimal curl-minimal
65+
66+
RUN microdnf install -y --disableplugin=subscription-manager --setopt=install_weak_deps=0 nss_wrapper
67+
# Copy-pasted from https://www.mongodb.com/docs/manual/tutorial/install-mongodb-enterprise-on-red-hat-tarball/
68+
RUN microdnf install -y --disableplugin=subscription-manager \
69+
cyrus-sasl cyrus-sasl-gssapi cyrus-sasl-plain krb5-libs openldap openssl xz-libs
70+
# Dependencies for the Agent
71+
RUN microdnf install -y --disableplugin=subscription-manager --setopt=install_weak_deps=0 \
72+
net-snmp \
73+
net-snmp-agent-libs
74+
RUN microdnf install -y --disableplugin=subscription-manager \
75+
hostname tar gzip procps jq \
76+
&& microdnf upgrade -y \
77+
&& rm -rf /var/lib/apt/lists/*
78+
79+
RUN mkdir -p /agent \
80+
&& mkdir -p /var/lib/mongodb-mms-automation \
81+
&& mkdir -p /var/log/mongodb-mms-automation/ \
82+
&& chmod -R +wr /var/log/mongodb-mms-automation/ \
83+
# ensure that the agent user can write the logs in OpenShift
84+
&& touch /var/log/mongodb-mms-automation/readiness.log \
85+
&& chmod ugo+rw /var/log/mongodb-mms-automation/readiness.log
86+
87+
# Copy scripts to a safe location that won't be overwritten by volume mount
88+
COPY ./docker/mongodb-kubernetes-init-database/content/LICENSE /licenses/LICENSE
89+
COPY ./docker/mongodb-agent/agent-launcher-shim.sh /usr/local/bin/agent-launcher-shim.sh
90+
COPY ./docker/mongodb-agent/setup-agent-files.sh /usr/local/bin/setup-agent-files.sh
91+
COPY ./docker/mongodb-agent/dummy-probe.sh /usr/local/bin/dummy-probe.sh
92+
COPY ./docker/mongodb-agent/dummy-readinessprobe /usr/local/bin/dummy-readinessprobe
93+
94+
RUN mkdir -p /var/lib/automation/config \
95+
&& chmod -R +r /var/lib/automation/config
96+
97+
RUN mkdir -p /tools /agent
98+
99+
COPY --from=tools_downloader "/tools/" /tools/
100+
COPY --from=agent_downloader "/agent/" /agent/
101+
102+
ARG version
103+
104+
LABEL name="MongoDB Agent" \
105+
version="${version}" \
106+
summary="MongoDB Agent" \
107+
description="MongoDB Agent" \
108+
vendor="MongoDB" \
109+
release="1" \
110+
maintainer="support@mongodb.com"
111+
112+
USER 2000
113+
CMD ["/agent/mongodb-agent", "-cluster=/var/lib/automation/config/automation-config.json"]
Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
# Build compilable stuff
2+
3+
FROM public.ecr.aws/docker/library/golang:1.25 AS readiness_builder
4+
COPY . /go/src/github.com/mongodb/mongodb-kubernetes
5+
WORKDIR /go/src/github.com/mongodb/mongodb-kubernetes
6+
7+
RUN CGO_ENABLED=0 go build -a -buildvcs=false -o /data/scripts/mmsconfiguration ./docker/mongodb-kubernetes-init-ops-manager/mmsconfiguration/edit_mms_configuration.go
8+
RUN CGO_ENABLED=0 go build -a -buildvcs=false -o /data/scripts/backup-daemon-readiness-probe ./docker/mongodb-kubernetes-init-ops-manager/backupdaemon_readinessprobe/backupdaemon_readiness.go
9+
10+
# Move binaries and scripts
11+
FROM scratch AS base
12+
13+
COPY --from=readiness_builder /data/scripts/mmsconfiguration /data/scripts/mmsconfiguration
14+
COPY --from=readiness_builder /data/scripts/backup-daemon-readiness-probe /data/scripts/backup-daemon-readiness-probe
15+
16+
# After v2.0, when non-Static Agent images will be removed, please ensure to copy those files
17+
# into ./docker/mongodb-enterprise-ops-manager directory. Leaving it this way will make the maintenance easier.
18+
COPY ./docker/mongodb-kubernetes-init-ops-manager/scripts/docker-entry-point.sh /data/scripts
19+
COPY ./docker/mongodb-kubernetes-init-ops-manager/scripts/backup-daemon-liveness-probe.sh /data/scripts
20+
COPY ./docker/mongodb-kubernetes-init-ops-manager/LICENSE /data/licenses/mongodb-enterprise-ops-manager
21+
22+
FROM registry.access.redhat.com/ubi9/ubi-minimal
23+
24+
ARG version
25+
ARG om_download_url
26+
27+
LABEL name="MongoDB Enterprise Ops Manager" \
28+
maintainer="support@mongodb.com" \
29+
vendor="MongoDB" \
30+
version=${version} \
31+
release="1" \
32+
summary="MongoDB Enterprise Ops Manager Image" \
33+
description="MongoDB Enterprise Ops Manager"
34+
35+
ENV MMS_HOME=/mongodb-ops-manager
36+
ENV MMS_PROP_FILE=${MMS_HOME}/conf/conf-mms.properties
37+
ENV MMS_CONF_FILE=${MMS_HOME}/conf/mms.conf
38+
ENV MMS_LOG_DIR=${MMS_HOME}/logs
39+
ENV MMS_TMP_DIR=${MMS_HOME}/tmp
40+
41+
EXPOSE 8080
42+
43+
# OpsManager docker image needs to have the MongoDB dependencies because the
44+
# backup daemon is running its database locally
45+
46+
# Replace libcurl-minimal and curl-minimal with the full versions
47+
# https://bugzilla.redhat.com/show_bug.cgi?id=1994521
48+
RUN microdnf install -y libssh libpsl libbrotli \
49+
&& microdnf download curl libcurl \
50+
&& rpm -Uvh --nodeps --replacefiles "*curl*$( uname -i ).rpm" \
51+
&& microdnf remove -y libcurl-minimal curl-minimal
52+
53+
RUN microdnf install --disableplugin=subscription-manager -y \
54+
cyrus-sasl \
55+
cyrus-sasl-gssapi \
56+
cyrus-sasl-plain \
57+
krb5-libs \
58+
libpcap \
59+
lm_sensors-libs \
60+
net-snmp \
61+
net-snmp-agent-libs \
62+
openldap \
63+
openssl \
64+
tar \
65+
rpm-libs \
66+
net-tools \
67+
procps-ng \
68+
ncurses
69+
70+
COPY --from=base /data/licenses /licenses/
71+
COPY --from=base /data/scripts /opt/scripts
72+
73+
RUN curl --fail -L -o ops_manager.tar.gz ${om_download_url} \
74+
&& tar -xzf ops_manager.tar.gz \
75+
&& rm ops_manager.tar.gz \
76+
&& mv mongodb-mms* "${MMS_HOME}"
77+
78+
# permissions
79+
RUN chmod -R 0777 "${MMS_LOG_DIR}" \
80+
&& chmod -R 0777 "${MMS_TMP_DIR}" \
81+
&& chmod -R 0775 "${MMS_HOME}/conf" \
82+
&& chmod -R 0775 "${MMS_HOME}/jdk" \
83+
&& mkdir "${MMS_HOME}/mongodb-releases/" \
84+
&& chmod -R 0775 "${MMS_HOME}/mongodb-releases" \
85+
&& chmod -R 0777 "${MMS_CONF_FILE}" \
86+
&& chmod -R 0777 "${MMS_PROP_FILE}"
87+
88+
# The "${MMS_HOME}/conf" will be populated by the docker-entry-point.sh.
89+
# For now we need to move into the templates directory.
90+
RUN cp -r "${MMS_HOME}/conf" "${MMS_HOME}/conf-template"
91+
92+
USER 2000
93+
94+
# operator to change the entrypoint to: /mongodb-ops-manager/bin/mongodb-mms start_mms (or a wrapper around this)
95+
ENTRYPOINT [ "sleep infinity" ]
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
FROM scratch AS base
2+
3+
COPY ./docker/mongodb-kubernetes-database/LICENSE /data/licenses/mongodb-kubernetes-database
4+
5+
FROM registry.access.redhat.com/ubi8/ubi-minimal
6+
7+
ENV MMS_HOME=/mongodb-automation
8+
ENV MMS_LOG_DIR=/var/log/mongodb-mms-automation
9+
10+
RUN microdnf update -y && rm -rf /var/cache/yum
11+
12+
# these are the packages needed for the agent
13+
RUN microdnf install -y --disableplugin=subscription-manager --setopt=install_weak_deps=0 nss_wrapper
14+
RUN microdnf install -y --disableplugin=subscription-manager \
15+
hostname \
16+
procps
17+
18+
# these are the packages needed for MongoDB
19+
# (https://docs.mongodb.com/manual/tutorial/install-mongodb-enterprise-on-red-hat-tarball/ "RHEL/CentOS 8" tab)
20+
RUN microdnf install -y --disableplugin=subscription-manager \
21+
cyrus-sasl \
22+
cyrus-sasl-gssapi \
23+
cyrus-sasl-plain \
24+
krb5-libs \
25+
libcurl \
26+
lm_sensors-libs \
27+
net-snmp \
28+
net-snmp-agent-libs \
29+
openldap \
30+
openssl \
31+
jq \
32+
tar \
33+
xz-libs \
34+
findutils
35+
36+
RUN ln -s /usr/lib64/libsasl2.so.3 /usr/lib64/libsasl2.so.2
37+
38+
# Set the required perms
39+
RUN mkdir -p "${MMS_LOG_DIR}" \
40+
&& chmod 0775 "${MMS_LOG_DIR}" \
41+
&& mkdir -p /var/lib/mongodb-mms-automation \
42+
&& chmod 0775 /var/lib/mongodb-mms-automation \
43+
&& mkdir -p /data \
44+
&& chmod 0775 /data \
45+
&& mkdir -p /journal \
46+
&& chmod 0775 /journal \
47+
&& mkdir -p "${MMS_HOME}" \
48+
&& chmod -R 0775 "${MMS_HOME}"
49+
50+
ARG version
51+
52+
LABEL name="MongoDB Kubernetes Database" \
53+
version="${version}" \
54+
summary="MongoDB Kubernetes Database Image" \
55+
description="MongoDB Kubernetes Database Image" \
56+
vendor="MongoDB" \
57+
release="1" \
58+
maintainer="support@mongodb.com"
59+
60+
# USER needs to be set for this image to pass RedHat verification. Some customers have these requirements as well
61+
# It does not matter what number it is, as long as it is set to something.
62+
# However, OpenShift will run the container as a random user,
63+
# and the number in this configuration is not relevant.
64+
USER 2000
65+
66+
# The docker image doesn't have any scripts so by default does nothing
67+
# The script will be copied in runtime from init containers and the operator is expected
68+
# to override the COMMAND
69+
ENTRYPOINT ["sleep infinity"]
70+
71+
COPY --from=base /data/licenses/mongodb-kubernetes-database /licenses/mongodb-kubernetes-database

0 commit comments

Comments
 (0)