-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Nikita Pavlovskiy
committed
Aug 10, 2023
1 parent
d0ab6f4
commit 2c2c733
Showing
36 changed files
with
468 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: carres-api-config | ||
data: | ||
database-url: jdbc:postgresql://postgres:5432/carres-prod | ||
keycloak-base-url: http://carres-keycloak:8080 | ||
keycloak-issuer-url: https://cars-reservation-sso.nikitades.com/realms/carres | ||
keycloak-realm: carres-prod |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: carres-api-deployment | ||
labels: | ||
app: carres-api | ||
spec: | ||
replicas: 1 | ||
selector: | ||
matchLabels: | ||
app: carres-api | ||
template: | ||
metadata: | ||
labels: | ||
app: carres-api | ||
spec: | ||
containers: | ||
- name: carres-api | ||
image: ghcr.io/nikitades/carres-api:latest | ||
ports: | ||
- containerPort: 8080 | ||
env: | ||
- name: SPRING_DATASOURCE_URL | ||
valueFrom: | ||
configMapKeyRef: | ||
name: carres-api-config | ||
key: database-url | ||
- name: SPRING_DATASOURCE_USERNAME | ||
valueFrom: | ||
secretKeyRef: | ||
name: carres-api-secret | ||
key: database-username | ||
- name: SPRING_DATASOURCE_PASSWORD | ||
valueFrom: | ||
secretKeyRef: | ||
name: carres-api-secret | ||
key: database-password | ||
- name: SPRING_JPA_DATABASE_PLATFORM | ||
value: org.hibernate.dialect.PostgreSQLDialect | ||
- name: SPRING_SECURITY_OAUTH2_RESOURCESERVER_JWT_ISSUER_URI | ||
valueFrom: | ||
configMapKeyRef: | ||
name: carres-api-config | ||
key: keycloak-issuer-url | ||
- name: KEYCLOAK_ADMIN_OAUTH_HOST | ||
valueFrom: | ||
configMapKeyRef: | ||
name: carres-api-config | ||
key: keycloak-base-url | ||
- name: KEYCLOAK_ADMIN_OAUTH_REALM | ||
valueFrom: | ||
configMapKeyRef: | ||
name: carres-api-config | ||
key: keycloak-realm | ||
- name: KEYCLOAK_ADMIN_OAUTH_CLIENT_ID | ||
valueFrom: | ||
secretKeyRef: | ||
name: carres-api-secret | ||
key: keycloak-client-id | ||
- name: KEYCLOAK_ADMIN_OAUTH_CLIENT_SECRET | ||
valueFrom: | ||
secretKeyRef: | ||
name: carres-api-secret | ||
key: keycloak-client-secret |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
apiVersion: networking.k8s.io/v1 | ||
kind: Ingress | ||
metadata: | ||
name: carres-api-ingress | ||
annotations: | ||
nginx.ingress.kubernetes.io/proxy-buffer-size: "128k" | ||
spec: | ||
rules: | ||
- host: cars-reservation-api.nikitades.com | ||
http: | ||
paths: | ||
- path: / | ||
pathType: Prefix | ||
backend: | ||
service: | ||
name: carres-api | ||
port: | ||
number: 8080 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: carres-api | ||
spec: | ||
selector: | ||
app: carres-api | ||
type: NodePort | ||
ports: | ||
- protocol: TCP | ||
port: 8080 | ||
targetPort: 8080 | ||
nodePort: 30000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: carres-keycloak-config | ||
data: | ||
database-url: jdbc:postgresql://postgres:5432/keycloak-prod |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: carres-keycloak-deployment | ||
labels: | ||
app: carres-keycloak | ||
spec: | ||
replicas: 1 | ||
selector: | ||
matchLabels: | ||
app: carres-keycloak | ||
template: | ||
metadata: | ||
labels: | ||
app: carres-keycloak | ||
spec: | ||
containers: | ||
- name: carres-keycloak | ||
image: ghcr.io/nikitades/carres-keycloak:latest | ||
args: | ||
[ | ||
"start", | ||
"--optimized", | ||
"--http-enabled=true", | ||
"--hostname-strict-https=false", | ||
"--hostname-strict=false", | ||
"--proxy=passthrough" | ||
] | ||
ports: | ||
- containerPort: 8080 | ||
env: | ||
- name: KC_DB_URL | ||
valueFrom: | ||
configMapKeyRef: | ||
name: carres-keycloak-config | ||
key: database-url | ||
- name: KC_DB_USERNAME | ||
valueFrom: | ||
secretKeyRef: | ||
name: carres-keycloak-secret | ||
key: kc-db-username | ||
- name: KC_DB_PASSWORD | ||
valueFrom: | ||
secretKeyRef: | ||
name: carres-keycloak-secret | ||
key: kc-db-password | ||
- name: KEYCLOAK_ADMIN | ||
valueFrom: | ||
secretKeyRef: | ||
name: carres-keycloak-secret | ||
key: admin-username | ||
- name: KEYCLOAK_ADMIN_PASSWORD | ||
valueFrom: | ||
secretKeyRef: | ||
name: carres-keycloak-secret | ||
key: admin-password |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
apiVersion: networking.k8s.io/v1 | ||
kind: Ingress | ||
metadata: | ||
name: carres-keycloak-ingress | ||
annotations: | ||
nginx.ingress.kubernetes.io/proxy-buffer-size: "128k" | ||
spec: | ||
rules: | ||
- host: cars-reservation-sso.nikitades.com | ||
http: | ||
paths: | ||
- path: / | ||
pathType: Prefix | ||
backend: | ||
service: | ||
name: carres-keycloak | ||
port: | ||
number: 8080 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: carres-keycloak | ||
spec: | ||
selector: | ||
app: carres-keycloak | ||
type: NodePort | ||
ports: | ||
- protocol: TCP | ||
port: 8080 | ||
targetPort: 8080 | ||
nodePort: 30001 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: carres-website-config | ||
data: | ||
nextauth-url: https://cars-reservation.nikitades.com | ||
nextauth-url-internal: http://localhost:3000 | ||
keycloak-issuer-url: https://cars-reservation-sso.nikitades.com/realms/carres | ||
api-url: https://cars-reservation-api.nikitades.com | ||
app-url: https://cars-reservation.nikitades.com |
Oops, something went wrong.