Skip to content

Commit

Permalink
Fixing issue when service label selector used Release.Name - overridd…
Browse files Browse the repository at this point in the history
…ing with more general fullnameOverride (#44)
  • Loading branch information
nzenchik authored Nov 6, 2024
1 parent 96df411 commit 2d1cadd
Show file tree
Hide file tree
Showing 11 changed files with 34 additions and 28 deletions.
6 changes: 6 additions & 0 deletions charts/blockscout-stack/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# ChangeLog

## 1.7.1

### Fix

- Service selector labels now support fullnameOverride variable instead of Release.Name

## 1.7.0

### Feature
Expand Down
4 changes: 2 additions & 2 deletions charts/blockscout-stack/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 1.7.0
version: 1.7.1

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes.
appVersion: "6.8.0"
appVersion: "6.9.0"
12 changes: 6 additions & 6 deletions charts/blockscout-stack/templates/blockscout-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ kind: Deployment
metadata:
name: {{ include "blockscout-stack.fullname" . }}-blockscout
labels:
app: {{ .Release.Name }}-blockscout
app: {{ include "blockscout-stack.fullname" . }}-blockscout
{{- include "blockscout-stack.labels" . | nindent 4 }}
spec:
{{- if .Values.blockscout.separateApi.enabled }}
Expand All @@ -14,7 +14,7 @@ spec:
{{- end }}
selector:
matchLabels:
app: {{ .Release.Name }}-blockscout
app: {{ include "blockscout-stack.fullname" . }}-blockscout
template:
metadata:
annotations:
Expand All @@ -23,7 +23,7 @@ spec:
{{- toYaml . | nindent 8 }}
{{- end }}
labels:
app: {{ .Release.Name }}-blockscout
app: {{ include "blockscout-stack.fullname" . }}-blockscout
{{- include "blockscout-stack.selectorLabels" . | nindent 8 }}
spec:
{{- with .Values.imagePullSecrets }}
Expand Down Expand Up @@ -227,13 +227,13 @@ kind: Deployment
metadata:
name: {{ include "blockscout-stack.fullname" . }}-blockscout-indexer
labels:
app: {{ .Release.Name }}-blockscout-indexer
app: {{ include "blockscout-stack.fullname" . }}-blockscout-indexer
{{- include "blockscout-stack.labels" . | nindent 4 }}
spec:
replicas: {{ .Values.blockscout.replicaCount }}
selector:
matchLabels:
app: {{ .Release.Name }}-blockscout-indexer
app: {{ include "blockscout-stack.fullname" . }}-blockscout-indexer
template:
metadata:
annotations:
Expand All @@ -242,7 +242,7 @@ spec:
{{- toYaml . | nindent 8 }}
{{- end }}
labels:
app: {{ .Release.Name }}-blockscout-indexer
app: {{ include "blockscout-stack.fullname" . }}-blockscout-indexer
{{- include "blockscout-stack.selectorLabels" . | nindent 8 }}
spec:
{{- with .Values.imagePullSecrets }}
Expand Down
4 changes: 2 additions & 2 deletions charts/blockscout-stack/templates/blockscout-service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ kind: Service
metadata:
name: {{ include "blockscout-stack.fullname" . }}-blockscout-svc
labels:
app: {{ .Release.Name }}-blockscout-svc
app: {{ include "blockscout-stack.fullname" . }}-blockscout-svc
{{- include "blockscout-stack.labels" . | nindent 4 }}
spec:
type: {{ .Values.blockscout.service.type }}
Expand All @@ -14,5 +14,5 @@ spec:
protocol: TCP
name: http
selector:
app: {{ .Release.Name }}-blockscout
app: {{ include "blockscout-stack.fullname" . }}-blockscout
{{- end }}
6 changes: 3 additions & 3 deletions charts/blockscout-stack/templates/frontend-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ kind: Deployment
metadata:
name: {{ include "blockscout-stack.fullname" . }}-frontend
labels:
app: {{ .Release.Name }}-frontend
app: {{ include "blockscout-stack.fullname" . }}-frontend
{{- include "blockscout-stack.labels" . | nindent 4 }}
spec:
replicas: {{ .Values.frontend.replicaCount }}
selector:
matchLabels:
app: {{ .Release.Name }}-frontend
app: {{ include "blockscout-stack.fullname" . }}-frontend
template:
metadata:
annotations:
Expand All @@ -19,7 +19,7 @@ spec:
releaseTime: {{ dateInZone "2006-01-02 15:04:05Z" (now) "UTC"| quote }}
{{- end }}
labels:
app: {{ .Release.Name }}-frontend
app: {{ include "blockscout-stack.fullname" . }}-frontend
{{- include "blockscout-stack.selectorLabels" . | nindent 8 }}
spec:
{{- with .Values.imagePullSecrets }}
Expand Down
2 changes: 1 addition & 1 deletion charts/blockscout-stack/templates/frontend-podmonitor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ spec:
path: /node-api/metrics
selector:
matchLabels:
app: {{ .Release.Name }}-frontend
app: {{ include "blockscout-stack.fullname" . }}-frontend
{{- end }}
4 changes: 2 additions & 2 deletions charts/blockscout-stack/templates/frontend-service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ kind: Service
metadata:
name: {{ include "blockscout-stack.fullname" . }}-frontend-svc
labels:
app: {{ .Release.Name }}-frontend-svc
app: {{ include "blockscout-stack.fullname" . }}-frontend-svc
{{- include "blockscout-stack.labels" . | nindent 4 }}
spec:
type: {{ .Values.frontend.service.type }}
Expand All @@ -14,5 +14,5 @@ spec:
protocol: TCP
name: http
selector:
app: {{ .Release.Name }}-frontend
app: {{ include "blockscout-stack.fullname" . }}-frontend
{{- end }}
6 changes: 3 additions & 3 deletions charts/blockscout-stack/templates/stats-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ kind: Deployment
metadata:
name: {{ include "blockscout-stack.fullname" . }}-stats
labels:
app: {{ .Release.Name }}-stats
app: {{ include "blockscout-stack.fullname" . }}-stats
{{- include "blockscout-stack.labels" . | nindent 4 }}
spec:
replicas: {{ .Values.stats.replicaCount }}
selector:
matchLabels:
app: {{ .Release.Name }}-stats
app: {{ include "blockscout-stack.fullname" . }}-stats
template:
metadata:
annotations:
Expand All @@ -19,7 +19,7 @@ spec:
releaseTime: {{ dateInZone "2006-01-02 15:04:05Z" (now) "UTC"| quote }}
{{- end }}
labels:
app: {{ .Release.Name }}-stats
app: {{ include "blockscout-stack.fullname" . }}-stats
{{- include "blockscout-stack.selectorLabels" . | nindent 8 }}
spec:
{{- with .Values.imagePullSecrets }}
Expand Down
4 changes: 2 additions & 2 deletions charts/blockscout-stack/templates/stats-service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ kind: Service
metadata:
name: {{ include "blockscout-stack.fullname" . }}-stats-svc
labels:
app: {{ .Release.Name }}-stats-svc
app: {{ include "blockscout-stack.fullname" . }}-stats-svc
{{- include "blockscout-stack.labels" . | nindent 4 }}
spec:
type: {{ .Values.stats.service.type }}
Expand All @@ -18,5 +18,5 @@ spec:
protocol: TCP
name: http-metrics
selector:
app: {{ .Release.Name }}-stats
app: {{ include "blockscout-stack.fullname" . }}-stats
{{- end }}
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ kind: Deployment
metadata:
name: {{ include "blockscout-stack.fullname" . }}-user-ops-indexer
labels:
app: {{ .Release.Name }}-user-ops-indexer
app: {{ include "blockscout-stack.fullname" . }}-user-ops-indexer
{{- include "blockscout-stack.labels" . | nindent 4 }}
spec:
replicas: {{ .Values.userOpsIndexer.replicaCount }}
selector:
matchLabels:
app: {{ .Release.Name }}-user-ops-indexer
app: {{ include "blockscout-stack.fullname" . }}-user-ops-indexer
template:
metadata:
annotations:
Expand All @@ -19,7 +19,7 @@ spec:
releaseTime: {{ dateInZone "2006-01-02 15:04:05Z" (now) "UTC"| quote }}
{{- end }}
labels:
app: {{ .Release.Name }}-user-ops-indexer
app: {{ include "blockscout-stack.fullname" . }}-user-ops-indexer
{{- include "blockscout-stack.selectorLabels" . | nindent 8 }}
spec:
{{- with .Values.imagePullSecrets }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ kind: Service
metadata:
name: {{ include "blockscout-stack.fullname" . }}-user-ops-indexer-svc
labels:
app: {{ .Release.Name }}-user-ops-indexer-svc
app: {{ include "blockscout-stack.fullname" . }}-user-ops-indexer-svc
{{- include "blockscout-stack.labels" . | nindent 4 }}
spec:
type: {{ .Values.userOpsIndexer.service.type }}
Expand All @@ -18,15 +18,15 @@ spec:
protocol: TCP
name: http-metrics
selector:
app: {{ .Release.Name }}-user-ops-indexer
app: {{ include "blockscout-stack.fullname" . }}-user-ops-indexer
---
{{- if .Values.userOpsIndexer.service.grpc.enabled }}
kind: Service
apiVersion: v1
metadata:
name: {{ include "blockscout-stack.fullname" . }}-user-ops-indexer-grpc-svc
labels:
app: {{ .Release.Name }}-user-ops-indexer-svc
app: {{ include "blockscout-stack.fullname" . }}-user-ops-indexer-svc
{{- include "blockscout-stack.labels" . | nindent 4 }}
spec:
type: {{ .Values.userOpsIndexer.service.type }}
Expand All @@ -36,6 +36,6 @@ spec:
protocol: TCP
name: grpc
selector:
app: {{ .Release.Name }}-user-ops-indexer
app: {{ include "blockscout-stack.fullname" . }}-user-ops-indexer
{{- end }}
{{- end }}

0 comments on commit 2d1cadd

Please sign in to comment.