mirror of https://github.com/helm/helm
commit
240449be9a
@ -1,20 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
# Copyright The Helm Authors.
|
|
||||||
#
|
|
||||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
# you may not use this file except in compliance with the License.
|
|
||||||
# You may obtain a copy of the License at
|
|
||||||
#
|
|
||||||
# http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
#
|
|
||||||
# Unless required by applicable law or agreed to in writing, software
|
|
||||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
# See the License for the specific language governing permissions and
|
|
||||||
# limitations under the License.
|
|
||||||
set -euo pipefail
|
|
||||||
|
|
||||||
curl -sSL https://github.com/golangci/golangci-lint/releases/download/v$GOLANGCI_LINT_VERSION/golangci-lint-$GOLANGCI_LINT_VERSION-linux-amd64.tar.gz | tar xz
|
|
||||||
sudo mv golangci-lint-$GOLANGCI_LINT_VERSION-linux-amd64/golangci-lint /usr/local/bin/golangci-lint
|
|
||||||
rm -rf golangci-lint-$GOLANGCI_LINT_VERSION-linux-amd64
|
|
@ -1,53 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
# Copyright The Helm Authors.
|
|
||||||
#
|
|
||||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
# you may not use this file except in compliance with the License.
|
|
||||||
# You may obtain a copy of the License at
|
|
||||||
#
|
|
||||||
# http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
#
|
|
||||||
# Unless required by applicable law or agreed to in writing, software
|
|
||||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
# See the License for the specific language governing permissions and
|
|
||||||
# limitations under the License.
|
|
||||||
set -euo pipefail
|
|
||||||
|
|
||||||
# Skip on pull request builds
|
|
||||||
if [[ -n "${CIRCLE_PR_NUMBER:-}" ]]; then
|
|
||||||
exit
|
|
||||||
fi
|
|
||||||
|
|
||||||
: ${AZURE_STORAGE_CONNECTION_STRING:?"AZURE_STORAGE_CONNECTION_STRING environment variable is not set"}
|
|
||||||
: ${AZURE_STORAGE_CONTAINER_NAME:?"AZURE_STORAGE_CONTAINER_NAME environment variable is not set"}
|
|
||||||
|
|
||||||
VERSION=
|
|
||||||
if [[ -n "${CIRCLE_TAG:-}" ]]; then
|
|
||||||
VERSION="${CIRCLE_TAG}"
|
|
||||||
elif [[ "${CIRCLE_BRANCH:-}" == "main" ]]; then
|
|
||||||
VERSION="canary"
|
|
||||||
else
|
|
||||||
echo "Skipping deploy step; this is neither a releasable branch or a tag"
|
|
||||||
exit
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "Installing Azure CLI"
|
|
||||||
echo "deb [arch=amd64] https://packages.microsoft.com/repos/azure-cli/ jammy main" | sudo tee /etc/apt/sources.list.d/azure-cli.list
|
|
||||||
curl -L https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add
|
|
||||||
sudo apt install apt-transport-https
|
|
||||||
sudo apt update
|
|
||||||
sudo apt install azure-cli
|
|
||||||
|
|
||||||
|
|
||||||
echo "Building helm binaries"
|
|
||||||
make build-cross
|
|
||||||
make dist checksum VERSION="${VERSION}"
|
|
||||||
|
|
||||||
echo "Pushing binaries to Azure"
|
|
||||||
if [[ "${VERSION}" == "canary" ]]; then
|
|
||||||
az storage blob upload-batch -s _dist/ -d "$AZURE_STORAGE_CONTAINER_NAME" --pattern 'helm-*' --connection-string "$AZURE_STORAGE_CONNECTION_STRING" --overwrite
|
|
||||||
else
|
|
||||||
az storage blob upload-batch -s _dist/ -d "$AZURE_STORAGE_CONTAINER_NAME" --pattern 'helm-*' --connection-string "$AZURE_STORAGE_CONNECTION_STRING"
|
|
||||||
fi
|
|
@ -0,0 +1,18 @@
|
|||||||
|
name: Publish Release Assets to Asset Transparency Log
|
||||||
|
|
||||||
|
on:
|
||||||
|
release:
|
||||||
|
types: [published, created, edited, released]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
github_release_asset_transparency_log_publish_job:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
name: Publish GitHub release asset digests to https://beta-asset.transparencylog.net
|
||||||
|
steps:
|
||||||
|
- name: Gather URLs from GitHub release and publish
|
||||||
|
id: asset-transparency
|
||||||
|
uses: transparencylog/github-releases-asset-transparency-verify-action@c77874b4514ae4003994ece9582675195fe012e2 # v11
|
||||||
|
- name: List verified and published URLs
|
||||||
|
run: echo "Verified URLs ${{ steps.asset-transparency.outputs.verified }}"
|
||||||
|
- name: List failed URLs
|
||||||
|
run: echo "Failed URLs ${{ steps.asset-transparency.outputs.failed }}"
|
@ -0,0 +1,82 @@
|
|||||||
|
name: release
|
||||||
|
on:
|
||||||
|
create:
|
||||||
|
tags:
|
||||||
|
- v*
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
|
||||||
|
# Note the only differences between release and canary-release jobs are:
|
||||||
|
# - only canary passes --overwrite flag
|
||||||
|
# - the VERSION make variable passed to 'make dist checksum' is expected to
|
||||||
|
# be "canary" if the job is triggered by a push to "main" branch. If the
|
||||||
|
# job is triggered by a tag push, VERSION should be the tag ref.
|
||||||
|
jobs:
|
||||||
|
release:
|
||||||
|
if: startsWith(github.ref, 'refs/tags/v')
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout source code
|
||||||
|
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # pin@v3.6.0
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
|
- name: Setup Go
|
||||||
|
uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # pin@4.1.0
|
||||||
|
with:
|
||||||
|
go-version: '1.20'
|
||||||
|
|
||||||
|
- name: Run unit tests
|
||||||
|
run: make test-coverage
|
||||||
|
|
||||||
|
- name: Build Helm Binaries
|
||||||
|
run: |
|
||||||
|
make build-cross
|
||||||
|
make dist checksum VERSION="${{ github.ref_name }}"
|
||||||
|
|
||||||
|
- name: Set latest version
|
||||||
|
run: |
|
||||||
|
# Push the latest semver tag, excluding prerelease tags
|
||||||
|
git tag | sort -r --version-sort | grep '^v[0-9]' | grep -v '-' | head -n1 > _dist/helm-latest-version
|
||||||
|
|
||||||
|
- name: Upload Binaries
|
||||||
|
uses: bacongobbler/azure-blob-storage-upload@50f7d898b7697e864130ea04c303ca38b5751c50 # pin@3.0.0
|
||||||
|
env:
|
||||||
|
AZURE_STORAGE_CONNECTION_STRING: "${{ secrets.AZURE_STORAGE_CONNECTION_STRING }}"
|
||||||
|
AZURE_STORAGE_CONTAINER_NAME: "${{ secrets.AZURE_STORAGE_CONTAINER_NAME }}"
|
||||||
|
with:
|
||||||
|
source_dir: _dist
|
||||||
|
container_name: ${{ secrets.AZURE_STORAGE_CONTAINER_NAME }}
|
||||||
|
connection_string: ${{ secrets.AZURE_STORAGE_CONNECTION_STRING }}
|
||||||
|
extra_args: '--pattern helm-*'
|
||||||
|
|
||||||
|
canary-release:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
if: github.ref == 'refs/heads/main'
|
||||||
|
steps:
|
||||||
|
- name: Checkout source code
|
||||||
|
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # pin@v3.6.0
|
||||||
|
|
||||||
|
- name: Setup Go
|
||||||
|
uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # pin@4.1.0
|
||||||
|
with:
|
||||||
|
go-version: '1.20'
|
||||||
|
|
||||||
|
- name: Run unit tests
|
||||||
|
run: make test-coverage
|
||||||
|
|
||||||
|
- name: Build Helm Binaries
|
||||||
|
run: |
|
||||||
|
make build-cross
|
||||||
|
make dist checksum VERSION="canary"
|
||||||
|
|
||||||
|
- name: Upload Binaries
|
||||||
|
uses: bacongobbler/azure-blob-storage-upload@50f7d898b7697e864130ea04c303ca38b5751c50 # pin@3.0.0
|
||||||
|
with:
|
||||||
|
source_dir: _dist
|
||||||
|
container_name: ${{ secrets.AZURE_STORAGE_CONTAINER_NAME }}
|
||||||
|
connection_string: ${{ secrets.AZURE_STORAGE_CONNECTION_STRING }}
|
||||||
|
extra_args: '--pattern helm-*'
|
||||||
|
# WARNING: this will overwrite existing blobs in your blob storage
|
||||||
|
overwrite: 'true'
|
@ -0,0 +1,94 @@
|
|||||||
|
/*
|
||||||
|
Copyright The Helm Authors.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"fmt"
|
||||||
|
"io"
|
||||||
|
"log"
|
||||||
|
|
||||||
|
"github.com/spf13/cobra"
|
||||||
|
|
||||||
|
"helm.sh/helm/v3/cmd/helm/require"
|
||||||
|
"helm.sh/helm/v3/pkg/action"
|
||||||
|
"helm.sh/helm/v3/pkg/cli/output"
|
||||||
|
)
|
||||||
|
|
||||||
|
type metadataWriter struct {
|
||||||
|
metadata *action.Metadata
|
||||||
|
}
|
||||||
|
|
||||||
|
func newGetMetadataCmd(cfg *action.Configuration, out io.Writer) *cobra.Command {
|
||||||
|
var outfmt output.Format
|
||||||
|
client := action.NewGetMetadata(cfg)
|
||||||
|
|
||||||
|
cmd := &cobra.Command{
|
||||||
|
Use: "metadata RELEASE_NAME",
|
||||||
|
Short: "This command fetches metadata for a given release",
|
||||||
|
Args: require.ExactArgs(1),
|
||||||
|
ValidArgsFunction: func(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) {
|
||||||
|
if len(args) != 0 {
|
||||||
|
return nil, cobra.ShellCompDirectiveNoFileComp
|
||||||
|
}
|
||||||
|
return compListReleases(toComplete, args, cfg)
|
||||||
|
},
|
||||||
|
RunE: func(cmd *cobra.Command, args []string) error {
|
||||||
|
releaseMetadata, err := client.Run(args[0])
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
return outfmt.Write(out, &metadataWriter{releaseMetadata})
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
f := cmd.Flags()
|
||||||
|
f.IntVar(&client.Version, "revision", 0, "specify release revision")
|
||||||
|
err := cmd.RegisterFlagCompletionFunc("revision", func(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) {
|
||||||
|
if len(args) == 1 {
|
||||||
|
return compListRevisions(toComplete, cfg, args[0])
|
||||||
|
}
|
||||||
|
return nil, cobra.ShellCompDirectiveNoFileComp
|
||||||
|
})
|
||||||
|
|
||||||
|
if err != nil {
|
||||||
|
log.Fatal(err)
|
||||||
|
}
|
||||||
|
|
||||||
|
bindOutputFlag(cmd, &outfmt)
|
||||||
|
|
||||||
|
return cmd
|
||||||
|
}
|
||||||
|
|
||||||
|
func (w metadataWriter) WriteTable(out io.Writer) error {
|
||||||
|
_, _ = fmt.Fprintf(out, "NAME: %v\n", w.metadata.Name)
|
||||||
|
_, _ = fmt.Fprintf(out, "CHART: %v\n", w.metadata.Chart)
|
||||||
|
_, _ = fmt.Fprintf(out, "VERSION: %v\n", w.metadata.Version)
|
||||||
|
_, _ = fmt.Fprintf(out, "APP_VERSION: %v\n", w.metadata.AppVersion)
|
||||||
|
_, _ = fmt.Fprintf(out, "NAMESPACE: %v\n", w.metadata.Namespace)
|
||||||
|
_, _ = fmt.Fprintf(out, "REVISION: %v\n", w.metadata.Revision)
|
||||||
|
_, _ = fmt.Fprintf(out, "STATUS: %v\n", w.metadata.Status)
|
||||||
|
_, _ = fmt.Fprintf(out, "DEPLOYED_AT: %v\n", w.metadata.DeployedAt)
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (w metadataWriter) WriteJSON(out io.Writer) error {
|
||||||
|
return output.EncodeJSON(out, w.metadata)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (w metadataWriter) WriteYAML(out io.Writer) error {
|
||||||
|
return output.EncodeYAML(out, w.metadata)
|
||||||
|
}
|
@ -0,0 +1,66 @@
|
|||||||
|
/*
|
||||||
|
Copyright The Helm Authors.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"testing"
|
||||||
|
|
||||||
|
"helm.sh/helm/v3/pkg/release"
|
||||||
|
)
|
||||||
|
|
||||||
|
func TestGetMetadataCmd(t *testing.T) {
|
||||||
|
tests := []cmdTestCase{{
|
||||||
|
name: "get metadata with a release",
|
||||||
|
cmd: "get metadata thomas-guide",
|
||||||
|
golden: "output/get-metadata.txt",
|
||||||
|
rels: []*release.Release{release.Mock(&release.MockReleaseOptions{Name: "thomas-guide"})},
|
||||||
|
}, {
|
||||||
|
name: "get metadata requires release name arg",
|
||||||
|
cmd: "get metadata",
|
||||||
|
golden: "output/get-metadata-args.txt",
|
||||||
|
rels: []*release.Release{release.Mock(&release.MockReleaseOptions{Name: "thomas-guide"})},
|
||||||
|
wantError: true,
|
||||||
|
}, {
|
||||||
|
name: "get metadata to json",
|
||||||
|
cmd: "get metadata thomas-guide --output json",
|
||||||
|
golden: "output/get-metadata.json",
|
||||||
|
rels: []*release.Release{release.Mock(&release.MockReleaseOptions{Name: "thomas-guide"})},
|
||||||
|
}, {
|
||||||
|
name: "get metadata to yaml",
|
||||||
|
cmd: "get metadata thomas-guide --output yaml",
|
||||||
|
golden: "output/get-metadata.yaml",
|
||||||
|
rels: []*release.Release{release.Mock(&release.MockReleaseOptions{Name: "thomas-guide"})},
|
||||||
|
}}
|
||||||
|
runTestCmd(t, tests)
|
||||||
|
}
|
||||||
|
|
||||||
|
func TestGetMetadataCompletion(t *testing.T) {
|
||||||
|
checkReleaseCompletion(t, "get metadata", false)
|
||||||
|
}
|
||||||
|
|
||||||
|
func TestGetMetadataRevisionCompletion(t *testing.T) {
|
||||||
|
revisionFlagCompletionTest(t, "get metadata")
|
||||||
|
}
|
||||||
|
|
||||||
|
func TestGetMetadataOutputCompletion(t *testing.T) {
|
||||||
|
outputFlagCompletionTest(t, "get metadata")
|
||||||
|
}
|
||||||
|
|
||||||
|
func TestGetMetadataFileCompletion(t *testing.T) {
|
||||||
|
checkFileCompletion(t, "get metadata", false)
|
||||||
|
checkFileCompletion(t, "get metadata myrelease", false)
|
||||||
|
}
|
@ -0,0 +1,19 @@
|
|||||||
|
name: wrongname
|
||||||
|
commands:
|
||||||
|
- name: empty
|
||||||
|
- name: full
|
||||||
|
commands:
|
||||||
|
- name: more
|
||||||
|
validArgs:
|
||||||
|
- one
|
||||||
|
- two
|
||||||
|
flags:
|
||||||
|
- b
|
||||||
|
- ball
|
||||||
|
- name: less
|
||||||
|
flags:
|
||||||
|
- a
|
||||||
|
- all
|
||||||
|
flags:
|
||||||
|
- z
|
||||||
|
- q
|
@ -0,0 +1,7 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
echo $HELM_PLUGIN_NAME
|
||||||
|
echo $HELM_PLUGIN_DIR
|
||||||
|
echo $HELM_PLUGINS
|
||||||
|
echo $HELM_REPOSITORY_CONFIG
|
||||||
|
echo $HELM_REPOSITORY_CACHE
|
||||||
|
echo $HELM_BIN
|
@ -0,0 +1,4 @@
|
|||||||
|
name: fullenv
|
||||||
|
usage: "show env vars"
|
||||||
|
description: "show all env vars"
|
||||||
|
command: "$HELM_PLUGIN_DIR/fullenv.sh"
|
@ -0,0 +1,6 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
generated: 2016-10-03T16:03:10.640376913-06:00
|
||||||
|
repositories:
|
||||||
|
- cache: testing-index.yaml
|
||||||
|
name: testing
|
||||||
|
url: http://example.com/charts
|
@ -0,0 +1,3 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
entries: {}
|
||||||
|
generated: "2020-09-09T19:50:50.198347916-04:00"
|
@ -0,0 +1,66 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
entries:
|
||||||
|
alpine:
|
||||||
|
- name: alpine
|
||||||
|
url: https://charts.helm.sh/stable/alpine-0.1.0.tgz
|
||||||
|
checksum: 0e6661f193211d7a5206918d42f5c2a9470b737d
|
||||||
|
created: "2018-06-27T10:00:18.230700509Z"
|
||||||
|
deprecated: true
|
||||||
|
home: https://helm.sh/helm
|
||||||
|
sources:
|
||||||
|
- https://github.com/helm/helm
|
||||||
|
version: 0.1.0
|
||||||
|
appVersion: 1.2.3
|
||||||
|
description: Deploy a basic Alpine Linux pod
|
||||||
|
keywords: []
|
||||||
|
maintainers: []
|
||||||
|
icon: ""
|
||||||
|
apiVersion: v2
|
||||||
|
- name: alpine
|
||||||
|
url: https://charts.helm.sh/stable/alpine-0.2.0.tgz
|
||||||
|
checksum: 0e6661f193211d7a5206918d42f5c2a9470b737d
|
||||||
|
created: "2018-07-09T11:34:37.797864902Z"
|
||||||
|
home: https://helm.sh/helm
|
||||||
|
sources:
|
||||||
|
- https://github.com/helm/helm
|
||||||
|
version: 0.2.0
|
||||||
|
appVersion: 2.3.4
|
||||||
|
description: Deploy a basic Alpine Linux pod
|
||||||
|
keywords: []
|
||||||
|
maintainers: []
|
||||||
|
icon: ""
|
||||||
|
apiVersion: v2
|
||||||
|
- name: alpine
|
||||||
|
url: https://charts.helm.sh/stable/alpine-0.3.0-rc.1.tgz
|
||||||
|
checksum: 0e6661f193211d7a5206918d42f5c2a9470b737d
|
||||||
|
created: "2020-11-12T08:44:58.872726222Z"
|
||||||
|
home: https://helm.sh/helm
|
||||||
|
sources:
|
||||||
|
- https://github.com/helm/helm
|
||||||
|
version: 0.3.0-rc.1
|
||||||
|
appVersion: 3.0.0
|
||||||
|
description: Deploy a basic Alpine Linux pod
|
||||||
|
keywords: []
|
||||||
|
maintainers: []
|
||||||
|
icon: ""
|
||||||
|
apiVersion: v2
|
||||||
|
mariadb:
|
||||||
|
- name: mariadb
|
||||||
|
url: https://charts.helm.sh/stable/mariadb-0.3.0.tgz
|
||||||
|
checksum: 65229f6de44a2be9f215d11dbff311673fc8ba56
|
||||||
|
created: "2018-04-23T08:20:27.160959131Z"
|
||||||
|
home: https://mariadb.org
|
||||||
|
sources:
|
||||||
|
- https://github.com/bitnami/bitnami-docker-mariadb
|
||||||
|
version: 0.3.0
|
||||||
|
description: Chart for MariaDB
|
||||||
|
keywords:
|
||||||
|
- mariadb
|
||||||
|
- mysql
|
||||||
|
- database
|
||||||
|
- sql
|
||||||
|
maintainers:
|
||||||
|
- name: Bitnami
|
||||||
|
email: containers@bitnami.com
|
||||||
|
icon: ""
|
||||||
|
apiVersion: v2
|
@ -0,0 +1,3 @@
|
|||||||
|
Error: "helm get metadata" requires 1 argument
|
||||||
|
|
||||||
|
Usage: helm get metadata RELEASE_NAME [flags]
|
@ -0,0 +1 @@
|
|||||||
|
{"name":"thomas-guide","chart":"foo","version":"0.1.0-beta.1","appVersion":"1.0","namespace":"default","revision":1,"status":"deployed","deployedAt":"1977-09-02T22:04:05Z"}
|
@ -0,0 +1,8 @@
|
|||||||
|
NAME: thomas-guide
|
||||||
|
CHART: foo
|
||||||
|
VERSION: 0.1.0-beta.1
|
||||||
|
APP_VERSION: 1.0
|
||||||
|
NAMESPACE: default
|
||||||
|
REVISION: 1
|
||||||
|
STATUS: deployed
|
||||||
|
DEPLOYED_AT: 1977-09-02T22:04:05Z
|
@ -0,0 +1,8 @@
|
|||||||
|
appVersion: "1.0"
|
||||||
|
chart: foo
|
||||||
|
deployedAt: "1977-09-02T22:04:05Z"
|
||||||
|
name: thomas-guide
|
||||||
|
namespace: default
|
||||||
|
revision: 1
|
||||||
|
status: deployed
|
||||||
|
version: 0.1.0-beta.1
|
@ -0,0 +1,32 @@
|
|||||||
|
---
|
||||||
|
# Source: issue-9027/charts/subchart/templates/values.yaml
|
||||||
|
global:
|
||||||
|
hash:
|
||||||
|
key3: 13
|
||||||
|
key4: 4
|
||||||
|
key5: 5
|
||||||
|
key6: 6
|
||||||
|
hash:
|
||||||
|
key3: 13
|
||||||
|
key4: 4
|
||||||
|
key5: 5
|
||||||
|
key6: 6
|
||||||
|
---
|
||||||
|
# Source: issue-9027/templates/values.yaml
|
||||||
|
global:
|
||||||
|
hash:
|
||||||
|
key1: null
|
||||||
|
key2: null
|
||||||
|
key3: 13
|
||||||
|
subchart:
|
||||||
|
global:
|
||||||
|
hash:
|
||||||
|
key3: 13
|
||||||
|
key4: 4
|
||||||
|
key5: 5
|
||||||
|
key6: 6
|
||||||
|
hash:
|
||||||
|
key3: 13
|
||||||
|
key4: 4
|
||||||
|
key5: 5
|
||||||
|
key6: 6
|
@ -1,4 +0,0 @@
|
|||||||
==> Linting testdata/testcharts/chart-with-only-crds
|
|
||||||
[WARNING] templates/: directory not found
|
|
||||||
|
|
||||||
1 chart(s) linted, 0 chart(s) failed
|
|
@ -0,0 +1 @@
|
|||||||
|
Error: release has no 3 version
|
@ -0,0 +1 @@
|
|||||||
|
Error: no results found
|
@ -0,0 +1,122 @@
|
|||||||
|
---
|
||||||
|
# Source: subchart/templates/subdir/serviceaccount.yaml
|
||||||
|
apiVersion: v1
|
||||||
|
kind: ServiceAccount
|
||||||
|
metadata:
|
||||||
|
name: subchart-sa
|
||||||
|
---
|
||||||
|
# Source: subchart/templates/subdir/configmap.yaml
|
||||||
|
apiVersion: v1
|
||||||
|
kind: ConfigMap
|
||||||
|
metadata:
|
||||||
|
name: subchart-cm
|
||||||
|
data:
|
||||||
|
value: qux
|
||||||
|
---
|
||||||
|
# Source: subchart/templates/subdir/role.yaml
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
kind: Role
|
||||||
|
metadata:
|
||||||
|
name: subchart-role
|
||||||
|
rules:
|
||||||
|
- apiGroups: [""]
|
||||||
|
resources: ["pods"]
|
||||||
|
verbs: ["get","list","watch"]
|
||||||
|
---
|
||||||
|
# Source: subchart/templates/subdir/rolebinding.yaml
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
kind: RoleBinding
|
||||||
|
metadata:
|
||||||
|
name: subchart-binding
|
||||||
|
roleRef:
|
||||||
|
apiGroup: rbac.authorization.k8s.io
|
||||||
|
kind: Role
|
||||||
|
name: subchart-role
|
||||||
|
subjects:
|
||||||
|
- kind: ServiceAccount
|
||||||
|
name: subchart-sa
|
||||||
|
namespace: default
|
||||||
|
---
|
||||||
|
# Source: subchart/charts/subcharta/templates/service.yaml
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: subcharta
|
||||||
|
labels:
|
||||||
|
helm.sh/chart: "subcharta-0.1.0"
|
||||||
|
spec:
|
||||||
|
type: ClusterIP
|
||||||
|
ports:
|
||||||
|
- port: 80
|
||||||
|
targetPort: 80
|
||||||
|
protocol: TCP
|
||||||
|
name: apache
|
||||||
|
selector:
|
||||||
|
app.kubernetes.io/name: subcharta
|
||||||
|
---
|
||||||
|
# Source: subchart/charts/subchartb/templates/service.yaml
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: subchartb
|
||||||
|
labels:
|
||||||
|
helm.sh/chart: "subchartb-0.1.0"
|
||||||
|
spec:
|
||||||
|
type: ClusterIP
|
||||||
|
ports:
|
||||||
|
- port: 80
|
||||||
|
targetPort: 80
|
||||||
|
protocol: TCP
|
||||||
|
name: nginx
|
||||||
|
selector:
|
||||||
|
app.kubernetes.io/name: subchartb
|
||||||
|
---
|
||||||
|
# Source: subchart/templates/service.yaml
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: subchart
|
||||||
|
labels:
|
||||||
|
helm.sh/chart: "subchart-0.1.0"
|
||||||
|
app.kubernetes.io/instance: "release-name"
|
||||||
|
kube-version/major: "1"
|
||||||
|
kube-version/minor: "20"
|
||||||
|
kube-version/version: "v1.20.0"
|
||||||
|
spec:
|
||||||
|
type: ClusterIP
|
||||||
|
ports:
|
||||||
|
- port: 80
|
||||||
|
targetPort: 80
|
||||||
|
protocol: TCP
|
||||||
|
name: nginx
|
||||||
|
selector:
|
||||||
|
app.kubernetes.io/name: subchart
|
||||||
|
---
|
||||||
|
# Source: subchart/templates/tests/test-config.yaml
|
||||||
|
apiVersion: v1
|
||||||
|
kind: ConfigMap
|
||||||
|
metadata:
|
||||||
|
name: "release-name-testconfig"
|
||||||
|
annotations:
|
||||||
|
"helm.sh/hook": test
|
||||||
|
data:
|
||||||
|
message: Hello World
|
||||||
|
---
|
||||||
|
# Source: subchart/templates/tests/test-nothing.yaml
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Pod
|
||||||
|
metadata:
|
||||||
|
name: "release-name-test"
|
||||||
|
annotations:
|
||||||
|
"helm.sh/hook": test
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- name: test
|
||||||
|
image: "alpine:latest"
|
||||||
|
envFrom:
|
||||||
|
- configMapRef:
|
||||||
|
name: "release-name-testconfig"
|
||||||
|
command:
|
||||||
|
- echo
|
||||||
|
- "$message"
|
||||||
|
restartPolicy: Never
|
@ -0,0 +1,122 @@
|
|||||||
|
---
|
||||||
|
# Source: subchart/templates/subdir/serviceaccount.yaml
|
||||||
|
apiVersion: v1
|
||||||
|
kind: ServiceAccount
|
||||||
|
metadata:
|
||||||
|
name: subchart-sa
|
||||||
|
---
|
||||||
|
# Source: subchart/templates/subdir/configmap.yaml
|
||||||
|
apiVersion: v1
|
||||||
|
kind: ConfigMap
|
||||||
|
metadata:
|
||||||
|
name: subchart-cm
|
||||||
|
data:
|
||||||
|
value: baz
|
||||||
|
---
|
||||||
|
# Source: subchart/templates/subdir/role.yaml
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
kind: Role
|
||||||
|
metadata:
|
||||||
|
name: subchart-role
|
||||||
|
rules:
|
||||||
|
- apiGroups: [""]
|
||||||
|
resources: ["pods"]
|
||||||
|
verbs: ["get","list","watch"]
|
||||||
|
---
|
||||||
|
# Source: subchart/templates/subdir/rolebinding.yaml
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
kind: RoleBinding
|
||||||
|
metadata:
|
||||||
|
name: subchart-binding
|
||||||
|
roleRef:
|
||||||
|
apiGroup: rbac.authorization.k8s.io
|
||||||
|
kind: Role
|
||||||
|
name: subchart-role
|
||||||
|
subjects:
|
||||||
|
- kind: ServiceAccount
|
||||||
|
name: subchart-sa
|
||||||
|
namespace: default
|
||||||
|
---
|
||||||
|
# Source: subchart/charts/subcharta/templates/service.yaml
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: subcharta
|
||||||
|
labels:
|
||||||
|
helm.sh/chart: "subcharta-0.1.0"
|
||||||
|
spec:
|
||||||
|
type: ClusterIP
|
||||||
|
ports:
|
||||||
|
- port: 80
|
||||||
|
targetPort: 80
|
||||||
|
protocol: TCP
|
||||||
|
name: apache
|
||||||
|
selector:
|
||||||
|
app.kubernetes.io/name: subcharta
|
||||||
|
---
|
||||||
|
# Source: subchart/charts/subchartb/templates/service.yaml
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: subchartb
|
||||||
|
labels:
|
||||||
|
helm.sh/chart: "subchartb-0.1.0"
|
||||||
|
spec:
|
||||||
|
type: ClusterIP
|
||||||
|
ports:
|
||||||
|
- port: 80
|
||||||
|
targetPort: 80
|
||||||
|
protocol: TCP
|
||||||
|
name: nginx
|
||||||
|
selector:
|
||||||
|
app.kubernetes.io/name: subchartb
|
||||||
|
---
|
||||||
|
# Source: subchart/templates/service.yaml
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: subchart
|
||||||
|
labels:
|
||||||
|
helm.sh/chart: "subchart-0.1.0"
|
||||||
|
app.kubernetes.io/instance: "release-name"
|
||||||
|
kube-version/major: "1"
|
||||||
|
kube-version/minor: "20"
|
||||||
|
kube-version/version: "v1.20.0"
|
||||||
|
spec:
|
||||||
|
type: ClusterIP
|
||||||
|
ports:
|
||||||
|
- port: 80
|
||||||
|
targetPort: 80
|
||||||
|
protocol: TCP
|
||||||
|
name: nginx
|
||||||
|
selector:
|
||||||
|
app.kubernetes.io/name: subchart
|
||||||
|
---
|
||||||
|
# Source: subchart/templates/tests/test-config.yaml
|
||||||
|
apiVersion: v1
|
||||||
|
kind: ConfigMap
|
||||||
|
metadata:
|
||||||
|
name: "release-name-testconfig"
|
||||||
|
annotations:
|
||||||
|
"helm.sh/hook": test
|
||||||
|
data:
|
||||||
|
message: Hello World
|
||||||
|
---
|
||||||
|
# Source: subchart/templates/tests/test-nothing.yaml
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Pod
|
||||||
|
metadata:
|
||||||
|
name: "release-name-test"
|
||||||
|
annotations:
|
||||||
|
"helm.sh/hook": test
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- name: test
|
||||||
|
image: "alpine:latest"
|
||||||
|
envFrom:
|
||||||
|
- configMapRef:
|
||||||
|
name: "release-name-testconfig"
|
||||||
|
command:
|
||||||
|
- echo
|
||||||
|
- "$message"
|
||||||
|
restartPolicy: Never
|
@ -0,0 +1,122 @@
|
|||||||
|
---
|
||||||
|
# Source: subchart/templates/subdir/serviceaccount.yaml
|
||||||
|
apiVersion: v1
|
||||||
|
kind: ServiceAccount
|
||||||
|
metadata:
|
||||||
|
name: subchart-sa
|
||||||
|
---
|
||||||
|
# Source: subchart/templates/subdir/configmap.yaml
|
||||||
|
apiVersion: v1
|
||||||
|
kind: ConfigMap
|
||||||
|
metadata:
|
||||||
|
name: subchart-cm
|
||||||
|
data:
|
||||||
|
value: foo
|
||||||
|
---
|
||||||
|
# Source: subchart/templates/subdir/role.yaml
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
kind: Role
|
||||||
|
metadata:
|
||||||
|
name: subchart-role
|
||||||
|
rules:
|
||||||
|
- apiGroups: [""]
|
||||||
|
resources: ["pods"]
|
||||||
|
verbs: ["get","list","watch"]
|
||||||
|
---
|
||||||
|
# Source: subchart/templates/subdir/rolebinding.yaml
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
kind: RoleBinding
|
||||||
|
metadata:
|
||||||
|
name: subchart-binding
|
||||||
|
roleRef:
|
||||||
|
apiGroup: rbac.authorization.k8s.io
|
||||||
|
kind: Role
|
||||||
|
name: subchart-role
|
||||||
|
subjects:
|
||||||
|
- kind: ServiceAccount
|
||||||
|
name: subchart-sa
|
||||||
|
namespace: default
|
||||||
|
---
|
||||||
|
# Source: subchart/charts/subcharta/templates/service.yaml
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: subcharta
|
||||||
|
labels:
|
||||||
|
helm.sh/chart: "subcharta-0.1.0"
|
||||||
|
spec:
|
||||||
|
type: ClusterIP
|
||||||
|
ports:
|
||||||
|
- port: 80
|
||||||
|
targetPort: 80
|
||||||
|
protocol: TCP
|
||||||
|
name: apache
|
||||||
|
selector:
|
||||||
|
app.kubernetes.io/name: subcharta
|
||||||
|
---
|
||||||
|
# Source: subchart/charts/subchartb/templates/service.yaml
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: subchartb
|
||||||
|
labels:
|
||||||
|
helm.sh/chart: "subchartb-0.1.0"
|
||||||
|
spec:
|
||||||
|
type: ClusterIP
|
||||||
|
ports:
|
||||||
|
- port: 80
|
||||||
|
targetPort: 80
|
||||||
|
protocol: TCP
|
||||||
|
name: nginx
|
||||||
|
selector:
|
||||||
|
app.kubernetes.io/name: subchartb
|
||||||
|
---
|
||||||
|
# Source: subchart/templates/service.yaml
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: subchart
|
||||||
|
labels:
|
||||||
|
helm.sh/chart: "subchart-0.1.0"
|
||||||
|
app.kubernetes.io/instance: "release-name"
|
||||||
|
kube-version/major: "1"
|
||||||
|
kube-version/minor: "20"
|
||||||
|
kube-version/version: "v1.20.0"
|
||||||
|
spec:
|
||||||
|
type: ClusterIP
|
||||||
|
ports:
|
||||||
|
- port: 80
|
||||||
|
targetPort: 80
|
||||||
|
protocol: TCP
|
||||||
|
name: nginx
|
||||||
|
selector:
|
||||||
|
app.kubernetes.io/name: subchart
|
||||||
|
---
|
||||||
|
# Source: subchart/templates/tests/test-config.yaml
|
||||||
|
apiVersion: v1
|
||||||
|
kind: ConfigMap
|
||||||
|
metadata:
|
||||||
|
name: "release-name-testconfig"
|
||||||
|
annotations:
|
||||||
|
"helm.sh/hook": test
|
||||||
|
data:
|
||||||
|
message: Hello World
|
||||||
|
---
|
||||||
|
# Source: subchart/templates/tests/test-nothing.yaml
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Pod
|
||||||
|
metadata:
|
||||||
|
name: "release-name-test"
|
||||||
|
annotations:
|
||||||
|
"helm.sh/hook": test
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- name: test
|
||||||
|
image: "alpine:latest"
|
||||||
|
envFrom:
|
||||||
|
- configMapRef:
|
||||||
|
name: "release-name-testconfig"
|
||||||
|
command:
|
||||||
|
- echo
|
||||||
|
- "$message"
|
||||||
|
restartPolicy: Never
|
@ -1 +1 @@
|
|||||||
version.BuildInfo{Version:"v3.10", GitCommit:"", GitTreeState:"", GoVersion:""}
|
version.BuildInfo{Version:"v3.13", GitCommit:"", GitTreeState:"", GoVersion:""}
|
||||||
|
@ -1 +1 @@
|
|||||||
version.BuildInfo{Version:"v3.10", GitCommit:"", GitTreeState:"", GoVersion:""}
|
version.BuildInfo{Version:"v3.13", GitCommit:"", GitTreeState:"", GoVersion:""}
|
||||||
|
@ -1 +1 @@
|
|||||||
v3.10
|
v3.13
|
||||||
|
@ -1 +1 @@
|
|||||||
Version: v3.10
|
Version: v3.13
|
@ -1 +1 @@
|
|||||||
version.BuildInfo{Version:"v3.10", GitCommit:"", GitTreeState:"", GoVersion:""}
|
version.BuildInfo{Version:"v3.13", GitCommit:"", GitTreeState:"", GoVersion:""}
|
||||||
|
@ -0,0 +1,6 @@
|
|||||||
|
apiVersion: v2
|
||||||
|
name: issue-9027
|
||||||
|
version: 0.1.0
|
||||||
|
dependencies:
|
||||||
|
- name: subchart
|
||||||
|
version: 0.1.0
|
@ -0,0 +1,3 @@
|
|||||||
|
apiVersion: v2
|
||||||
|
name: subchart
|
||||||
|
version: 0.1.0
|
@ -0,0 +1 @@
|
|||||||
|
{{ .Values | toYaml }}
|
@ -0,0 +1,17 @@
|
|||||||
|
global:
|
||||||
|
hash:
|
||||||
|
key1: 1
|
||||||
|
key2: 2
|
||||||
|
key3: 3
|
||||||
|
key4: 4
|
||||||
|
key5: 5
|
||||||
|
key6: 6
|
||||||
|
|
||||||
|
|
||||||
|
hash:
|
||||||
|
key1: 1
|
||||||
|
key2: 2
|
||||||
|
key3: 3
|
||||||
|
key4: 4
|
||||||
|
key5: 5
|
||||||
|
key6: 6
|
@ -0,0 +1 @@
|
|||||||
|
{{ .Values | toYaml }}
|
@ -0,0 +1,11 @@
|
|||||||
|
global:
|
||||||
|
hash:
|
||||||
|
key1: null
|
||||||
|
key2: null
|
||||||
|
key3: 13
|
||||||
|
|
||||||
|
subchart:
|
||||||
|
hash:
|
||||||
|
key1: null
|
||||||
|
key2: null
|
||||||
|
key3: 13
|
@ -0,0 +1,5 @@
|
|||||||
|
# This file is used to test values passed by file at the command line
|
||||||
|
|
||||||
|
configmap:
|
||||||
|
enabled: true
|
||||||
|
value: "qux"
|
@ -0,0 +1,8 @@
|
|||||||
|
{{ if .Values.configmap.enabled -}}
|
||||||
|
apiVersion: v1
|
||||||
|
kind: ConfigMap
|
||||||
|
metadata:
|
||||||
|
name: {{ .Chart.Name }}-cm
|
||||||
|
data:
|
||||||
|
value: {{ .Values.configmap.value }}
|
||||||
|
{{- end }}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue