Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 0 additions & 11 deletions .helm/templates/configs/cm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,3 @@ data:
{{ $conf_key }}: {{ $conf_value | quote }}
{{- end}}
DB_HOST: {{ .Release.Name }}-postgresql
---
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ include "sunflower.fullname" . }}-docs
labels:
{{- include "sunflower.labels.docs" . | nindent 4 }}
data:
{{- range $conf_key,$conf_value := .Values.docs.configs }}
{{ $conf_key }}: {{ $conf_value | quote }}
{{- end}}
9 changes: 0 additions & 9 deletions .helm/templates/configs/secret.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,3 @@ metadata:
labels:
{{- include "sunflower.labels.application" . | nindent 4 }}
data:

---
apiVersion: v1
kind: Secret
metadata:
name: {{ include "sunflower.fullname" . }}-docs
labels:
{{- include "sunflower.labels.docs" . | nindent 4 }}
data:
66 changes: 0 additions & 66 deletions .helm/templates/docs/deployment.yaml

This file was deleted.

53 changes: 0 additions & 53 deletions .helm/templates/docs/ingress-werf.yaml

This file was deleted.

61 changes: 0 additions & 61 deletions .helm/templates/docs/ingress.yaml

This file was deleted.

15 changes: 0 additions & 15 deletions .helm/templates/docs/service.yaml

This file was deleted.

16 changes: 0 additions & 16 deletions .helm/templates/docs/serviceaccount.yaml

This file was deleted.

77 changes: 0 additions & 77 deletions .helm/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -147,80 +147,3 @@ application:
tolerations: []

affinity: {}


docs:
nodeSelector: {}

tolerations: []

affinity: {}

resources: {}
# We usually recommend not to specify default resources and to leave this as a conscious
# choice for the user. This also increases chances charts run on environments with little
# resources, such as Minikube. If you do want to specify resources, uncomment the following
# lines, adjust them as necessary, and remove the curly braces after 'resources:'.
# limits:
# cpu: 100m
# memory: 128Mi
# requests:
# cpu: 100m
# memory: 128Mi
configs: {}
# ENV_NAME: eaxmple

replicaCount: 1

image:
repository: ghcr.io/amazeit/sunflower/sunflower
pullPolicy: IfNotPresent
# Overrides the image tag whose default is the chart appVersion.
tag:

imagePullSecrets: []
nameOverride: ""
fullnameOverride: ""

serviceAccount:
# Specifies whether a service account should be created
create: true
# Annotations to add to the service account
annotations: {}
# The name of the service account to use.
# If not set and create is true, a name is generated using the fullname template
name: ""

podAnnotations: {}

podSecurityContext: {}
# fsGroup: 2000

securityContext: {}
# capabilities:
# drop:
# - ALL
# readOnlyRootFilesystem: true
# runAsNonRoot: true
# runAsUser: 1000

service:
type: ClusterIP
port: 80

ingress:
enabled: false
className: ""
annotations:
external-dns.kubernetes.io/class: cloudflare
# nginx.ingress.kubernetes.io/rewrite-target: /$2
# nginx.ingress.kubernetes.io/use-regex: "true"
hosts:
- host: api.example.local
paths:
- path: /docs/
pathType: ImplementationSpecific
tls: []
# - secretName: chart-example-tls
# hosts:
# - chart-example.local
23 changes: 21 additions & 2 deletions ocsp/views.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from cryptography.x509 import ocsp
from django.http import HttpResponse
from django.views.decorators.csrf import csrf_exempt
from django_filters.rest_framework import DjangoFilterBackend
from django_filters import rest_framework
from rest_framework import permissions, viewsets
from rest_framework.response import Response

Expand Down Expand Up @@ -124,7 +124,7 @@ class SourceViewSet(viewsets.ModelViewSet):
queryset = Source.objects.all()
serializer_class = SourceSerializer
permission_classes = [permissions.IsAuthenticated]
filter_backends = [DjangoFilterBackend]
filter_backends = [rest_framework.DjangoFilterBackend]
filterset_fields = ["name", "host", "addr"]

def create(self, request, *args, **kwargs):
Expand Down Expand Up @@ -185,10 +185,29 @@ def list(self, request, *args, **kwargs):
return super().list(request, *args, **kwargs)


class RequestLogFilterSet(rest_framework.FilterSet):
date = rest_framework.DateFromToRangeFilter()
cert = rest_framework.ModelChoiceFilter(
queryset=Certificate.objects.all(), null_label="null"
)

class Meta:
model = RequestLog
fields = [
"date",
"cert",
"host",
"addr",
"result",
]


class RequestLogViewSet(viewsets.ModelViewSet):
queryset = RequestLog.objects.all()
serializer_class = RequestLogSerializer
permission_classes = [permissions.IsAuthenticated]
filter_backends = [rest_framework.DjangoFilterBackend]
filterset_class = RequestLogFilterSet

http_method_names = ["get"]

Expand Down
2 changes: 1 addition & 1 deletion sunflower/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,6 @@
name="redoc",
),
# Non versioned views
path("crl/<str:ca_slug>.<str:format>", crl_view, name="crl"),
path("crl/<int:ca_sn>.<str:format>", crl_view, name="crl"),
path("ocsp/", ocsp_view, name="ocsp"),
]
4 changes: 0 additions & 4 deletions werf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,3 @@ project: sunflower
image: application
dockerfile: Dockerfile
context: .
---
image: docs
dockerfile: docs/Dockerfile
context: .
Loading