yusuf karatoprak 5 years ago
parent
commit
4b1c3aa065
  1. 23
      eventhub.httpapi.host.ingress.yaml
  2. 18
      eventhub.identityserver.ingress.yaml
  3. 18
      eventhub.ingress.yaml
  4. 18
      issuer.yml
  5. 12
      manifests/deployment.eventhub.httpapi.host.yml
  6. 12
      manifests/deployment.eventhub.identityserver.yml
  7. 12
      manifests/deployment.eventhub.web.yml
  8. 24
      manifests/eventhub.httpapi.host.ingress.yaml
  9. 24
      manifests/eventhub.identityserver.ingress.yaml
  10. 25
      manifests/eventhub.ingress.yaml
  11. 4
      manifests/service.eventhub.httpapi.host.yml
  12. 10
      manifests/service.eventhub.identityserver.yml
  13. 8
      manifests/service.eventhub.web.yml
  14. 3
      src/EventHub.HttpApi.Host/Program.cs

23
eventhub.httpapi.host.ingress.yaml

@ -1,23 +0,0 @@
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: volosoft-eventhub-httpapi-host-static
namespace: ingress-basic
annotations:
kubernetes.io/ingress.class: nginx
nginx.ingress.kubernetes.io/ssl-redirect: "false"
nginx.ingress.kubernetes.io/use-regex: "true"
nginx.ingress.kubernetes.io/rewrite-target: /$1
spec:
rules:
- host: https://openeventhub.com/
http:
paths:
- backend:
service:
name: volosoft-eventhub-identityserver-service
port:
number: 80
path: /static(/|$)(.*)

18
eventhub.identityserver.ingress.yaml

@ -1,18 +0,0 @@
apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
name: volosoft-eventhub-identityserver-ingress
namespace: default
annotations:
kubernetes.io/ingress.class: nginx
#nginx.ingress.kubernetes.io/ssl-redirect: "false"
spec:
rules:
- host: web.eventhub.identityserver.gokhansengun.com
http:
paths:
- backend:
serviceName: volosoft-eventhub-identityserver-service
servicePort: 80
path: /

18
eventhub.ingress.yaml

@ -1,18 +0,0 @@
apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
name: volosoft-eventhub-web-ingress
namespace: default
annotations:
kubernetes.io/ingress.class: nginx
#nginx.ingress.kubernetes.io/ssl-redirect: "false"
spec:
rules:
- host: web.eventhub.gokhansengun.com
http:
paths:
- backend:
serviceName: volosoft-eventhub-web-service
servicePort: 80
path: /

18
issuer.yml

@ -0,0 +1,18 @@
apiVersion: cert-manager.io/v1
kind: Issuer
metadata:
name: letsencrypt-prod
spec:
acme:
# The ACME server URL
server: https://acme-v02.api.letsencrypt.org/directory
# Email address used for ACME registration
email: yusuf.karatoprak@volosoft.com
# Name of a secret used to store the ACME account private key
privateKeySecretRef:
name: letsencrypt-prod
# Enable the HTTP-01 challenge provider
solvers:
- http01:
ingress:
class: nginx

12
manifests/deployment.eventhub.httpapi.host.yml

@ -1,22 +1,22 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: volosoft-eventhub-httpapi-host-deployment
name: httpapi-host
spec:
selector:
matchLabels:
app: volosoft-eventhub-httpapi-host-pod
app: httpapi-host
template:
metadata:
labels:
app: volosoft-eventhub-httpapi-host-pod
app: httpapi-host
spec:
containers:
- name: volosoft-eventhub-httpapi-host-container
image: voloeventhubhttpapihost.azurecr.io/voloeventhubhttpapihost:latest
- name: httpapi-host
image: eventhubregistry.azurecr.io/eventhubregistry:v2
imagePullPolicy: Always
resources:
limits:
requests:
memory: "128Mi"
cpu: "500m"
ports:

12
manifests/deployment.eventhub.identityserver.yml

@ -1,22 +1,22 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: volosoft-eventhub-identityserver-deployment
name: identityserver
spec:
selector:
matchLabels:
app: volosoft-eventhub-identityserver-pod
app: identityserver
template:
metadata:
labels:
app: volosoft-eventhub-identityserver-pod
app: identityserver
spec:
containers:
- name: volosoft-eventhub-identityserver-container
image: voloeventhubidentityserver.azurecr.io/voloeventhubidentityserver
- name: identityserver
image: eventhubregistry.azurecr.io/eventhubregistry:v3
imagePullPolicy: Always
resources:
limits:
requests:
memory: "128Mi"
cpu: "500m"
ports:

12
manifests/deployment.eventhub.web.yml

@ -1,22 +1,22 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: volosoft-eventhub-web-deployment
name: web
spec:
selector:
matchLabels:
app: volosoft-eventhub-web-pod
app: web
template:
metadata:
labels:
app: volosoft-eventhub-web-pod
app: web
spec:
containers:
- name: volosoft-eventhub-web-container
image: voloeventhub.azurecr.io/voloeventhub
- name: web
image: eventhubregistry.azurecr.io/eventhubregistry:v4
imagePullPolicy: Always
resources:
limits:
requests:
memory: "128Mi"
cpu: "500m"
ports:

24
manifests/eventhub.httpapi.host.ingress.yaml

@ -0,0 +1,24 @@
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: httpapi-host
annotations:
kubernetes.io/ingress.class: nginx
nginx.ingress.kubernetes.io/ssl-redirect: "true"
cert-manager.io/issuer: letsencrypt-prod
spec:
tls:
- hosts:
- api.eventhub.gokhansengun.com
secretName: httpapi-host-tls
rules:
- host: api.eventhub.gokhansengun.com
http:
paths:
- backend:
service:
name: httpapi-host
port:
number: 80
path: /
pathType: Prefix

24
manifests/eventhub.identityserver.ingress.yaml

@ -0,0 +1,24 @@
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: identityserver
annotations:
kubernetes.io/ingress.class: nginx
nginx.ingress.kubernetes.io/ssl-redirect: "true"
cert-manager.io/issuer: letsencrypt-prod
spec:
tls:
- hosts:
- identityserver.eventhub.gokhansengun.com
secretName: identityserver-tls
rules:
- host: api.eventhub.gokhansengun.com
http:
paths:
- backend:
service:
name: identityserver
port:
number: 80
path: /
pathType: Prefix

25
manifests/eventhub.ingress.yaml

@ -0,0 +1,25 @@
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: web
annotations:
kubernetes.io/ingress.class: nginx
nginx.ingress.kubernetes.io/ssl-redirect: "true"
cert-manager.io/issuer: letsencrypt-prod
spec:
tls:
- hosts:
- api.eventhub.gokhansengun.com
secretName: web-tls
rules:
- host: web.eventhub.gokhansengun.com
http:
paths:
- backend:
service:
name: web
port:
number: 80
path: /
pathType: Prefix

4
manifests/service.eventhub.httpapi.host.yml

@ -1,10 +1,10 @@
apiVersion: v1
kind: Service
metadata:
name: volosoft-eventhub-httpapi-host-service
name: httpapi-host
spec:
selector:
app: volosoft-eventhub-httpapi-host-pod
app: httpapi-host
ports:
- port: 80
targetPort: 80

10
manifests/service.eventhub.identityserver.yml

@ -1,11 +1,11 @@
apiVersion: v1
kind: Service
metadata:
name: volosoft-eventhub-identityserver-service
name: identityserver
spec:
selector:
app: volosoft-eventhub-identityserver-pod
app: identityserver
ports:
- port: 80
targetPort: 80
type: ClusterIP
- port: 80
targetPort: 80
type: ClusterIP

8
manifests/service.eventhub.web.yml

@ -1,11 +1,11 @@
apiVersion: v1
kind: Service
metadata:
name: volosoft-eventhub-web-service
name: web
spec:
selector:
app: volosoft-eventhub-web-pod
app: web
ports:
- port: 80
targetPort: 80
- port: 80
targetPort: 80
type: ClusterIP

3
src/EventHub.HttpApi.Host/Program.cs

@ -19,7 +19,8 @@ namespace EventHub
.MinimumLevel.Override("Microsoft", LogEventLevel.Information)
.MinimumLevel.Override("Microsoft.EntityFrameworkCore", LogEventLevel.Warning)
.Enrich.FromLogContext()
.WriteTo.Async(c => c.File("Logs/logs.txt"))
//.WriteTo.Async(c => c.File("Logs/logs.txt"))
.WriteTo.Async(c => c.Console())
#if DEBUG
.WriteTo.Async(c => c.Console())
#endif

Loading…
Cancel
Save