diff --git a/eventhub.httpapi.host.ingress.yaml b/eventhub.httpapi.host.ingress.yaml deleted file mode 100644 index e06c7e9..0000000 --- a/eventhub.httpapi.host.ingress.yaml +++ /dev/null @@ -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(/|$)(.*) - diff --git a/eventhub.identityserver.ingress.yaml b/eventhub.identityserver.ingress.yaml deleted file mode 100644 index f2900e0..0000000 --- a/eventhub.identityserver.ingress.yaml +++ /dev/null @@ -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: / diff --git a/eventhub.ingress.yaml b/eventhub.ingress.yaml deleted file mode 100644 index db3a3f1..0000000 --- a/eventhub.ingress.yaml +++ /dev/null @@ -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: / diff --git a/issuer.yml b/issuer.yml new file mode 100644 index 0000000..93e240d --- /dev/null +++ b/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 \ No newline at end of file diff --git a/manifests/deployment.eventhub.httpapi.host.yml b/manifests/deployment.eventhub.httpapi.host.yml index cefd47b..30b09a6 100644 --- a/manifests/deployment.eventhub.httpapi.host.yml +++ b/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: diff --git a/manifests/deployment.eventhub.identityserver.yml b/manifests/deployment.eventhub.identityserver.yml index 3150c4c..0b23f1f 100644 --- a/manifests/deployment.eventhub.identityserver.yml +++ b/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: diff --git a/manifests/deployment.eventhub.web.yml b/manifests/deployment.eventhub.web.yml index a64eae8..5bc0650 100644 --- a/manifests/deployment.eventhub.web.yml +++ b/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: diff --git a/manifests/eventhub.httpapi.host.ingress.yaml b/manifests/eventhub.httpapi.host.ingress.yaml new file mode 100644 index 0000000..8484cca --- /dev/null +++ b/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 diff --git a/manifests/eventhub.identityserver.ingress.yaml b/manifests/eventhub.identityserver.ingress.yaml new file mode 100644 index 0000000..c5fc1be --- /dev/null +++ b/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 diff --git a/manifests/eventhub.ingress.yaml b/manifests/eventhub.ingress.yaml new file mode 100644 index 0000000..2529910 --- /dev/null +++ b/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 + diff --git a/manifests/service.eventhub.httpapi.host.yml b/manifests/service.eventhub.httpapi.host.yml index f401a50..78f5439 100644 --- a/manifests/service.eventhub.httpapi.host.yml +++ b/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 diff --git a/manifests/service.eventhub.identityserver.yml b/manifests/service.eventhub.identityserver.yml index dd2b38e..77c5533 100644 --- a/manifests/service.eventhub.identityserver.yml +++ b/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 \ No newline at end of file + - port: 80 + targetPort: 80 + type: ClusterIP diff --git a/manifests/service.eventhub.web.yml b/manifests/service.eventhub.web.yml index c3e1e22..c1df77b 100644 --- a/manifests/service.eventhub.web.yml +++ b/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 \ No newline at end of file diff --git a/src/EventHub.HttpApi.Host/Program.cs b/src/EventHub.HttpApi.Host/Program.cs index 08c00d8..6a4c2f6 100644 --- a/src/EventHub.HttpApi.Host/Program.cs +++ b/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