Skip to content

Commit

Permalink
NodePortやめてClusterIPに変更
Browse files Browse the repository at this point in the history
  • Loading branch information
na2na-p committed Jun 27, 2024
1 parent a64a320 commit 3222c73
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
5 changes: 2 additions & 3 deletions infra/k8s/web/templates/service.yaml
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
{{- if eq .Values.service.type "NodePort" }}
{{- if eq .Values.service.type "ClusterIP" }}
apiVersion: v1
kind: Service
metadata:
name: {{ include "web.fullname" . }}
labels:
{{- include "web.labels" . | nindent 4 }}
spec:
type: NodePort
type: ClusterIP
selector:
{{- include "web.selectorLabels" . | nindent 4 }}
ports:
- name: http
port: {{ .Values.service.port }}
targetPort: {{ .Values.service.port }}
nodePort: {{ .Values.service.nodePort }}
{{- end }}
3 changes: 1 addition & 2 deletions infra/k8s/web/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,8 @@ redis:

service:
host: "https://mk8stest.na2na.dev/"
type: NodePort
type: ClusterIP
port: 3000
nodePort: 30000

nodeSelector: {}

Expand Down

0 comments on commit 3222c73

Please sign in to comment.