Skip to content

Commit c063b99

Browse files
authored
Merge pull request #4205 from lsst-sqre/tickets/DM-48977
DM-48977: Adapt mobu chart to current style
2 parents 6237431 + dd6b9b0 commit c063b99

14 files changed

+45
-79
lines changed

applications/mobu/README.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,17 +28,15 @@ Continuous integration testing
2828
| config.sentryEnvironment | string | `nil` | The environment to report to Sentry |
2929
| config.sentryTracesSampleConfig | float | `0` | Sentry tracing config: a float to specify a percentage, or "errors" to send all transactions with errors. |
3030
| config.slackAlerts | bool | `true` | Whether to send alerts and status to Slack. |
31-
| fullnameOverride | string | `""` | Override the full name for resources (includes the release name) |
3231
| global.baseUrl | string | Set by Argo CD | Base URL for the environment |
3332
| global.host | string | Set by Argo CD | Host name for ingress |
3433
| global.vaultSecretsPath | string | Set by Argo CD | Base path for Vault secrets |
3534
| image.pullPolicy | string | `"IfNotPresent"` | Pull policy for the mobu image |
3635
| image.repository | string | `"ghcr.io/lsst-sqre/mobu"` | mobu image to use |
3736
| image.tag | string | The appVersion of the chart | Tag of mobu image to use |
3837
| ingress.annotations | object | `{}` | Additional annotations to add to the ingress |
39-
| nameOverride | string | `""` | Override the base name for resources |
4038
| nodeSelector | object | `{}` | Node selector rules for the mobu frontend pod |
4139
| podAnnotations | object | `{}` | Annotations for the mobu frontend pod |
4240
| resources | object | See `values.yaml` | Resource limits and requests for the mobu frontend pod |
43-
| terminationGracePeriodSeconds | string | See `values.yaml` | Number of seconds for k8s to send SIGKILL after sending SIGTERM |
41+
| terminationGracePeriodSeconds | string | Use the Kubernetes default | Number of seconds for Kubernetes to send SIGKILL after sending SIGTERM |
4442
| tolerations | list | `[]` | Tolerations for the mobu frontend pod |
Lines changed: 2 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,4 @@
1-
{{/*
2-
Expand the name of the chart.
3-
*/}}
4-
{{- define "mobu.name" -}}
5-
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
6-
{{- end -}}
7-
8-
{{/*
9-
Create a default fully qualified app name.
10-
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
11-
If release name contains chart name it will be used as a full name.
12-
*/}}
13-
{{- define "mobu.fullname" -}}
14-
{{- if .Values.fullnameOverride -}}
15-
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
16-
{{- else -}}
17-
{{- $name := default .Chart.Name .Values.nameOverride -}}
18-
{{- if contains $name .Release.Name -}}
19-
{{- .Release.Name | trunc 63 | trimSuffix "-" -}}
20-
{{- else -}}
21-
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
22-
{{- end -}}
23-
{{- end -}}
24-
{{- end -}}
25-
1+
{{/* vim: set filetype=mustache: */}}
262
{{/*
273
Create chart name and version as used by the chart label.
284
*/}}
@@ -34,9 +10,7 @@ Create chart name and version as used by the chart label.
3410
Common labels
3511
*/}}
3612
{{- define "mobu.labels" -}}
37-
app.kubernetes.io/name: {{ include "mobu.name" . }}
3813
helm.sh/chart: {{ include "mobu.chart" . }}
39-
app.kubernetes.io/instance: {{ .Release.Name }}
4014
{{- if .Chart.AppVersion }}
4115
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
4216
{{- end }}
@@ -47,6 +21,6 @@ app.kubernetes.io/managed-by: {{ .Release.Service }}
4721
Selector labels
4822
*/}}
4923
{{- define "mobu.selectorLabels" -}}
50-
app.kubernetes.io/name: {{ include "mobu.name" . }}
24+
app.kubernetes.io/name: "mobu"
5125
app.kubernetes.io/instance: {{ .Release.Name }}
5226
{{- end }}

applications/mobu/templates/configmap.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
apiVersion: v1
22
kind: ConfigMap
33
metadata:
4-
name: {{ include "mobu.fullname" . }}
4+
name: "mobu"
55
labels:
66
{{- include "mobu.labels" . | nindent 4 }}
77
data:

applications/mobu/templates/deployment.yaml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
apiVersion: apps/v1
22
kind: Deployment
33
metadata:
4-
name: {{ include "mobu.fullname" . }}
4+
name: "mobu"
55
labels:
66
{{- include "mobu.labels" . | nindent 4 }}
77
spec:
@@ -33,45 +33,45 @@ spec:
3333
- name: "MOBU_ALERT_HOOK"
3434
valueFrom:
3535
secretKeyRef:
36-
name: {{ template "mobu.fullname" . }}-secret
36+
name: "mobu"
3737
key: "ALERT_HOOK"
3838
{{- end }}
3939
- name: "MOBU_ENVIRONMENT_URL"
4040
value: {{ .Values.global.baseUrl }}
4141
- name: "MOBU_GAFAELFAWR_TOKEN"
4242
valueFrom:
4343
secretKeyRef:
44-
name: {{ template "mobu.fullname" . }}-gafaelfawr-token
44+
name: "mobu-gafaelfawr-token"
4545
key: "token"
4646
- name: "MOBU_SENTRY_ENVIRONMENT"
4747
value: {{ .Values.global.environmentName }}
4848
- name: "MOBU_SENTRY_DSN"
4949
valueFrom:
5050
secretKeyRef:
51-
name: {{ template "mobu.fullname" . }}-secret
51+
name: "mobu"
5252
key: "sentry-dsn"
5353
{{- if .Values.config.githubRefreshApp }}
5454
- name: "MOBU_GITHUB_REFRESH_APP_WEBHOOK_SECRET"
5555
valueFrom:
5656
secretKeyRef:
57-
name: {{ template "mobu.fullname" . }}-secret
57+
name: "mobu"
5858
key: "github-refresh-app-webhook-secret"
5959
{{- end}}
6060
{{- if .Values.config.githubCiApp }}
6161
- name: "MOBU_GITHUB_CI_APP_ID"
6262
valueFrom:
6363
secretKeyRef:
64-
name: {{ template "mobu.fullname" . }}-secret
64+
name: "mobu"
6565
key: "github-ci-app-id"
6666
- name: "MOBU_GITHUB_CI_APP_PRIVATE_KEY"
6767
valueFrom:
6868
secretKeyRef:
69-
name: {{ template "mobu.fullname" . }}-secret
69+
name: "mobu"
7070
key: "github-ci-app-private-key"
7171
- name: "MOBU_GITHUB_CI_APP_WEBHOOK_SECRET"
7272
valueFrom:
7373
secretKeyRef:
74-
name: {{ template "mobu.fullname" . }}-secret
74+
name: "mobu"
7575
key: "github-ci-app-webhook-secret"
7676
{{- end}}
7777
{{- if .Values.config.metrics.enabled }}

applications/mobu/templates/gafaelfawr-token.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
apiVersion: gafaelfawr.lsst.io/v1alpha1
22
kind: GafaelfawrServiceToken
33
metadata:
4-
name: {{ include "mobu.fullname" . }}-gafaelfawr-token
4+
name: "mobu-gafaelfawr-token"
55
labels:
66
{{- include "mobu.labels" . | nindent 4 }}
77
spec:

applications/mobu/templates/ingress-github-ci-app.yaml renamed to applications/mobu/templates/ingress-github-ci.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
apiVersion: gafaelfawr.lsst.io/v1alpha1
33
kind: GafaelfawrIngress
44
metadata:
5-
name: {{ template "mobu.fullname" . }}-github-ci
5+
name: "mobu-github-ci"
66
labels:
77
{{- include "mobu.labels" . | nindent 4 }}
88
config:
@@ -11,7 +11,7 @@ config:
1111
anonymous: true
1212
template:
1313
metadata:
14-
name: {{ template "mobu.fullname" . }}-github-ci
14+
name: "mobu-github-ci"
1515
{{- with .Values.ingress.annotations }}
1616
annotations:
1717
{{- toYaml . | nindent 6 }}
@@ -25,7 +25,7 @@ template:
2525
pathType: "Prefix"
2626
backend:
2727
service:
28-
name: {{ template "mobu.fullname" . }}
28+
name: "mobu"
2929
port:
3030
number: 8080
3131
{{- end }}

applications/mobu/templates/ingress-github-refresh-app.yaml renamed to applications/mobu/templates/ingress-github-refresh.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
apiVersion: gafaelfawr.lsst.io/v1alpha1
33
kind: GafaelfawrIngress
44
metadata:
5-
name: {{ template "mobu.fullname" . }}-github-refresh
5+
name: "mobu-github-refresh"
66
labels:
77
{{- include "mobu.labels" . | nindent 4 }}
88
config:
@@ -11,7 +11,7 @@ config:
1111
anonymous: true
1212
template:
1313
metadata:
14-
name: {{ template "mobu.fullname" . }}-github-refresh
14+
name: "mobu-github-refresh"
1515
{{- with .Values.ingress.annotations }}
1616
annotations:
1717
{{- toYaml . | nindent 6 }}
@@ -25,7 +25,7 @@ template:
2525
pathType: "Prefix"
2626
backend:
2727
service:
28-
name: {{ template "mobu.fullname" . }}
28+
name: "mobu"
2929
port:
3030
number: 8080
3131
{{- end }}

applications/mobu/templates/ingress.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
apiVersion: gafaelfawr.lsst.io/v1alpha1
22
kind: GafaelfawrIngress
33
metadata:
4-
name: {{ template "mobu.fullname" . }}
4+
name: "mobu"
55
labels:
66
{{- include "mobu.labels" . | nindent 4 }}
77
config:
@@ -13,7 +13,7 @@ config:
1313
service: "mobu"
1414
template:
1515
metadata:
16-
name: {{ template "mobu.fullname" . }}
16+
name: "mobu"
1717
{{- with .Values.ingress.annotations }}
1818
annotations:
1919
{{- toYaml . | nindent 6 }}
@@ -27,6 +27,6 @@ template:
2727
pathType: "Prefix"
2828
backend:
2929
service:
30-
name: {{ template "mobu.fullname" . }}
30+
name: "mobu"
3131
port:
3232
number: 8080

applications/mobu/templates/networkpolicy.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
apiVersion: networking.k8s.io/v1
22
kind: NetworkPolicy
33
metadata:
4-
name: {{ include "mobu.fullname" . }}
4+
name: "mobu"
55
spec:
66
podSelector:
77
matchLabels:

applications/mobu/templates/service.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
apiVersion: v1
22
kind: Service
33
metadata:
4-
name: {{ include "mobu.fullname" . }}
4+
name: "mobu"
55
labels:
66
{{- include "mobu.labels" . | nindent 4 }}
77
spec:

0 commit comments

Comments
 (0)