Skip to content

Commit

Permalink
Merge branch 'master' into fix-stale-workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
julio-lopez authored Oct 6, 2024
2 parents 599fae8 + 19f53db commit f376a9a
Show file tree
Hide file tree
Showing 20 changed files with 718 additions and 18 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/atlas-image-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
if: needs.check-files.outputs.changed == 'true'
steps:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@988b5a0280414f521da01fcc63a27aeeb4b104db # v3.6.1
uses: docker/setup-buildx-action@c47758b77c9736f4b2ef4073d4d51994fabfe349 # v3.7.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@5cd11c3a4ced054e52742c5fd54dca954e0edd85 # v6.7.0
uses: docker/build-push-action@4f58ea79222b3b9dc2c8bbdd6debcef730109a75 # v6.9.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@988b5a0280414f521da01fcc63a27aeeb4b104db # v3.6.1
uses: docker/setup-buildx-action@c47758b77c9736f4b2ef4073d4d51994fabfe349 # v3.7.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@5cd11c3a4ced054e52742c5fd54dca954e0edd85 # v6.7.0
uses: docker/build-push-action@4f58ea79222b3b9dc2c8bbdd6debcef730109a75 # v6.9.0
with:
context: .
file: ${{ inputs.image_file }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/govulncheck.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
echo "go_version=$version" >> "$GITHUB_OUTPUT"
- id: govulncheck
name: 'Govulncheck'
uses: golang/govulncheck-action@dd0578b371c987f96d1185abb54344b44352bd58 # v1.0.3
uses: golang/govulncheck-action@b625fbe08f3bccbe446d94fbf87fcc875a4f50ee # v1.0.4
continue-on-error: ${{ github.event_name == 'pull_request' }}
with:
repo-checkout: false
Expand Down
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@988b5a0280414f521da01fcc63a27aeeb4b104db # v3.6.1
uses: docker/setup-buildx-action@c47758b77c9736f4b2ef4073d4d51994fabfe349 # v3.7.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@5cd11c3a4ced054e52742c5fd54dca954e0edd85 # v6.7.0
uses: docker/build-push-action@4f58ea79222b3b9dc2c8bbdd6debcef730109a75 # v6.9.0
with:
context: "{{defaultContext}}:docker/build"
platforms: linux/amd64,linux/arm64
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@461ef6c76dfe95d5c364de2f431ddbd31a417628 # v3.26.9
uses: github/codeql-action/upload-sarif@6db8d6351fd0be61f9ed8ebd12ccd35dcec51fea # v3.26.11
with:
sarif_file: results.sarif
-
Expand Down
2 changes: 1 addition & 1 deletion docker/couchbase-tools/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM couchbase:enterprise-7.6.2
FROM couchbase:enterprise-7.6.3

MAINTAINER "Tom Manville <tom@kasten.io>"

Expand Down
2 changes: 1 addition & 1 deletion docker/kafka-adobes3Connector/image/adobeSink.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
ARG TOOLS_IMAGE
FROM ${TOOLS_IMAGE} AS TOOLS_IMAGE

FROM confluentinc/cp-kafka-connect:7.7.0
FROM confluentinc/cp-kafka-connect:7.7.1

USER root

Expand Down
2 changes: 1 addition & 1 deletion docker/kafka-adobes3Connector/image/adobeSource.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM confluentinc/cp-kafka-connect:7.7.0
FROM confluentinc/cp-kafka-connect:7.7.1

USER root

Expand Down
2 changes: 1 addition & 1 deletion docker/postgres-kanister-tools/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ ARG TOOLS_IMAGE
FROM ${TOOLS_IMAGE} AS TOOLS_IMAGE

# Actual image base
FROM postgres:16-bullseye
FROM postgres:17-bullseye

ENV DEBIAN_FRONTEND noninteractive

Expand Down
2 changes: 1 addition & 1 deletion docker/postgres-kanister-tools/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
awscli==1.34.26
awscli==1.34.29
pip==24.2
setuptools==75.1.0
wheel==0.44.0
2 changes: 1 addition & 1 deletion docker/postgresql/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
awscli==1.34.26
awscli==1.34.29
wal-e==1.1.1
pip==24.2
setuptools==75.1.0
Expand Down
76 changes: 76 additions & 0 deletions docs/functions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,82 @@ Example:
- |
echo "Example"
MultiContainerRun
-----------------

MultiContainerRun spins up a new pod with two containers connected
via shared `emptyDir`_ volume.
It's similar to KubeTask, but allows using multiple images to move backup data.
"background" container is one responsible for generating data, while "output" container
should export it to destination.
The main difference between these containers is that phase outputs can only be generated
from the "output" container.
The function also supports an optional init container to set up the volume contents.

.. csv-table::
:header: "Argument", "Required", "Type", "Description"
:align: left
:widths: 5,5,5,15

`namespace`, No, `string`, namespace in which to execute (the pod will be created in controller's namespace if not specified)
`backgroundImage`, Yes, `string`, image to be used in "background" container
`backgroundCommand`, Yes, `[]string`, command list to execute in "background" container
`outputImage`, Yes, `string`, image to be used in "output" container
`outputCommand`, Yes, `[]string`, command list to execute in "output" container
`initImage`, No, `string`, image to be used in init container of the pod
`initCommand`, No, `[]string`, command list to execute in init container of the pod
`podOverride`, No, `map[string]interface{}`, specs to override default pod specs with
`podAnnotations`, No, `map[string]string`, custom annotations for the temporary pod that gets created
`podLabels`, No, `map[string]string`, custom labels for the temporary pod that gets created
`sharedVolumeMedium`, No, `string`, medium setting for shared volume. See `emptyDir`_.
`sharedVolumeSizeLimit`, No, `string`, sizeLimit setting for shared volume. See `emptyDir`_.
`sharedVolumeDir`, No, `string`, directory to mount shared volume. Defaults to `/tmp`

.. _emptyDir: https://kubernetes.io/docs/concepts/storage/volumes/#emptydir

Example:

.. code-block:: yaml
:linenos:
- func: MultiContainerRun
name: examplePhase
args:
namespace: "{{ .Deployment.Namespace }}"
podOverride:
containers:
- name: export
imagePullPolicy: IfNotPresent
podAnnotations:
annKey: annValue
podLabels:
labelKey: labelValue
sharedVolumeMedium: Memory
sharedVolumeSizeLimit: 1Gi
sharedVolumeDir: /tmp/
initImage: ubuntu
initCommand:
- bash
- -c
- |
mkfifo /tmp/pipe-file
backgroundImage: ubuntu
backgroundCommand:
- bash
- -c
- |
for i in {1..10}
do
echo $i
sleep 0.1
done > /tmp/pipe-file
outputImage: ubuntu
outputCommand:
- bash
- -c
- |
cat /tmp/pipe-file
ScaleWorkload
-------------

Expand Down
3 changes: 3 additions & 0 deletions docs/spelling_wordlist.txt
Original file line number Diff line number Diff line change
Expand Up @@ -63,3 +63,6 @@ webhook
Kopia
kopia
hostname
emptyDir
sizeLimit
init
66 changes: 66 additions & 0 deletions docs_new/functions.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,72 @@ Example:
echo "Example"
```
### MultiContainerRun
MultiContainerRun spins up a new pod with two containers connected via shared [emptyDir](https://kubernetes.io/docs/concepts/storage/volumes/#emptydir) volume.
It's similar to KubeTask, but allows using multiple images to move backup data.
"background" container is one responsible for generating data, while "output" container
should export it to destination.
The main difference between these containers is that phase outputs can only be generated from the
"output" container.
The function also supports an optional init container to set up the volume contents.
| Argument | Required | Type | Description |
| ----------- | :------: | ----------------------- | ----------- |
| namespace | No | string | namespace in which to execute (the pod will be created in controller's namespace if not specified) |
| backgroundImage | Yes | string | image to be used in "background" container |
| backgroundCommand | Yes | []string | command list to execute in "background" container |
| outputImage | Yes | string | image to be used in "output" container |
| outputCommand | Yes | []string | command list to execute in "output" container |
| initImage | No | string | image to be used in init container of the pod |
| initCommand | No | []string | command list to execute in init container of the pod |
| podOverride | No | map[string]interface{} | specs to override default pod specs with |
| podAnnotations | No | map[string]string | custom annotations for the temporary pod that gets created |
| podLabels | No | map[string]string | custom labels for the temporary pod that gets created |
| sharedVolumeMedium | No | string | medium setting for shared volume. See [emptyDir](https://kubernetes.io/docs/concepts/storage/volumes/#emptydir). |
| sharedVolumeSizeLimit | No | string | sizeLimit setting for shared volume. See [emptyDir](https://kubernetes.io/docs/concepts/storage/volumes/#emptydir). |
| sharedVolumeDir | No | string | directory to mount shared volume, defaults to `/tmp` |


Example:

``` yaml
- func: MultiContainerRun
name: examplePhase
args:
namespace: "{{ .Deployment.Namespace }}"
podOverride:
containers:
- name: export
imagePullPolicy: IfNotPresent
podAnnotations:
annKey: annValue
podLabels:
labelKey: labelValue
sharedVolumeMedium: Memory
sharedVolumeSizeLimit: 1Gi
sharedVolumeDir: /tmp/
backgroundImage: ubuntu
backgroundCommand:
- bash
- -c
- |
mkfifo /tmp/pipe-file
for i in {1..10}
do
echo $i
sleep 0.1
done > /tmp/pipe-file
outputImage: ubuntu
outputCommand:
- bash
- -c
- |
while [ ! -e /tmp/pipe-file ]; do sleep 1; done
cat /tmp/pipe-file
```

### ScaleWorkload

ScaleWorkload is used to scale up or scale down a Kubernetes workload.
Expand Down
Loading

0 comments on commit f376a9a

Please sign in to comment.