Skip to content

Commit

Permalink
Merge branch 'k8up-io:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
eunames authored Aug 3, 2024
2 parents 4d6a756 + 7713061 commit 4ca6556
Show file tree
Hide file tree
Showing 27 changed files with 88 additions and 73 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/chart-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,19 @@ jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: '0'

- name: Determine Go version from go.mod
run: echo "GO_VERSION=$(go mod edit -json | jq -r .Go)" >> $GITHUB_ENV
working-directory: ./charts

- uses: actions/setup-go@v3
- uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}

- uses: actions/cache@v3
- uses: actions/cache@v4
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
Expand All @@ -36,7 +36,7 @@ jobs:
template:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Render Helm charts
run: find charts -type f -name Chart.yaml -exec .github/render-charts.sh {} \;
6 changes: 3 additions & 3 deletions .github/workflows/chart-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,18 @@ jobs:
smoke_test: "${binary} version"

- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: '0'

- name: Determine Go version from go.mod
run: echo "GO_VERSION=$(go mod edit -json | jq -r .Go)" >> $GITHUB_ENV

- uses: actions/setup-go@v3
- uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}

- uses: actions/cache@v3
- uses: actions/cache@v4
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/chart-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,19 @@ jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: '0'

- name: Determine Go version from go.mod
run: echo "GO_VERSION=$(go mod edit -json | jq -r .Go)" >> $GITHUB_ENV
working-directory: ./charts

- uses: actions/setup-go@v3
- uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}

- uses: actions/cache@v3
- uses: actions/cache@v4
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/docs-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,16 @@ jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Determine Go version from go.mod
run: echo "GO_VERSION=$(go mod edit -json | jq -r .Go)" >> $GITHUB_ENV

- uses: actions/setup-go@v3
- uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}

- uses: actions/cache@v3
- uses: actions/cache@v4
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
runs-on: ubuntu-latest
if: ${{ contains(github.ref, 'tags') }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Configure Git
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,16 @@ jobs:
e2e-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Determine Go version from go.mod
run: echo "GO_VERSION=$(go mod edit -json | jq -r .Go)" >> $GITHUB_ENV

- uses: actions/setup-go@v3
- uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}

- uses: actions/cache@v3
- uses: actions/cache@v4
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,16 @@ jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Determine Go version from go.mod
run: echo "GO_VERSION=$(go mod edit -json | jq -r .Go)" >> $GITHUB_ENV

- uses: actions/setup-go@v3
- uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}

- uses: actions/cache@v3
- uses: actions/cache@v4
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ jobs:
dist:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Determine Go version from go.mod
run: echo "GO_VERSION=$(go mod edit -json | jq -r .Go)" >> $GITHUB_ENV

- uses: actions/setup-go@v3
- uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}

Expand All @@ -23,7 +23,7 @@ jobs:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- uses: actions/cache@v3
- uses: actions/cache@v4
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
Expand All @@ -34,14 +34,14 @@ jobs:
run: make docker-build -e IMG_TAG=${GITHUB_REF#refs/heads/}

- name: Login to quay.io
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
registry: quay.io
username: ${{ secrets.QUAY_IO_USERNAME }}
password: ${{ secrets.QUAY_IO_PASSWORD }}

- name: Login to GHCR
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ jobs:
dist:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Determine Go version from go.mod
run: echo "GO_VERSION=$(go mod edit -json | jq -r .Go)" >> $GITHUB_ENV

- uses: actions/setup-go@v3
- uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}

Expand All @@ -25,22 +25,22 @@ jobs:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- uses: actions/cache@v3
- uses: actions/cache@v4
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Login to quay.io
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
registry: quay.io
username: ${{ secrets.QUAY_IO_USERNAME }}
password: ${{ secrets.QUAY_IO_PASSWORD }}

- name: Login to GHCR
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/scorecard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,12 @@ jobs:

steps:
- name: "Checkout code"
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
persist-credentials: false

- name: "Run analysis"
uses: ossf/scorecard-action@v2.3.1
uses: ossf/scorecard-action@v2.4.0
with:
results_file: results.sarif
results_format: sarif
Expand All @@ -59,14 +59,14 @@ jobs:
# Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF
# format to the repository Actions tab.
- name: "Upload artifact"
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3
uses: actions/upload-artifact@0b2256b8c012f0828dc542b3febcab082c67f72b # v4.3.4
with:
name: SARIF file
path: results.sarif
retention-days: 5

# Upload the results to GitHub's code scanning dashboard.
- name: "Upload to code-scanning"
uses: github/codeql-action/upload-sarif@17573ee1cc1b9d061760f3a006fc4aac4f944fd5 # v2.2.4
uses: github/codeql-action/upload-sarif@3e0e84636c6f5df46a2cb232ae1dd1384713150d # v2.25.15
with:
sarif_file: results.sarif
6 changes: 3 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,16 @@ jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Determine Go version from go.mod
run: echo "GO_VERSION=$(go mod edit -json | jq -r .Go)" >> $GITHUB_ENV

- uses: actions/setup-go@v3
- uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}

- uses: actions/cache@v3
- uses: actions/cache@v4
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM docker.io/library/alpine:3.19 as restic
FROM docker.io/library/alpine:3.20 as restic

RUN apk add --update --no-cache \
bash \
Expand All @@ -9,7 +9,7 @@ COPY go.mod fetch_restic.sh ./
RUN ./fetch_restic.sh /usr/local/bin/restic \
&& /usr/local/bin/restic version

FROM docker.io/library/alpine:3.19 as k8up
FROM docker.io/library/alpine:3.20 as k8up

ENTRYPOINT ["k8up"]

Expand Down
2 changes: 1 addition & 1 deletion charts/k8up/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ keywords:
- backup
- operator
- restic
version: 4.8.0
version: 4.8.1
sources:
- https://github.com/k8up-io/k8up
maintainers:
Expand Down
2 changes: 1 addition & 1 deletion charts/k8up/README.gotmpl.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
```bash
kubectl apply -f https://github.com/k8up-io/k8up/releases/download/k8up-{{ template "chart.version" . }}/k8up-crd.yaml
kubectl apply -f https://github.com/k8up-io/k8up/releases/download/k8up-{{ template "chart.version" . }}/k8up-crd.yaml --server-side
```

<!---
Expand Down
9 changes: 5 additions & 4 deletions charts/k8up/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# k8up

![Version: 4.8.0](https://img.shields.io/badge/Version-4.8.0-informational?style=flat-square)
![Version: 4.8.1](https://img.shields.io/badge/Version-4.8.1-informational?style=flat-square)

Kubernetes and OpenShift Backup Operator based on restic

Expand All @@ -13,7 +13,7 @@ helm repo add k8up-io https://k8up-io.github.io/k8up
helm install k8up k8up-io/k8up
```
```bash
kubectl apply -f https://github.com/k8up-io/k8up/releases/download/k8up-4.8.0/k8up-crd.yaml
kubectl apply -f https://github.com/k8up-io/k8up/releases/download/k8up-4.8.1/k8up-crd.yaml --server-side
```

<!---
Expand Down Expand Up @@ -48,7 +48,7 @@ Document your changes in values.yaml and let `make docs:helm` generate this sect
| image.pullPolicy | string | `"IfNotPresent"` | Operator image pull policy |
| image.registry | string | `"ghcr.io"` | Operator image registry |
| image.repository | string | `"k8up-io/k8up"` | Operator image repository |
| image.tag | string | `"v2.10.0"` | Operator image tag (version) |
| image.tag | string | `"v2.11.0"` | Operator image tag (version) |
| imagePullSecrets | list | `[]` | |
| k8up.backupImage.repository | string | `""` | The backup runner image repository. Defaults to `{image.registry}/{image.repository}`. Specify an image repository including registry, e.g. `example.com/repo/image` |
| k8up.backupImage.tag | string | `""` | The backup runner image tag Defaults to `{image.tag}` |
Expand All @@ -63,7 +63,7 @@ Document your changes in values.yaml and let `make docs:helm` generate this sect
| k8up.skipWithoutAnnotation | bool | `false` | Specifies whether K8up should ignore PVCs without the backup annotation (by default, `k8up.io/backup`) |
| k8up.timezone | string | `""` | Specifies the timezone K8up is using for scheduling. Empty value defaults to the timezone in which Kubernetes is deployed. Accepts `tz database` compatible entries, e.g. `Europe/Zurich` |
| metrics.grafanaDashboard.additionalLabels | object | `{}` | Add labels to the Grafana Dashboard object |
| metrics.grafanaDashboard.enable | bool | `false` | Whether to deploy the Grafana dashboard |
| metrics.grafanaDashboard.enabled | bool | `false` | Whether to deploy the Grafana dashboard |
| metrics.grafanaDashboard.namespace | string | `""` | If the object should be installed in a different namespace than operator |
| metrics.prometheusRule.additionalLabels | object | `{}` | Add labels to the PrometheusRule object |
| metrics.prometheusRule.additionalRules | list | `[]` | Provide additional alert rules in addition to the defaults |
Expand All @@ -84,6 +84,7 @@ Document your changes in values.yaml and let `make docs:helm` generate this sect
| nodeSelector | object | `{}` | |
| podAnnotations | object | `{}` | Annotations to add to the Pod spec. |
| podSecurityContext | object | `{}` | Security context to add to the Pod spec. |
| priorityClassName | string | `""` | The name of the priority class to use. |
| rbac.create | bool | `true` | Create cluster roles and rolebinding. May need elevated permissions to create cluster roles and -bindings. |
| replicaCount | int | `1` | How many operator pods should run. Note: Operator features leader election for K8s 1.16 and later, so that only 1 pod is reconciling/scheduling jobs. Follower pods reduce interruption time as they're on hot standby when leader is unresponsive. |
| resources.limits.memory | string | `"256Mi"` | Memory limit of K8up operator. See [supported units][resource-units]. |
Expand Down
3 changes: 3 additions & 0 deletions charts/k8up/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,9 @@ spec:
resources:
{{- toYaml .Values.resources | nindent 12 }}
serviceAccountName: {{ template "k8up.serviceAccountName" . }}
{{- with .Values.priorityClassName }}
priorityClassName: {{ . }}
{{- end }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
Expand Down
2 changes: 2 additions & 0 deletions charts/k8up/templates/grafana-dashboard.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- if .Values.metrics.grafanaDashboard.enabled -}}
kind: ConfigMap
apiVersion: v1
metadata:
Expand Down Expand Up @@ -1204,3 +1205,4 @@ data:
"weekStart": ""
}
`}}
{{- end -}}
Loading

0 comments on commit 4ca6556

Please sign in to comment.