Skip to content

Commit 318eda4

Browse files
authored
Merge branch 'master' into search/public-preview
2 parents 401a5bb + 79543a3 commit 318eda4

File tree

106 files changed

+2537
-1115
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

106 files changed

+2537
-1115
lines changed
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: 'Setup Ubuntu Runner Host'
2+
inputs:
3+
python-version:
4+
description: 'Python version to use'
5+
required: true
6+
runs:
7+
using: "composite"
8+
steps:
9+
- name: setup python
10+
uses: actions/setup-python@v5
11+
with:
12+
python-version: ${{inputs.python-version}}
13+
cache: 'pip' # caching pip dependencies
14+
- name: Install dependencies
15+
shell: bash
16+
run: |
17+
sudo apt-get install libldap2-dev libsasl2-dev # Required for python-ldap
18+
pip install --upgrade pip
19+
pip install -r requirements.txt

.github/pull_request_template.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@
77
<!-- Enter your proof that it works here.-->
88

99
## Checklist
10+
1011
- [ ] Have you linked a jira ticket and/or is the ticket in the title?
1112
- [ ] Have you checked whether your jira ticket required DOCSP changes?
12-
- [ ] Have you checked for release_note changes?
13+
- [ ] Have you added changelog file?
14+
- use `skip-changelog` label if not needed
15+
- refer to [Changelog files and Release Notes](https://github.com/mongodb/mongodb-kubernetes/blob/master/CONTRIBUTING.md#changelog-files-and-release-notes) section in CONTRIBUTING.md for more details
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: Preview Release Notes
2+
on:
3+
push:
4+
branches:
5+
- master
6+
- release-*
7+
pull_request:
8+
branches:
9+
- master
10+
- release-*
11+
12+
jobs:
13+
preview_release_notes:
14+
name: Preview Release Notes
15+
runs-on: ubuntu-latest
16+
permissions:
17+
contents: read
18+
pull-requests: write
19+
steps:
20+
- name: Check out repository
21+
uses: actions/checkout@v4
22+
with:
23+
fetch-depth: '0'
24+
- name: Setup host
25+
uses: ./.github/actions/setup-ubuntu-host
26+
with:
27+
python-version: '${{ vars.PYTHON_VERSION }}'
28+
- name: Generate Release Notes
29+
id: generate_release_notes
30+
run: python -m scripts.release.release_notes -s $INITIAL_COMMIT_SHA -v $INITIAL_VERSION -o release_notes_tmp.md
31+
env:
32+
INITIAL_COMMIT_SHA: ${{ vars.RELEASE_INITIAL_COMMIT_SHA }}
33+
INITIAL_VERSION: ${{ vars.RELEASE_INITIAL_VERSION }}
34+
- name: Add disclaimer to release notes preview
35+
run: |
36+
echo -e "_:warning: (this preview might not be accurate if the PR is not rebased on current master branch)_\n" > release_notes_preview.md
37+
cat release_notes_tmp.md >> release_notes_preview.md
38+
- name: Summarize results
39+
run: cat release_notes_preview.md >> $GITHUB_STEP_SUMMARY
40+
- name: Update PR comment
41+
# If the PR is from a fork, we cannot update the comment using read only permissions
42+
if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository
43+
run: gh issue comment $ISSUE --edit-last --create-if-none --body-file release_notes_preview.md
44+
env:
45+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
46+
ISSUE: ${{ github.event.pull_request.html_url }}
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Validate Changelog Requirement
2+
on:
3+
pull_request:
4+
branches:
5+
- master
6+
- release-*
7+
types:
8+
- opened
9+
- synchronize
10+
- reopened
11+
- labeled
12+
- unlabeled
13+
14+
jobs:
15+
validate-changelog:
16+
name: Check for valid changelog entry
17+
runs-on: ubuntu-latest
18+
permissions:
19+
contents: read
20+
steps:
21+
- name: Check out repository
22+
uses: actions/checkout@v4
23+
with:
24+
fetch-depth: '0'
25+
- name: Setup host
26+
uses: ./.github/actions/setup-ubuntu-host
27+
with:
28+
python-version: '${{ vars.PYTHON_VERSION }}'
29+
- name: Check if changelog entry file was added in this PR
30+
run: |
31+
set -o pipefail
32+
python -m scripts.release.check_changelog -b $BASE_SHA -f $FAIL_ON_NO_CHANGES | tee >> $GITHUB_STEP_SUMMARY
33+
env:
34+
BASE_SHA: ${{ github.event.pull_request.base.sha }}
35+
FAIL_ON_NO_CHANGES: ${{ !contains(github.event.pull_request.labels.*.name, 'skip-changelog') }}

.gitignore

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,6 @@ public/architectures/**/secrets/*
4343

4444
docker/mongodb-kubernetes-appdb/content/readinessprobe
4545
mongodb-kubernetes
46-
docker/mongodb-kubernetes-operator/Dockerfile
47-
docker/mongodb-kubernetes-database/Dockerfile
48-
docker/mongodb-enterprise-ops-manager/Dockerfile
49-
docker/mongodb-kubernetes-init-database/Dockerfile
50-
docker/mongodb-kubernetes-init-ops-manager/Dockerfile
5146
docker/mongodb-kubernetes-operator/content/mongodb-kubernetes-operator.tar
5247
docker/mongodb-kubernetes-tests/helm_chart/
5348
docker/mongodb-kubernetes-tests/public/

CONTRIBUTING.md

Lines changed: 47 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,51 @@
11
# Summary
2+
23
Contributing to the Mongodb Controllers for Kubernetes (MCK) project
3-
Pull requests are always welcome, and the MCK dev team appreciates any help the community can give to help make MongoDB better.
4+
Pull requests are always welcome, and the MCK dev team appreciates any help the community can give to help make MongoDB
5+
better.
6+
7+
## PR Prerequisites
48

5-
# PR Prerequisites
6-
* Please ensure you have signed our Contributor Agreement. You can find it [here](https://www.mongodb.com/legal/contributor-agreement).
9+
* Please ensure you have signed our Contributor Agreement. You can find
10+
it [here](https://www.mongodb.com/legal/contributor-agreement).
711
* Please ensure that all commits are signed.
12+
* Create a changelog file that will describe the changes you made. Use the `skip-changelog` label if your changes do not
13+
require a changelog entry.
14+
15+
## Changelog files and Release Notes
16+
17+
Each Pull Request usually has a changelog file that describes the changes made in the PR using Markdown syntax.
18+
Changelog files are placed in the `changelog/` directory and used to generate the Release Notes for the
19+
upcoming release. Preview of the Release Notes is automatically added as comment to each Pull Request.
20+
The changelog file needs to follow the naming convention
21+
`YYYYMMDD-<change_kind>-<short-description>.md`. To create changelog file please use the
22+
`scripts/release/create_changelog.py` script. Example usage:
23+
24+
```console
25+
python3 -m scripts.release.create_changelog --kind fix "Fix that I want to describe in the changelog"
26+
```
27+
28+
For more options, run the script with `--help`:
29+
30+
```console
31+
python3 -m scripts.release.create_changelog --help
32+
usage: create_changelog.py [-h] [-c ] [-d ] [-e] -k title
33+
34+
Utility to easily create a new changelog entry file.
35+
36+
positional arguments:
37+
title Title for the changelog entry
38+
39+
options:
40+
-h, --help show this help message and exit
41+
-c, --changelog-path
42+
Path to the changelog directory relative to a current working directory. Default is 'changelog/'
43+
-d, --date Date in 'YYYY-MM-DD' format to use for the changelog entry. Default is today's date
44+
-e, --editor Open the created changelog entry in the default editor (if set, otherwise uses 'vi'). Default is True
45+
-k, --kind Kind of the changelog entry:
46+
- 'prelude' for prelude entries
47+
- 'breaking' for breaking change entries
48+
- 'feature' for feature entries
49+
- 'fix' for bugfix entries
50+
- 'other' for other entries
51+
```

cmd/kubectl-mongodb/LICENSE-THIRD-PARTY

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,13 @@ github.com/golang/protobuf,v1.5.4,https://github.com/golang/protobuf/blob/v1.5.4
1111
github.com/google/gnostic-models,v0.6.8,https://github.com/google/gnostic-models/blob/v0.6.8/LICENSE,Apache-2.0
1212
github.com/google/gofuzz,v1.2.0,https://github.com/google/gofuzz/blob/v1.2.0/LICENSE,Apache-2.0
1313
github.com/google/uuid,v1.6.0,https://github.com/google/uuid/blob/v1.6.0/LICENSE,BSD-3-Clause
14-
github.com/gorilla/websocket,v1.5.0,https://github.com/gorilla/websocket/blob/v1.5.0/LICENSE,BSD-2-Clause
1514
github.com/imdario/mergo,v0.3.15,https://github.com/imdario/mergo/blob/v0.3.15/LICENSE,BSD-3-Clause
1615
github.com/josharian/intern,v1.0.0,https://github.com/josharian/intern/blob/v1.0.0/license.md,MIT
1716
github.com/json-iterator/go,v1.1.12,https://github.com/json-iterator/go/blob/v1.1.12/LICENSE,MIT
1817
github.com/mailru/easyjson,v0.7.7,https://github.com/mailru/easyjson/blob/v0.7.7/LICENSE,MIT
19-
github.com/moby/spdystream,v0.2.0,https://github.com/moby/spdystream/blob/v0.2.0/LICENSE,Apache-2.0
2018
github.com/modern-go/concurrent,v0.0.0-20180306012644-bacd9c7ef1dd,https://github.com/modern-go/concurrent/blob/bacd9c7ef1dd/LICENSE,Apache-2.0
2119
github.com/modern-go/reflect2,v1.0.2,https://github.com/modern-go/reflect2/blob/v1.0.2/LICENSE,Apache-2.0
2220
github.com/munnerz/goautoneg,v0.0.0-20191010083416-a7dc8b61c822,https://github.com/munnerz/goautoneg/blob/a7dc8b61c822/LICENSE,BSD-3-Clause
23-
github.com/mxk/go-flowrate/flowrate,v0.0.0-20140419014527-cca7078d478f,https://github.com/mxk/go-flowrate/blob/cca7078d478f/LICENSE,BSD-3-Clause
2421
github.com/spf13/cobra,v1.7.0,https://github.com/spf13/cobra/blob/v1.7.0/LICENSE.txt,Apache-2.0
2522
github.com/spf13/pflag,v1.0.5,https://github.com/spf13/pflag/blob/v1.0.5/LICENSE,BSD-3-Clause
2623
go.yaml.in/yaml/v2,v2.4.2,https://github.com/yaml/go-yaml/blob/v2.4.2/LICENSE,Apache-2.0
@@ -30,7 +27,7 @@ gopkg.in/yaml.v2,v2.4.0,https://github.com/go-yaml/yaml/blob/v2.4.0/LICENSE,Apac
3027
gopkg.in/yaml.v3,v3.0.1,https://github.com/go-yaml/yaml/blob/v3.0.1/LICENSE,MIT
3128
k8s.io/api,v0.30.10,https://github.com/kubernetes/api/blob/v0.30.10/LICENSE,Apache-2.0
3229
k8s.io/apimachinery/pkg,v0.30.10,https://github.com/kubernetes/apimachinery/blob/v0.30.10/LICENSE,Apache-2.0
33-
k8s.io/apimachinery/third_party/forked/golang,v0.30.10,https://github.com/kubernetes/apimachinery/blob/v0.30.10/third_party/forked/golang/LICENSE,BSD-3-Clause
30+
k8s.io/apimachinery/third_party/forked/golang/reflect,v0.30.10,https://github.com/kubernetes/apimachinery/blob/v0.30.10/third_party/forked/golang/LICENSE,BSD-3-Clause
3431
k8s.io/client-go,v0.30.10,https://github.com/kubernetes/client-go/blob/v0.30.10/LICENSE,Apache-2.0
3532
k8s.io/klog/v2,v2.130.1,https://github.com/kubernetes/klog/blob/v2.130.1/LICENSE,Apache-2.0
3633
k8s.io/kube-openapi/pkg,v0.0.0-20240228011516-70dd3763d340,https://github.com/kubernetes/kube-openapi/blob/70dd3763d340/LICENSE,Apache-2.0

cmd/kubectl-mongodb/debug/debug.go

Lines changed: 0 additions & 136 deletions
This file was deleted.

cmd/kubectl-mongodb/root/root.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ import (
99

1010
"github.com/spf13/cobra"
1111

12-
cmddebug "github.com/mongodb/mongodb-kubernetes/cmd/kubectl-mongodb/debug"
1312
"github.com/mongodb/mongodb-kubernetes/cmd/kubectl-mongodb/multicluster"
1413
"github.com/mongodb/mongodb-kubernetes/cmd/kubectl-mongodb/utils"
1514
)
@@ -25,7 +24,6 @@ of MongoDB resources in your kubernetes cluster.
2524

2625
func init() {
2726
rootCmd.AddCommand(multicluster.MulticlusterCmd)
28-
rootCmd.AddCommand(cmddebug.DebugCmd)
2927
}
3028

3129
// Execute adds all child commands to the root command and sets flags appropriately.

docker/mongodb-agent-non-matrix/Dockerfile

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
1-
ARG imagebase
2-
FROM ${imagebase} as base
1+
FROM scratch AS base
2+
3+
ARG agent_version
4+
ARG agent_distro
5+
ARG tools_version
6+
ARG tools_distro
7+
8+
ADD https://mciuploads.s3.amazonaws.com/mms-automation/mongodb-mms-build-agent/builds/automation-agent/prod/mongodb-mms-automation-agent-${agent_version}.${agent_distro}.tar.gz /data/mongodb-agent.tar.gz
9+
ADD https://downloads.mongodb.org/tools/db/mongodb-database-tools-${tools_distro}-${tools_version}.tgz /data/mongodb-tools.tgz
10+
11+
COPY ./docker/mongodb-kubernetes-init-database/content/LICENSE /data/LICENSE
312

413
FROM registry.access.redhat.com/ubi9/ubi-minimal
514

@@ -46,6 +55,12 @@ COPY --from=base /data/mongodb-agent.tar.gz /agent
4655
COPY --from=base /data/mongodb-tools.tgz /agent
4756
COPY --from=base /data/LICENSE /licenses/LICENSE
4857

58+
# Copy scripts to a safe location that won't be overwritten by volume mount
59+
COPY --from=base /opt/scripts/agent-launcher-shim.sh /usr/local/bin/agent-launcher-shim.sh
60+
COPY --from=base /opt/scripts/setup-agent-files.sh /usr/local/bin/setup-agent-files.sh
61+
COPY --from=base /opt/scripts/dummy-probe.sh /usr/local/bin/dummy-probe.sh
62+
COPY --from=base /opt/scripts/dummy-readinessprobe.sh /usr/local/bin/dummy-readinessprobe
63+
4964
RUN tar xfz /agent/mongodb-agent.tar.gz \
5065
&& mv mongodb-mms-automation-agent-*/mongodb-mms-automation-agent /agent/mongodb-agent \
5166
&& chmod +x /agent/mongodb-agent \

0 commit comments

Comments
 (0)