第4章 OpenShift Container Platform での Ansible Automation Controller の設定
Kubernetes のアップグレード中は、Automation Controller が実行されている必要があります。
4.1. OpenShift Container Platform のアップグレード中におけるダウンタイムの最小化 リンクのコピーリンクがクリップボードにコピーされました!
アップグレード中のダウンタイムを最小限に抑えるために、Automation Controller で次の設定変更を行ってください。
前提条件
- Ansible Automation Platform 2.4
- Ansible Automation Controller 4.4
OpenShift Container Platform
- > 4.10.42
- > 4.11.16
- > 4.12.0
- Postgres の高可用性 (HA) デプロイメント
- Automation Controller Pod をスケジュールできる複数のワーカーノード
手順
AutomationController 仕様で、
RECEPTOR_KUBE_SUPPORT_RECONNECTを有効にします。apiVersion: automationcontroller.ansible.com/v1beta1 kind: AutomationController metadata: ... spec: ... ee_extra_env: | - name: RECEPTOR_KUBE_SUPPORT_RECONNECT value: enabled ```AutomationController 仕様で、グレースフル終了機能を有効にします。
termination_grace_period_seconds: <time to wait for job to finish>Web およびタスク Pod 用に
podAntiAffinityを設定し、AutomationController 仕様でデプロイメントを分散します。task_affinity: podAntiAffinity: preferredDuringSchedulingIgnoredDuringExecution: - podAffinityTerm: labelSelector: matchExpressions: - key: app.kubernetes.io/name operator: In values: - awx-task topologyKey: topology.kubernetes.io/zone weight: 100 web_affinity: podAntiAffinity: preferredDuringSchedulingIgnoredDuringExecution: - podAffinityTerm: labelSelector: matchExpressions: - key: app.kubernetes.io/name operator: In values: - awx-web topologyKey: topology.kubernetes.io/zone weight: 100OpenShift Container Platform で
PodDisruptionBudgetを設定します。--- apiVersion: policy/v1 kind: PodDisruptionBudget metadata: name: automationcontroller-job-pods spec: maxUnavailable: 0 selector: matchExpressions: - key: ansible-awx-job-id operator: Exists --- apiVersion: policy/v1 kind: PodDisruptionBudget metadata: name: automationcontroller-web-pods spec: minAvailable: 1 selector: matchExpressions: - key: app.kubernetes.io/name operator: In values: - <automationcontroller_instance_name>-web --- apiVersion: policy/v1 kind: PodDisruptionBudget metadata: name: automationcontroller-task-pods spec: minAvailable: 1 selector: matchExpressions: - key: app.kubernetes.io/name operator: In values: - <automationcontroller_instance_name>-task