refactor: rename custom components from shannon-* to hightower-*
Renames API server, worker jobs, credentials secret, and workspaces PVC to use the hightower prefix. Upstream Shannon names (namespace, Temporal service, package imports, .shannon/ dir) are unchanged. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1,24 +1,24 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: shannon-api
|
||||
name: hightower-api
|
||||
namespace: shannon
|
||||
labels:
|
||||
app: shannon-api
|
||||
app: hightower-api
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: shannon-api
|
||||
app: hightower-api
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: shannon-api
|
||||
app: hightower-api
|
||||
spec:
|
||||
serviceAccountName: shannon-api
|
||||
serviceAccountName: hightower-api
|
||||
containers:
|
||||
- name: api
|
||||
image: ghcr.io/farhoodliquor/shannon-api:latest
|
||||
image: ghcr.io/farhoodliquor/hightower-api:latest
|
||||
ports:
|
||||
- containerPort: 3000
|
||||
name: http
|
||||
@@ -31,7 +31,7 @@ spec:
|
||||
value: shannon
|
||||
envFrom:
|
||||
- secretRef:
|
||||
name: shannon-credentials
|
||||
name: hightower-credentials
|
||||
volumeMounts:
|
||||
- name: workspaces
|
||||
mountPath: /app/workspaces
|
||||
@@ -56,4 +56,4 @@ spec:
|
||||
volumes:
|
||||
- name: workspaces
|
||||
persistentVolumeClaim:
|
||||
claimName: shannon-workspaces
|
||||
claimName: hightower-workspaces
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: Role
|
||||
metadata:
|
||||
name: shannon-api
|
||||
name: hightower-api
|
||||
namespace: shannon
|
||||
rules:
|
||||
- apiGroups: ["batch"]
|
||||
@@ -17,13 +17,13 @@ rules:
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: RoleBinding
|
||||
metadata:
|
||||
name: shannon-api
|
||||
name: hightower-api
|
||||
namespace: shannon
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: shannon-api
|
||||
name: hightower-api
|
||||
namespace: shannon
|
||||
roleRef:
|
||||
kind: Role
|
||||
name: shannon-api
|
||||
name: hightower-api
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: shannon-api
|
||||
name: hightower-api
|
||||
namespace: shannon
|
||||
spec:
|
||||
selector:
|
||||
app: shannon-api
|
||||
app: hightower-api
|
||||
ports:
|
||||
- name: http
|
||||
port: 3000
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
name: shannon-api
|
||||
name: hightower-api
|
||||
namespace: shannon
|
||||
|
||||
@@ -7,7 +7,7 @@ patches:
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: shannon-api
|
||||
name: hightower-api
|
||||
spec:
|
||||
template:
|
||||
spec:
|
||||
|
||||
@@ -33,6 +33,6 @@ export function loadConfig(): Config {
|
||||
k8sNamespace: process.env.K8S_NAMESPACE || 'shannon',
|
||||
workerImage,
|
||||
workspacesDir: process.env.WORKSPACES_DIR || '/app/workspaces',
|
||||
credentialsSecretName: process.env.CREDENTIALS_SECRET_NAME || 'shannon-credentials',
|
||||
credentialsSecretName: process.env.CREDENTIALS_SECRET_NAME || 'hightower-credentials',
|
||||
};
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@ export interface JobParams {
|
||||
readonly pipelineTesting?: boolean;
|
||||
}
|
||||
|
||||
const WORKER_LABEL = 'shannon-worker';
|
||||
const WORKER_LABEL = 'hightower-worker';
|
||||
const REPO_MOUNT_PATH = '/repo';
|
||||
|
||||
export function buildJobSpec(params: JobParams): k8s.V1Job {
|
||||
@@ -36,7 +36,7 @@ export function buildJobSpec(params: JobParams): k8s.V1Job {
|
||||
|
||||
// 2. Build volumes and mounts
|
||||
const volumes: k8s.V1Volume[] = [
|
||||
{ name: 'workspaces', persistentVolumeClaim: { claimName: 'shannon-workspaces' } },
|
||||
{ name: 'workspaces', persistentVolumeClaim: { claimName: 'hightower-workspaces' } },
|
||||
{ name: 'shm', emptyDir: { medium: 'Memory', sizeLimit: '2Gi' } },
|
||||
];
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
import type * as k8s from '@kubernetes/client-node';
|
||||
|
||||
const WORKER_LABEL = 'shannon-worker';
|
||||
const WORKER_LABEL = 'hightower-worker';
|
||||
|
||||
export async function createJob(batchApi: k8s.BatchV1Api, namespace: string, job: k8s.V1Job): Promise<void> {
|
||||
await batchApi.createNamespacedJob({ namespace, body: job });
|
||||
|
||||
@@ -26,10 +26,10 @@ export async function startScan(
|
||||
): Promise<ScanResponse> {
|
||||
const suffix = randomSuffix();
|
||||
const taskQueue = `api-${suffix}`;
|
||||
const jobName = `shannon-worker-${suffix}`;
|
||||
const jobName = `hightower-worker-${suffix}`;
|
||||
|
||||
const workspace =
|
||||
input.workspace ?? `${new URL(input.targetUrl).hostname.replace(/[^a-zA-Z0-9-]/g, '-')}_shannon-${Date.now()}`;
|
||||
input.workspace ?? `${new URL(input.targetUrl).hostname.replace(/[^a-zA-Z0-9-]/g, '-')}_hightower-${Date.now()}`;
|
||||
|
||||
const job = buildJobSpec({
|
||||
jobName,
|
||||
|
||||
Reference in New Issue
Block a user