-
Notifications
You must be signed in to change notification settings - Fork 33
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
[DRAFT] Next major version #342
base: master
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 | ||||
---|---|---|---|---|---|---|
@@ -1,5 +1,5 @@ | ||||||
apiVersion: v2 | ||||||
appVersion: "3.7.7" | ||||||
appVersion: "v4.0.0" | ||||||
description: Mender is a robust and secure way to update all your software and deploy your IoT devices at scale with support for customization | ||||||
name: mender | ||||||
version: 5.10.1 | ||||||
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.
Suggested change
;) Besides, this could be a good exercise for the release-please tool; wanna make a try? 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.
That would be pretty neat! 🚀 |
||||||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
{{- define "mender.container.resources" -}} | ||
{{- if .override.resources }} | ||
{{- .override.resources | toYaml }} | ||
{{- else if .dot.Values.default.resources }} | ||
{{- .dot.Values.default.resources | toYaml }} | ||
{{- end }} | ||
{{- end -}} | ||
|
||
{{- define "mender.container.securityContext" -}} | ||
{{- if .override.containerSecurityContext }} | ||
{{- /* NOTE: respect falsy override.containerSecurityContext.enabled */ -}} | ||
{{- if .override.containerSecurityContext.enabled }} | ||
{{- omit .override.containerSecurityContext "enabled" | toYaml }} | ||
{{- else }} | ||
{{- printf "{}" }} | ||
{{- end }} | ||
{{- else if and .dot.Values.default.containerSecurityContext | ||
.dot.Values.default.containerSecurityContext.enabled }} | ||
{{- omit .dot.Values.default.containerSecurityContext "enabled" | toYaml }} | ||
{{- else }} | ||
{{- printf "{}" }} | ||
{{- end }} | ||
{{- end -}} | ||
|
||
{{- /* Synopsis | ||
{{ include "mender.container" (dict | ||
"dot" . | ||
"component" "<serviceName>" | ||
"override" .Values.<serviceName> | ||
"readinessPath": "optional|/api/internal/v1/.component/health" | ||
"livenessPath": "optional|/api/internal/v1/.component/alive") | ||
}} | ||
Bolierplate Mender service ContainerSpec | ||
*/ -}} | ||
{{- define "mender.container" -}} | ||
image: {{ include "mender.image" . }} | ||
imagePullPolicy: {{ include "mender.imagePullPolicy" . }} | ||
{{- if .args }} | ||
args: {{ splitList " " .args | toYaml | nindent 2 }} | ||
{{- else if and .override.automigrate }} | ||
args: ["server", "--automigrate"] | ||
{{- else }} | ||
args: ["server"] | ||
{{- end }} | ||
{{- if (not .migration) }} | ||
# Readiness/liveness probes | ||
readinessProbe: | ||
httpGet: | ||
path: {{ coalesce .readinessPath (printf "/api/internal/v1/%s/health" .component) }} | ||
port: 8080 | ||
{{- coalesce .override.readinessProbe .dot.Values.default.readinessProbe | | ||
toYaml | | ||
nindent 2 }} | ||
livenessProbe: | ||
httpGet: | ||
path: {{ coalesce .livenessPath (printf "/api/internal/v1/%s/alive" .component) }} | ||
port: 8080 | ||
{{- coalesce .override.livenessProbe .dot.Values.default.livenessProbe | | ||
toYaml | | ||
nindent 2 }} | ||
startupProbe: | ||
httpGet: | ||
path: {{ coalesce .livenessPath (printf "/api/internal/v1/%s/alive" .component) }} | ||
port: 8080 | ||
{{- coalesce .override.startupProbe .dot.Values.default.startupProbe | | ||
toYaml | | ||
nindent 2 }} | ||
{{- end }} | ||
{{- if .resources }} | ||
resources: {{- nindent 2 .resources }} | ||
{{- else }} | ||
{{- with include "mender.container.resources" . }} | ||
resources: {{- nindent 2 . }} | ||
{{- end }} | ||
{{- end }} | ||
securityContext: {{ include "mender.container.securityContext" . }} | ||
{{- end -}} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
{{- define "mender.podSecurityContext" -}} | ||
{{- if .override.containerSecurityContext }} | ||
{{- /* NOTE: respect falsy override.containerSecurityContext.enabled */ -}} | ||
{{- if .override.containerSecurityContext.enabled }} | ||
{{- omit .override.containerSecurityContext "enabled" | toYaml }} | ||
{{- else }} | ||
{{- printf "{}" }} | ||
{{- end }} | ||
{{- else if and .dot.Values.default.containerSecurityContext | ||
.dot.Values.default.containerSecurityContext.enabled }} | ||
{{- omit .dot.Values.default.containerSecurityContext "enabled" | toYaml }} | ||
{{- else }} | ||
{{- printf "{}" }} | ||
{{- end }} | ||
{{- end -}} | ||
|
||
{{- /* Synopsis: | ||
{{ include "mender.podSpec" (dict | ||
"dot" . | ||
"component" "<serviceName>" | ||
"override" .Values.<serviceName> | ||
}} | ||
Generates shared boilerplate PodSpec | ||
*/ -}} | ||
{{- define "mender.podSpec" -}} | ||
serviceAccountName: {{ include "mender.serviceAccountName" . }} | ||
{{- with (coalesce .override.affinity .dot.Values.default.affinity) }} | ||
affinity: {{ toYaml . | nindent 4 }} | ||
{{- end }} | ||
{{- with (coalesce .override.tolerations .dot.Values.default.tolerations) }} | ||
tolerations: {{ toYaml . | nindent 4 }} | ||
{{- end }} | ||
securityContext: {{ include "mender.podSecurityContext" . | nindent 2}} | ||
{{- with .restartPolicy }} | ||
restartPolicy: {{ quote . }} | ||
{{- end }} | ||
{{- with coalesce .override.imagePullSecrets .dot.Values.default.imagePullSecrets }} | ||
imagePullSecrets: {{- toYaml . | nindent 2 }} | ||
{{- end }} | ||
{{- with (coalesce .override.priorityClassName .dot.Values.default.PriorityClassName) }} | ||
priorityClassName: {{ quote . }} | ||
{{- end }} | ||
{{- with (coalesce .override.nodeSelector .dot.Values.default.nodeSelector) }} | ||
nodeSelector: {{ toYaml . | nindent 4 }} | ||
{{- end }} | ||
{{- end -}} |
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.
👍
So you have to create your own secret by hand? Then we'll have to add the snippet to the docs.mender.io:
kubectl create secret docker-registry NAME --docker-username=user --docker-password=password --docker-email=email --docker-server=registry.mender.io
in the Mender Docs