-
Notifications
You must be signed in to change notification settings - Fork 0
feat(slashbay): add prd-apps Fleet manifests #6
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
Open
surrealwolf
wants to merge
1
commit into
main
Choose a base branch
from
feat/slashbay-prd-apps
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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,32 @@ | ||
| # Fleet GitRepo — register this repo to deploy Coder + Slashbay to prd-apps | ||
| # Apply to the cluster where Fleet runs (e.g. Rancher management cluster): | ||
| # kubectl apply -f fleet-gitrepo.yaml | ||
| # | ||
| # If a GitRepo named gitops-dev-prd-apps already exists, add the slashbay | ||
| # path to spec.paths instead of creating a second GitRepo. | ||
| # | ||
| # Requires: Fleet installed, prd-apps cluster registered with label | ||
| # management.cattle.io/cluster-display-name=prd-apps | ||
| # Before Slashbay starts: create secrets — see slashbay/secrets/README.md | ||
| apiVersion: fleet.cattle.io/v1alpha1 | ||
| kind: GitRepo | ||
| metadata: | ||
| name: gitops-dev-prd-apps | ||
| namespace: fleet-default | ||
| labels: | ||
| app: gitops-dev | ||
| cluster: prd-apps | ||
| managed-by: gitops | ||
| spec: | ||
| repo: https://github.com/DataKnifeAI/gitops-dev.git | ||
| branch: main | ||
| paths: | ||
| - coder/overlays/prd-apps | ||
| - slashbay/overlays/prd-apps | ||
| targets: | ||
| - clusterSelector: | ||
| matchLabels: | ||
| management.cattle.io/cluster-display-name: prd-apps | ||
| correctDrift: | ||
| enabled: true | ||
| keepResources: true |
This file contains hidden or 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,36 @@ | ||
| # Slashbay | ||
|
|
||
| [Slashbay](https://github.com/DataKnifeAI/slashbay) — DataKnifeAI issue-webhook herald. Issues dock here, cheap-LLM triage decides if they are work, and a Coder workspace is berthed for a coding agent. | ||
|
|
||
| Image is built in GitLab CI (GitHub mirror) and pushed to Harbor. This repo only deploys it. | ||
|
|
||
| ## Target | ||
|
|
||
| | Item | Value | | ||
| |------|--------| | ||
| | Cluster | `prd-apps` | | ||
| | Namespace | `slashbay` | | ||
| | Image | `harbor.dataknife.net/library/slashbay` | | ||
| | Fleet path | `slashbay/overlays/prd-apps` | | ||
| | Ingress | `slashbay.dataknife.net` (nginx; GitHub/GitLab webhooks) | | ||
| | Coder | `https://coder.dataknife.net` (`CODER_ACCESS_URL`) | | ||
|
|
||
| ## Prerequisites | ||
|
|
||
| 1. Harbor image exists (`library/slashbay`) and `harbor-registry-secret` in namespace `slashbay` | ||
| 2. Application secret `slashbay-secrets` — see [secrets/README.md](secrets/README.md) | ||
| 3. DNS for `slashbay.dataknife.net` if webhooks must reach the cluster from GitHub/GitLab.com | ||
|
|
||
| ## Deployment | ||
|
|
||
| ```bash | ||
| kubectl config use-context prd-apps | ||
| # secrets first — see secrets/README.md | ||
| kubectl apply -k overlays/prd-apps/ | ||
| ``` | ||
|
|
||
| `overlays/prd-apps` is self-contained (no `../../base`) so Fleet can use that directory as the GitRepo path, same as Coder. | ||
|
|
||
| Leave `SLASHBAY_DRY_RUN=true` on the ConfigMap until secrets and Coder are ready. Pin the image tag after the first Harbor release (siblings pin `high-command-*:v0.N`). | ||
|
|
||
| App-repo copy of these manifests: [DataKnifeAI/slashbay](https://github.com/DataKnifeAI/slashbay) `deploy/`. |
This file contains hidden or 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,22 @@ | ||
| apiVersion: v1 | ||
| kind: ConfigMap | ||
| metadata: | ||
| name: slashbay-config | ||
| namespace: slashbay | ||
| labels: | ||
| app: slashbay | ||
| app.kubernetes.io/name: slashbay | ||
| data: | ||
| SLASHBAY_DRY_RUN: "true" | ||
| SLASHBAY_STATE_DSN: "sqlite:////data/slashbay.db" | ||
| SLASHBAY_REPO_ALLOWLIST: "DataKnifeAI/*" | ||
| SLASHBAY_TRIGGER_EVENTS: "opened,reopened" | ||
| SLASHBAY_MAX_CONCURRENT: "3" | ||
| SLASHBAY_TRIAGE_MODEL: "gpt-5-nano" | ||
| SLASHBAY_TRIAGE_ESCALATE_MODEL: "gpt-5.6-luna" | ||
| SLASHBAY_TRIAGE_ESCALATE_BELOW: "0.7" | ||
| CODER_ACCESS_URL: "https://coder.dataknife.net" | ||
| CODER_TEMPLATE: "dkai-agent" | ||
| CODER_WORKSPACE_OWNER: "me" | ||
| GITHUB_API_URL: "https://api.github.com" | ||
| GITLAB_API_URL: "https://gitlab.com/api/v4" |
This file contains hidden or 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,87 @@ | ||
| apiVersion: apps/v1 | ||
| kind: Deployment | ||
| metadata: | ||
| name: slashbay | ||
| namespace: slashbay | ||
| labels: | ||
| app: slashbay | ||
| app.kubernetes.io/name: slashbay | ||
| spec: | ||
| replicas: 1 | ||
| selector: | ||
| matchLabels: | ||
| app: slashbay | ||
| template: | ||
| metadata: | ||
| labels: | ||
| app: slashbay | ||
| app.kubernetes.io/name: slashbay | ||
| spec: | ||
| serviceAccountName: slashbay | ||
| imagePullSecrets: | ||
| - name: harbor-registry-secret | ||
| securityContext: | ||
| runAsNonRoot: true | ||
| runAsUser: 1000 | ||
| runAsGroup: 1000 | ||
| containers: | ||
| - name: slashbay | ||
| image: harbor.dataknife.net/library/slashbay:latest | ||
| imagePullPolicy: Always | ||
| ports: | ||
| - name: http | ||
| containerPort: 8080 | ||
| protocol: TCP | ||
| envFrom: | ||
| - configMapRef: | ||
| name: slashbay-config | ||
| - secretRef: | ||
| name: slashbay-secrets | ||
| optional: true | ||
| env: | ||
| - name: SLASHBAY_HOST | ||
| value: "0.0.0.0" | ||
| - name: SLASHBAY_PORT | ||
| value: "8080" | ||
| livenessProbe: | ||
| httpGet: | ||
| path: /healthz | ||
| port: http | ||
| initialDelaySeconds: 10 | ||
| periodSeconds: 30 | ||
| timeoutSeconds: 5 | ||
| successThreshold: 1 | ||
| failureThreshold: 3 | ||
| readinessProbe: | ||
| httpGet: | ||
| path: /healthz | ||
| port: http | ||
| initialDelaySeconds: 5 | ||
| periodSeconds: 10 | ||
| timeoutSeconds: 3 | ||
| successThreshold: 1 | ||
| failureThreshold: 2 | ||
| resources: | ||
| requests: | ||
| cpu: 100m | ||
| memory: 128Mi | ||
| limits: | ||
| cpu: 500m | ||
| memory: 512Mi | ||
| securityContext: | ||
| readOnlyRootFilesystem: true | ||
| allowPrivilegeEscalation: false | ||
| capabilities: | ||
| drop: | ||
| - ALL | ||
| volumeMounts: | ||
| - name: data | ||
| mountPath: /data | ||
| - name: tmp | ||
| mountPath: /tmp | ||
| volumes: | ||
| - name: data | ||
| persistentVolumeClaim: | ||
| claimName: slashbay-data | ||
| - name: tmp | ||
| emptyDir: {} |
This file contains hidden or 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,10 @@ | ||
| apiVersion: kustomize.config.k8s.io/v1beta1 | ||
| kind: Kustomization | ||
|
|
||
| resources: | ||
| - namespace.yaml | ||
| - serviceaccount.yaml | ||
| - configmap.yaml | ||
| - pvc.yaml | ||
| - deployment.yaml | ||
| - service.yaml |
This file contains hidden or 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,7 @@ | ||
| apiVersion: v1 | ||
| kind: Namespace | ||
| metadata: | ||
| name: slashbay | ||
| labels: | ||
| app.kubernetes.io/name: slashbay | ||
| managed-by: gitops |
This file contains hidden or 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,14 @@ | ||
| apiVersion: v1 | ||
| kind: PersistentVolumeClaim | ||
| metadata: | ||
| name: slashbay-data | ||
| namespace: slashbay | ||
| labels: | ||
| app: slashbay | ||
| app.kubernetes.io/name: slashbay | ||
| spec: | ||
| accessModes: | ||
| - ReadWriteOnce | ||
| resources: | ||
| requests: | ||
| storage: 1Gi |
This file contains hidden or 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,17 @@ | ||
| apiVersion: v1 | ||
| kind: Service | ||
| metadata: | ||
| name: slashbay | ||
| namespace: slashbay | ||
| labels: | ||
| app: slashbay | ||
| app.kubernetes.io/name: slashbay | ||
| spec: | ||
| type: ClusterIP | ||
| selector: | ||
| app: slashbay | ||
| ports: | ||
| - name: http | ||
| port: 80 | ||
| targetPort: http | ||
| protocol: TCP |
This file contains hidden or 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,8 @@ | ||
| apiVersion: v1 | ||
| kind: ServiceAccount | ||
| metadata: | ||
| name: slashbay | ||
| namespace: slashbay | ||
| labels: | ||
| app: slashbay | ||
| app.kubernetes.io/name: slashbay |
This file contains hidden or 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,22 @@ | ||
| apiVersion: v1 | ||
| kind: ConfigMap | ||
| metadata: | ||
| name: slashbay-config | ||
| namespace: slashbay | ||
| labels: | ||
| app: slashbay | ||
| app.kubernetes.io/name: slashbay | ||
| data: | ||
| SLASHBAY_DRY_RUN: "true" | ||
| SLASHBAY_STATE_DSN: "sqlite:////data/slashbay.db" | ||
| SLASHBAY_REPO_ALLOWLIST: "DataKnifeAI/*" | ||
| SLASHBAY_TRIGGER_EVENTS: "opened,reopened" | ||
| SLASHBAY_MAX_CONCURRENT: "3" | ||
| SLASHBAY_TRIAGE_MODEL: "gpt-5-nano" | ||
| SLASHBAY_TRIAGE_ESCALATE_MODEL: "gpt-5.6-luna" | ||
| SLASHBAY_TRIAGE_ESCALATE_BELOW: "0.7" | ||
| CODER_ACCESS_URL: "https://coder.dataknife.net" | ||
| CODER_TEMPLATE: "dkai-agent" | ||
| CODER_WORKSPACE_OWNER: "me" | ||
| GITHUB_API_URL: "https://api.github.com" | ||
| GITLAB_API_URL: "https://gitlab.com/api/v4" |
This file contains hidden or 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,88 @@ | ||
| apiVersion: apps/v1 | ||
| kind: Deployment | ||
| metadata: | ||
| name: slashbay | ||
| namespace: slashbay | ||
| labels: | ||
| app: slashbay | ||
| app.kubernetes.io/name: slashbay | ||
| spec: | ||
| replicas: 1 | ||
| selector: | ||
| matchLabels: | ||
| app: slashbay | ||
| template: | ||
| metadata: | ||
| labels: | ||
| app: slashbay | ||
| app.kubernetes.io/name: slashbay | ||
| spec: | ||
| serviceAccountName: slashbay | ||
| imagePullSecrets: | ||
| - name: harbor-registry-secret | ||
| # Omit fsGroup — TrueNAS CSI NFS can fail kubelet applyFSGroup (same as Coder postgres). | ||
| securityContext: | ||
| runAsNonRoot: true | ||
| runAsUser: 1000 | ||
| runAsGroup: 1000 | ||
| containers: | ||
| - name: slashbay | ||
| image: harbor.dataknife.net/library/slashbay:latest | ||
| imagePullPolicy: Always | ||
| ports: | ||
| - name: http | ||
| containerPort: 8080 | ||
| protocol: TCP | ||
| envFrom: | ||
| - configMapRef: | ||
| name: slashbay-config | ||
| - secretRef: | ||
| name: slashbay-secrets | ||
| optional: true | ||
| env: | ||
| - name: SLASHBAY_HOST | ||
| value: "0.0.0.0" | ||
| - name: SLASHBAY_PORT | ||
| value: "8080" | ||
| livenessProbe: | ||
| httpGet: | ||
| path: /healthz | ||
| port: http | ||
| initialDelaySeconds: 10 | ||
| periodSeconds: 30 | ||
| timeoutSeconds: 5 | ||
| successThreshold: 1 | ||
| failureThreshold: 3 | ||
| readinessProbe: | ||
| httpGet: | ||
| path: /healthz | ||
| port: http | ||
| initialDelaySeconds: 5 | ||
| periodSeconds: 10 | ||
| timeoutSeconds: 3 | ||
| successThreshold: 1 | ||
| failureThreshold: 2 | ||
| resources: | ||
| requests: | ||
| cpu: 100m | ||
| memory: 128Mi | ||
| limits: | ||
| cpu: 500m | ||
| memory: 512Mi | ||
| securityContext: | ||
| readOnlyRootFilesystem: true | ||
| allowPrivilegeEscalation: false | ||
| capabilities: | ||
| drop: | ||
| - ALL | ||
| volumeMounts: | ||
| - name: data | ||
| mountPath: /data | ||
| - name: tmp | ||
| mountPath: /tmp | ||
| volumes: | ||
| - name: data | ||
| persistentVolumeClaim: | ||
| claimName: slashbay-data | ||
| - name: tmp | ||
| emptyDir: {} | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔒 Agentic Security Review
Severity: MEDIUM
Using a mutable image tag (
:latest) in a production deployment allows the runtime artifact to change without a corresponding Git change to this PR-managed manifest.Impact: If an attacker (or compromised CI/registry credential) can retag/push that repository, the cluster can pull and run unreviewed code on restart/rollout, weakening GitOps integrity and enabling supply-chain compromise.
Reviewed by Cursor Security Reviewer for commit 448b5f5. Configure here.