Skip to content

Commit 3280ba3

Browse files
committed
merge helm2 and helm3
1 parent a0c9f33 commit 3280ba3

File tree

10 files changed

+33
-17
lines changed

10 files changed

+33
-17
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,3 +39,6 @@ erl_crash.dump
3939
/.elixir_ls/
4040
*~
4141
*.orig
42+
43+
# asdf
44+
.tool-versions

deployment/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ kubectl apply -f kubectl/rig.yaml
88

99
## Helm
1010

11+
The Helm Charts are stored in [./helm2](./helm2) and [./helm3](./helm3) directory, which are essentially the same but only use a different `apiVersion` in the `Chart.yaml`.
12+
1113
### Version 2
1214

1315
```bash

deployment/helm2/reactive-interaction-gateway/.helmignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
*.swp
1515
*.bak
1616
*.tmp
17+
*.orig
1718
*~
1819
# Various IDEs
1920
.project
Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
apiVersion: v1
2-
appVersion: "2.4.0"
3-
description: A Helm chart for Kubernetes
42
name: reactive-interaction-gateway
3+
description: A Helm chart for Kubernetes
4+
5+
# This is the chart version. This version number should be incremented each time you make changes
6+
# to the chart and its templates, including the app version.
57
version: 1.0.0
8+
9+
# This is the version number of the application being deployed. This version number should be
10+
# incremented each time you make changes to the application.
11+
appVersion: 2.4.0

deployment/helm2/reactive-interaction-gateway/templates/_helpers.tpl

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,15 +35,22 @@ Create chart name and version as used by the chart label.
3535
Common labels
3636
*/}}
3737
{{- define "reactive-interaction-gateway.labels" -}}
38-
app.kubernetes.io/name: {{ include "reactive-interaction-gateway.name" . }}
3938
helm.sh/chart: {{ include "reactive-interaction-gateway.chart" . }}
40-
app.kubernetes.io/instance: {{ .Release.Name }}
39+
{{ include "reactive-interaction-gateway.selectorLabels" . }}
4140
{{- if .Chart.AppVersion }}
4241
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
4342
{{- end }}
4443
app.kubernetes.io/managed-by: {{ .Release.Service }}
4544
{{- end -}}
4645

46+
{{/*
47+
Selector labels
48+
*/}}
49+
{{- define "reactive-interaction-gateway.selectorLabels" -}}
50+
app.kubernetes.io/name: {{ include "reactive-interaction-gateway.name" . }}
51+
app.kubernetes.io/instance: {{ .Release.Name }}
52+
{{- end -}}
53+
4754
{{/*
4855
Return the appropriate apiVersion for deployment.
4956
*/}}

deployment/helm2/reactive-interaction-gateway/templates/deployment.yaml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,16 @@ kind: Deployment
33
metadata:
44
name: {{ include "reactive-interaction-gateway.fullname" . }}
55
labels:
6-
{{ include "reactive-interaction-gateway.labels" . | indent 4 }}
6+
{{- include "reactive-interaction-gateway.labels" . | nindent 4 }}
77
spec:
88
replicas: {{ .Values.replicaCount }}
99
selector:
1010
matchLabels:
11-
app.kubernetes.io/name: {{ include "reactive-interaction-gateway.name" . }}
12-
app.kubernetes.io/instance: {{ .Release.Name }}
11+
{{- include "reactive-interaction-gateway.selectorLabels" . | nindent 6 }}
1312
template:
1413
metadata:
1514
labels:
16-
app.kubernetes.io/name: {{ include "reactive-interaction-gateway.name" . }}
17-
app.kubernetes.io/instance: {{ .Release.Name }}
15+
{{- include "reactive-interaction-gateway.selectorLabels" . | nindent 8 }}
1816
spec:
1917
containers:
2018
- name: {{ .Chart.Name }}

deployment/helm2/reactive-interaction-gateway/templates/service-headless.yaml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ kind: Service
33
metadata:
44
name: {{ include "reactive-interaction-gateway.fullname" . }}-headless
55
labels:
6-
{{ include "reactive-interaction-gateway.labels" . | indent 4 }}
6+
{{- include "reactive-interaction-gateway.labels" . | nindent 4 }}
77
spec:
88
type: ClusterIP
99
clusterIP: None
@@ -25,5 +25,4 @@ spec:
2525
protocol: TCP
2626
name: internal-https
2727
selector:
28-
app.kubernetes.io/name: {{ include "reactive-interaction-gateway.name" . }}
29-
app.kubernetes.io/instance: {{ .Release.Name }}
28+
{{- include "reactive-interaction-gateway.selectorLabels" . | nindent 4 }}

deployment/helm2/reactive-interaction-gateway/templates/service.yaml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ kind: Service
33
metadata:
44
name: {{ include "reactive-interaction-gateway.fullname" . }}
55
labels:
6-
{{ include "reactive-interaction-gateway.labels" . | indent 4 }}
6+
{{- include "reactive-interaction-gateway.labels" . | nindent 4 }}
77
spec:
88
type: {{ .Values.service.type }}
99
ports:
@@ -24,5 +24,4 @@ spec:
2424
protocol: TCP
2525
name: internal-https
2626
selector:
27-
app.kubernetes.io/name: {{ include "reactive-interaction-gateway.name" . }}
28-
app.kubernetes.io/instance: {{ .Release.Name }}
27+
{{- include "reactive-interaction-gateway.selectorLabels" . | nindent 4 }}

deployment/helm2/reactive-interaction-gateway/values.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,10 @@ deployment:
3838
DISCOVERY_TYPE: dns
3939
## DNS_NAME is set dynamically
4040
## NODE_HOST is set dynamically to PodIP in "templates/deployment.yaml"
41-
# Change magiccookie to some individual hash
41+
## Change magiccookie to some individual hash
4242
NODE_COOKIE: magiccookie
4343

44+
4445
## Kafka
4546
## Setting "KAFKA_BROKERS" automatically enables usage of Kafka
4647
# KAFKA_BROKERS: localhost:9092

docs/rig-dev-guide.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ To have the project use a newer Elixir version, make sure to change the followin
4343
## Releasing a new version
4444

4545
- Increment `rig` version in the [version](../version) file
46-
- Increment `appVersion` in the [Helm v2 Chart.yaml](../deployment/helm2/reactive-interaction-gateway/Chart.yaml) and [Helm v3 Chart.yaml](../deployment/helm3/reactive-interaction-gateway/Chart.yaml) files
46+
- Increment `appVersion` in the [Helm 2 Chart.yaml](../deployment/helm2/reactive-interaction-gateway/Chart.yaml) and [Helm 3 Chart.yaml](../deployment/helm3/reactive-interaction-gateway/Chart.yaml) files
4747
- Increment image tag in the [Kubernetes rig.yaml](../deployment/kubectl/rig.yaml) file
4848
- In [CHANGELOG.md](../CHANGELOG.md), rename `[Unreleased]` and add a corresponding link to the bottom of the file
4949
- Create a signed Git tag either using `git -s` or by creating a release using the Github UI

0 commit comments

Comments
 (0)