Skip to content

Commit

Permalink
Adding specific app selector (#1039)
Browse files Browse the repository at this point in the history
Given we are now doing multiple sentries, we need to add a specific app
selector that is common to fuel-core or sentry deployments, this is just
an addition for it
  • Loading branch information
rfuelsh authored Feb 23, 2023
1 parent e55067c commit e451549
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
16 changes: 8 additions & 8 deletions deployment/charts/templates/fuel-core-deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ metadata:
spec:
selector:
matchLabels:
app: {{ template "fuel-core.name" . }}
app: {{ .Values.app.selector_name }}
endpoints:
- path: /metrics
port: http
Expand Down Expand Up @@ -42,15 +42,15 @@ kind: Service
apiVersion: v1
metadata:
labels:
app: {{ template "fuel-core.name" . }}
app: {{ .Values.app.selector_name }}
chart: {{ template "fuel-core.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
name: {{ template "fuel-core.name" . }}-lb-service
spec:
type: LoadBalancer
selector:
app: {{ template "fuel-core.name" . }}
app: {{ .Values.app.selector_name }}
ports:
- name: http
port: {{ .Values.app.http_port }}
Expand All @@ -62,15 +62,15 @@ kind: Service
apiVersion: v1
metadata:
labels:
app: {{ template "fuel-core.name" . }}
app: {{ .Values.app.selector_name }}
chart: {{ template "fuel-core.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
name: {{ template "fuel-core.name" . }}-service
spec:
type: NodePort
selector:
app: {{ template "fuel-core.name" . }}
app: {{ .Values.app.selector_name }}
ports:
- name: http
port: {{ .Values.app.http_port }}
Expand All @@ -86,22 +86,22 @@ kind: Deployment
metadata:
name: {{ template "fuel-core.name" . }}-k8s
labels:
app: {{ template "fuel-core.name" . }}
app: {{ .Values.app.selector_name }}
chart: {{ template "fuel-core.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
spec:
selector:
matchLabels:
app: {{ template "fuel-core.name" . }}
app: {{ .Values.app.selector_name }}
release: {{ .Release.Name }}
replicas: {{ .Values.app.replicas }}
strategy:
type: Recreate
template:
metadata:
labels:
app: {{ template "fuel-core.name" . }}
app: {{ .Values.app.selector_name }}
release: {{ .Release.Name }}
spec:
containers:
Expand Down
1 change: 1 addition & 0 deletions deployment/charts/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

app:
name: ${fuel_core_service_name}
selector_name: ${fuel_core_selector_name}
replicas: ${fuel_core_pod_replicas}
http_port: 80
target_port: 4000
Expand Down
1 change: 1 addition & 0 deletions deployment/scripts/.env
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ fuel_core_consensus_key_secret="dGVzdA=="

# allow multiple fuel-core nodes in the same namespace, also used for setting up reserved nodes
fuel_core_service_name="fuel-core"
fuel_core_selector_name="fuel-core"

fuel_core_p2p_key="0x123123123123"
# disables discovery using internal ip addresses
Expand Down

0 comments on commit e451549

Please sign in to comment.