Skip to content

Commit

Permalink
add nodePort service
Browse files Browse the repository at this point in the history
  • Loading branch information
pxsalehi committed Aug 11, 2020
1 parent 9053354 commit 76fe59e
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 31 deletions.
2 changes: 1 addition & 1 deletion templates/master_statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ spec:
metadata:
labels:
app: {{ .Values.master.labelValue }}
orientdb-cluster-member: "true"
{{ .Values.hazelcastDiscovery.podlabel.name }}: {{ .Values.hazelcastDiscovery.podlabel.value | quote }}
spec:
serviceAccountName: {{ .Values.serviceAccount.name }}
terminationGracePeriodSeconds: 30
Expand Down
2 changes: 2 additions & 0 deletions templates/replica_statefulset.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
{{- if gt .Values.replica.replicas 0 -}}
{{- end -}}
35 changes: 20 additions & 15 deletions templates/service.yaml
Original file line number Diff line number Diff line change
@@ -1,15 +1,20 @@
#apiVersion: v1
#kind: Service
#metadata:
# name: {{ include "orientdb.fullname" . }}
# labels:
# {{- include "orientdb.labels" . | nindent 4 }}
#spec:
# type: {{ .Values.service.type }}
# ports:
# - port: {{ .Values.service.port }}
# targetPort: http
# protocol: TCP
# name: http
# selector:
# {{- include "orientdb.selectorLabels" . | nindent 4 }}
{{- if .Values.service.nodePort.create -}}
apiVersion: v1
kind: Service
metadata:
name: {{ .Values.master.serviceName }}-service
namespace: {{ .Values.namespace }}
labels:
app: {{ .Values.master.labelValue }}
spec:
type: NodePort
ports:
- name: binary
port: {{ .Values.binaryPort }}
nodePort: {{ .Values.binaryNodePort }}
- name: http
port: {{ .Values.httpPort }}
nodePort: {{ .Values.httpNodePort }}
selector:
app: {{ .Values.master.labelValue }}
{{- end -}}
12 changes: 0 additions & 12 deletions templates/serviceaccount.yaml

This file was deleted.

6 changes: 3 additions & 3 deletions values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ master:
name: orientdb
serviceName: orientdb
labelValue: orientdb
replicas: 3
replicas: 2

replica:
name: orientdb-replica
Expand Down Expand Up @@ -48,6 +48,6 @@ volumes:
size: 100Mi

service:
type: ClusterIP
port: 80
nodePort:
create: true

0 comments on commit 76fe59e

Please sign in to comment.