-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add tsa to scaffolding. Signed-off-by: Ville Aikas <[email protected]> * Deploy & test tsa. Signed-off-by: Ville Aikas <[email protected]> * Export TSA_URL in github test script. Signed-off-by: Ville Aikas <[email protected]> * doh, add the path to the ts query. Signed-off-by: Ville Aikas <[email protected]> Signed-off-by: Ville Aikas <[email protected]>
- Loading branch information
Showing
12 changed files
with
181 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
kind: Namespace | ||
apiVersion: v1 | ||
metadata: | ||
name: tsa-system |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
--- | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: Role | ||
metadata: | ||
namespace: tsa-system | ||
name: secret-operator | ||
rules: | ||
- apiGroups: [""] # "" indicates the core API group | ||
resources: ["secrets"] | ||
verbs: ["create", "get", "update"] | ||
--- | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: RoleBinding | ||
metadata: | ||
name: role-secret-operator | ||
namespace: tsa-system | ||
roleRef: | ||
apiGroup: rbac.authorization.k8s.io | ||
kind: Role | ||
name: secret-operator | ||
subjects: | ||
- kind: ServiceAccount | ||
name: createsecret | ||
namespace: tsa-system |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
apiVersion: v1 | ||
kind: ServiceAccount | ||
metadata: | ||
name: createsecret | ||
namespace: tsa-system |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
--- | ||
apiVersion: batch/v1 | ||
kind: Job | ||
metadata: | ||
name: createsecret | ||
namespace: tsa-system | ||
spec: | ||
# This number looks crazy, but on k8s 1.23 there does not seem to be | ||
# exponential backoff, so just keep on trying. For any other version | ||
# won't run this far by any chance. | ||
backoffLimit: 90 | ||
activeDeadlineSeconds: 300 | ||
ttlSecondsAfterFinished: 600 | ||
template: | ||
spec: | ||
serviceAccountName: createsecret | ||
restartPolicy: Never | ||
automountServiceAccountToken: true | ||
containers: | ||
- name: createsecret | ||
image: ko://github.com/sigstore/scaffolding/cmd/rekor/createsecret | ||
args: [ | ||
"--signing-secret=tsa-signing-secret", | ||
"--secret=tsa-pub-key" | ||
] | ||
env: | ||
- name: NAMESPACE | ||
valueFrom: | ||
fieldRef: | ||
fieldPath: metadata.namespace |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
kind: Namespace | ||
apiVersion: v1 | ||
metadata: | ||
name: tsa-system |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
--- | ||
apiVersion: v1 | ||
kind: ServiceAccount | ||
metadata: | ||
name: tsa | ||
namespace: tsa-system | ||
--- | ||
apiVersion: serving.knative.dev/v1 | ||
kind: Service | ||
metadata: | ||
namespace: tsa-system | ||
name: tsa | ||
spec: | ||
template: | ||
metadata: | ||
annotations: | ||
autoscaling.knative.dev/min-scale: "1" | ||
spec: | ||
serviceAccountName: tsa | ||
containers: | ||
- name: tsa | ||
# https://github.com/sigstore/timestamp-authority/pkgs/container/timestamp-server/47328709?tag=7053dd7448247db0180a061047ad782b269511ca | ||
# Resolved via crane digest 2022-11-08 | ||
image: ghcr.io/sigstore/timestamp-server@sha256:a7a604ca0c2d26a36db84cd2ebae509ee8d3ed575d90a3599e6e3c77cac741c0 | ||
ports: | ||
- containerPort: 3000 | ||
args: [ | ||
"serve", | ||
"--timestamp-signer=file", | ||
"--file-signer-key-path=/var/run/tsa-secrets/signing-secret", | ||
"--file-signer-passwd=$(SECRET_SIGNING_PWD)" | ||
] | ||
env: | ||
- name: SECRET_SIGNING_PWD | ||
valueFrom: | ||
secretKeyRef: | ||
name: tsa-signing-secret | ||
key: signing-secret-password | ||
volumeMounts: | ||
- name: tsa-secrets | ||
mountPath: "/var/run/tsa-secrets" | ||
readOnly: true | ||
volumes: | ||
- name: tsa-secrets | ||
secret: | ||
secretName: tsa-signing-secret | ||
items: | ||
- key: signing-secret | ||
path: signing-secret |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters