This commit is contained in:
2024-04-08 09:40:36 +02:00
commit f29f47ba64
82 changed files with 61981 additions and 0 deletions
@@ -0,0 +1,42 @@
######################################
# Install linkerd service mesh #
######################################
---
- name: install linkerd service mesh
when: inventory_hostname in groups['controller']
block:
- name: Download linkerd install scrip
get_url:
url: https://run.linkerd.io/install
dest: /tmp/linkerd.sh
- name: Install linkerd CLI
shell:
cmd: cat /tmp/linkerd.sh | sh
- name: Set linkerd .bashrc
lineinfile:
path: ~/.bashrc
line: 'PATH=$PATH:/root/.linkerd2/bin'
- name: init linkerd on controller1
when: inventory_hostname in groups['controller_init']
block:
- name: Install linkerd CRD in Cluster
shell: "linkerd install --crds | kubectl apply -f -"
- name: Install linkerd in Cluster
shell: "linkerd install | kubectl apply -f -"
- name: Wait for linkerd pods become ready
command: "kubectl rollout status deployment linkerd-destination -n linkerd --timeout 150s"
- name: Wait for linkerd pods become ready
command: "kubectl rollout status deployment linkerd-proxy-injector -n linkerd --timeout 150s"
- name: Install linkerd Dashboard
shell: "linkerd viz install | kubectl apply -f -"
- name: Pause for 15 seconds and wait for linkerd installation
pause:
seconds: 15