Skip to content

Commit

Permalink
uf
Browse files Browse the repository at this point in the history
  • Loading branch information
shubhamv108 committed Aug 28, 2023
1 parent 1dc12f9 commit ebefcbf
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 2 deletions.
2 changes: 1 addition & 1 deletion compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ services:
- 'MYSQL_DATABASE=sse'
- 'MYSQL_PASSWORD=root1234'
- 'MYSQL_ROOT_PASSWORD=root1234'
- 'MYSQL_USER=test'
- 'MYSQL_USER=server'
ports:
- '3306:3306'

Expand Down
17 changes: 17 additions & 0 deletions k8s/mysql.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,22 @@ spec:
- image: mysql:latest
name: mysql
env:
- name: MYSQL_ROOT_PASSWORD
value: root1234
# valueFrom:
# secretKeyRef:
# name: mysql-pass-root
# key: password
- name: MYSQL_USER
value: server
- name: MYSQL_PASSWORD
value: root1234
# valueFrom:
# secretKeyRef:
# name: mysql-pass-user
# key: password
- name: MYSQL_DATABASE
value: sse
# Use secret in real usage
- name: MYSQL_ROOT_PASSWORD
value: root1234
Expand All @@ -76,6 +92,7 @@ metadata:
spec:
ports:
- port: 3306
targetPort: 3306
selector:
app: mysql
clusterIP: None
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/application.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## Spring DATASOURCE (DataSourceAutoConfiguration & DataSourceProperties)
spring.datasource.url=jdbc:mysql://mysql.mysql.svc:3306/sse?useSSL=false&serverTimezone=UTC&useLegacyDatetimeCode=false&autoReconnect=true&allowPublicKeyRetrieval=true&createDatabaseIfNotExist=true
spring.datasource.username=test
spring.datasource.username=server
spring.datasource.password=root1234
## Hibernate Properties
# The SQL dialect makes Hibernate generate better SQL for the chosen database
Expand Down

0 comments on commit ebefcbf

Please sign in to comment.