-
Notifications
You must be signed in to change notification settings - Fork 43
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
helm chart: Add extra labels and annotations to pods and k8s resources / Allow SSL mode to be defined. #655
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
@@ -2,12 +2,20 @@ | |||||||||
{{- $host := .Values.config.database.host | default (include "nebraska.postgresql.fullname" .) }} | ||||||||||
{{- $port := .Values.config.database.port | toString }} | ||||||||||
{{- $user := ( tpl .Values.config.database.username . ) }} | ||||||||||
{{- $sslMode := ( tpl .Values.config.database.sslMode . ) }} | ||||||||||
apiVersion: apps/v1 | ||||||||||
kind: Deployment | ||||||||||
metadata: | ||||||||||
name: {{ include "nebraska.fullname" . }} | ||||||||||
labels: | ||||||||||
{{- include "nebraska.labels" . | nindent 4 }} | ||||||||||
{{- with .Values.extraLabels }} | ||||||||||
{{- toYaml . | nindent 4 }} | ||||||||||
{{- end }} | ||||||||||
{{- with.Values.extraAnnotations }} | ||||||||||
annotations: | ||||||||||
{{- toYaml . | nindent 4 }} | ||||||||||
{{- end }} | ||||||||||
spec: | ||||||||||
replicas: {{ .Values.replicaCount }} | ||||||||||
revisionHistoryLimit: {{ .Values.revisionHistoryLimit }} | ||||||||||
|
@@ -24,6 +32,7 @@ spec: | |||||||||
{{- end }} | ||||||||||
labels: | ||||||||||
{{- include "nebraska.selectorLabels" . | nindent 8 }} | ||||||||||
{{ toYaml .Values.podLabels | nindent 8 }} | ||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It looks like adding extra pod labels in this way does not work.
Suggested change
should fix the linter issue. |
||||||||||
spec: | ||||||||||
{{- with .Values.image.pullSecrets }} | ||||||||||
imagePullSecrets: | ||||||||||
|
@@ -137,7 +146,7 @@ spec: | |||||||||
key: dbPassword | ||||||||||
{{- end }} | ||||||||||
- name: NEBRASKA_DB_URL | ||||||||||
value: {{ printf "postgres://%s:$(DB_PASSWORD)@%s:%s/%s?sslmode=disable&connect_timeout=10" $user $host $port $db | quote }} | ||||||||||
value: {{ printf "postgres://%s:$(DB_PASSWORD)@%s:%s/%s?sslmode=%s&connect_timeout=10" $user $host $port $db $sslMode | quote }} | ||||||||||
{{- if eq .Values.config.auth.mode "github" }} | ||||||||||
- name: "NEBRASKA_GITHUB_OAUTH_CLIENT_ID" | ||||||||||
value: "{{ .Values.config.auth.github.clientID }}" | ||||||||||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,10 +7,16 @@ metadata: | |
name: {{ $fullName }} | ||
labels: | ||
{{- include "nebraska.labels" . | nindent 4 }} | ||
{{- with .Values.extraLabels }} | ||
{{- toYaml . | nindent 4 }} | ||
{{- end }} | ||
{{- with .Values.ingress.annotations }} | ||
annotations: | ||
{{- toYaml . | nindent 4 }} | ||
{{- end }} | ||
{{- with.Values.extraAnnotations }} | ||
{{- toYaml . | nindent 4 }} | ||
{{- end }} | ||
Comment on lines
13
to
+19
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This block needs more attention. If |
||
spec: | ||
{{- if eq (include "nebraska.ingress.apiVersion" $) "networking.k8s.io/v1" }} | ||
{{- with .Values.ingress.ingressClassName }} | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,6 +5,15 @@ metadata: | |
name: {{ include "nebraska.fullname" . }}-packages | ||
labels: | ||
{{- include "nebraska.labels" . | nindent 4 }} | ||
{{ toYaml .Values.config.hostFlatcarPackages.persistence.labels | nindent 4 }} | ||
{{- with .Values.extraLabels }} | ||
{{- toYaml . | nindent 4 }} | ||
{{- end }} | ||
annotations: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Almost same here, please surround the |
||
{{ toYaml .Values.config.hostFlatcarPackages.persistence.annotations | nindent 4 }} | ||
{{- with.Values.extraAnnotations }} | ||
{{- toYaml . | nindent 4 }} | ||
{{- end }} | ||
spec: | ||
accessModes: {{ .Values.config.hostFlatcarPackages.persistence.accessModes }} | ||
resources: | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,13 @@ metadata: | |
name: {{ include "nebraska.fullname" . }} | ||
labels: | ||
{{- include "nebraska.labels" . | nindent 4 }} | ||
{{- with .Values.extraLabels }} | ||
{{- toYaml . | nindent 4 }} | ||
{{- end }} | ||
annotations: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same here |
||
{{- with.Values.extraAnnotations }} | ||
{{- toYaml . | nindent 4 }} | ||
{{- end }} | ||
spec: | ||
type: {{ .Values.service.type }} | ||
ports: | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,8 +5,14 @@ metadata: | |
name: {{ include "nebraska.serviceAccountName" . }} | ||
labels: | ||
{{- include "nebraska.labels" . | nindent 4 }} | ||
{{- with .Values.extraLabels }} | ||
{{- toYaml . | nindent 4 }} | ||
{{- end }} | ||
{{- with .Values.serviceAccount.annotations }} | ||
annotations: | ||
{{- toYaml . | nindent 4 }} | ||
{{- end }} | ||
{{- with.Values.extraAnnotations }} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same here |
||
{{- toYaml | nindent 4 }} | ||
{{- end }} | ||
{{- end }} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,10 +7,17 @@ metadata: | |
name: {{ $fullName | trunc 56 | trimSuffix "-" }}-update | ||
labels: | ||
{{- include "nebraska.labels" . | nindent 4 }} | ||
{{- with .Values.extraLabels }} | ||
{{- toYaml . | nindent 4 }} | ||
{{- end }} | ||
{{- with .Values.ingress.update.annotations }} | ||
annotations: | ||
{{- toYaml . | nindent 4 }} | ||
{{- end }} | ||
{{- with.Values.extraAnnotations }} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same |
||
{{- toYaml . | nindent 4 }} | ||
{{- end }} | ||
{{ toYaml .Values.extraAnnotations | nindent 4 }} | ||
spec: | ||
{{- if eq (include "nebraska.ingress.apiVersion" $) "networking.k8s.io/v1" }} | ||
{{- with .Values.ingress.update.ingressClassName }} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please bump at least the minor version as this PR adds additional features and not bugfixes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the review, I'm not a Helm user myself and don't know how the versioning is used in practice… So rather semver-like, it seems.