Browse Source

Add a package for aws-iam-authenticator

Douglas Thrift 1 year ago
parent
commit
73249b3012

+ 3 - 1
README.md

@@ -4,7 +4,9 @@
 [![](https://img.shields.io/badge/gist-update%20status-blue.svg?style=flat-square)](https://gist.github.com/douglaswth/d98014ed4fcaa5cc65bb902f21ce366a)
 [![](https://img.shields.io/badge/chocolatey-douglaswth-884b2e.svg?style=flat-square)](https://chocolatey.org/profiles/douglaswth)
 
-* [BlueBrick](manual/bluebrick)<br>
+* [AWS IAM Authenticator for Kubernetes](automatic/aws-iam-authenticator)<br>
+  [![Chocolatey](https://img.shields.io/chocolatey/v/aws-iam-authenticator.svg?style=flat-square)](https://chocolatey.org/packages/aws-iam-authenticator)
+* [BlueBrick](automatic/bluebrick)<br>
   [![Chocolatey](https://img.shields.io/chocolatey/v/bluebrick.svg?style=flat-square)](https://chocolatey.org/packages/bluebrick)
 * [right_st - RightScale ServerTemplate and RightScript tool](automatic/right-st)<br>
   [![Chocolatey](https://img.shields.io/chocolatey/v/right-st.svg?style=flat-square)](https://chocolatey.org/packages/right-st)

+ 42 - 0
automatic/aws-iam-authenticator/aws-iam-authenticator.nuspec

@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<package xmlns="http://schemas.microsoft.com/packaging/2015/06/nuspec.xsd">
+  <metadata>
+    <id>aws-iam-authenticator</id>
+    <version>0.4.0</version>
+    <packageSourceUrl>https://github.com/douglaswth/chocolatey-packages/tree/master/automatic/aws-iam-authenticator</packageSourceUrl>
+    <title>AWS IAM Authenticator for Kubernetes</title>
+    <authors>Heptio,Amazon EKS OSS Engineers</authors>
+    <projectUrl>https://github.com/kubernetes-sigs/aws-iam-authenticator</projectUrl>
+    <iconUrl>http://cdn.rawgit.com/douglaswth/chocolatey-packages/master/icons/aws-iam-authenticator.png</iconUrl>
+    <copyright>2017 the contributors</copyright>
+    <licenseUrl>https://github.com/kubernetes-sigs/aws-iam-authenticator/blob/master/LICENSE</licenseUrl>
+    <requireLicenseAcceptance>false</requireLicenseAcceptance>
+    <projectSourceUrl>https://github.com/kubernetes-sigs/aws-iam-authenticator</projectSourceUrl>
+    <bugTrackerUrl>https://github.com/kubernetes-sigs/aws-iam-authenticator/issues</bugTrackerUrl>
+    <tags>aws-iam-authenticator aws cli cloud amazon kubernetes kubectl devops</tags>
+    <summary>A tool to use AWS IAM credentials to authenticate to a Kubernetes cluster</summary>
+    <description># AWS IAM Authenticator for Kubernetes
+
+A tool to use AWS IAM credentials to authenticate to a Kubernetes cluster.
+The initial work on this tool was driven by Heptio. The project receives contributions from multiple community engineers and is currently maintained by Heptio and Amazon EKS OSS Engineers.
+
+## Why do I want this?
+If you are an administrator running a Kubernetes cluster on AWS, you already need to manage AWS IAM credentials to provision and update the cluster.
+By using AWS IAM Authenticator for Kubernetes, you avoid having to manage a separate credential for Kubernetes access.
+AWS IAM also provides a number of nice properties such as an out of band audit trail (via CloudTrail) and 2FA/MFA enforcement.
+
+If you are building a Kubernetes installer on AWS, AWS IAM Authenticator for Kubernetes can simplify your bootstrap process.
+You won't need to somehow smuggle your initial admin credential securely out of your newly installed cluster.
+Instead, you can create a dedicated `KubernetesAdmin` role at cluster provisioning time and set up Authenticator to allow cluster administrator logins.
+
+**Please Note**: This is an automatically updated package. If you find it is
+out of date by more than a day or two, please contact the maintainer(s) and
+let them know the package is no longer updating correctly.
+</description>
+    <releaseNotes>See the [GitHub release](https://github.com/kubernetes-sigs/aws-iam-authenticator/releases/latest).</releaseNotes>
+  </metadata>
+  <files>
+    <file src="tools\**" target="tools" />
+  </files>
+</package>

+ 13 - 0
automatic/aws-iam-authenticator/tools/chocolateyinstall.ps1

@@ -0,0 +1,13 @@
+$ErrorActionPreference = 'Stop';
+
+$toolsDir   = "$(Split-Path -parent $MyInvocation.MyCommand.Definition)"
+
+$packageArgs = @{
+  packageName   = $env:ChocolateyPackageName
+  fileFullPath  = "$toolsDir\aws-iam-authenticator.exe"
+  url64bit      = 'https://github.com/kubernetes-sigs/aws-iam-authenticator/releases/download/v0.4.0/aws-iam-authenticator_0.4.0_windows_amd64.exe'
+  checksum64    = 'd26ccd0e83667f79dea88a72072371fd87c2023895417b54c2bd0e4c55d7d5fa'
+  checksumType64= 'sha256'
+}
+
+Get-ChocolateyWebFile @packageArgs

+ 23 - 0
automatic/aws-iam-authenticator/update.ps1

@@ -0,0 +1,23 @@
+Import-Module au
+
+$latest_release = 'https://github.com/kubernetes-sigs/aws-iam-authenticator/releases/latest'
+
+function global:au_GetLatest {
+  $download_page = Invoke-WebRequest -Uri $latest_release -UseBasicParsing
+  $regex         = '^.+/aws-iam-authenticator_(\d+\.\d+\.\d+)_windows_amd64\.exe$'
+  $url64         = "https://github.com$($download_page.Links | ? href -Match $regex | select -First 1 -ExpandProperty href)"
+  $version       = $url64 -replace $regex, '$1'
+  return @{ Version = $version; URL64 = $url64 }
+}
+
+function global:au_SearchReplace {
+  @{
+    'tools\chocolateyInstall.ps1' = @{
+      "(^\s+url64bit\s+=\s+)('.*')"       = "`$1'$($Latest.URL64)'"
+      "(^\s+checksum64\s+=\s+)('.*')"     = "`$1'$($Latest.Checksum64)'"
+      "(^\s+checksumType64\s+=\s+)('.*')" = "`$1'$($Latest.ChecksumType64)'"
+    }
+  }
+}
+
+update -ChecksumFor 64

BIN
icons/aws-iam-authenticator.png