Merge "Add toleration to Portieris deployment and jobs"

This commit is contained in:
Zuul 2021-10-04 12:20:55 +00:00 committed by Gerrit Code Review
commit 4eafa3f4cd
2 changed files with 132 additions and 0 deletions

View File

@ -30,6 +30,7 @@ Patch01: 0001-Squash-required-portieris-fixes.patch
Patch02: 0002-add-image-pull-secrets-to-images.patch
Patch03: 0003-add-toggle-to-reinstall-the-admission-webhook.patch
Patch04: 0004-run-admission-webhooks-as-non-root.patch
Patch05: 0005-add-toleration.patch
BuildRequires: helm
BuildRequires: chartmuseum
@ -43,6 +44,7 @@ StarlingX portieris charts
%patch02 -p1
%patch03 -p1
%patch04 -p1
%patch05 -p1
%build
# Host a server for the charts

View File

@ -0,0 +1,130 @@
From ed939af4c374f834f6e15e2f6c3d5cbff53c90ec Mon Sep 17 00:00:00 2001
From: Rafael Camargos <RafaelLucas.Camargos@windriver.com>
Date: Tue, 28 Sep 2021 11:05:29 -0400
Subject: [PATCH] Add toleration to deployment and jobs
---
.../admission-webhooks/create-admission-webhooks.yaml | 4 ++++
.../admission-webhooks/delete-admission-webhooks.yaml | 4 ++++
helm/portieris/templates/crd-creation/create-crds.yaml | 4 ++++
helm/portieris/templates/crd-creation/delete-crds.yaml | 4 ++++
.../templates/crd-creation/validate-crd-creation.yaml | 4 ++++
.../templates/default/create-default-policies.yaml | 6 +++++-
helm/portieris/templates/deployment.yaml | 4 ++++
7 files changed, 29 insertions(+), 1 deletion(-)
diff --git a/helm/portieris/templates/admission-webhooks/create-admission-webhooks.yaml b/helm/portieris/templates/admission-webhooks/create-admission-webhooks.yaml
index cbe0eb7..fe3e5c2 100644
--- a/helm/portieris/templates/admission-webhooks/create-admission-webhooks.yaml
+++ b/helm/portieris/templates/admission-webhooks/create-admission-webhooks.yaml
@@ -27,6 +27,10 @@ spec:
heritage: {{ .Release.Service }}
spec:
serviceAccountName: portieris
+ tolerations:
+ - key: "node-role.kubernetes.io/master"
+ operator: "Exists"
+ effect: "NoSchedule"
containers:
- name: hyperkube
image: "{{ .Values.hyperkube.repository }}:{{ .Values.hyperkube.tag }}"
diff --git a/helm/portieris/templates/admission-webhooks/delete-admission-webhooks.yaml b/helm/portieris/templates/admission-webhooks/delete-admission-webhooks.yaml
index dd8c259..e8edc3d 100644
--- a/helm/portieris/templates/admission-webhooks/delete-admission-webhooks.yaml
+++ b/helm/portieris/templates/admission-webhooks/delete-admission-webhooks.yaml
@@ -23,6 +23,10 @@ spec:
heritage: {{ .Release.Service }}
spec:
serviceAccountName: portieris
+ tolerations:
+ - key: "node-role.kubernetes.io/master"
+ operator: "Exists"
+ effect: "NoSchedule"
containers:
- name: hyperkube
image: "{{ .Values.hyperkube.repository }}:{{ .Values.hyperkube.tag }}"
diff --git a/helm/portieris/templates/crd-creation/create-crds.yaml b/helm/portieris/templates/crd-creation/create-crds.yaml
index 13b0ca2..2033ee6 100644
--- a/helm/portieris/templates/crd-creation/create-crds.yaml
+++ b/helm/portieris/templates/crd-creation/create-crds.yaml
@@ -23,6 +23,10 @@ spec:
heritage: {{ .Release.Service }}
spec:
serviceAccountName: portieris
+ tolerations:
+ - key: "node-role.kubernetes.io/master"
+ operator: "Exists"
+ effect: "NoSchedule"
containers:
- name: hyperkube
image: "{{ .Values.hyperkube.repository }}:{{ .Values.hyperkube.tag }}"
diff --git a/helm/portieris/templates/crd-creation/delete-crds.yaml b/helm/portieris/templates/crd-creation/delete-crds.yaml
index 783fe23..894598a 100644
--- a/helm/portieris/templates/crd-creation/delete-crds.yaml
+++ b/helm/portieris/templates/crd-creation/delete-crds.yaml
@@ -23,6 +23,10 @@ spec:
heritage: {{ .Release.Service }}
spec:
serviceAccountName: portieris
+ tolerations:
+ - key: "node-role.kubernetes.io/master"
+ operator: "Exists"
+ effect: "NoSchedule"
containers:
- name: hyperkube
image: "{{ .Values.hyperkube.repository }}:{{ .Values.hyperkube.tag }}"
diff --git a/helm/portieris/templates/crd-creation/validate-crd-creation.yaml b/helm/portieris/templates/crd-creation/validate-crd-creation.yaml
index d3075da..58e501e 100644
--- a/helm/portieris/templates/crd-creation/validate-crd-creation.yaml
+++ b/helm/portieris/templates/crd-creation/validate-crd-creation.yaml
@@ -23,6 +23,10 @@ spec:
heritage: {{ .Release.Service }}
spec:
serviceAccountName: portieris
+ tolerations:
+ - key: "node-role.kubernetes.io/master"
+ operator: "Exists"
+ effect: "NoSchedule"
containers:
- name: hyperkube
image: "{{ .Values.hyperkube.repository }}:{{ .Values.hyperkube.tag }}"
diff --git a/helm/portieris/templates/default/create-default-policies.yaml b/helm/portieris/templates/default/create-default-policies.yaml
index 31a38c0..fae1597 100644
--- a/helm/portieris/templates/default/create-default-policies.yaml
+++ b/helm/portieris/templates/default/create-default-policies.yaml
@@ -23,6 +23,10 @@ spec:
heritage: {{ .Release.Service }}
spec:
serviceAccountName: portieris
+ tolerations:
+ - key: "node-role.kubernetes.io/master"
+ operator: "Exists"
+ effect: "NoSchedule"
containers:
- name: hyperkube
image: "{{ .Values.hyperkube.repository }}:{{ .Values.hyperkube.tag }}"
@@ -39,4 +43,4 @@ spec:
configMap:
name: default-image-policies
restartPolicy: OnFailure
-
\ No newline at end of file
+
diff --git a/helm/portieris/templates/deployment.yaml b/helm/portieris/templates/deployment.yaml
index d8f3590..e6c4184 100644
--- a/helm/portieris/templates/deployment.yaml
+++ b/helm/portieris/templates/deployment.yaml
@@ -25,6 +25,10 @@ spec:
imagePullSecrets:
- name: default-registry-key
{{ end }}
+ tolerations:
+ - key: "node-role.kubernetes.io/master"
+ operator: "Exists"
+ effect: "NoSchedule"
containers:
- name: {{ .Chart.Name }}
image: "{{ .Values.image.host | default "docker.io/ibmcom" }}/{{ .Values.image.image }}:{{ .Values.image.tag }}"
--
2.29.2