Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix selectors in charts for service and hpa #26

Merged
merged 4 commits into from Jul 6, 2021
Merged

Conversation

Rizato
Copy link
Contributor

@Rizato Rizato commented Jun 30, 2021

Fixes the hpa targets to point to the correct pods.

Fixes the service selector labels to point to the correct pods.

@Rizato Rizato requested a review from zv June 30, 2021 17:43
@Rizato Rizato requested a review from alanjds July 6, 2021 13:45
Comment on lines +53 to +91
{{/*
Nginx labels
*/}}
{{- define "microengine-webhooks-py.nginx.labels" -}}
helm.sh/chart: {{ include "microengine-webhooks-py.chart" . }}
{{ include "microengine-webhooks-py.nginx.selectorLabels" . }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- end }}

{{/*
Nginx selector labels
*/}}
{{- define "microengine-webhooks-py.nginx.selectorLabels" -}}
app.kubernetes.io/name: {{ include "microengine-webhooks-py.name" . }}-nginx
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}

{{/*
Worker labels
*/}}
{{- define "microengine-webhooks-py.worker.labels" -}}
helm.sh/chart: {{ include "microengine-webhooks-py.chart" . }}
{{ include "microengine-webhooks-py.worker.selectorLabels" . }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- end }}

{{/*
Worker selector labels
*/}}
{{- define "microengine-webhooks-py.worker.selectorLabels" -}}
app.kubernetes.io/name: {{ include "microengine-webhooks-py.name" . }}-worker
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On Helm charts, it feels specially hard to figure out the correctness of the changes by glancing at the code.

Would be nice to have a diff of the make template somehow on the PR.

If I remember, will try to automate this diffing thing, at least up to a text to be copy-pasted.

@Rizato Rizato merged commit 5f3da77 into master Jul 6, 2021
@Rizato Rizato deleted the fix/chart-hpa-targets branch July 6, 2021 14:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants