Rearrange Helm charts into deploy/ and test/e2e/charts directories

Signed-off-by: James Munnelly <james@munnelly.eu>
This commit is contained in:
James Munnelly 2018-12-04 16:14:31 +00:00
parent 640e63f618
commit 5a17c58c03
57 changed files with 18 additions and 17 deletions

View File

@ -37,7 +37,7 @@ filegroup(
"//cmd/acmesolver:all-srcs",
"//cmd/controller:all-srcs",
"//cmd/webhook:all-srcs",
"//contrib:all-srcs",
"//deploy:all-srcs",
"//docs/generated/reference:all-srcs",
"//hack:all-srcs",
"//pkg/acme:all-srcs",

View File

@ -10,6 +10,6 @@ Helm, or want to inspect a 'bare minimum' deployment.
The manifests in this are generated from the Helm chart automatically.
The `values.yaml` files used to configure cert-manager can be found in
[`hack/deploy`](../../../hack/deploy/).
[`hack/deploy`](../../hack/deploy/).
They are automatically generated by running `./hack/update-deploy-gen.sh`.

View File

@ -108,7 +108,7 @@ sh_test(
srcs = ["verify-deploy-gen.sh"],
data = [
":update-deploy-gen",
"//contrib:all-srcs",
"//deploy:all-srcs",
"//hack/deploy:all-srcs",
],
)

View File

@ -34,7 +34,7 @@ gen() {
TMP_OUTPUT_WEBHOOK=$(mktemp)
mkdir -p "$(dirname ${OUTPUT})"
helm template \
"${REPO_ROOT}/contrib/charts/cert-manager" \
"${REPO_ROOT}/deploy/chart" \
--values "${REPO_ROOT}/hack/deploy/${VALUES}.yaml" \
--kube-version "${KUBE_VERSION}" \
--namespace "cert-manager" \
@ -42,7 +42,7 @@ gen() {
--set "fullnameOverride=cert-manager" \
--set "createNamespaceResource=true" > "${TMP_OUTPUT}"
helm template \
"${REPO_ROOT}/contrib/charts/cert-manager/webhook" \
"${REPO_ROOT}/deploy/chart/webhook" \
--values "${REPO_ROOT}/hack/deploy/${VALUES}.yaml" \
--kube-version "${KUBE_VERSION}" \
--namespace "cert-manager" \
@ -53,6 +53,6 @@ gen() {
export HELM_HOME="$(mktemp -d)"
helm init --client-only
helm dep update "${REPO_ROOT}/contrib/charts/cert-manager"
gen rbac-values "${REPO_ROOT}/contrib/manifests/cert-manager/with-rbac"
gen without-rbac-values "${REPO_ROOT}/contrib/manifests/cert-manager/without-rbac"
helm dep update "${REPO_ROOT}/deploy/chart"
gen rbac-values "${REPO_ROOT}/deploy/manifests/with-rbac"
gen without-rbac-values "${REPO_ROOT}/deploy/manifests/without-rbac"

View File

@ -45,7 +45,7 @@ export BUILD_WORKSPACE_DIRECTORY="$(pwd)"
echo "diffing ${DIFFROOT} against freshly generated deploy-gen"
ret=0
diff --exclude=__main__ -Naupr "${DIFFROOT}/contrib/manifests" "${TMP_DIFFROOT}/contrib/manifests" || ret=$?
diff --exclude=__main__ -Naupr "${DIFFROOT}/deploy/manifests" "${TMP_DIFFROOT}/deploy/manifests" || ret=$?
if [[ $ret -eq 0 ]]
then
echo "${DIFFROOT} up to date."

View File

@ -18,6 +18,7 @@ package certmanager
import (
"fmt"
"os/exec"
"github.com/jetstack/cert-manager/test/e2e/framework/addon/chart"
"github.com/jetstack/cert-manager/test/e2e/framework/addon/tiller"
@ -42,11 +43,6 @@ type Certmanager struct {
// Required namespace to deploy Certmanager into.
Namespace string
// Config is a reference to the overall test config structure with flags
// parsed from the CLI.
// This is used for global configuration settings.
Config *config.Config
}
// Details return the details about the certmanager instance deployed
@ -71,11 +67,12 @@ func (p *Certmanager) Setup(cfg *config.Config) error {
if err != nil {
return err
}
p.config = cfg
p.chart = &chart.Chart{
Tiller: p.Tiller,
ReleaseName: "chart-certmanager-" + p.Name,
Namespace: p.Namespace,
ChartName: cfg.RepoRoot + "/contrib/charts/cert-manager",
ChartName: cfg.RepoRoot + "/deploy/chart",
// TODO: move resource requests/limits into Vars so they are always set
Values: []string{cfg.RepoRoot + "/test/fixtures/cert-manager-values.yaml"},
// doesn't matter when installing from disk
@ -91,6 +88,10 @@ func (p *Certmanager) Setup(cfg *config.Config) error {
// Provision will actually deploy this instance of Pebble-ingress to the cluster.
func (p *Certmanager) Provision() error {
if err := exec.Command("kubectl", "apply", "-f", p.config.RepoRoot+"/deploy/manifests/00-crds.yaml").Run(); err != nil {
return fmt.Errorf("Error install cert-manager CRD manifests: %v", err)
}
return p.chart.Provision()
}

View File

@ -68,7 +68,7 @@ func (p *Pebble) Setup(cfg *config.Config) error {
Tiller: p.Tiller,
ReleaseName: "chart-pebble-" + p.Name,
Namespace: p.Namespace,
ChartName: cfg.RepoRoot + "/contrib/charts/pebble",
ChartName: cfg.RepoRoot + "/test/e2e/charts/pebble",
// doesn't matter when installing from disk
ChartVersion: "0",
}

View File

@ -107,7 +107,7 @@ func (v *Vault) Setup(cfg *config.Config) error {
Tiller: v.Tiller,
ReleaseName: "chart-vault-" + v.Name,
Namespace: v.Namespace,
ChartName: cfg.RepoRoot + "/contrib/charts/vault",
ChartName: cfg.RepoRoot + "/test/e2e/charts/vault",
// doesn't matter when installing from disk
ChartVersion: "0",
Vars: []chart.StringTuple{