Skip to content

Commit bbf2050

Browse files
authored
Merge pull request #3 from HomeDevopsLab/node-selector
Node selector support
2 parents 2279cf6 + a6bc8ca commit bbf2050

7 files changed

Lines changed: 25 additions & 6 deletions

File tree

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Changelog
22

3+
## [2.0.0] - 2023-07-21
4+
### Added
5+
- ability to use nodeSelector function
6+
37
## [1.0.3] - 2023-06-05
48
### Chaged
59
- increased failure threshold

chart/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ type: application
1515
# This is the chart version. This version number should be incremented each time you make changes
1616
# to the chart and its templates, including the app version.
1717
# Versions are expected to follow Semantic Versioning (https://semver.org/)
18-
version: 1.0.3
18+
version: 2.0.0
1919
# This is the version number of the application being deployed. This version number should be
2020
# incremented each time you make changes to the application. Versions are not expected to
2121
# follow Semantic Versioning. They should reflect the version the application is using.

chart/templates/deployment.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,10 @@ spec:
6969
failureThreshold: 30
7070
periodSeconds: 10
7171
{{- end }}
72+
nodeSelector:
73+
{{- with .Values.nodeSelector }}
74+
{{- toYaml . | nindent 8 }}
75+
{{- end }}
7276
{{- if .Values.volumes.enabled }}
7377
{{- if .Values.volumes.type.pvc }}
7478
{{- $ownership := regexSplit ":" .Values.volumes.ownership -1 }}

chart/templates/initWebsiteDir.yaml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ spec:
2525
spec:
2626
restartPolicy: Never
2727
containers:
28-
- name: alpine
29-
image: arm32v7/alpine:3.17.2
28+
- name: "{{ .Release.Name }}-init-websitedir"
29+
image: gitea.angrybits.pl/kkrolikowski/toolbox:0.0.1
3030
env:
3131
- name: WEBSITE_DIRS
3232
{{- range .Values.volumes.mountPath }}
@@ -45,6 +45,10 @@ spec:
4545
- -c
4646
- >-
4747
mkdir -p $(WEBSITE_DIRS);
48+
nodeSelector:
49+
{{- with .Values.nodeSelector }}
50+
{{- toYaml . | nindent 8 }}
51+
{{- end }}
4852
volumes:
4953
- name: {{ .Release.Name }}-volume
5054
nfs:

chart/templates/mysqlDBhelper.yaml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ spec:
2424
restartPolicy: Never
2525
containers:
2626
- name: mysqldb-helper
27-
image: devkrolikowski/mysqldb-helper:0.1.0
27+
image: gitea.angrybits.pl/kkrolikowski/mysql-initdb:0.0.1
2828
env:
2929
- name: DB_ADMIN_LOGIN
3030
valueFrom:
@@ -49,5 +49,9 @@ spec:
4949
name: {{ .Release.Name }}-db
5050
key: password
5151
- name: DB_HOST
52-
value: lab-helper.lan
52+
value: srv-db2.lan
53+
nodeSelector:
54+
{{- with .Values.nodeSelector }}
55+
{{- toYaml . | nindent 8 }}
56+
{{- end }}
5357
{{- end }}

chart/test_values.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,6 @@ volumes:
1919
type:
2020
nfs:
2121
server: lab-storage.lan
22-
path: /volume1/storagelab
22+
path: /volume1/storagelab
23+
nodeSelector:
24+
kubernetes.io/arch: arm64

chart/values.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,3 +33,4 @@ startupProbes:
3333
deployNotifications:
3434
enabled: false
3535
image: ""
36+
nodeSelector: {}

0 commit comments

Comments
 (0)