From owner-svn-ports-head@freebsd.org Fri Aug 17 21:43:40 2018 Return-Path: Delivered-To: svn-ports-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C6530107C64A; Fri, 17 Aug 2018 21:43:40 +0000 (UTC) (envelope-from danilo@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7BC4F74186; Fri, 17 Aug 2018 21:43:40 +0000 (UTC) (envelope-from danilo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5CF536652; Fri, 17 Aug 2018 21:43:40 +0000 (UTC) (envelope-from danilo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w7HLhe9T085477; Fri, 17 Aug 2018 21:43:40 GMT (envelope-from danilo@FreeBSD.org) Received: (from danilo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7HLhdMa085468; Fri, 17 Aug 2018 21:43:39 GMT (envelope-from danilo@FreeBSD.org) Message-Id: <201808172143.w7HLhdMa085468@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: danilo set sender to danilo@FreeBSD.org using -f From: Danilo Egea Gondolfo Date: Fri, 17 Aug 2018 21:43:39 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r477450 - in head/sysutils: . eksctl eksctl/files X-SVN-Group: ports-head X-SVN-Commit-Author: danilo X-SVN-Commit-Paths: in head/sysutils: . eksctl eksctl/files X-SVN-Commit-Revision: 477450 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Aug 2018 21:43:41 -0000 Author: danilo Date: Fri Aug 17 21:43:38 2018 New Revision: 477450 URL: https://svnweb.freebsd.org/changeset/ports/477450 Log: - New port: sysutils/eksctl eksctl is a simple CLI tool for creating clusters on EKS - Amazon's new managed Kubernetes service for EC2. It is written in Go, and based on Amazon's official CloudFormation templates. Added: head/sysutils/eksctl/ head/sysutils/eksctl/Makefile (contents, props changed) head/sysutils/eksctl/distinfo (contents, props changed) head/sysutils/eksctl/files/ head/sysutils/eksctl/files/patch-pkg_eks_auth.go (contents, props changed) head/sysutils/eksctl/files/patch-pkg_utils_kubectl.go (contents, props changed) head/sysutils/eksctl/pkg-descr (contents, props changed) Modified: head/sysutils/Makefile Modified: head/sysutils/Makefile ============================================================================== --- head/sysutils/Makefile Fri Aug 17 21:07:58 2018 (r477449) +++ head/sysutils/Makefile Fri Aug 17 21:43:38 2018 (r477450) @@ -300,6 +300,7 @@ SUBDIR += ec2-scripts SUBDIR += edid-decode SUBDIR += eject + SUBDIR += eksctl SUBDIR += endian SUBDIR += enteruser SUBDIR += entr Added: head/sysutils/eksctl/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sysutils/eksctl/Makefile Fri Aug 17 21:43:38 2018 (r477450) @@ -0,0 +1,39 @@ +# Created by: Danilo Egea Gondolfo +# $FreeBSD$ + +PORTNAME= eksctl +PORTVERSION= 0.1.0 +CATEGORIES= sysutils + +MAINTAINER= danilo@FreeBSD.org +COMMENT= CLI for Amazon EKS + +LICENSE= APACHE20 + +RUN_DEPENDS= kubectl:sysutils/kubectl \ + aws-iam-authenticator:security/aws-iam-authenticator + +USES= go + +USE_GITHUB= yes +GH_ACCOUNT= weaveworks + +PLIST_FILES= bin/${PORTNAME} + +post-patch: + ${LN} -s ${WRKSRC}/vendor ${WRKSRC}/src + ${MKDIR} ${WRKSRC}/src/github.com/weaveworks/eksctl + ${LN} -s ${WRKSRC}/pkg ${WRKSRC}/src/github.com/weaveworks/eksctl/pkg + +do-build: + cd ${WRKSRC}/cmd/${PORTNAME} && \ + GOPATH=${WRKSRC} go build \ + -ldflags="-X main.gitCommit=${PORTVERSION} \ + -X main.builtAt=$$(date +'%s')" + +do-install: + ${INSTALL_PROGRAM} \ + ${WRKSRC}/cmd/${PORTNAME}/${PORTNAME} \ + ${STAGEDIR}${PREFIX}/bin/${PORTNAME} + +.include Added: head/sysutils/eksctl/distinfo ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sysutils/eksctl/distinfo Fri Aug 17 21:43:38 2018 (r477450) @@ -0,0 +1,3 @@ +TIMESTAMP = 1534530868 +SHA256 (weaveworks-eksctl-0.1.0_GH0.tar.gz) = 81ed110dcb67df9105034243453debba42aaf013d4dfe72ce292a52076bad023 +SIZE (weaveworks-eksctl-0.1.0_GH0.tar.gz) = 15217839 Added: head/sysutils/eksctl/files/patch-pkg_eks_auth.go ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sysutils/eksctl/files/patch-pkg_eks_auth.go Fri Aug 17 21:43:38 2018 (r477450) @@ -0,0 +1,11 @@ +--- pkg/eks/auth.go.orig 2018-08-17 20:19:48 UTC ++++ pkg/eks/auth.go +@@ -192,7 +192,7 @@ func (c *ClientConfig) WithExecHeptioAuthenticator() * + x := clientConfigCopy.Client.AuthInfos[c.ContextName] + x.Exec = &clientcmdapi.ExecConfig{ + APIVersion: "client.authentication.k8s.io/v1alpha1", +- Command: "heptio-authenticator-aws", ++ Command: "aws-iam-authenticator", + Args: []string{"token", "-i", c.Cluster.ClusterName}, + /* + Args: []string{"token", "-i", c.Cluster.ClusterName, "-r", c.roleARN}, Added: head/sysutils/eksctl/files/patch-pkg_utils_kubectl.go ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sysutils/eksctl/files/patch-pkg_utils_kubectl.go Fri Aug 17 21:43:38 2018 (r477450) @@ -0,0 +1,45 @@ +--- pkg/utils/kubectl.go.orig 2018-08-17 19:52:51 UTC ++++ pkg/utils/kubectl.go +@@ -46,22 +46,12 @@ func CheckKubectlVersion(env []string) error { + return nil + } + +-func CheckHeptioAuthenticatorAWS() error { +- path, err := exec.LookPath("heptio-authenticator-aws") +- if err == nil { +- logger.Debug("heptio-authenticator-aws: %q", path) +- } else { +- return fmt.Errorf("heptio-authenticator-aws not installed") +- } +- return nil +-} +- + func CheckAllCommands(kubeconfigPath string, isContextSet bool, contextName string, env []string) error { + if err := CheckKubectlVersion(env); err != nil { + return err + } + +- if err := CheckHeptioAuthenticatorAWS(); err != nil { ++ if err := checkAuthenticator(); err != nil { + return err + } + +@@ -97,4 +87,18 @@ func CheckAllCommands(kubeconfigPath string, isContext + } + + return nil ++} ++ ++// checkAuthenticator checks for the authenticator binary existence. ++func checkAuthenticator() error { ++ binaries := []string{"heptio-authenticator-aws", "aws-iam-authenticator"} ++ for _, bin := range binaries { ++ path, err := exec.LookPath(bin) ++ if err == nil { ++ // binary was found ++ logger.Debug("%s: %q", bin, path) ++ return nil ++ } ++ } ++ return fmt.Errorf("neither aws-iam-authenticator nor heptio-authenticator-aws are installed") + } Added: head/sysutils/eksctl/pkg-descr ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sysutils/eksctl/pkg-descr Fri Aug 17 21:43:38 2018 (r477450) @@ -0,0 +1,5 @@ +eksctl is a simple CLI tool for creating clusters on EKS - Amazon's +new managed Kubernetes service for EC2. It is written in Go, +and based on Amazon's official CloudFormation templates. + +WWW: https://eksctl.io/