refactor: rename all custom K8s components to hightower
Namespace, Temporal, router, PVCs, labels, and GHCR API image all renamed from shannon-* to hightower-*. Upstream references preserved: worker image (ghcr.io/farhoodliquor/shannon), .shannon/ dirs, @shannon/worker package imports. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -2,7 +2,7 @@ apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: hightower-api
|
||||
namespace: shannon
|
||||
namespace: hightower
|
||||
labels:
|
||||
app: hightower-api
|
||||
spec:
|
||||
@@ -24,11 +24,11 @@ spec:
|
||||
name: http
|
||||
env:
|
||||
- name: TEMPORAL_ADDRESS
|
||||
value: shannon-temporal:7233
|
||||
value: hightower-temporal:7233
|
||||
- name: WORKER_IMAGE
|
||||
value: ghcr.io/farhoodliquor/shannon:latest
|
||||
- name: K8S_NAMESPACE
|
||||
value: shannon
|
||||
value: hightower
|
||||
envFrom:
|
||||
- secretRef:
|
||||
name: hightower-credentials
|
||||
|
||||
@@ -2,7 +2,7 @@ apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: Role
|
||||
metadata:
|
||||
name: hightower-api
|
||||
namespace: shannon
|
||||
namespace: hightower
|
||||
rules:
|
||||
- apiGroups: ["batch"]
|
||||
resources: ["jobs"]
|
||||
@@ -18,11 +18,11 @@ apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: RoleBinding
|
||||
metadata:
|
||||
name: hightower-api
|
||||
namespace: shannon
|
||||
namespace: hightower
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: hightower-api
|
||||
namespace: shannon
|
||||
namespace: hightower
|
||||
roleRef:
|
||||
kind: Role
|
||||
name: hightower-api
|
||||
|
||||
@@ -2,7 +2,7 @@ apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: hightower-api
|
||||
namespace: shannon
|
||||
namespace: hightower
|
||||
spec:
|
||||
selector:
|
||||
app: hightower-api
|
||||
|
||||
@@ -2,4 +2,4 @@ apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
name: hightower-api
|
||||
namespace: shannon
|
||||
namespace: hightower
|
||||
|
||||
@@ -28,9 +28,9 @@ export function loadConfig(): Config {
|
||||
|
||||
return {
|
||||
port: Number(process.env.PORT) || 3000,
|
||||
temporalAddress: process.env.TEMPORAL_ADDRESS || 'shannon-temporal:7233',
|
||||
temporalAddress: process.env.TEMPORAL_ADDRESS || 'hightower-temporal:7233',
|
||||
apiKey,
|
||||
k8sNamespace: process.env.K8S_NAMESPACE || 'shannon',
|
||||
k8sNamespace: process.env.K8S_NAMESPACE || 'hightower',
|
||||
workerImage,
|
||||
workspacesDir: process.env.WORKSPACES_DIR || '/app/workspaces',
|
||||
credentialsSecretName: process.env.CREDENTIALS_SECRET_NAME || 'hightower-credentials',
|
||||
|
||||
@@ -87,7 +87,7 @@ export function buildJobSpec(params: JobParams): k8s.V1Job {
|
||||
}
|
||||
|
||||
// 4. Env vars
|
||||
const env: k8s.V1EnvVar[] = [{ name: 'TEMPORAL_ADDRESS', value: 'shannon-temporal:7233' }];
|
||||
const env: k8s.V1EnvVar[] = [{ name: 'TEMPORAL_ADDRESS', value: 'hightower-temporal:7233' }];
|
||||
|
||||
// 5. Construct the Job
|
||||
return {
|
||||
@@ -98,8 +98,8 @@ export function buildJobSpec(params: JobParams): k8s.V1Job {
|
||||
namespace: params.namespace,
|
||||
labels: {
|
||||
app: WORKER_LABEL,
|
||||
'shannon.io/workspace': params.workspace,
|
||||
'shannon.io/scan-id': params.jobName,
|
||||
'hightower.io/workspace': params.workspace,
|
||||
'hightower.io/scan-id': params.jobName,
|
||||
},
|
||||
},
|
||||
spec: {
|
||||
@@ -109,7 +109,7 @@ export function buildJobSpec(params: JobParams): k8s.V1Job {
|
||||
metadata: {
|
||||
labels: {
|
||||
app: WORKER_LABEL,
|
||||
'shannon.io/workspace': params.workspace,
|
||||
'hightower.io/workspace': params.workspace,
|
||||
},
|
||||
},
|
||||
spec: {
|
||||
|
||||
@@ -106,7 +106,7 @@ export async function listScans(
|
||||
const jobs = await listWorkerJobs(batchApi, config.k8sNamespace);
|
||||
for (const job of jobs) {
|
||||
const jobName = job.metadata?.name ?? '';
|
||||
const workspace = job.metadata?.labels?.['shannon.io/workspace'] ?? jobName;
|
||||
const workspace = job.metadata?.labels?.['hightower.io/workspace'] ?? jobName;
|
||||
const startTime = job.status?.startTime;
|
||||
|
||||
results.push({
|
||||
|
||||
Reference in New Issue
Block a user