Skip to content

Commit

Permalink
Merge branch 'master' into import
Browse files Browse the repository at this point in the history
  • Loading branch information
anishbista60 authored Sep 21, 2024
2 parents 23c7fe2 + d207c41 commit fdf72cb
Show file tree
Hide file tree
Showing 97 changed files with 458 additions and 328 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/atlas-image-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
fetch-depth: 0
- uses: tj-actions/changed-files@e9772d140489982e0e3704fea5ee93d536f1e275 # v45.0.1
- uses: tj-actions/changed-files@48d8f15b2aaa3d255ca5af3eba4870f807ce6b3c # v45.0.2
name: Get changed files
id: changed-files
with:
Expand All @@ -39,7 +39,7 @@ jobs:
if: needs.check-files.outputs.changed == 'true'
steps:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@d70bba72b1f3fd22344832f00baa16ece964efeb # v3.3.0
uses: docker/setup-buildx-action@988b5a0280414f521da01fcc63a27aeeb4b104db # v3.6.1
- name: Image metadata
id: meta
uses: docker/metadata-action@8e5442c4ef9f78752691e2d8f8d19755c6f78e81 # v5.5.1
Expand All @@ -57,7 +57,7 @@ jobs:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@15560696de535e4014efeff63c48f16952e52dd1 # v6.2.0
uses: docker/build-push-action@5cd11c3a4ced054e52742c5fd54dca954e0edd85 # v6.7.0
with:
context: "{{defaultContext}}:docker/mongodb-atlas"
push: true
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/build_docker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
- name: Set up QEMU
uses: docker/setup-qemu-action@49b3bc8e6bdd4a60e6116a5414239cba5943d3cf # v3.2.0
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
uses: docker/setup-buildx-action@988b5a0280414f521da01fcc63a27aeeb4b104db # v3.6.1
- name: Login to GHCR
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0
with:
Expand All @@ -66,7 +66,7 @@ jobs:
${{ inputs.extra_tags }}
labels: ${{ inputs.labels }}
- name: Build and push
uses: docker/build-push-action@v6
uses: docker/build-push-action@5cd11c3a4ced054e52742c5fd54dca954e0edd85 # v6.7.0
with:
context: .
file: ${{ inputs.image_file }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/dependendy-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ jobs:
- name: 'Checkout Repository'
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: 'Dependency Review'
uses: actions/dependency-review-action@v4
uses: actions/dependency-review-action@5a2ce3f5b92ee19cbb1541a4984c76d921601d7c # v4.3.4
4 changes: 2 additions & 2 deletions .github/workflows/kanister-image-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ jobs:
- name: Set up QEMU
uses: docker/setup-qemu-action@49b3bc8e6bdd4a60e6116a5414239cba5943d3cf # v3.2.0
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@d70bba72b1f3fd22344832f00baa16ece964efeb # v3.3.0
uses: docker/setup-buildx-action@988b5a0280414f521da01fcc63a27aeeb4b104db # v3.6.1
- name: Image metadata
id: meta
uses: docker/metadata-action@8e5442c4ef9f78752691e2d8f8d19755c6f78e81 # v5.5.1
Expand All @@ -73,7 +73,7 @@ jobs:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@15560696de535e4014efeff63c48f16952e52dd1 # v6.2.0
uses: docker/build-push-action@5cd11c3a4ced054e52742c5fd54dca954e0edd85 # v6.7.0
with:
context: "{{defaultContext}}:docker/build"
platforms: linux/amd64,linux/arm64
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ jobs:
run: echo "${{needs.gomod.outputs.gomod}}" > go.mod
- name: restore_gosum
run: echo "${{needs.gomod.outputs.gosum}}" > go.sum
- uses: helm/[email protected]
- uses: helm/kind-action@0025e74a8c7512023d06dc019c617aa3cf561fde # v1.10.0
- run: |
make install-csi-hostpath-driver
make install-minio
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ossf-scorecard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
-
# Upload the results to GitHub's code scanning dashboard.
name: "Upload to results to dashboard"
uses: github/codeql-action/upload-sarif@4dd16135b69a43b6c8efb853346f8437d92d3c93 # v3.26.6
uses: github/codeql-action/upload-sarif@8214744c546c1e5c8f03dde8fab3a7353211988d # v3.26.7
with:
sarif_file: results.sarif
-
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ jobs:
export HELM_RELEASE_REPO_INDEX=https://charts.kanister.io/
make package-helm VERSION=${RELEASE_TAG}
- name: Free Disk Space (Ubuntu)
uses: jlumbroso/free-disk-space@main
uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be # v1.3.1
- name: gorelease
run: make gorelease
env:
Expand All @@ -102,7 +102,6 @@ jobs:
run: echo "release_url=https://github.com/kanisterio/kanister/releases/tag/${RELEASE_TAG}" >> "$GITHUB_OUTPUT"

build_docs:
runs-on: ubuntu-latest
needs: [run_if, release_packages]
permissions:
contents: read
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/triage-issues.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@ jobs:
steps:
-
name: Add label
uses: actions-ecosystem/[email protected]
uses: actions-ecosystem/action-add-labels@18f1af5e3544586314bbe15c0273249c770b2daf # v1.1.3
with:
labels: "triage"
github_token: ${{ secrets.GITHUB_TOKEN }}
-
name: Add comment
uses: actions-ecosystem/[email protected]
uses: actions-ecosystem/action-create-comment@e23bc59fbff7aac7f9044bd66c2dc0fe1286f80b # v1.0.2
if: github.event.action == 'opened'
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -37,7 +37,7 @@ jobs:
If you haven't already, please take a moment to review our project's [Code of Conduct](https://github.com/kanisterio/kanister/blob/master/CODE_OF_CONDUCT.md) document.
-
name: Update project
uses: alex-page/[email protected]
uses: alex-page/github-project-automation-plus@303f24a24c67ce7adf565a07e96720faf126fe36 # v0.9.0
with:
repo-token: ${{ secrets.GH_TOKEN }} # must use a PAT here
project: Kanister
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/triage-prs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
steps:
-
name: Comment
uses: actions-ecosystem/[email protected]
uses: actions-ecosystem/action-create-comment@e23bc59fbff7aac7f9044bd66c2dc0fe1286f80b # v1.0.2
# Avoid adding a comment when the PR is on the same repo.
if: github.event.action == 'opened' && github.event.pull_request.head.repo.fork
with:
Expand All @@ -31,7 +31,7 @@ jobs:
If you haven't already, please take a moment to review our project [contributing guideline](https://github.com/kanisterio/kanister/blob/master/CONTRIBUTING.md) and [Code of Conduct](https://github.com/kanisterio/kanister/blob/master/CODE_OF_CONDUCT.md) document.
-
name: Update status in project
uses: alex-page/[email protected]
uses: alex-page/github-project-automation-plus@303f24a24c67ce7adf565a07e96720faf126fe36 # v0.9.0
# This only works for PRs opened in the same repo and not by dependabot.
# Other PRs don't get the necessary credentials.
if: github.repository == 'kanisterio/kanister' && !github.event.pull_request.head.repo.fork
Expand Down
57 changes: 46 additions & 11 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,33 +1,68 @@
# Release Notes

## 0.111.0

### New Features

<!-- releasenotes/notes/pre-release-0.111.0-478149ddf5d56f80.yaml @ b'07949285eea9a1c7f0768bd8c8354d64278b0d82' -->
* Add support for Read-Only and Write Access Modes when connecting to the Kopia Repository Server in `kando`.

<!-- releasenotes/notes/pre-release-0.111.0-478149ddf5d56f80.yaml @ b'07949285eea9a1c7f0768bd8c8354d64278b0d82' -->
* Add support for Cache Size Limits to the `kopia server start` command.

<!-- releasenotes/notes/pre-release-0.111.0-478149ddf5d56f80.yaml @ b'07949285eea9a1c7f0768bd8c8354d64278b0d82' -->
* Add support to pass labels and annotations to the methods that create/clone VolumeSnapshot and VolumeSnapshotContent resources.

<!-- releasenotes/notes/pre-release-0.111.0-478149ddf5d56f80.yaml @ b'07949285eea9a1c7f0768bd8c8354d64278b0d82' -->
* Support `image` argument for `ExportRDSSnapshotToLocation` and `RestoreRDSSnapshot` functions to override default postgres-kanister-tools image.

<!-- releasenotes/notes/pre-release-0.111.0-478149ddf5d56f80.yaml @ b'07949285eea9a1c7f0768bd8c8354d64278b0d82' -->
* Added support to customise the labels and annotations of the temporary pods that are created by some Kanister functions.

<!-- releasenotes/notes/pre-release-0.111.0-478149ddf5d56f80.yaml @ b'07949285eea9a1c7f0768bd8c8354d64278b0d82' -->
* Added two new fields, `podLabels` and `podAnnotations`, to the ActionSet. These fields can be used to configure the labels and annotations of the Kanister function pod run by an ActionSet.

### Security Issues

<!-- releasenotes/notes/pre-release-0.111.0-478149ddf5d56f80.yaml @ b'07949285eea9a1c7f0768bd8c8354d64278b0d82' -->
* Update Go to 1.22.7 to pull in latest security updates.

### Other Notes

<!-- releasenotes/notes/pre-release-0.111.0-478149ddf5d56f80.yaml @ b'07949285eea9a1c7f0768bd8c8354d64278b0d82' -->
* Update ubi-minimal base image to ubi-minimal:9.4-1227.1725849298.

<!-- releasenotes/notes/pre-release-0.111.0-478149ddf5d56f80.yaml @ b'07949285eea9a1c7f0768bd8c8354d64278b0d82' -->
* Add `stylecheck`, `errcheck`, and `misspel` linters to test packages.

## 0.110.0

## New Features
### New Features

<!-- releasenotes/notes/pre-release-0.110.0-a47623540224894a.yaml @ b'ee13e8df9850ff4a5ead22c922120b13c80614a5' -->
<!-- releasenotes/notes/pre-release-0.110.0-a47623540224894a.yaml @ b'fffef729e348ce0cf8bba3646303460d5e37fe16' -->
* Split parallelism helm value into dataStore.parallelism.upload and dataStore.parallelism.download to be used separately in BackupDataUsingKopiaServer and RestoreDataUsingKopiaServer

## Bug Fixes
### Bug Fixes

<!-- releasenotes/notes/pre-release-0.110.0-a47623540224894a.yaml @ b'ee13e8df9850ff4a5ead22c922120b13c80614a5' -->
<!-- releasenotes/notes/pre-release-0.110.0-a47623540224894a.yaml @ b'fffef729e348ce0cf8bba3646303460d5e37fe16' -->
* Make pod writer exec wait for cat command to finish. Fixes race condition between cat cat command end exec termination.

<!-- releasenotes/notes/pre-release-0.110.0-a47623540224894a.yaml @ b'ee13e8df9850ff4a5ead22c922120b13c80614a5' -->
<!-- releasenotes/notes/pre-release-0.110.0-a47623540224894a.yaml @ b'fffef729e348ce0cf8bba3646303460d5e37fe16' -->
* Make sure all storage providers return similar error if snapshot doesn't exist, which is expected by DeleteVolumeSnapshot

## Other Notes
### Other Notes

<!-- releasenotes/notes/pre-release-0.110.0-a47623540224894a.yaml @ b'ee13e8df9850ff4a5ead22c922120b13c80614a5' -->
<!-- releasenotes/notes/pre-release-0.110.0-a47623540224894a.yaml @ b'fffef729e348ce0cf8bba3646303460d5e37fe16' -->
* Update ubi-minimal base image to ubi-minimal:9.4-1194

<!-- releasenotes/notes/pre-release-0.110.0-a47623540224894a.yaml @ b'ee13e8df9850ff4a5ead22c922120b13c80614a5' -->
<!-- releasenotes/notes/pre-release-0.110.0-a47623540224894a.yaml @ b'fffef729e348ce0cf8bba3646303460d5e37fe16' -->
* Update errkit to v0.0.2

<!-- releasenotes/notes/pre-release-0.110.0-a47623540224894a.yaml @ b'ee13e8df9850ff4a5ead22c922120b13c80614a5' -->
<!-- releasenotes/notes/pre-release-0.110.0-a47623540224894a.yaml @ b'fffef729e348ce0cf8bba3646303460d5e37fe16' -->
* Switch pkg/app to errkit

<!-- releasenotes/notes/pre-release-0.110.0-a47623540224894a.yaml @ b'ee13e8df9850ff4a5ead22c922120b13c80614a5' -->
<!-- releasenotes/notes/pre-release-0.110.0-a47623540224894a.yaml @ b'fffef729e348ce0cf8bba3646303460d5e37fe16' -->
* Switch pkg/kopia to errkit

<!-- releasenotes/notes/pre-release-0.110.0-a47623540224894a.yaml @ b'ee13e8df9850ff4a5ead22c922120b13c80614a5' -->
<!-- releasenotes/notes/pre-release-0.110.0-a47623540224894a.yaml @ b'fffef729e348ce0cf8bba3646303460d5e37fe16' -->
* Switch pkg/kube to errkit
41 changes: 22 additions & 19 deletions CHANGELOG_CURRENT.md
Original file line number Diff line number Diff line change
@@ -1,33 +1,36 @@
# Release Notes

## 0.110.0
## 0.111.0

## New Features

<!-- releasenotes/notes/pre-release-0.110.0-a47623540224894a.yaml @ b'ee13e8df9850ff4a5ead22c922120b13c80614a5' -->
* Split parallelism helm value into dataStore.parallelism.upload and dataStore.parallelism.download to be used separately in BackupDataUsingKopiaServer and RestoreDataUsingKopiaServer
<!-- releasenotes/notes/pre-release-0.111.0-478149ddf5d56f80.yaml @ b'07949285eea9a1c7f0768bd8c8354d64278b0d82' -->
* Add support for Read-Only and Write Access Modes when connecting to the Kopia Repository Server in `kando`.

## Bug Fixes
<!-- releasenotes/notes/pre-release-0.111.0-478149ddf5d56f80.yaml @ b'07949285eea9a1c7f0768bd8c8354d64278b0d82' -->
* Add support for Cache Size Limits to the `kopia server start` command.

<!-- releasenotes/notes/pre-release-0.110.0-a47623540224894a.yaml @ b'ee13e8df9850ff4a5ead22c922120b13c80614a5' -->
* Make pod writer exec wait for cat command to finish. Fixes race condition between cat cat command end exec termination.
<!-- releasenotes/notes/pre-release-0.111.0-478149ddf5d56f80.yaml @ b'07949285eea9a1c7f0768bd8c8354d64278b0d82' -->
* Add support to pass labels and annotations to the methods that create/clone VolumeSnapshot and VolumeSnapshotContent resources.

<!-- releasenotes/notes/pre-release-0.110.0-a47623540224894a.yaml @ b'ee13e8df9850ff4a5ead22c922120b13c80614a5' -->
* Make sure all storage providers return similar error if snapshot doesn't exist, which is expected by DeleteVolumeSnapshot
<!-- releasenotes/notes/pre-release-0.111.0-478149ddf5d56f80.yaml @ b'07949285eea9a1c7f0768bd8c8354d64278b0d82' -->
* Support `image` argument for `ExportRDSSnapshotToLocation` and `RestoreRDSSnapshot` functions to override default postgres-kanister-tools image.

## Other Notes
<!-- releasenotes/notes/pre-release-0.111.0-478149ddf5d56f80.yaml @ b'07949285eea9a1c7f0768bd8c8354d64278b0d82' -->
* Added support to customise the labels and annotations of the temporary pods that are created by some Kanister functions.

<!-- releasenotes/notes/pre-release-0.111.0-478149ddf5d56f80.yaml @ b'07949285eea9a1c7f0768bd8c8354d64278b0d82' -->
* Added two new fields, `podLabels` and `podAnnotations`, to the ActionSet. These fields can be used to configure the labels and annotations of the Kanister function pod run by an ActionSet.

<!-- releasenotes/notes/pre-release-0.110.0-a47623540224894a.yaml @ b'ee13e8df9850ff4a5ead22c922120b13c80614a5' -->
* Update ubi-minimal base image to ubi-minimal:9.4-1194
## Security Issues

<!-- releasenotes/notes/pre-release-0.110.0-a47623540224894a.yaml @ b'ee13e8df9850ff4a5ead22c922120b13c80614a5' -->
* Update errkit to v0.0.2
<!-- releasenotes/notes/pre-release-0.111.0-478149ddf5d56f80.yaml @ b'07949285eea9a1c7f0768bd8c8354d64278b0d82' -->
* Update Go to 1.22.7 to pull in latest security updates.

<!-- releasenotes/notes/pre-release-0.110.0-a47623540224894a.yaml @ b'ee13e8df9850ff4a5ead22c922120b13c80614a5' -->
* Switch pkg/app to errkit
## Other Notes

<!-- releasenotes/notes/pre-release-0.110.0-a47623540224894a.yaml @ b'ee13e8df9850ff4a5ead22c922120b13c80614a5' -->
* Switch pkg/kopia to errkit
<!-- releasenotes/notes/pre-release-0.111.0-478149ddf5d56f80.yaml @ b'07949285eea9a1c7f0768bd8c8354d64278b0d82' -->
* Update ubi-minimal base image to ubi-minimal:9.4-1227.1725849298.

<!-- releasenotes/notes/pre-release-0.110.0-a47623540224894a.yaml @ b'ee13e8df9850ff4a5ead22c922120b13c80614a5' -->
* Switch pkg/kube to errkit
<!-- releasenotes/notes/pre-release-0.111.0-478149ddf5d56f80.yaml @ b'07949285eea9a1c7f0768bd8c8354d64278b0d82' -->
* Add `stylecheck`, `errcheck`, and `misspel` linters to test packages.
7 changes: 7 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,13 @@ contributions are high quality and easy for our community to review and accept.
Please don't hesitate to reach out to us on [Slack](https://join.slack.com/t/kanisterio/shared_invite/enQtNzg2MDc4NzA0ODY4LTU1NDU2NDZhYjk3YmE5MWNlZWMwYzk1NjNjOGQ3NjAyMjcxMTIyNTE1YzZlMzgwYmIwNWFkNjU0NGFlMzNjNTk). if you
have any questions about contributing!

**Filling details in PR template**

While raising a pull request it's necessary to fill the details asked in the PR template. Some of the
fields might not be applicable for for the PR but filling up proper details for `Change Overview`
and `Test Plan` is a must. These fields help to set the necessary context related to the change made
in PR which helps significantly in reviewing the PR.

### Commit conventions

#### Types:
Expand Down
9 changes: 7 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ push-name:
version:
@echo $(VERSION)

.PHONY: deploy test codegen build-dirs run clean container-clean bin-clean docs start-kind tiller stop-kind release-snapshot go-mod-download
.PHONY: deploy format-vet go-test test codegen build-dirs run clean container-clean bin-clean docs start-kind tiller stop-kind release-snapshot go-mod-download

deploy: release-controller .deploy-$(DOTFILE_IMAGE)
.deploy-$(DOTFILE_IMAGE):
Expand All @@ -158,9 +158,14 @@ deploy: release-controller .deploy-$(DOTFILE_IMAGE)
bundle.yaml.in > .deploy-$(DOTFILE_IMAGE)
@kubectl apply -f .deploy-$(DOTFILE_IMAGE)

test: build-dirs
format-vet: build-dirs
@$(MAKE) run CMD="./build/format-vet.sh $(SRC_DIRS)"

go-test: build-dirs
@$(MAKE) run CMD="TEST_FILTER=$(TEST_FILTER) ./build/test.sh $(SRC_DIRS)"

test: format-vet go-test

helm-test: build-dirs
@$(MAKE) run CMD="./build/helm-test.sh $(SRC_DIRS)"

Expand Down
41 changes: 41 additions & 0 deletions build/format-vet.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
#!/bin/bash

# Copyright 2024 The Kanister Authors.
#
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

set -o errexit
set -o nounset

export CGO_ENABLED=0
export GO111MODULE=on

TARGETS=$(for d in "$@"; do echo ./$d/...; done)

echo -n "Checking gofmt: "
ERRS=$(find "$@" -type f -name \*.go | xargs gofmt -l 2>&1 || true)
if [ -n "${ERRS}" ]; then
echo "FAIL - the following files need to be gofmt'ed:"
for e in ${ERRS}; do
echo " $e"
done
echo
exit 1
fi
echo "PASS"
echo

echo -n "Checking go vet: "
go vet ${TARGETS}
echo "PASS"
25 changes: 0 additions & 25 deletions build/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,31 +33,6 @@ fi

TARGETS=$(for d in "$@"; do echo ./$d/...; done)

echo -n "Checking gofmt: "
ERRS=$(find "$@" -type f -name \*.go | xargs gofmt -l 2>&1 || true)
if [ -n "${ERRS}" ]; then
echo "FAIL - the following files need to be gofmt'ed:"
for e in ${ERRS}; do
echo " $e"
done
echo
exit 1
fi
echo "PASS"
echo

echo -n "Checking go vet: "
ERRS=$(go vet ${TARGETS} 2>&1 || true)
if [ -n "${ERRS}" ]; then
echo "FAIL"
echo "${ERRS}"
echo
# TODO: Renable govet. Currently generated code fails to pass go vet. report,
# but don't exit on failures.
#exit 1
fi
echo

check_dependencies() {
# Check if minio is already deployed. We suppress only `stdout` and not `stderr` to make sure we catch errors if `helm status` fails
if helm status minio -n minio 1> /dev/null ; then
Expand Down
Loading

0 comments on commit fdf72cb

Please sign in to comment.