Skip to content

Commit

Permalink
add k8s yml 🐎
Browse files Browse the repository at this point in the history
  • Loading branch information
coverseed committed Jan 16, 2024
1 parent a08e77c commit 0637e6f
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 4 deletions.
10 changes: 10 additions & 0 deletions k8s/application.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
polar:
greeting: Welcome to the book catalog from a development Kubernetes environment!
spring:
datasource:
url: jdbc:postgresql://polar-postgres/polardb_catalog
security:
oauth2:
resourceserver:
jwt:
issuer-uri: http://polar-keycloak/realms/PolarBookshop
27 changes: 23 additions & 4 deletions k8s/deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ spec:
metadata:
labels:
app: catalog-service
annotations:
prometheus.io/scrape: "true"
prometheus.io/path: /actuator/prometheus
prometheus.io/port: "9001"
spec:
containers:
- name: catalog-service
Expand All @@ -27,9 +31,24 @@ spec:
env:
- name: BPL_JVM_THREAD_COUNT
value: "50"
- name: SPRING_CLOUD_CONFIG_URI
value: http://config-service
- name: SPRING_DATASOURCE_URL
value: jdbc:postgresql://polar-postgres/polardb_catalog
- name: SPRING_PROFILES_ACTIVE
value: testdata
livenessProbe:
httpGet:
path: /actuator/health/liveness
port: 9001
initialDelaySeconds: 10
periodSeconds: 5
readinessProbe:
httpGet:
path: /actuator/health/readiness
port: 9001
initialDelaySeconds: 5
periodSeconds: 15
volumeMounts:
- name: catalog-config-volume
mountPath: /workspace/config
volumes:
- name: catalog-config-volume
configMap:
name: catalog-config
14 changes: 14 additions & 0 deletions k8s/kustomization.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

resources:
- deployment.yml
- service.yml

configMapGenerator:
- name: catalog-config
files:
- application.yml
options:
labels:
app: catalog-service

0 comments on commit 0637e6f

Please sign in to comment.