Skip to content

Commit

Permalink
fix: clashes
Browse files Browse the repository at this point in the history
  • Loading branch information
Gowtham1729 committed Dec 13, 2023
1 parent 7d64901 commit e0cdfe7
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 41 deletions.
26 changes: 15 additions & 11 deletions applications/backend/django_server/news/views.py
Original file line number Diff line number Diff line change
@@ -1,23 +1,26 @@
from django.utils import timezone
from rest_framework import viewsets
from datetime import datetime, timedelta

from django.shortcuts import render
from django.utils import timezone
from rest_framework import viewsets

from .models import Analysis, News, Ticker
from .serializers import AnalysisSerializer, NewsSerializer, TickerSerializer


def home(request):
tickers = Ticker.objects.all()
analysis = Analysis.objects.all().filter(date=datetime.now().date() - timedelta(days=1))
analysis = Analysis.objects.all().filter(
date=datetime.now().date() - timedelta(days=1)
)
return render(
request,
"home.html",
{
'date': datetime.now().date() - timedelta(days=1),
'tickers': tickers,
'analysis_items': analysis,
}
"date": datetime.now().date() - timedelta(days=1),
"tickers": tickers,
"analysis_items": analysis,
},
)


Expand All @@ -28,12 +31,13 @@ def news(request, symbol, date):
request,
"news.html",
{
'date': date,
'symbol': symbol,
'news': news,
}
"date": date,
"symbol": symbol,
"news": news,
},
)


class NewsViewSet(viewsets.ReadOnlyModelViewSet):
queryset = News.objects.all()
serializer_class = NewsSerializer
Expand Down
9 changes: 1 addition & 8 deletions infrastructure/k8s/folio-feed-helm/templates/ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,9 @@ spec:
- http:
paths:
- path: /*
pathType: ImplementationSpecific
backend:
service:
name: {{ include "folio-feed.fullname" . }}-frontend
port:
number: 80
- path: /api/*
pathType: ImplementationSpecific
backend:
service:
name: {{ include "folio-feed.fullname" . }}-backend
port:
number: 80
number: 80
22 changes: 0 additions & 22 deletions infrastructure/k8s/folio-feed-helm/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,28 +27,6 @@ backend:
memory: 512Mi


frontend:
image:
registry: us-central1-docker.pkg.dev/folio-feed-403709/image-registry
repository: folio-feed-frontend
tag: &frontendImageTag aac17e42ad16314b40dca22cffbf6ac76457adb4

replicaCount: 1
autoscaling:
enabled: false
minReplicas: 1
maxReplicas: 3

nodeSelector:
cloud.google.com/gke-spot: "true"
cloud.google.com/compute-class: Scale-Out

resources:
# GKE Autopilot only considers requests. limits are same as requests.
requests:
cpu: 250m
memory: 512Mi

fetcher:
image:
registry: us-central1-docker.pkg.dev/folio-feed-403709/image-registry
Expand Down

0 comments on commit e0cdfe7

Please sign in to comment.