Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add backfillredis cronjob, fix helm issue #185

Merged
merged 2 commits into from
Feb 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion charts/trusted-artifact-signer/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,4 @@ sources:
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.1.42
version: 0.1.43
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{{- if .Values.configs.rekor.backfillRedis.enabled }}
apiVersion: batch/v1
kind: CronJob
metadata:
name: backfill-redis
namespace: {{ .Values.configs.rekor.namespace }}
spec:
schedule: {{ .Values.configs.rekor.backfillRedis.schedule | quote }}
jobTemplate:
spec:
template:
spec:
containers:
- name: backfill-redis
image: "{{ template "image" .Values.configs.rekor.backfillRedis.image }}"
command: ["/bin/sh", "-c"]
args:
- >
endIndex=$(curl -sS http://rekor-server/api/v1/log | sed -E 's/.*"treeSize":([0-9]+).*/\1/');
endIndex=$((endIndex-1));
if [ $endIndex -lt 0 ]; then
echo "info: no rekor entries found";
exit 0;
fi;
backfill-redis --hostname=rekor-redis --port=6379 --rekor-address=http://rekor-server --start=0 --end=$endIndex
restartPolicy: OnFailure
{{- end }}
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ apiVersion: console.openshift.io/v1
kind: ConsoleCLIDownload
metadata:
name: cosign
labels:
app.kubernetes.io/managed-by: "Helm"
annotations:
meta.helm.sh/release-name: "trusted-artifact-signer"
meta.helm.sh/release-namespace: "trusted-artifact-signer"
spec:
description: cosign is a CLI tool that allows you to
manage sigstore artifacts.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ apiVersion: console.openshift.io/v1
kind: ConsoleCLIDownload
metadata:
name: enterprisecontract
labels:
app.kubernetes.io/managed-by: "Helm"
annotations:
meta.helm.sh/release-name: "trusted-artifact-signer"
meta.helm.sh/release-namespace: "trusted-artifact-signer"
spec:
description: Enterprise Contract is a tool for verifying signatures and performing policy checks on container images
displayName: Enterprise Contract - Command Line Interface (CLI)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ apiVersion: console.openshift.io/v1
kind: ConsoleCLIDownload
metadata:
name: gitsign
labels:
app.kubernetes.io/managed-by: "Helm"
annotations:
meta.helm.sh/release-name: "trusted-artifact-signer"
meta.helm.sh/release-namespace: "trusted-artifact-signer"
spec:
description: gitsign is a CLI tool that allows you to
digitally sign and verify git commits.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ apiVersion: console.openshift.io/v1
kind: ConsoleCLIDownload
metadata:
name: rekor-cli
labels:
app.kubernetes.io/managed-by: "Helm"
annotations:
meta.helm.sh/release-name: "trusted-artifact-signer"
meta.helm.sh/release-namespace: "trusted-artifact-signer"
spec:
description: rekor-cli is a CLI tool that allows you to
interact with rekor server.
Expand Down
15 changes: 9 additions & 6 deletions charts/trusted-artifact-signer/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,15 @@ configs:
- interval: 30s
port: 2112-tcp
scheme: http
backfillRedis:
enabled: true
schedule: "0 0 * * *"
image:
registry: registry.redhat.io
repository: rhtas-tech-preview/backfill-redis-rhel9
version: "sha256:028b3090bd0677351cc40de4a49246a5cdd57bdd2ad1668e4d7df0a7c01f20c7"
pullPolicy: IfNotPresent


fulcio:
namespace_create: true
Expand Down Expand Up @@ -297,12 +306,6 @@ scaffold:
repository: rhtas-tech-preview/createtree-rhel9
version: "sha256:ec13e102555022c210361da239ec3cfe2e0d7b7fc3fea51d40e75fcbc9658a42"
pullPolicy: IfNotPresent
backfillredis:
image:
registry: registry.redhat.io
repository: rhtas-tech-preview/backfill-redis-rhel9
version: "sha256:028b3090bd0677351cc40de4a49246a5cdd57bdd2ad1668e4d7df0a7c01f20c7"
pullPolicy: IfNotPresent
trillian:
enabled: true
forceNamespace: trillian-system
Expand Down
Loading