Skip to content

Commit

Permalink
feat(windows): basic kubectl package support
Browse files Browse the repository at this point in the history
  • Loading branch information
noelmcloughlin committed Oct 8, 2020
1 parent e08e8eb commit 3848610
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 4 deletions.
4 changes: 2 additions & 2 deletions docs/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
kubernetes-formula
==================

Highly extensible formula to manage kubernetes on MacOS and GNU/Linux. Currently supports:
Highly extensible formula to manage kubernetes on MacOS, Windows, and GNU/Linux. Currently supports:

* `server` (https://kubernetes.io)
* `node` (https://kubernetes.io)
Expand Down Expand Up @@ -65,7 +65,7 @@ The default `kubernetes.devlibs` state includes the following:
:scale: 100%
:target: https://github.com/semantic-release/semantic-release

A SaltStack formula for kubernetes on MacOS and GNU/Linux.
A SaltStack formula for kubernetes on MacOS and GNU/Linux. Windows is work in progress.

.. contents:: **Table of Contents**
:depth: 1
Expand Down
6 changes: 6 additions & 0 deletions kubernetes/client/package/clean.sls
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,11 @@ include:
- test -x /usr/local/bin/brew
- grew list | grep ^kubectl$
{%- elif grains.os_family == 'Windows' %}
{{ formula }}-client-package-clean-choco:
chocolatey.uninstalled:
- name: {{ d.client.pkg.name }}
{%- endif %}
{%- endif %}
7 changes: 7 additions & 0 deletions kubernetes/client/package/install.sls
Original file line number Diff line number Diff line change
Expand Up @@ -42,5 +42,12 @@ include:
- runas: {{ d.identity.rootuser }}
- unless: test -x /usr/local/bin/kubectl # if binary is missing
{%- elif grains.kernel|lower in ('Windows',) %}
{{ formula }}-client-package-install-choco:
chocolatey.installed:
- name: {{ d.client.pkg.name }}
- force: True
{%- endif %}
{%- endif %}
6 changes: 4 additions & 2 deletions kubernetes/osfamilymap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -100,11 +100,13 @@ Windows:
binary: C:\\kubernetes
source: C:\\temp\\kubernetes
client:
version: 1.19.0
check: systeminfo
pkg:
name: kubectl.exe
name: kubernetes-cli # choco
use_upstream: package
binary:
source_hash: '974d351e7e0ad1e1ed0901770d65188e8d4c4cdd2494474d14a2b2c325751293'
source_hash: '6ec32a8a62b69363a524c4f8db765ff4bd16ea7e5b0eb04aa5a667f8653eda18c357a97513d9e12f0ba1612516acb150deffb6e3608633c62b97a15b6efa7cc0'
node:
pkg:
use_upstream: archive
Expand Down

0 comments on commit 3848610

Please sign in to comment.