Skip to content

Commit

Permalink
feat: quickstart running
Browse files Browse the repository at this point in the history
  • Loading branch information
like-a-bause committed Mar 31, 2023
1 parent a2953b0 commit aca320d
Show file tree
Hide file tree
Showing 21 changed files with 181 additions and 99 deletions.
45 changes: 0 additions & 45 deletions deploy/k8s/base/deployment.yaml

This file was deleted.

34 changes: 34 additions & 0 deletions deploy/k8s/base/elements/deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: hanko-elements
namespace: hanko-tenant
labels:
app: hanko-elements
spec:
replicas: 1
selector:
matchLabels:
app: hanko-elements
template:
metadata:
labels:
app: hanko-elements
spec:
containers:
- name: hanko-elements
image: ghcr.io/teamhanko/hanko/elements:main
imagePullPolicy: IfNotPresent
env:
- name: HANKO_URL
value: https://hanko.quickstart.test
- name: HANKO_URL_INTERNAL
value: http://hanko-public.svc
- name: HANKO_ELEMENT_URL
value: http://localhost:9500/elements.js
- name: HANKO_FRONTEND_SDK_URL
value: http://localhost:9500/sdk.modern.js
ports:
- name: http-public
containerPort: 80
protocol: TCP
26 changes: 26 additions & 0 deletions deploy/k8s/base/elements/ingress.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: hanko-elements
namespace: hanko-tenant
annotations:
kubernetes.io/ingress.class: "nginx"
cert-manager.io/cluster-issuer: "letsencrypt-prod"
nginx.ingress.kubernetes.io/ssl-redirect: "true"
nginx.ingress.kubernetes.io/force-ssl-redirect: "true"
spec:
tls:
- hosts:
- elements.quickstart.test
secretName: elements-tls
rules:
- host: elements.quickstart.test
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: elements
port:
name: http
4 changes: 4 additions & 0 deletions deploy/k8s/base/elements/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
resources:
- deployment.yaml
- service.yaml
- ingress.yaml
14 changes: 14 additions & 0 deletions deploy/k8s/base/elements/service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
apiVersion: v1
kind: Service
metadata:
name: elements
namespace: hanko-tenant
spec:
selector:
app: hanko-elements
ports:
- port: 80
targetPort: http-public
protocol: TCP
name: http
3 changes: 0 additions & 3 deletions deploy/k8s/base/kustomization.yaml

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
34 changes: 34 additions & 0 deletions deploy/k8s/base/quickstart/deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: hanko-quickstart
namespace: hanko-tenant
labels:
app: hanko-quickstart
spec:
replicas: 1
selector:
matchLabels:
app: hanko-quickstart
template:
metadata:
labels:
app: hanko-quickstart
spec:
containers:
- name: hanko-quickstart
image: ghcr.io/teamhanko/hanko/quickstart:main
imagePullPolicy: IfNotPresent
env:
- name: HANKO_URL
value: https://hanko.quickstart.test
- name: HANKO_URL_INTERNAL
value: http://hanko-public.svc
- name: HANKO_ELEMENT_URL
value: https://elements.quickstart.test/elements.js
- name: HANKO_FRONTEND_SDK_URL
value: https://elements.quickstart.test/sdk.modern.js
ports:
- name: http-public
containerPort: 8080
protocol: TCP
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
namespace: hanko
name: hanko
namespace: hanko-tenant
name: hanko-quickstart
annotations:
kubernetes.io/ingress.class: "nginx"
cert-manager.io/cluster-issuer: "letsencrypt-prod"
Expand All @@ -11,16 +11,16 @@ metadata:
spec:
tls:
- hosts:
- hanko.test
secretName: hanko-tls
- app.quickstart.test
secretName: quickstart-tls
rules:
- host: hanko.test
- host: app.quickstart.test
http:
paths:
- path: /api
- path: /
pathType: Prefix
backend:
service:
name: hanko
name: quickstart
port:
name: http
4 changes: 4 additions & 0 deletions deploy/k8s/base/quickstart/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
resources:
- deployment.yaml
- service.yaml
- ingress.yaml
14 changes: 14 additions & 0 deletions deploy/k8s/base/quickstart/service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
apiVersion: v1
kind: Service
metadata:
name: quickstart
namespace: hanko-tenant
spec:
selector:
app: hanko-quickstart
ports:
- port: 80
targetPort: http-public
protocol: TCP
name: http
27 changes: 0 additions & 27 deletions deploy/k8s/base/services.yaml

This file was deleted.

4 changes: 0 additions & 4 deletions deploy/k8s/overlays/quickstart/hanko-config.yaml

This file was deleted.

14 changes: 5 additions & 9 deletions deploy/k8s/overlays/quickstart/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
namespace: hanko
namespace: hanko-quickstart
resources:
- namespace.yaml
- ingress.yaml
- ../../base
- ../../postgres
configMapGenerator:
- files:
- hanko-config.yaml
name: hanko-config
- ../../base/postgres
- ../../base/hanko
- ../../base/elements
- ../../base/quickstart
4 changes: 0 additions & 4 deletions deploy/k8s/overlays/quickstart/namespace.yaml

This file was deleted.

6 changes: 6 additions & 0 deletions deploy/k8s/overlays/thirdparty-x-domain/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
namespace: hanko-thirdparty-x-domain
resources:
- ../../base/postgres
- ../../base/hanko
- ../../base/elements
- ../../base/quickstart
33 changes: 33 additions & 0 deletions skaffold.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
apiVersion: skaffold/v2beta29
kind: Config
metadata:
name: hanko-tenant
build:
artifacts:
- image: ghcr.io/teamhanko/hanko
context: backend
docker:
dockerfile: Dockerfile
- image: ghcr.io/teamhanko/hanko/quickstart
context: quickstart
docker:
dockerfile: Dockerfile
- image: ghcr.io/teamhanko/hanko/elements
context: frontend
docker:
dockerfile: Dockerfile
deploy:
kustomize:
paths:
- deploy/k8s/overlays/quickstart
profiles:
- name: quickstart
deploy:
kustomize:
paths:
- deploy/k8s/overlays/quickstart
- name: thirdparty
deploy:
kustomize:
paths:
- deploy/k8s/overlays/thirdparty

0 comments on commit aca320d

Please sign in to comment.