fix: server url을 infra 설정의 helm chart에 매핑된 value로 수정 #309
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
#️⃣연관된 이슈
📝작업 내용
ServerClientConfig 에서 배포 환경일 때에 올바른 yaml파일을 읽지 않아서 UserController가 깨지는 문제 수정
ServerClientConfig.kt에서
이 부분에서
원래 두번째 것을 읽어야 하는데 첫번째 것을 읽어서 생기는 문제를 해결하였습니다!
dev 환경이 아니기 때문에 dev.yml의 값을 읽지 않는다고 합니다
@yudonggeun 님이 infra 설정의 helm 차트에 Server의 url을 등록하고
https://github.com/kSideProject/kpring-infra/blob/main/charts/user/templates/deployment.yaml
{{- if .Values.global.enable.user }} apiVersion: apps/v1 kind: Deployment metadata: name: {{ .Values.service.name }} namespace: {{ .Release.namespace }} labels: app: {{ .Values.service.name }} spec: replicas: 1 selector: matchLabels: app: {{ .Values.service.name }} template: metadata: labels: app: {{ .Values.service.name }} spec: containers: - name: {{ .Values.service.name }} image: {{ .Values.service.image }}:{{ .Values.service.tag }} ports: - containerPort: {{ .Values.service.port }} env: - name: AUTH_SERVICE_URL value: {{ .Values.api.authServiceUrl }} - name: APPLICATION_PROFILE valueFrom: configMapKeyRef: name: profile-config key: profile - name: MYSQL_USERNAME value: {{ .Values.mysql.username }} - name: MYSQL_PASSWORD value: {{ .Values.mysql.password }} - name: MYSQL_URL value: {{ .Values.mysql.url }} - name: URL_SERVER value: {{ .Values.global.core.url.server }} {{- end }}
그것을 받아서 배포 환경에서 쓸 수 있도록 했습니다!
ServerClientConfig.kt에서
url.server에 매핑되는 값은
application.yml에서
helm차트에서 SERVER_URL이 될 수 있도록 했습니다!