Skip to content

Commit

Permalink
rails-application: add component label/selector
Browse files Browse the repository at this point in the history
  • Loading branch information
klausmeyer committed Aug 18, 2024
1 parent fe47a16 commit fadd6f2
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion charts/rails-application/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ apiVersion: v2
name: rails-application
description: Base chart for my rails applications
type: application
version: "0.1.0-alpha2"
version: "0.1.0-alpha3"
3 changes: 2 additions & 1 deletion charts/rails-application/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ spec:
{{- end }}
selector:
matchLabels:
app.kubernetes.io/component: {{ $deploymentName }}
{{- include "rails-application.selectorLabels" $ | nindent 6 }}
template:
metadata:
Expand All @@ -19,7 +20,7 @@ spec:
{{- toYaml . | nindent 8 }}
{{- end }}
labels:
"k8s.klaus-meyer.net/deployment-type": {{ $deploymentName }}
app.kubernetes.io/component: {{ $deploymentName }}
{{- include "rails-application.labels" $ | nindent 8 }}
{{- with $.Values.podLabels }}
{{- toYaml . | nindent 8 }}
Expand Down
2 changes: 1 addition & 1 deletion charts/rails-application/templates/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ spec:
protocol: TCP
name: http
selector:
k8s.klaus-meyer.net/deployment-type: web
app.kubernetes.io/component: web
{{- include "rails-application.selectorLabels" . | nindent 4 }}

0 comments on commit fadd6f2

Please sign in to comment.