Compare commits

...
Sign in to create a new pull request.

4 commits

Author SHA1 Message Date
sync-test
301fc9acd5 chore: add networkpolicy.yaml to ollama kustomization
All checks were successful
sync-to-forgejo / sync (push) Successful in 19s
2026-07-06 01:50:49 +05:30
sync-test
b709d31b67 feat: Add NetworkPolicy for Ollama security on high-performance branch (Task 3) 2026-07-06 01:50:32 +05:30
sync-test
8f777775c9 test(ci): verify github-to-forgejo sync for gitops
All checks were successful
sync-to-forgejo / sync (push) Successful in 20s
2026-07-04 19:29:00 +05:30
Ashwin Kumar Sivakumar
3aa95c9d92 ci: sync GitHub pushes to Forgejo
Some checks failed
sync-to-forgejo / sync (push) Failing after 0s
2026-07-03 18:59:24 +05:30
3 changed files with 93 additions and 1 deletions

38
.github/workflows/sync-to-forgejo.yml vendored Normal file
View file

@ -0,0 +1,38 @@
name: sync-to-forgejo
on:
push:
branches:
- main
- high-performance
workflow_dispatch:
permissions:
contents: read
concurrency:
group: sync-to-forgejo-${{ github.ref }}
cancel-in-progress: true
jobs:
sync:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Configure Git
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
- name: Push to Forgejo
env:
FORGEJO_TOKEN: ${{ secrets.FORGEJO_TOKEN }}
run: |
set -euo pipefail
git remote add forgejo "https://admin:${FORGEJO_TOKEN}@ci.nxtgauge.com/ashwin/${{ github.event.repository.name }}.git" 2>/dev/null || \
git remote set-url forgejo "https://admin:${FORGEJO_TOKEN}@ci.nxtgauge.com/ashwin/${{ github.event.repository.name }}.git"
git push forgejo "HEAD:${GITHUB_REF#refs/heads/}" --force

View file

@ -4,4 +4,5 @@ resources:
- namespace.yaml
- pvc.yaml
- deployment.yaml
- service.yaml
- service.yaml
- networkpolicy.yaml

View file

@ -0,0 +1,53 @@
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
name: ollama-ingress-restriction
namespace: nxtgauge-ai
labels:
app: ollama
spec:
podSelector:
matchLabels:
app: ollama
policyTypes:
- Ingress
ingress:
# Allow traffic from users service (port 11434)
- from:
- namespaceSelector:
matchLabels:
name: default
podSelector:
matchLabels:
app: users
ports:
- protocol: TCP
port: 11434
# Allow traffic from payments service
- from:
- namespaceSelector:
matchLabels:
name: default
podSelector:
matchLabels:
app: payments
ports:
- protocol: TCP
port: 11434
# Allow traffic from nxtgauge-ai-assistant service
- from:
- namespaceSelector:
matchLabels:
name: nxtgauge-ai
podSelector:
matchLabels:
app: nxtgauge-ai-assistant
ports:
- protocol: TCP
port: 11434
# Allow traffic from within the same namespace (for health checks, etc.)
- from:
- podSelector: {}
ports:
- protocol: TCP
port: 11434