Skip to content

Commit

Permalink
Change from commands helm to k8s module: metrics-server
Browse files Browse the repository at this point in the history
- Install Helm plugin diff to ignore the following warning:
  [WARNING]: The default idempotency check can fail to
  report changes in certain cases. Install helm diff >= 3.4.1 for better
  results.
- Know issue for the warning:
  [WARNING]: Module did not set no_log for pass_credentials
  - ansible-collections/kubernetes.core#412

Signed-off-by: flavono123 <flavono123@gmail.com>
  • Loading branch information
flavono123 committed Jun 14, 2022
1 parent 96fcc6c commit 5a2c7a9
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
5 changes: 5 additions & 0 deletions provisioning/roles/kubernetes/tasks/helm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,8 @@
update_cache: yes
name: helm

- name: Install Helm plugin diff
become: yes
kubernetes.core.helm_plugin:
state: present
plugin_path: https://github.com/databus23/helm-diff
10 changes: 8 additions & 2 deletions provisioning/roles/kubernetes/tasks/metrics_server.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
- name: Add Helm repository metrics-server
become: yes
command: helm repo add metrics-server https://kubernetes-sigs.github.io/metrics-server/
kubernetes.core.helm_repository:
name: metrics-server
repo_url: https://kubernetes-sigs.github.io/metrics-server/

- name: Install Helm chart metrics-server
become: yes
command: helm upgrade --install metrics-server metrics-server/metrics-server -n kube-system
kubernetes.core.helm:
state: present
name: metrics-server
chart_ref: metrics-server/metrics-server
release_namespace: kube-system

0 comments on commit 5a2c7a9

Please sign in to comment.