Skip to content

Commit 4dd11f1

Browse files
authored
To Deploy kubernetes pods of OracleDatabase only on nodes in a particular nodepool having label "pool" (#1895)
* Added Pool * Added nodepool label 'pool' * Added nodepool label 'pool' * generalised the label name * generalised the label name * generalised the label name
1 parent f6cb69a commit 4dd11f1

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

OracleDatabase/SingleInstance/helm-charts/oracle-db/templates/deployment.yaml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,14 @@ spec:
3131
securityContext:
3232
runAsUser: 54321
3333
fsGroup: 54321
34-
{{- if .Values.availabilityDomain }}
34+
{{- if or .Values.availabilityDomain .Values.nodeLabels}}
3535
nodeSelector:
36+
{{- range $key, $value := .Values.nodeLabels }}
37+
{{ $key }}: {{ $value | quote }}
38+
{{- end }}
39+
{{- if .Values.availabilityDomain }}
3640
failure-domain.beta.kubernetes.io/zone: "{{ .Values.availabilityDomain }}"
41+
{{- end }}
3742
{{- end }}
3843
containers:
3944
- name: oracle-db

OracleDatabase/SingleInstance/helm-charts/oracle-db/values.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,3 +46,8 @@ imagePullPolicy: Always
4646
## container registry login/password
4747
imagePullSecrets:
4848

49+
## Deploy only on nodes having required labels .
50+
## Format label_name : label_value . eg pool: sidb
51+
## Leave empty if there is no such requirement
52+
nodeLabels:
53+
# pool: sidb

0 commit comments

Comments
 (0)