Skip to content

Commit d4c6008

Browse files
author
Maurice Faber
committed
fix: chart renamed to otomi and published on charts repo
1 parent b5c90f9 commit d4c6008

19 files changed

+116
-30
lines changed

.github/workflows/main.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,16 +78,17 @@ jobs:
7878
id: chart_prepare
7979
run: |
8080
# Release new chart only if its version changes
81-
[ ! $(git show ${{ github.sha }} chart/otomi-installer/Chart.yaml | grep '^+version:.*$') ] && echo "No chart changes detected. Skipping." && exit
81+
[ ! $(git show ${{ github.sha }} chart/otomi/Chart.yaml | grep '^+version:.*$') ] && echo "No chart changes detected. Skipping." && exit
8282
echo ::set-output name=has_chart_changes::true
8383
release_tag=v$(cat package.json | jq -r '.version')
84-
sed --in-place "s/APP_VERSION_PLACEHOLDER/$release_tag/g" chart/otomi-installer/Chart.yaml
84+
sed --in-place "s/APP_VERSION_PLACEHOLDER/$release_tag/g" chart/otomi/Chart.yaml
8585
- if: '${{ steps.chart_prepare.outputs.has_chart_changes }}'
86-
name: Create and publish otomi-installer chart release
86+
name: Create and publish otomi chart release
8787
id: chart_release
8888
uses: helm/[email protected]
8989
with:
9090
charts_dir: chart
91+
charts_repo_url: https://otomi.io/charts/
9192
env:
9293
CR_TOKEN: ${{ secrets.GITHUB_TOKEN }}
9394
- name: Slack Notification

chart/otomi-installer/scripts/map-values.sh

Lines changed: 0 additions & 1 deletion
This file was deleted.

chart/otomi-installer/templates/NOTES.txt

Whitespace-only changes.

chart/otomi-installer/templates/rbac.yaml

Lines changed: 0 additions & 12 deletions
This file was deleted.

chart/otomi-installer/templates/serviceaccount.yaml

Lines changed: 0 additions & 4 deletions
This file was deleted.
File renamed without changes.

chart/otomi-installer/Chart.yaml renamed to chart/otomi/Chart.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
apiVersion: v1
2-
name: otomi-installer
2+
name: otomi
33
description: A Helm chart for installing otomi in Kubernetes
44
home: https://otomi.io/
55
icon: https://otomi.io/img/otomi-logo.svg
66
type: application
7-
version: '0.1.2'
7+
version: '0.1.1'
88
appVersion: 'APP_VERSION_PLACEHOLDER'
99
keywords:
1010
- otomi

chart/otomi/scripts/map-values.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
npm run tasks:otomi-chart

chart/otomi/templates/NOTES.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
The Otomi installer was successfully deployed on the cluster.
2+
3+
Please inspect the output of the installer job ({{ .Release.Namespace }}/{{ include "otomi.fullname" . }}) for any feedback or errors.
4+
5+
Also visit otomi.io for further instructions and reference documentation.

chart/otomi/templates/_helpers.tpl

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
{{/*
2+
Expand the name of the chart.
3+
*/}}
4+
{{- define "otomi.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 "otomi.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+
26+
{{/*
27+
Create chart name and version as used by the chart label.
28+
*/}}
29+
{{- define "otomi.chart" -}}
30+
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
31+
{{- end }}
32+
33+
{{/*
34+
Common labels
35+
*/}}
36+
{{- define "otomi.labels" -}}
37+
helm.sh/chart: {{ include "otomi.chart" . }}
38+
{{ include "otomi.selectorLabels" . }}
39+
{{- if .Chart.AppVersion }}
40+
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
41+
{{- end }}
42+
app.kubernetes.io/managed-by: {{ .Release.Service }}
43+
{{- end }}
44+
45+
{{/*
46+
Selector labels
47+
*/}}
48+
{{- define "otomi.selectorLabels" -}}
49+
app.kubernetes.io/name: {{ include "otomi.name" . }}
50+
app.kubernetes.io/instance: {{ .Release.Name }}
51+
{{- end }}
52+
53+
{{/*
54+
Create the name of the service account to use
55+
*/}}
56+
{{- define "otomi.serviceAccountName" -}}
57+
{{- if .Values.serviceAccount.create }}
58+
{{- default (include "otomi.fullname" .) .Values.serviceAccount.name }}
59+
{{- else }}
60+
{{- default "default" .Values.serviceAccount.name }}
61+
{{- end }}
62+
{{- end }}

chart/otomi-installer/templates/job.yaml renamed to chart/otomi/templates/job.yaml

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,25 @@
11
apiVersion: batch/v1
22
kind: Job
33
metadata:
4-
name: otomi-installer-job
4+
name: {{ include "otomi.fullname" . }}
5+
labels: {{- include "otomi.labels" . | nindent 4 }}
56
spec:
67
template:
78
metadata:
8-
name: otomi-install
9+
{{- with .Values.podAnnotations }}
10+
annotations: {{- toYaml . | nindent 8 }}
11+
{{- end }}
12+
labels: {{- include "otomi.selectorLabels" . | nindent 8 }}
913
spec:
14+
{{- with .Values.imagePullSecrets }}
1015
imagePullSecrets:
11-
- name: regcred
12-
serviceAccountName: {{ .Release.Name }}
16+
{{- toYaml . | nindent 8 }}
17+
{{- end }}
18+
serviceAccountName: {{ include "otomi.serviceAccountName" . }}
19+
securityContext: {{- toYaml .Values.podSecurityContext | nindent 8 }}
1320
initContainers:
1421
- name: bootstrap-values
22+
securityContext: {{- toYaml .Values.securityContext | nindent 12 }}
1523
image: otomi/core:{{ .Values.otomi.version }}
1624
imagePullPolicy: Always
1725
command: ['/bin/bash', '-c']
@@ -29,7 +37,7 @@ spec:
2937
value: /secret/values.yaml
3038
envFrom:
3139
- secretRef:
32-
name: {{ .Release.Name }}-sops-secrets
40+
name: {{ include "otomi.fullname" . }}-sops-secrets
3341
volumeMounts:
3442
- name: otomi-values
3543
mountPath: /env
@@ -74,7 +82,7 @@ spec:
7482
value: /env
7583
envFrom:
7684
- secretRef:
77-
name: {{ .Release.Name }}-sops-secrets
85+
name: {{ include "otomi.fullname" . }}-sops-secrets
7886
volumeMounts:
7987
- name: otomi-values
8088
mountPath: /env
@@ -97,7 +105,7 @@ spec:
97105
value: /home/app/stack/env
98106
envFrom:
99107
- secretRef:
100-
name: {{ .Release.Name }}-sops-secrets
108+
name: {{ include "otomi.fullname" . }}-sops-secrets
101109
volumeMounts:
102110
- name: otomi-values
103111
mountPath: /home/app/stack/env

chart/otomi/templates/rbac.yaml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{{- if .Values.serviceAccount.create -}}
2+
apiVersion: rbac.authorization.k8s.io/v1
3+
kind: ClusterRoleBinding
4+
metadata:
5+
name: {{ include "otomi.fullname" . }}
6+
labels: {{- include "otomi.selectorLabels" . | nindent 8 }}
7+
roleRef:
8+
apiGroup: rbac.authorization.k8s.io
9+
kind: ClusterRole
10+
name: cluster-admin
11+
subjects:
12+
- kind: ServiceAccount
13+
name: {{ include "otomi.serviceAccountName" . }}
14+
namespace: {{ .Release.Namespace }}
15+
{{- end }}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{{- if .Values.serviceAccount.create -}}
2+
apiVersion: v1
3+
kind: ServiceAccount
4+
metadata:
5+
name: {{ include "otomi.serviceAccountName" . }}
6+
labels: {{- include "otomi.labels" . | nindent 4 }}
7+
{{- with .Values.serviceAccount.annotations }}
8+
annotations: {{- toYaml . | nindent 4 }}
9+
{{- end }}
10+
{{- end }}

chart/otomi-installer/templates/sops-secrets.yaml renamed to chart/otomi/templates/sops-secrets.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
apiVersion: v1
33
kind: Secret
44
metadata:
5-
name: {{ .Release.Name }}-sops-secrets
5+
name: {{ include "otomi.fullname" . }}-sops-secrets
66
type: Opaque
77
data:
88
{{- with $v.azure }}

chart/otomi-installer/templates/values-secrets.yaml renamed to chart/otomi/templates/values-secrets.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ apiVersion: v1
22
kind: Secret
33
metadata:
44
name: {{ .Release.Name }}-values
5+
labels: {{- include "otomi.labels" . | nindent 4 }}
56
type: Opaque
67
data:
78
values.yaml: |-
File renamed without changes.

0 commit comments

Comments
 (0)