Add toleration for taint

This commit adds toleration for taint master NoSchedule to different
components. This will help us in managing components that gets deployed
in kubernetes master nodes

Relates-To: #406

Change-Id: I9f3a30be9c4eed65dcdd1c41514abbfd9c384541
Signed-off-by: Sreejith Punnapuzha <sreejith.punnapuzha@outlook.com>
This commit is contained in:
Sreejith Punnapuzha 2020-11-10 12:02:33 -06:00
parent a980243565
commit 02da44720c
11 changed files with 67 additions and 7 deletions

View File

@ -0,0 +1,10 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: ironic
spec:
template:
spec:
tolerations:
- key: node-role.kubernetes.io/master
effect: NoSchedule

View File

@ -10,3 +10,6 @@ resources:
- namespace.yaml
namespace: metal3
patchesStrategicMerge:
- ironic_toleration_patch.yaml

View File

@ -11,3 +11,4 @@ patchesStrategicMerge:
- manager_image_patch.yaml
- manager_pull_policy.yaml
- manager_auth_proxy_patch.yaml
- manager_toleration_patch.yaml

View File

@ -0,0 +1,11 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: controller-manager
namespace: system
spec:
template:
spec:
tolerations:
- key: node-role.kubernetes.io/master
effect: NoSchedule

View File

@ -0,0 +1,11 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: helm-controller
namespace: flux-system
spec:
template:
spec:
tolerations:
- key: node-role.kubernetes.io/master
effect: NoSchedule

View File

@ -2,3 +2,6 @@ apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- deployment.yaml
patchesStrategicMerge:
- deployment_toleration_patch.yaml

View File

@ -0,0 +1,11 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: source-controller
namespace: flux-system
spec:
template:
spec:
tolerations:
- key: node-role.kubernetes.io/master
effect: NoSchedule

View File

@ -3,3 +3,6 @@ kind: Kustomization
resources:
- deployment.yaml
- service.yaml
patchesStrategicMerge:
- deployment_toleration_patch.yaml

View File

@ -6,3 +6,6 @@ images:
- name: controller
newName: controller
newTag: latest
patchesStrategicMerge:
- manager_toleration_patch.yaml

View File

@ -0,0 +1,11 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: controller-manager
namespace: system
spec:
template:
spec:
tolerations:
- key: node-role.kubernetes.io/master
effect: NoSchedule

View File

@ -18,13 +18,6 @@ export KUBECONFIG=${KUBECONFIG:-"$HOME/.airship/kubeconfig"}
NODENAME="node01"
export KUBECONFIG_TARGET_CONTEXT=${KUBECONFIG_TARGET_CONTEXT:-"target-cluster"}
# TODO remove taint
kubectl \
--kubeconfig $KUBECONFIG \
--context $KUBECONFIG_TARGET_CONTEXT \
--request-timeout 10s \
taint node $NODENAME node-role.kubernetes.io/master-
echo "Deploy infra to cluster"
airshipctl phase run initinfra-target --debug