Skip to content
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
9 changes: 9 additions & 0 deletions deploy/k3s/runner-it/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,15 @@ runner termination can bypass cleanup; runner temp cleanup on the next job
must still be retained. Merge both workflow and retry-action changes into
`tapdata-it/main` together, since reusable action references use `@main`.

## Office scan Gitee SSH credentials

The `runner-scan` and `runner-scan-common` Deployments mask the runner image's
legacy `/root/.ssh/id_rsa` with a read-only empty file. Workflows that need Gitee
SSH must use their own repository's `GITEE_SSH_KEY` and `GITEE_KNOWN_HOSTS`
Secrets in a job-scoped temporary directory, then remove that directory at job
completion. Do not bake or mount a Gitee private key into these shared runners;
otherwise jobs can inherit an identity from an earlier run.

The following runtime Secrets are intentionally not stored in Git:

- `runner-it-auth`: GitHub organization runner registration credentials.
Expand Down
28 changes: 28 additions & 0 deletions deploy/k3s/runner-it/remaining-runners.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,14 @@ spec:
hostAliases:
- ip: 192.168.1.184
hostnames: [fileserver.tapdata.net, nexus.tapdata.net]
initContainers:
- name: mask-image-gitee-key
image: harbor.internal.tapdata.io/tapdata/github-action-runner:5.12
imagePullPolicy: IfNotPresent
command: ["sh", "-ec", "umask 077; : > /ssh/id_rsa"]
volumeMounts:
- name: gitee-ssh-key
mountPath: /ssh
containers:
- name: runner
image: harbor.internal.tapdata.io/tapdata/github-action-runner:5.12
Expand Down Expand Up @@ -197,6 +205,10 @@ spec:
volumeMounts:
- name: docker-sock
mountPath: /var/run/docker.sock
- name: gitee-ssh-key
mountPath: /root/.ssh/id_rsa
subPath: id_rsa
readOnly: true
- name: java-truststore
mountPath: /usr/java/jdk-17.0.12/lib/security/cacerts
subPath: cacerts
Expand All @@ -210,6 +222,8 @@ spec:
secret:
secretName: runner-it-truststore
defaultMode: 0444
- name: gitee-ssh-key
emptyDir: {}
---
apiVersion: apps/v1
kind: Deployment
Expand Down Expand Up @@ -240,6 +254,14 @@ spec:
hostAliases:
- ip: 192.168.1.184
hostnames: [fileserver.tapdata.net, nexus.tapdata.net]
initContainers:
- name: mask-image-gitee-key
image: harbor.internal.tapdata.io/tapdata/github-action-runner:5.12
imagePullPolicy: IfNotPresent
command: ["sh", "-ec", "umask 077; : > /ssh/id_rsa"]
volumeMounts:
- name: gitee-ssh-key
mountPath: /ssh
containers:
- name: runner
image: harbor.internal.tapdata.io/tapdata/github-action-runner:5.12
Expand Down Expand Up @@ -272,11 +294,17 @@ spec:
volumeMounts:
- name: docker-sock
mountPath: /var/run/docker.sock
- name: gitee-ssh-key
mountPath: /root/.ssh/id_rsa
subPath: id_rsa
readOnly: true
volumes:
- name: docker-sock
hostPath:
path: /run/podman/podman.sock
type: Socket
- name: gitee-ssh-key
emptyDir: {}
---
apiVersion: apps/v1
kind: Deployment
Expand Down
Loading