mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2025-12-14 13:54:37 +03:00
Remove krew support (#11824)
* Remove krew installation support Krew is fundamentally to install kubectl plugins, which are eminently a client side things. It's also not difficult to install on a client machine. * Remove krew cleanup
This commit is contained in:
@@ -1,5 +0,0 @@
|
||||
---
|
||||
krew_enabled: false
|
||||
krew_root_dir: "/usr/local/krew"
|
||||
krew_default_index_uri: https://github.com/kubernetes-sigs/krew-index.git
|
||||
krew_no_upgrade_check: 0
|
||||
@@ -1,38 +0,0 @@
|
||||
---
|
||||
- name: Krew | Download krew
|
||||
include_tasks: "../../../download/tasks/download_file.yml"
|
||||
vars:
|
||||
download: "{{ download_defaults | combine(downloads.krew) }}"
|
||||
|
||||
- name: Krew | krew env
|
||||
template:
|
||||
src: krew.j2
|
||||
dest: /etc/bash_completion.d/krew
|
||||
mode: "0644"
|
||||
|
||||
- name: Krew | Copy krew manifest
|
||||
template:
|
||||
src: krew.yml.j2
|
||||
dest: "{{ local_release_dir }}/krew.yml"
|
||||
mode: "0644"
|
||||
|
||||
- name: Krew | Install krew # noqa command-instead-of-shell
|
||||
shell: "{{ local_release_dir }}/krew-{{ host_os }}_{{ image_arch }} install --archive={{ local_release_dir }}/krew-{{ host_os }}_{{ image_arch }}.tar.gz --manifest={{ local_release_dir }}/krew.yml"
|
||||
environment:
|
||||
KREW_ROOT: "{{ krew_root_dir }}"
|
||||
KREW_DEFAULT_INDEX_URI: "{{ krew_default_index_uri | default('') }}"
|
||||
|
||||
- name: Krew | Get krew completion
|
||||
command: "{{ local_release_dir }}/krew-{{ host_os }}_{{ image_arch }} completion bash"
|
||||
changed_when: false
|
||||
register: krew_completion
|
||||
check_mode: false
|
||||
ignore_errors: true # noqa ignore-errors
|
||||
|
||||
- name: Krew | Install krew completion
|
||||
copy:
|
||||
dest: /etc/bash_completion.d/krew.sh
|
||||
content: "{{ krew_completion.stdout }}"
|
||||
mode: "0755"
|
||||
become: true
|
||||
when: krew_completion.rc == 0
|
||||
@@ -1,10 +0,0 @@
|
||||
---
|
||||
- name: Krew | install krew on kube_control_plane
|
||||
import_tasks: krew.yml
|
||||
|
||||
- name: Krew | install krew on localhost
|
||||
import_tasks: krew.yml
|
||||
delegate_to: localhost
|
||||
connection: local
|
||||
run_once: true
|
||||
when: kubectl_localhost
|
||||
@@ -1,7 +0,0 @@
|
||||
# krew bash env(kubespray)
|
||||
export KREW_ROOT="{{ krew_root_dir }}"
|
||||
{% if krew_default_index_uri is defined %}
|
||||
export KREW_DEFAULT_INDEX_URI='{{ krew_default_index_uri }}'
|
||||
{% endif %}
|
||||
export PATH="${KREW_ROOT:-$HOME/.krew}/bin:$PATH"
|
||||
export KREW_NO_UPGRADE_CHECK={{ krew_no_upgrade_check }}
|
||||
@@ -1,100 +0,0 @@
|
||||
apiVersion: krew.googlecontainertools.github.com/v1alpha2
|
||||
kind: Plugin
|
||||
metadata:
|
||||
name: krew
|
||||
spec:
|
||||
version: "{{ krew_version }}"
|
||||
homepage: https://krew.sigs.k8s.io/
|
||||
shortDescription: Package manager for kubectl plugins.
|
||||
caveats: |
|
||||
krew is now installed! To start using kubectl plugins, you need to add
|
||||
krew's installation directory to your PATH:
|
||||
|
||||
* macOS/Linux:
|
||||
- Add the following to your ~/.bashrc or ~/.zshrc:
|
||||
export PATH="${KREW_ROOT:-$HOME/.krew}/bin:$PATH"
|
||||
- Restart your shell.
|
||||
|
||||
* Windows: Add %USERPROFILE%\.krew\bin to your PATH environment variable
|
||||
|
||||
To list krew commands and to get help, run:
|
||||
$ kubectl krew
|
||||
For a full list of available plugins, run:
|
||||
$ kubectl krew search
|
||||
|
||||
You can find documentation at
|
||||
https://krew.sigs.k8s.io/docs/user-guide/quickstart/.
|
||||
|
||||
platforms:
|
||||
- uri: {{ krew_download_url }}
|
||||
sha256: {{ krew_archive_checksum }}
|
||||
bin: krew
|
||||
files:
|
||||
- from: ./krew-darwin_amd64
|
||||
to: krew
|
||||
- from: ./LICENSE
|
||||
to: .
|
||||
selector:
|
||||
matchLabels:
|
||||
os: darwin
|
||||
arch: amd64
|
||||
- uri: {{ krew_download_url }}
|
||||
sha256: {{ krew_archive_checksum }}
|
||||
bin: krew
|
||||
files:
|
||||
- from: ./krew-darwin_arm64
|
||||
to: krew
|
||||
- from: ./LICENSE
|
||||
to: .
|
||||
selector:
|
||||
matchLabels:
|
||||
os: darwin
|
||||
arch: arm64
|
||||
- uri: {{ krew_download_url }}
|
||||
sha256: {{ krew_archive_checksum }}
|
||||
bin: krew
|
||||
files:
|
||||
- from: ./krew-linux_amd64
|
||||
to: krew
|
||||
- from: ./LICENSE
|
||||
to: .
|
||||
selector:
|
||||
matchLabels:
|
||||
os: linux
|
||||
arch: amd64
|
||||
- uri: {{ krew_download_url }}
|
||||
sha256: {{ krew_archive_checksum }}
|
||||
bin: krew
|
||||
files:
|
||||
- from: ./krew-linux_arm
|
||||
to: krew
|
||||
- from: ./LICENSE
|
||||
to: .
|
||||
selector:
|
||||
matchLabels:
|
||||
os: linux
|
||||
arch: arm
|
||||
- uri: {{ krew_download_url }}
|
||||
sha256: {{ krew_archive_checksum }}
|
||||
bin: krew
|
||||
files:
|
||||
- from: ./krew-linux_arm64
|
||||
to: krew
|
||||
- from: ./LICENSE
|
||||
to: .
|
||||
selector:
|
||||
matchLabels:
|
||||
os: linux
|
||||
arch: arm64
|
||||
- uri: {{ krew_download_url }}
|
||||
sha256: {{ krew_archive_checksum }}
|
||||
bin: krew.exe
|
||||
files:
|
||||
- from: ./krew-windows_amd64.exe
|
||||
to: krew.exe
|
||||
- from: ./LICENSE
|
||||
to: .
|
||||
selector:
|
||||
matchLabels:
|
||||
os: windows
|
||||
arch: amd64
|
||||
@@ -10,12 +10,6 @@ dependencies:
|
||||
tags:
|
||||
- helm
|
||||
|
||||
- role: kubernetes-apps/krew
|
||||
when:
|
||||
- krew_enabled
|
||||
tags:
|
||||
- krew
|
||||
|
||||
- role: kubernetes-apps/registry
|
||||
when:
|
||||
- registry_enabled
|
||||
|
||||
Reference in New Issue
Block a user