diff --git a/meta-stx-virt/recipes-containers/kubernetes/files/helm-upload b/meta-stx-virt/recipes-containers/kubernetes/files/helm-upload deleted file mode 100644 index 4dbacc0..0000000 --- a/meta-stx-virt/recipes-containers/kubernetes/files/helm-upload +++ /dev/null @@ -1,67 +0,0 @@ -#!/bin/bash - -# -# Copyright (c) 2018 Wind River Systems, Inc. -# -# SPDX-License-Identifier: Apache-2.0 -# - -# This script takes the names of packaged helm charts as arguments. -# It installs them in the on-node helm chart repository and regenerates -# the repository index. - - -# We want to run as the "www" user and scripts can't be setuid. The -# sudoers permissions are set up to allow wrsroot to run this script -# as the "www" user without a password. -if [ $USER != "www" ]; then - exec sudo -u www $0 $@ -fi - - -RETVAL=0 -REINDEX=0 - -REPO_BASE='/www/pages/helm_charts' - -# First argument is always the repo where the charts need to be placed -if [ $# -lt 2 ]; then - echo "Usage: helm-upload .. " - exit 1 -fi - -# Make sure the repo directory exists -REPO_DIR="${REPO_BASE}/$1" -if [ ! -e $REPO_DIR ]; then - echo "$REPO_DIR doesn't exist." - exit 1 -fi - -shift 1 - -for FILE in "$@"; do - if [ -r $FILE ]; then - # QUESTION: should we disallow overwriting an existing file? - # The versions are embedded in the filename, so it shouldn't - # cause problems. - cp $FILE $REPO_DIR - if [ $? -ne 0 ]; then - echo Problem adding $FILE to helm chart registry. - RETVAL=1 - else - REINDEX=1 - fi - else - echo Cannot read file ${FILE}. - RETVAL=1 - fi -done - - -# Now re-index the helm repository if we successfully copied in -# any new charts. -if [ $REINDEX -eq 1 ]; then - /usr/sbin/helm repo index $REPO_DIR -fi - -exit $RETVAL diff --git a/meta-stx-virt/recipes-containers/kubernetes/files/helm.sudo b/meta-stx-virt/recipes-containers/kubernetes/files/helm.sudo deleted file mode 100644 index 48e02bf..0000000 --- a/meta-stx-virt/recipes-containers/kubernetes/files/helm.sudo +++ /dev/null @@ -1,3 +0,0 @@ -wrsroot ALL=(www) NOPASSWD: /usr/local/sbin/helm-upload - -Defaults lecture=never, secure_path=/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin diff --git a/meta-stx-virt/recipes-containers/kubernetes/helm_2.13.1.bb b/meta-stx-virt/recipes-containers/kubernetes/helm_3.2.1.bb similarity index 50% rename from meta-stx-virt/recipes-containers/kubernetes/helm_2.13.1.bb rename to meta-stx-virt/recipes-containers/kubernetes/helm_3.2.1.bb index 6889768..8e7c5ce 100644 --- a/meta-stx-virt/recipes-containers/kubernetes/helm_2.13.1.bb +++ b/meta-stx-virt/recipes-containers/kubernetes/helm_3.2.1.bb @@ -3,23 +3,20 @@ SUMMARY = "The Kubernetes Package Manager" HOMEPAGE = "https://github.com/kubernetes/helm/releases " SECTION = "devel" LICENSE = "Apache-2.0" -LIC_FILES_CHKSUM = "file://LICENSE;md5=0c7bcb474e766c7d92924a18cd9d3878" +LIC_FILES_CHKSUM = "file://LICENSE;md5=6a18660411af65e17f370bdbb50e6957" -#SRCREV = "618447cbf203d147601b4b9bd7f8c37a5d39fbb4" -SRCNAME = "helm" -#PROTOCOL = "https" -#BRANCH = "release-2.13" S = "${WORKDIR}/linux-amd64" -PV = "2.13.1" + +inherit stx-metadata + +STX_REPO = "integ" +STX_SUBPATH = "kubernetes/helm/centos/files" SRC_URI = " \ - https://get.helm.sh/helm-v2.13.1-linux-amd64.tar.gz \ - file://helm-upload \ - file://helm.sudo \ + https://get.helm.sh/helm-v${PV}-linux-amd64.tar.gz \ " -# Client: &version.Version{SemVer:"v2.13.1", GitCommit:"618447cbf203d147601b4b9bd7f8c37a5d39fbb4", GitTreeState:"clean"} -SRC_URI[md5sum] = "ffbe37fe328d99156d14a950bbd8107c" -SRC_URI[sha256sum] = "c1967c1dfcd6c921694b80ededdb9bd1beb27cb076864e58957b1568bc98925a" +SRC_URI[md5sum] = "98764c2c0175bd306223cc985700d619" +SRC_URI[sha256sum] = "018f9908cb950701a5d59e757653a790c66d8eda288625dbb185354ca6f41f6b" INSANE_SKIP_${PN} = "ldflags" INHIBIT_PACKAGE_STRIP = "1" @@ -42,8 +39,9 @@ do_install() { install -m 0750 -d ${D}/${sysconfdir}/sudoers.d install -m 0755 ${S}/helm ${D}/${sbindir}/ - install -m 0755 ${S}/../helm.sudo ${D}/${sysconfdir}/sudoers.d/helm - install -m 0755 ${S}/../helm-upload ${D}/${sbindir}/ + install -m 0755 ${STX_METADATA_PATH}/helm.sudo ${D}/${sysconfdir}/sudoers.d/helm + install -m 0755 ${STX_METADATA_PATH}/helm-upload ${D}/${sbindir}/ + install -m 0755 ${STX_METADATA_PATH}/helmv2-cli.sh ${D}/${sbindir}/helmv2-cli } BBCLASSEXTEND = "native nativesdk" @@ -51,6 +49,7 @@ BBCLASSEXTEND = "native nativesdk" FILES_${PN} = " \ ${sbindir}/helm \ ${sbindir}/helm-upload \ + ${sbindir}/helmv2-cli \ ${sysconfdir}/sudoers.d \ ${sysconfdir}/sudoers.d/helm \ "