mirror of
https://github.com/argoproj/argo-cd
synced 2026-04-21 17:07:16 +00:00
chore!: Helm2 removal (#8313)
* chore: remove helm2 Reorder test/container/Dockerfile to mitigate issue of being unable to create .gitconfig since the homedir is not present chore: cleanup helm2 and tests related to it Remove helm2 init. Fix unused import Use helm 3 structure for CRDs Remove helm2-dependency testdata Address PR comments Add back values-production and value.yaml on helm tests Remove helm2 from openapi. Signed-off-by: Shyukri Shyukriev <shyukri.shyukriev@mariadb.com> modified: util/helm/cmd_test.go * fix: generated openapi Signed-off-by: Michael Crenshaw <michael@crenshaw.dev> Co-authored-by: Michael Crenshaw <michael@crenshaw.dev>
This commit is contained in:
parent
1a47fa2b03
commit
6b783af5c6
62 changed files with 124 additions and 1151 deletions
3
.github/workflows/ci-build.yaml
vendored
3
.github/workflows/ci-build.yaml
vendored
|
|
@ -222,9 +222,6 @@ jobs:
|
|||
make install-codegen-tools-local
|
||||
make install-go-tools-local
|
||||
working-directory: /home/runner/go/src/github.com/argoproj/argo-cd
|
||||
- name: Initialize local Helm
|
||||
run: |
|
||||
helm2 init --client-only
|
||||
- name: Run codegen
|
||||
run: |
|
||||
set -x
|
||||
|
|
|
|||
21
.github/workflows/release.yaml
vendored
21
.github/workflows/release.yaml
vendored
|
|
@ -2,14 +2,14 @@ name: Create ArgoCD release
|
|||
on:
|
||||
push:
|
||||
tags:
|
||||
- 'release-v*'
|
||||
- '!release-v1.5*'
|
||||
- '!release-v1.4*'
|
||||
- '!release-v1.3*'
|
||||
- '!release-v1.2*'
|
||||
- '!release-v1.1*'
|
||||
- '!release-v1.0*'
|
||||
- '!release-v0*'
|
||||
- "release-v*"
|
||||
- "!release-v1.5*"
|
||||
- "!release-v1.4*"
|
||||
- "!release-v1.3*"
|
||||
- "!release-v1.2*"
|
||||
- "!release-v1.1*"
|
||||
- "!release-v1.0*"
|
||||
- "!release-v0*"
|
||||
|
||||
env:
|
||||
GOLANG_VERSION: '1.17'
|
||||
|
|
@ -172,7 +172,6 @@ jobs:
|
|||
run: |
|
||||
set -ue
|
||||
make install-codegen-tools-local
|
||||
helm2 init --client-only
|
||||
make manifests-local VERSION=${TARGET_VERSION}
|
||||
git diff
|
||||
git commit manifests/ -m "Bump version to ${TARGET_VERSION}"
|
||||
|
|
@ -196,7 +195,6 @@ jobs:
|
|||
docker login --username "${DOCKER_USERNAME}" --password "${DOCKER_TOKEN}"
|
||||
if: ${{ env.DRY_RUN != 'true' }}
|
||||
|
||||
|
||||
- uses: docker/setup-qemu-action@v1
|
||||
- uses: docker/setup-buildx-action@v1
|
||||
- name: Build and push Docker image for release
|
||||
|
|
@ -213,7 +211,7 @@ jobs:
|
|||
- name: Read release notes file
|
||||
id: release-notes
|
||||
uses: juliangruber/read-file-action@v1
|
||||
with:
|
||||
with:
|
||||
path: ${{ env.RELEASE_NOTES }}
|
||||
|
||||
- name: Push changes to release branch
|
||||
|
|
@ -345,4 +343,3 @@ jobs:
|
|||
set -ue
|
||||
git push --delete origin ${SOURCE_TAG}
|
||||
if: ${{ always() }}
|
||||
|
||||
|
|
|
|||
|
|
@ -28,7 +28,6 @@ ADD hack/install.sh .
|
|||
ADD hack/installers installers
|
||||
ADD hack/tool-versions.sh .
|
||||
|
||||
RUN ./install.sh helm2-linux
|
||||
RUN ./install.sh helm-linux
|
||||
RUN INSTALL_PATH=/usr/local/bin ./install.sh kustomize
|
||||
RUN ./install.sh awscli-linux
|
||||
|
|
@ -55,7 +54,6 @@ RUN groupadd -g 999 argocd && \
|
|||
|
||||
COPY hack/gpg-wrapper.sh /usr/local/bin/gpg-wrapper.sh
|
||||
COPY hack/git-verify-wrapper.sh /usr/local/bin/git-verify-wrapper.sh
|
||||
COPY --from=builder /usr/local/bin/helm2 /usr/local/bin/helm2
|
||||
COPY --from=builder /usr/local/bin/helm /usr/local/bin/helm
|
||||
COPY --from=builder /usr/local/bin/kustomize /usr/local/bin/kustomize
|
||||
COPY --from=builder /usr/local/aws-cli/v2/current/dist /usr/local/aws-cli/v2/current/dist
|
||||
|
|
|
|||
1
Makefile
1
Makefile
|
|
@ -532,7 +532,6 @@ install-tools-local: install-test-tools-local install-codegen-tools-local instal
|
|||
.PHONY: install-test-tools-local
|
||||
install-test-tools-local:
|
||||
./hack/install.sh kustomize
|
||||
./hack/install.sh helm2-linux
|
||||
./hack/install.sh helm-linux
|
||||
|
||||
# Installs all tools required for running codegen (Linux packages)
|
||||
|
|
|
|||
|
|
@ -4951,7 +4951,7 @@
|
|||
},
|
||||
"version": {
|
||||
"type": "string",
|
||||
"title": "Version is the Helm version to use for templating (either \"2\" or \"3\")"
|
||||
"title": "Version is the Helm version to use for templating (\"3\")"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
|
|||
|
|
@ -5,7 +5,6 @@ RUN ./install.sh codegen-go-tools
|
|||
RUN ./install.sh lint-tools
|
||||
|
||||
RUN mkdir -p /home/user && chmod 777 /home/user
|
||||
RUN HELM_HOME=/home/user/.helm helm2 init --client-only
|
||||
|
||||
RUN git config --system user.name "ArgoCD Test User"
|
||||
RUN git config --system user.email "noreply@example.com"
|
||||
|
|
|
|||
|
|
@ -1 +0,0 @@
|
|||
2d9124f582a33b269f48215a00922b3dcf7a03f265499886ba956fbc03ff9892 helm-v2.16.0-linux-amd64.tar.gz
|
||||
|
|
@ -1 +0,0 @@
|
|||
f3bec3c7c55f6a9eb9e6586b8c503f370af92fe987fcbf741f37707606d70296 helm-v2.17.0-linux-amd64.tar.gz
|
||||
|
|
@ -1 +0,0 @@
|
|||
c3ebe8fa04b4e235eb7a9ab030a98d3002f93ecb842f0a8741f98383a9493d7f helm-v2.17.0-linux-arm64.tar.gz
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
#!/bin/bash
|
||||
set -eux -o pipefail
|
||||
|
||||
KUSTOMIZE_VERSION=4.2.0 "$(dirname $0)/../install.sh" helm2-linux kustomize protoc
|
||||
KUSTOMIZE_VERSION=4.2.0 "$(dirname $0)/../install.sh" kustomize protoc
|
||||
|
|
|
|||
|
|
@ -1,12 +0,0 @@
|
|||
#!/bin/bash
|
||||
set -eux -o pipefail
|
||||
|
||||
. $(dirname $0)/../tool-versions.sh
|
||||
|
||||
export TARGET_FILE=helm-v${helm2_version}-linux-${ARCHITECTURE}.tar.gz
|
||||
|
||||
[ -e ${DOWNLOADS}/${TARGET_FILE} ] || curl -sLf --retry 3 -o ${DOWNLOADS}/${TARGET_FILE} https://get.helm.sh/helm-v${helm2_version}-linux-$ARCHITECTURE.tar.gz
|
||||
$(dirname $0)/compare-chksum.sh
|
||||
mkdir -p /tmp/helm2 && tar -C /tmp/helm2 -xf $DOWNLOADS/${TARGET_FILE}
|
||||
sudo install -m 0755 /tmp/helm2/linux-$ARCHITECTURE/helm $BIN/helm2
|
||||
helm2 version --client
|
||||
|
|
@ -9,7 +9,6 @@
|
|||
# SHA256 sum of the binary.
|
||||
###############################################################################
|
||||
awscliv2_version=2.4.6
|
||||
helm2_version=2.17.0
|
||||
helm3_version=3.8.1
|
||||
kubectl_version=1.17.8
|
||||
kubectx_version=0.6.3
|
||||
|
|
|
|||
|
|
@ -283,7 +283,7 @@ spec:
|
|||
type: string
|
||||
version:
|
||||
description: Version is the Helm version to use for templating
|
||||
(either "2" or "3")
|
||||
("3")
|
||||
type: string
|
||||
type: object
|
||||
kustomize:
|
||||
|
|
@ -630,7 +630,7 @@ spec:
|
|||
type: string
|
||||
version:
|
||||
description: Version is the Helm version to use for templating
|
||||
(either "2" or "3")
|
||||
("3")
|
||||
type: string
|
||||
type: object
|
||||
kustomize:
|
||||
|
|
@ -984,7 +984,7 @@ spec:
|
|||
type: string
|
||||
version:
|
||||
description: Version is the Helm version to use for
|
||||
templating (either "2" or "3")
|
||||
templating ("3")
|
||||
type: string
|
||||
type: object
|
||||
kustomize:
|
||||
|
|
@ -1355,7 +1355,7 @@ spec:
|
|||
type: string
|
||||
version:
|
||||
description: Version is the Helm version to use
|
||||
for templating (either "2" or "3")
|
||||
for templating ("3")
|
||||
type: string
|
||||
type: object
|
||||
kustomize:
|
||||
|
|
@ -1700,7 +1700,7 @@ spec:
|
|||
type: string
|
||||
version:
|
||||
description: Version is the Helm version to use for
|
||||
templating (either "2" or "3")
|
||||
templating ("3")
|
||||
type: string
|
||||
type: object
|
||||
kustomize:
|
||||
|
|
@ -2034,7 +2034,7 @@ spec:
|
|||
type: string
|
||||
version:
|
||||
description: Version is the Helm version to use for
|
||||
templating (either "2" or "3")
|
||||
templating ("3")
|
||||
type: string
|
||||
type: object
|
||||
kustomize:
|
||||
|
|
|
|||
|
|
@ -282,7 +282,7 @@ spec:
|
|||
type: string
|
||||
version:
|
||||
description: Version is the Helm version to use for templating
|
||||
(either "2" or "3")
|
||||
("3")
|
||||
type: string
|
||||
type: object
|
||||
kustomize:
|
||||
|
|
@ -629,7 +629,7 @@ spec:
|
|||
type: string
|
||||
version:
|
||||
description: Version is the Helm version to use for templating
|
||||
(either "2" or "3")
|
||||
("3")
|
||||
type: string
|
||||
type: object
|
||||
kustomize:
|
||||
|
|
@ -983,7 +983,7 @@ spec:
|
|||
type: string
|
||||
version:
|
||||
description: Version is the Helm version to use for
|
||||
templating (either "2" or "3")
|
||||
templating ("3")
|
||||
type: string
|
||||
type: object
|
||||
kustomize:
|
||||
|
|
@ -1354,7 +1354,7 @@ spec:
|
|||
type: string
|
||||
version:
|
||||
description: Version is the Helm version to use
|
||||
for templating (either "2" or "3")
|
||||
for templating ("3")
|
||||
type: string
|
||||
type: object
|
||||
kustomize:
|
||||
|
|
@ -1699,7 +1699,7 @@ spec:
|
|||
type: string
|
||||
version:
|
||||
description: Version is the Helm version to use for
|
||||
templating (either "2" or "3")
|
||||
templating ("3")
|
||||
type: string
|
||||
type: object
|
||||
kustomize:
|
||||
|
|
@ -2033,7 +2033,7 @@ spec:
|
|||
type: string
|
||||
version:
|
||||
description: Version is the Helm version to use for
|
||||
templating (either "2" or "3")
|
||||
templating ("3")
|
||||
type: string
|
||||
type: object
|
||||
kustomize:
|
||||
|
|
|
|||
|
|
@ -283,7 +283,7 @@ spec:
|
|||
type: string
|
||||
version:
|
||||
description: Version is the Helm version to use for templating
|
||||
(either "2" or "3")
|
||||
("3")
|
||||
type: string
|
||||
type: object
|
||||
kustomize:
|
||||
|
|
@ -630,7 +630,7 @@ spec:
|
|||
type: string
|
||||
version:
|
||||
description: Version is the Helm version to use for templating
|
||||
(either "2" or "3")
|
||||
("3")
|
||||
type: string
|
||||
type: object
|
||||
kustomize:
|
||||
|
|
@ -984,7 +984,7 @@ spec:
|
|||
type: string
|
||||
version:
|
||||
description: Version is the Helm version to use for
|
||||
templating (either "2" or "3")
|
||||
templating ("3")
|
||||
type: string
|
||||
type: object
|
||||
kustomize:
|
||||
|
|
@ -1355,7 +1355,7 @@ spec:
|
|||
type: string
|
||||
version:
|
||||
description: Version is the Helm version to use
|
||||
for templating (either "2" or "3")
|
||||
for templating ("3")
|
||||
type: string
|
||||
type: object
|
||||
kustomize:
|
||||
|
|
@ -1700,7 +1700,7 @@ spec:
|
|||
type: string
|
||||
version:
|
||||
description: Version is the Helm version to use for
|
||||
templating (either "2" or "3")
|
||||
templating ("3")
|
||||
type: string
|
||||
type: object
|
||||
kustomize:
|
||||
|
|
@ -2034,7 +2034,7 @@ spec:
|
|||
type: string
|
||||
version:
|
||||
description: Version is the Helm version to use for
|
||||
templating (either "2" or "3")
|
||||
templating ("3")
|
||||
type: string
|
||||
type: object
|
||||
kustomize:
|
||||
|
|
|
|||
|
|
@ -283,7 +283,7 @@ spec:
|
|||
type: string
|
||||
version:
|
||||
description: Version is the Helm version to use for templating
|
||||
(either "2" or "3")
|
||||
("3")
|
||||
type: string
|
||||
type: object
|
||||
kustomize:
|
||||
|
|
@ -630,7 +630,7 @@ spec:
|
|||
type: string
|
||||
version:
|
||||
description: Version is the Helm version to use for templating
|
||||
(either "2" or "3")
|
||||
("3")
|
||||
type: string
|
||||
type: object
|
||||
kustomize:
|
||||
|
|
@ -984,7 +984,7 @@ spec:
|
|||
type: string
|
||||
version:
|
||||
description: Version is the Helm version to use for
|
||||
templating (either "2" or "3")
|
||||
templating ("3")
|
||||
type: string
|
||||
type: object
|
||||
kustomize:
|
||||
|
|
@ -1355,7 +1355,7 @@ spec:
|
|||
type: string
|
||||
version:
|
||||
description: Version is the Helm version to use
|
||||
for templating (either "2" or "3")
|
||||
for templating ("3")
|
||||
type: string
|
||||
type: object
|
||||
kustomize:
|
||||
|
|
@ -1700,7 +1700,7 @@ spec:
|
|||
type: string
|
||||
version:
|
||||
description: Version is the Helm version to use for
|
||||
templating (either "2" or "3")
|
||||
templating ("3")
|
||||
type: string
|
||||
type: object
|
||||
kustomize:
|
||||
|
|
@ -2034,7 +2034,7 @@ spec:
|
|||
type: string
|
||||
version:
|
||||
description: Version is the Helm version to use for
|
||||
templating (either "2" or "3")
|
||||
templating ("3")
|
||||
type: string
|
||||
type: object
|
||||
kustomize:
|
||||
|
|
|
|||
|
|
@ -202,7 +202,7 @@ message ApplicationSourceHelm {
|
|||
// FileParameters are file parameters to the helm template
|
||||
repeated HelmFileParameter fileParameters = 5;
|
||||
|
||||
// Version is the Helm version to use for templating (either "2" or "3")
|
||||
// Version is the Helm version to use for templating ("3")
|
||||
optional string version = 6;
|
||||
|
||||
// PassCredentials pass credentials to all domains (Helm's --pass-credentials)
|
||||
|
|
|
|||
|
|
@ -767,7 +767,7 @@ func schema_pkg_apis_application_v1alpha1_ApplicationSourceHelm(ref common.Refer
|
|||
},
|
||||
"version": {
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Description: "Version is the Helm version to use for templating (either \"2\" or \"3\")",
|
||||
Description: "Version is the Helm version to use for templating (\"3\")",
|
||||
Type: []string{"string"},
|
||||
Format: "",
|
||||
},
|
||||
|
|
|
|||
|
|
@ -237,7 +237,7 @@ type ApplicationSourceHelm struct {
|
|||
Values string `json:"values,omitempty" protobuf:"bytes,4,opt,name=values"`
|
||||
// FileParameters are file parameters to the helm template
|
||||
FileParameters []HelmFileParameter `json:"fileParameters,omitempty" protobuf:"bytes,5,opt,name=fileParameters"`
|
||||
// Version is the Helm version to use for templating (either "2" or "3")
|
||||
// Version is the Helm version to use for templating ("3")
|
||||
Version string `json:"version,omitempty" protobuf:"bytes,6,opt,name=version"`
|
||||
// PassCredentials pass credentials to all domains (Helm's --pass-credentials)
|
||||
PassCredentials bool `json:"passCredentials,omitempty" protobuf:"bytes,7,opt,name=passCredentials"`
|
||||
|
|
|
|||
|
|
@ -22,8 +22,8 @@ func TestHelmDependencyWithConcurrency(t *testing.T) {
|
|||
// https://github.com/argoproj/argo-cd/issues/4728
|
||||
|
||||
cleanup := func() {
|
||||
_ = os.Remove(filepath.Join("../../util/helm/testdata/helm2-dependency", helmDepUpMarkerFile))
|
||||
_ = os.RemoveAll(filepath.Join("../../util/helm/testdata/helm2-dependency", "charts"))
|
||||
_ = os.Remove(filepath.Join("../../util/helm/testdata/dependency", helmDepUpMarkerFile))
|
||||
_ = os.RemoveAll(filepath.Join("../../util/helm/testdata/dependency", "charts"))
|
||||
}
|
||||
cleanup()
|
||||
defer cleanup()
|
||||
|
|
@ -33,7 +33,7 @@ func TestHelmDependencyWithConcurrency(t *testing.T) {
|
|||
wg.Add(3)
|
||||
for i := 0; i < 3; i++ {
|
||||
go func() {
|
||||
res, err := helmTemplate("../../util/helm/testdata/helm2-dependency", "../..", nil, &apiclient.ManifestRequest{
|
||||
res, err := helmTemplate("../../util/helm/testdata/dependency", "../..", nil, &apiclient.ManifestRequest{
|
||||
ApplicationSource: &argoappv1.ApplicationSource{},
|
||||
Repos: []*argoappv1.Repository{&helmRepo},
|
||||
}, false)
|
||||
|
|
|
|||
|
|
@ -287,8 +287,8 @@ func TestGenerateHelmChartWithDependencies(t *testing.T) {
|
|||
service := newService("../..")
|
||||
|
||||
cleanup := func() {
|
||||
_ = os.Remove(filepath.Join("../../util/helm/testdata/helm2-dependency", helmDepUpMarkerFile))
|
||||
_ = os.RemoveAll(filepath.Join("../../util/helm/testdata/helm2-dependency", "charts"))
|
||||
_ = os.Remove(filepath.Join("../../util/helm/testdata/dependency", helmDepUpMarkerFile))
|
||||
_ = os.RemoveAll(filepath.Join("../../util/helm/testdata/dependency", "charts"))
|
||||
}
|
||||
cleanup()
|
||||
defer cleanup()
|
||||
|
|
@ -297,7 +297,7 @@ func TestGenerateHelmChartWithDependencies(t *testing.T) {
|
|||
q := apiclient.ManifestRequest{
|
||||
Repo: &argoappv1.Repository{},
|
||||
ApplicationSource: &argoappv1.ApplicationSource{
|
||||
Path: "./util/helm/testdata/helm2-dependency",
|
||||
Path: "./util/helm/testdata/dependency",
|
||||
},
|
||||
Repos: []*argoappv1.Repository{&helmRepo},
|
||||
}
|
||||
|
|
@ -305,7 +305,6 @@ func TestGenerateHelmChartWithDependencies(t *testing.T) {
|
|||
assert.Nil(t, err)
|
||||
assert.Len(t, res1.Manifests, 10)
|
||||
}
|
||||
|
||||
func TestManifestGenErrorCacheByNumRequests(t *testing.T) {
|
||||
|
||||
// Returns the state of the manifest generation cache, by querying the cache for the previously set result
|
||||
|
|
@ -1093,7 +1092,7 @@ func TestGetAppDetailsHelm(t *testing.T) {
|
|||
res, err := service.GetAppDetails(context.Background(), &apiclient.RepoServerAppDetailsQuery{
|
||||
Repo: &argoappv1.Repository{},
|
||||
Source: &argoappv1.ApplicationSource{
|
||||
Path: "./util/helm/testdata/helm2-dependency",
|
||||
Path: "./util/helm/testdata/dependency",
|
||||
},
|
||||
})
|
||||
|
||||
|
|
@ -1103,7 +1102,6 @@ func TestGetAppDetailsHelm(t *testing.T) {
|
|||
assert.Equal(t, "Helm", res.Type)
|
||||
assert.EqualValues(t, []string{"values-production.yaml", "values.yaml"}, res.Helm.ValueFiles)
|
||||
}
|
||||
|
||||
func TestGetAppDetailsHelm_WithNoValuesFile(t *testing.T) {
|
||||
service := newService("../..")
|
||||
|
||||
|
|
|
|||
|
|
@ -41,8 +41,7 @@ ADD ./hack/installers installers
|
|||
ADD go.mod go.mod
|
||||
ADD go.sum go.sum
|
||||
|
||||
RUN ./install.sh helm2-linux && \
|
||||
./install.sh helm-linux && \
|
||||
RUN ./install.sh helm-linux && \
|
||||
./install.sh kubectl-linux && \
|
||||
./install.sh kustomize && \
|
||||
./install.sh codegen-tools && \
|
||||
|
|
@ -53,7 +52,6 @@ RUN ./install.sh helm2-linux && \
|
|||
go install github.com/jstemmer/go-junit-report@latest && \
|
||||
rm -rf /tmp/dl && \
|
||||
rm -rf /tmp/helm && \
|
||||
rm -rf /tmp/helm2 && \
|
||||
rm -rf /tmp/ks_*
|
||||
|
||||
# These are required for running end-to-end tests
|
||||
|
|
@ -82,11 +80,12 @@ ARG UID
|
|||
# Prepare user configuration & build environments
|
||||
RUN useradd -l -u ${UID} -d /home/user -s /bin/bash user && \
|
||||
echo "user ALL=(ALL) NOPASSWD:ALL" > /etc/sudoers.d/user && \
|
||||
HELM_HOME=/home/user/.helm helm2 init --client-only && \
|
||||
mkdir -p /home/user/.kube && chmod 777 /home/user/.kube && \
|
||||
chown -R user /home/user && \
|
||||
chgrp -R user /home/user && \
|
||||
HOME=/home/user git config --global user.name "ArgoCD Test User" && \
|
||||
HOME=/home/user git config --global user.email "noreply@example.com" && \
|
||||
mkdir -p /go/pkg && chmod 777 /go/pkg && \
|
||||
mkdir -p /home/user/.kube && chmod 777 /home/user/.kube && \
|
||||
mkdir -p /var/run/sshd && \
|
||||
mkdir -p /root/.ssh && \
|
||||
mkdir -p /go && \
|
||||
|
|
@ -95,8 +94,6 @@ RUN useradd -l -u ${UID} -d /home/user -s /bin/bash user && \
|
|||
chmod 0600 /etc/ssh/ssh_host_*_key && \
|
||||
mkdir -p /tmp/go-build-cache && chmod -R 777 /tmp/go-build-cache && \
|
||||
mkdir -p /home/user/.cache && chmod 777 /home/user/.cache && \
|
||||
chown -R user /home/user && \
|
||||
chgrp -R user /home/user && \
|
||||
chmod -R 777 /usr/local/go && \
|
||||
ln -s /usr/local/bin/node /usr/local/bin/nodejs && \
|
||||
ln -s /usr/local/lib/node_modules/npm/bin/npm-cli.js /usr/local/bin/npm && \
|
||||
|
|
|
|||
|
|
@ -7,7 +7,6 @@ import (
|
|||
"net"
|
||||
"net/http"
|
||||
"os"
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
"github.com/argoproj/gitops-engine/pkg/health"
|
||||
|
|
@ -401,11 +400,6 @@ func TestHelmWithMultipleDependencies(t *testing.T) {
|
|||
Expect(SyncStatusIs(SyncStatusCodeSynced))
|
||||
}
|
||||
|
||||
func TestHelm2WithDependencies(t *testing.T) {
|
||||
SkipOnEnv(t, "HELM", "HELM2")
|
||||
testHelmWithDependencies(t, "helm2-with-dependencies", false)
|
||||
}
|
||||
|
||||
func TestHelmWithDependenciesLegacyRepo(t *testing.T) {
|
||||
SkipOnEnv(t, "HELM")
|
||||
testHelmWithDependencies(t, "helm-with-dependencies", true)
|
||||
|
|
@ -443,9 +437,7 @@ func testHelmWithDependencies(t *testing.T, chartPath string, legacyRepo bool) {
|
|||
}
|
||||
|
||||
helmVer := ""
|
||||
if strings.Contains(chartPath, "helm2") {
|
||||
helmVer = "v2"
|
||||
}
|
||||
|
||||
ctx.Path(chartPath).
|
||||
When().
|
||||
CreateApp("--helm-version", helmVer).
|
||||
|
|
|
|||
36
test/e2e/testdata/helm-crd/crds/crd.yaml
vendored
Normal file
36
test/e2e/testdata/helm-crd/crds/crd.yaml
vendored
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
# name must match the spec fields below, and be in the form: <plural>.<group>
|
||||
name: crontabs.stable.example.com
|
||||
spec:
|
||||
# group name to use for REST API: /apis/<group>/<version>
|
||||
group: stable.example.com
|
||||
# list of versions supported by this CustomResourceDefinition
|
||||
versions:
|
||||
- name: v1
|
||||
# Each version can be enabled/disabled by Served flag.
|
||||
served: true
|
||||
# One and only one version must be marked as the storage version.
|
||||
storage: true
|
||||
schema:
|
||||
openAPIV3Schema:
|
||||
type: object
|
||||
properties:
|
||||
spec:
|
||||
type: object
|
||||
properties:
|
||||
cronSpec:
|
||||
type: string
|
||||
# either Namespaced or Cluster
|
||||
scope: Namespaced
|
||||
names:
|
||||
# plural name to be used in the URL: /apis/<group>/<version>/<plural>
|
||||
plural: crontabs
|
||||
# singular name to be used as an alias on the CLI and for display
|
||||
singular: crontab
|
||||
# kind is normally the CamelCased singular type. Your resource manifests use this.
|
||||
kind: CronTab
|
||||
# shortNames allow shorter string to match your resource on the CLI
|
||||
shortNames:
|
||||
- ct
|
||||
34
test/e2e/testdata/helm-crd/templates/crd.yaml
vendored
34
test/e2e/testdata/helm-crd/templates/crd.yaml
vendored
|
|
@ -1,34 +0,0 @@
|
|||
apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
name: crontabs.stable.example.com
|
||||
spec:
|
||||
conversion:
|
||||
strategy: None
|
||||
group: stable.example.com
|
||||
names:
|
||||
kind: CronTab
|
||||
listKind: CronTabList
|
||||
plural: crontabs
|
||||
shortNames:
|
||||
- ct
|
||||
singular: crontab
|
||||
scope: Namespaced
|
||||
versions:
|
||||
- name: v1
|
||||
served: true
|
||||
storage: true
|
||||
schema:
|
||||
openAPIV3Schema:
|
||||
type: object
|
||||
properties:
|
||||
apiVersion:
|
||||
type: string
|
||||
kind:
|
||||
type: string
|
||||
metadata:
|
||||
type: object
|
||||
spec:
|
||||
type: object
|
||||
x-kubernetes-map-type: atomic
|
||||
x-kubernetes-preserve-unknown-fields: true
|
||||
|
|
@ -1,4 +1,6 @@
|
|||
apiVersion: stable.example.com/v1
|
||||
kind: CronTab
|
||||
metadata:
|
||||
name: {{ .Release.Name }}-inst
|
||||
name: {{ .Release.Name }}-inst
|
||||
spec:
|
||||
cronSpec: "* * * * */5"
|
||||
|
|
|
|||
6
test/e2e/testdata/helm-repo/index.yaml
vendored
6
test/e2e/testdata/helm-repo/index.yaml
vendored
|
|
@ -5,9 +5,3 @@ entries:
|
|||
urls:
|
||||
- http://argocd-e2e-server:9080/helm-repo/helm-1.0.0.tgz
|
||||
version: 1.0.0
|
||||
helm2:
|
||||
- created: "2020-03-02T08:16:19.960425-08:00"
|
||||
name: helm2
|
||||
urls:
|
||||
- http://argocd-e2e-server:9080/helm-repo/helm2-1.0.0.tgz
|
||||
version: 1.0.0
|
||||
|
|
|
|||
6
test/e2e/testdata/helm-repo/local/index.yaml
vendored
6
test/e2e/testdata/helm-repo/local/index.yaml
vendored
|
|
@ -5,9 +5,3 @@ entries:
|
|||
urls:
|
||||
- http://127.0.0.1:9080/argo-e2e/testdata.git/helm-repo/helm-1.0.0.tgz
|
||||
version: 1.0.0
|
||||
helm2:
|
||||
- created: "2020-03-02T08:16:19.960425-08:00"
|
||||
name: helm2
|
||||
urls:
|
||||
- http://127.0.0.1:9080/argo-e2e/testdata.git/helm-repo/helm2-1.0.0.tgz
|
||||
version: 1.0.0
|
||||
|
|
|
|||
|
|
@ -5,9 +5,4 @@ entries:
|
|||
urls:
|
||||
- http://127.0.0.1:9080/argo-e2e/testdata.git/helm-repo/helm-1.0.0.tgz
|
||||
version: 1.0.0
|
||||
helm2:
|
||||
- created: "2020-03-02T08:16:19.960425-08:00"
|
||||
name: helm2
|
||||
urls:
|
||||
- http://127.0.0.1:9080/argo-e2e/testdata.git/helm-repo/helm2-1.0.0.tgz
|
||||
version: 1.0.0
|
||||
|
||||
|
|
|
|||
|
|
@ -5,9 +5,3 @@ entries:
|
|||
urls:
|
||||
- http://argocd-e2e-server:9080/helm-repo/helm-1.0.0.tgz
|
||||
version: 1.0.0
|
||||
helm2:
|
||||
- created: "2020-03-02T08:16:19.960425-08:00"
|
||||
name: helm2
|
||||
urls:
|
||||
- http://argocd-e2e-server:9080/helm-repo/helm2-1.0.0.tgz
|
||||
version: 1.0.0
|
||||
|
|
|
|||
|
|
@ -5,6 +5,3 @@ dependencies:
|
|||
- name: helm
|
||||
repository: "https://localhost:9444/argo-e2e/testdata.git/helm-repo/local"
|
||||
version: v1.0.0
|
||||
- name: helm2
|
||||
repository: "https://localhost:9444/argo-e2e/testdata.git/helm-repo/local2"
|
||||
version: v1.0.0
|
||||
|
|
@ -1 +0,0 @@
|
|||
name: helm-with-dependencies
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
dependencies:
|
||||
- name: helm2
|
||||
repository: "@custom-repo"
|
||||
version: v1.0.0
|
||||
2
test/e2e/testdata/helm2/Chart.yaml
vendored
2
test/e2e/testdata/helm2/Chart.yaml
vendored
|
|
@ -1,2 +0,0 @@
|
|||
version: 1.0.0
|
||||
name: helm2
|
||||
1
test/e2e/testdata/helm2/baz.yaml
vendored
1
test/e2e/testdata/helm2/baz.yaml
vendored
|
|
@ -1 +0,0 @@
|
|||
a: b
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: my-map
|
||||
data:
|
||||
foo: bar
|
||||
|
|
@ -213,8 +213,6 @@ export ARGOCD_E2E_SKIP_GPG=${ARGOCD_E2E_SKIP_GPG:-false}
|
|||
export ARGOCD_E2E_SKIP_OPENSHIFT=${ARGOCD_E2E_SKIP_OPENSHIFT:-false}
|
||||
# Skip all Helm tests
|
||||
export ARGOCD_E2E_SKIP_HELM=${ARGOCD_E2E_SKIP_HELM:-false}
|
||||
# Skip only Helm v2 related tests
|
||||
export ARGOCD_E2E_SKIP_HELM2=${ARGOCD_E2E_SKIP_HELM2:-false}
|
||||
```
|
||||
|
||||
## Recording tests that ran successfully and restart at point of fail
|
||||
|
|
|
|||
|
|
@ -34,8 +34,6 @@ export ARGOCD_E2E_SKIP_GPG=${ARGOCD_E2E_SKIP_GPG:-false}
|
|||
export ARGOCD_E2E_SKIP_OPENSHIFT=${ARGOCD_E2E_SKIP_OPENSHIFT:-false}
|
||||
# Skip Helm tests
|
||||
export ARGOCD_E2E_SKIP_HELM=${ARGOCD_E2E_SKIP_HELM:-false}
|
||||
# Skip Helm v2 related tests
|
||||
export ARGOCD_E2E_SKIP_HELM2=${ARGOCD_E2E_SKIP_HELM2:-false}
|
||||
# Skip Ksonnet tests
|
||||
export ARGOCD_E2E_SKIP_KSONNET=${ARGOCD_E2E_SKIP_KSONNET:-false}
|
||||
|
||||
|
|
|
|||
|
|
@ -28,8 +28,6 @@ type Cmd struct {
|
|||
func NewCmd(workDir string, version string, proxy string) (*Cmd, error) {
|
||||
|
||||
switch version {
|
||||
case "v2":
|
||||
return NewCmdWithVersion(workDir, HelmV2, false, proxy)
|
||||
// If v3 is specified (or by default, if no value is specified) then use v3
|
||||
case "", "v3":
|
||||
return NewCmdWithVersion(workDir, HelmV3, false, proxy)
|
||||
|
|
|
|||
|
|
@ -23,12 +23,6 @@ func TestCmd_template_kubeVersion(t *testing.T) {
|
|||
assert.NotEmpty(t, s)
|
||||
}
|
||||
|
||||
func TestNewCmd_helmV2(t *testing.T) {
|
||||
cmd, err := NewCmd(".", "v2", "")
|
||||
assert.NoError(t, err)
|
||||
assert.Equal(t, "helm2", cmd.HelmVer.binaryName)
|
||||
}
|
||||
|
||||
func TestNewCmd_helmV3(t *testing.T) {
|
||||
cmd, err := NewCmd(".", "v3", "")
|
||||
assert.NoError(t, err)
|
||||
|
|
|
|||
|
|
@ -104,29 +104,24 @@ func TestHelmGetParamsValueFilesThatExist(t *testing.T) {
|
|||
}
|
||||
|
||||
func TestHelmDependencyBuild(t *testing.T) {
|
||||
testCases := map[string]string{"Helm": "dependency", "Helm2": "helm2-dependency"}
|
||||
helmRepos := []HelmRepository{{Name: "bitnami", Repo: "https://charts.bitnami.com/bitnami"}}
|
||||
for name := range testCases {
|
||||
t.Run(name, func(t *testing.T) {
|
||||
chart := testCases[name]
|
||||
clean := func() {
|
||||
_ = os.RemoveAll(fmt.Sprintf("./testdata/%s/charts", chart))
|
||||
_ = os.RemoveAll(fmt.Sprintf("./testdata/%s/Chart.lock", chart))
|
||||
}
|
||||
clean()
|
||||
defer clean()
|
||||
h, err := NewHelmApp(fmt.Sprintf("./testdata/%s", chart), helmRepos, false, "", "", false)
|
||||
assert.NoError(t, err)
|
||||
err = h.Init()
|
||||
assert.NoError(t, err)
|
||||
_, err = h.Template(&TemplateOpts{Name: "wordpress"})
|
||||
assert.Error(t, err)
|
||||
err = h.DependencyBuild()
|
||||
assert.NoError(t, err)
|
||||
_, err = h.Template(&TemplateOpts{Name: "wordpress"})
|
||||
assert.NoError(t, err)
|
||||
})
|
||||
chart := "dependency"
|
||||
clean := func() {
|
||||
_ = os.RemoveAll("./testdata/dependency/charts")
|
||||
_ = os.RemoveAll("./testdata/dependency/Chart.lock")
|
||||
}
|
||||
clean()
|
||||
defer clean()
|
||||
h, err := NewHelmApp(fmt.Sprintf("./testdata/%s", chart), helmRepos, false, "", "", false)
|
||||
assert.NoError(t, err)
|
||||
err = h.Init()
|
||||
assert.NoError(t, err)
|
||||
_, err = h.Template(&TemplateOpts{Name: "wordpress"})
|
||||
assert.Error(t, err)
|
||||
err = h.DependencyBuild()
|
||||
assert.NoError(t, err)
|
||||
_, err = h.Template(&TemplateOpts{Name: "wordpress"})
|
||||
assert.NoError(t, err)
|
||||
}
|
||||
|
||||
func TestHelmTemplateReleaseNameOverwrite(t *testing.T) {
|
||||
|
|
|
|||
|
|
@ -6,15 +6,6 @@ import (
|
|||
)
|
||||
|
||||
var (
|
||||
// HelmV2 represents helm V2 specific settings
|
||||
HelmV2 = HelmVer{
|
||||
binaryName: "helm2",
|
||||
templateNameArg: "--name",
|
||||
kubeVersionSupported: true,
|
||||
showCommand: "inspect",
|
||||
pullCommand: "fetch",
|
||||
initSupported: true,
|
||||
}
|
||||
// HelmV3 represents helm V3 specific settings
|
||||
HelmV3 = HelmVer{
|
||||
binaryName: "helm",
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@ allowEmptyPassword: true
|
|||
replicaCount: 1
|
||||
|
||||
externalDatabase:
|
||||
## All of these values are only used when mariadb.enabled is set to false
|
||||
## All of these values are only used when mariadb.enabled is set to false
|
||||
## Database host
|
||||
host: localhost
|
||||
|
||||
|
|
@ -175,26 +175,26 @@ ingress:
|
|||
## The list of hostnames to be covered with this ingress record.
|
||||
## Most likely this will be just one host, but in the event more hosts are needed, this is an array
|
||||
hosts:
|
||||
- name: wordpress.local
|
||||
- name: wordpress.local
|
||||
|
||||
## Set this to true in order to enable TLS on the ingress record
|
||||
## A side effect of this will be that the backend wordpress service will be connected at port 443
|
||||
tls: false
|
||||
## Set this to true in order to enable TLS on the ingress record
|
||||
## A side effect of this will be that the backend wordpress service will be connected at port 443
|
||||
tls: false
|
||||
|
||||
## If TLS is set to true, you must declare what secret will store the key/certificate for TLS
|
||||
tlsSecret: wordpress.local-tls
|
||||
## If TLS is set to true, you must declare what secret will store the key/certificate for TLS
|
||||
tlsSecret: wordpress.local-tls
|
||||
|
||||
## Ingress annotations done as key:value pairs
|
||||
## If you're using kube-lego, you will want to add:
|
||||
## kubernetes.io/tls-acme: true
|
||||
##
|
||||
## For a full list of possible ingress annotations, please see
|
||||
## ref: https://github.com/kubernetes/ingress-nginx/blob/master/docs/user-guide/nginx-configuration/annotations.md
|
||||
##
|
||||
## If tls is set to true, annotation ingress.kubernetes.io/secure-backends: "true" will automatically be set
|
||||
annotations:
|
||||
# kubernetes.io/ingress.class: nginx
|
||||
# kubernetes.io/tls-acme: true
|
||||
## Ingress annotations done as key:value pairs
|
||||
## If you're using kube-lego, you will want to add:
|
||||
## kubernetes.io/tls-acme: true
|
||||
##
|
||||
## For a full list of possible ingress annotations, please see
|
||||
## ref: https://github.com/kubernetes/ingress-nginx/blob/master/docs/user-guide/nginx-configuration/annotations.md
|
||||
##
|
||||
## If tls is set to true, annotation ingress.kubernetes.io/secure-backends: "true" will automatically be set
|
||||
annotations:
|
||||
# kubernetes.io/ingress.class: nginx
|
||||
# kubernetes.io/tls-acme: true
|
||||
|
||||
secrets:
|
||||
## If you're providing your own certificates, please use this to add the certificates as secrets
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
.git
|
||||
# OWNERS file for Kubernetes
|
||||
OWNERS
|
||||
# example production yaml
|
||||
values-production.yaml
|
||||
20
util/helm/testdata/helm2-dependency/Chart.yaml
vendored
20
util/helm/testdata/helm2-dependency/Chart.yaml
vendored
|
|
@ -1,20 +0,0 @@
|
|||
name: wordpress
|
||||
version: 2.1.10
|
||||
appVersion: 4.9.8
|
||||
description: Web publishing platform for building blogs and websites.
|
||||
icon: https://bitnami.com/assets/stacks/wordpress/img/wordpress-stack-220x234.png
|
||||
keywords:
|
||||
- wordpress
|
||||
- cms
|
||||
- blog
|
||||
- http
|
||||
- web
|
||||
- application
|
||||
- php
|
||||
home: http://www.wordpress.com/
|
||||
sources:
|
||||
- https://github.com/bitnami/bitnami-docker-wordpress
|
||||
maintainers:
|
||||
- name: bitnami-bot
|
||||
email: containers@bitnami.com
|
||||
engine: gotpl
|
||||
12
util/helm/testdata/helm2-dependency/OWNERS
vendored
12
util/helm/testdata/helm2-dependency/OWNERS
vendored
|
|
@ -1,12 +0,0 @@
|
|||
approvers:
|
||||
- prydonius
|
||||
- tompizmor
|
||||
- sameersbn
|
||||
- carrodher
|
||||
- juan131
|
||||
reviewers:
|
||||
- prydonius
|
||||
- tompizmor
|
||||
- sameersbn
|
||||
- carrodher
|
||||
- juan131
|
||||
232
util/helm/testdata/helm2-dependency/README.md
vendored
232
util/helm/testdata/helm2-dependency/README.md
vendored
|
|
@ -1,232 +0,0 @@
|
|||
# WordPress
|
||||
|
||||
[WordPress](https://wordpress.org/) is one of the most versatile open source content management systems on the market. A publishing platform for building blogs and websites.
|
||||
|
||||
## TL;DR;
|
||||
|
||||
```console
|
||||
$ helm install stable/wordpress
|
||||
```
|
||||
|
||||
## Introduction
|
||||
|
||||
This chart bootstraps a [WordPress](https://github.com/bitnami/bitnami-docker-wordpress) deployment on a [Kubernetes](http://kubernetes.io) cluster using the [Helm](https://helm.sh) package manager.
|
||||
|
||||
It also packages the [Bitnami MariaDB chart](https://github.com/kubernetes/charts/tree/master/stable/mariadb) which is required for bootstrapping a MariaDB deployment for the database requirements of the WordPress application.
|
||||
|
||||
## Prerequisites
|
||||
|
||||
- Kubernetes 1.4+ with Beta APIs enabled
|
||||
- PV provisioner support in the underlying infrastructure
|
||||
|
||||
## Installing the Chart
|
||||
|
||||
To install the chart with the release name `my-release`:
|
||||
|
||||
```console
|
||||
$ helm install --name my-release stable/wordpress
|
||||
```
|
||||
|
||||
The command deploys WordPress on the Kubernetes cluster in the default configuration. The [configuration](#configuration) section lists the parameters that can be configured during installation.
|
||||
|
||||
> **Tip**: List all releases using `helm list`
|
||||
|
||||
## Uninstalling the Chart
|
||||
|
||||
To uninstall/delete the `my-release` deployment:
|
||||
|
||||
```console
|
||||
$ helm delete my-release
|
||||
```
|
||||
|
||||
The command removes all the Kubernetes components associated with the chart and deletes the release.
|
||||
|
||||
## Configuration
|
||||
|
||||
The following table lists the configurable parameters of the WordPress chart and their default values.
|
||||
|
||||
| Parameter | Description | Default |
|
||||
|----------------------------------|--------------------------------------------|---------------------------------------------------------|
|
||||
| `image.registry` | WordPress image registry | `docker.io` |
|
||||
| `image.repository` | WordPress image name | `bitnami/wordpress` |
|
||||
| `image.tag` | WordPress image tag | `{VERSION}` |
|
||||
| `image.pullPolicy` | Image pull policy | `Always` if `imageTag` is `latest`, else `IfNotPresent` |
|
||||
| `image.pullSecrets` | Specify image pull secrets | `nil` |
|
||||
| `wordpressUsername` | User of the application | `user` |
|
||||
| `wordpressPassword` | Application password | _random 10 character long alphanumeric string_ |
|
||||
| `wordpressEmail` | Admin email | `user@example.com` |
|
||||
| `wordpressFirstName` | First name | `FirstName` |
|
||||
| `wordpressLastName` | Last name | `LastName` |
|
||||
| `wordpressBlogName` | Blog name | `User's Blog!` |
|
||||
| `wordpressTablePrefix` | Table prefix | `wp_` |
|
||||
| `allowEmptyPassword` | Allow DB blank passwords | `true` |
|
||||
| `smtpHost` | SMTP host | `nil` |
|
||||
| `smtpPort` | SMTP port | `nil` |
|
||||
| `smtpUser` | SMTP user | `nil` |
|
||||
| `smtpPassword` | SMTP password | `nil` |
|
||||
| `smtpUsername` | User name for SMTP emails | `nil` |
|
||||
| `smtpProtocol` | SMTP protocol [`tls`, `ssl`] | `nil` |
|
||||
| `replicaCount` | Number of WordPress Pods to run | `1` |
|
||||
| `mariadb.enabled` | Deploy MariaDB container(s) | `true` |
|
||||
| `mariadb.rootUser.password` | MariaDB admin password | `nil` |
|
||||
| `mariadb.db.name` | Database name to create | `bitnami_wordpress` |
|
||||
| `mariadb.db.user` | Database user to create | `bn_wordpress` |
|
||||
| `mariadb.db.password` | Password for the database | _random 10 character long alphanumeric string_ |
|
||||
| `externalDatabase.host` | Host of the external database | `localhost` |
|
||||
| `externalDatabase.user` | Existing username in the external db | `bn_wordpress` |
|
||||
| `externalDatabase.password` | Password for the above username | `nil` |
|
||||
| `externalDatabase.database` | Name of the existing database | `bitnami_wordpress` |
|
||||
| `externalDatabase.port` | Database port number | `3306` |
|
||||
| `serviceType` | Kubernetes Service type | `LoadBalancer` |
|
||||
| `serviceExternalTrafficPolicy` | Enable client source IP preservation | `Cluster` |
|
||||
| `nodePorts.http` | Kubernetes http node port | `""` |
|
||||
| `nodePorts.https` | Kubernetes https node port | `""` |
|
||||
| `healthcheckHttps` | Use https for liveliness and readiness | `false` |
|
||||
| `ingress.enabled` | Enable ingress controller resource | `false` |
|
||||
| `ingress.hosts[0].name` | Hostname to your WordPress installation | `wordpress.local` |
|
||||
| `ingress.hosts[0].path` | Path within the url structure | `/` |
|
||||
| `ingress.hosts[0].tls` | Utilize TLS backend in ingress | `false` |
|
||||
| `ingress.hosts[0].tlsSecret` | TLS Secret (certificates) | `wordpress.local-tls-secret` |
|
||||
| `ingress.hosts[0].annotations` | Annotations for this host's ingress record | `[]` |
|
||||
| `ingress.secrets[0].name` | TLS Secret Name | `nil` |
|
||||
| `ingress.secrets[0].certificate` | TLS Secret Certificate | `nil` |
|
||||
| `ingress.secrets[0].key` | TLS Secret Key | `nil` |
|
||||
| `persistence.enabled` | Enable persistence using PVC | `true` |
|
||||
| `persistence.existingClaim` | Enable persistence using an existing PVC | `nil` |
|
||||
| `persistence.storageClass` | PVC Storage Class | `nil` (uses alpha storage class annotation) |
|
||||
| `persistence.accessMode` | PVC Access Mode | `ReadWriteOnce` |
|
||||
| `persistence.size` | PVC Storage Request | `10Gi` |
|
||||
| `nodeSelector` | Node labels for pod assignment | `{}` |
|
||||
| `tolerations` | List of node taints to tolerate | `[]` |
|
||||
| `affinity` | Map of node/pod affinities | `{}` |
|
||||
|
||||
The above parameters map to the env variables defined in [bitnami/wordpress](http://github.com/bitnami/bitnami-docker-wordpress). For more information please refer to the [bitnami/wordpress](http://github.com/bitnami/bitnami-docker-wordpress) image documentation.
|
||||
|
||||
Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example,
|
||||
|
||||
```console
|
||||
$ helm install --name my-release \
|
||||
--set wordpressUsername=admin,wordpressPassword=password,mariadb.mariadbRootPassword=secretpassword \
|
||||
stable/wordpress
|
||||
```
|
||||
|
||||
The above command sets the WordPress administrator account username and password to `admin` and `password` respectively. Additionally, it sets the MariaDB `root` user password to `secretpassword`.
|
||||
|
||||
Alternatively, a YAML file that specifies the values for the above parameters can be provided while installing the chart. For example,
|
||||
|
||||
```console
|
||||
$ helm install --name my-release -f values.yaml stable/wordpress
|
||||
```
|
||||
|
||||
> **Tip**: You can use the default [values.yaml](values.yaml)
|
||||
|
||||
## Production and horizontal scaling
|
||||
|
||||
The following repo contains the recommended production settings for wordpress capture in an alternative [values file](values-production.yaml). Please read carefully the comments in the values-production.yaml file to set up your environment appropriately.
|
||||
|
||||
To horizontally scale this chart, first download the [values-production.yaml](values-production.yaml) file to your local folder, then:
|
||||
|
||||
```console
|
||||
$ helm install --name my-release -f ./values-production.yaml stable/wordpress
|
||||
```
|
||||
|
||||
Note that [values-production.yaml](values-production.yaml) includes a replicaCount of 3, so there will be 3 WordPress pods. As a result, to use the /admin portal and to ensure you can scale wordpress you need to provide a ReadWriteMany PVC, if you don't have a provisioner for this type of storage, we recommend that you install the nfs provisioner and map it to a RWO volume.
|
||||
|
||||
```console
|
||||
$ helm install stable/nfs-server-provisioner --set persistence.enabled=true,persistence.size=10Gi
|
||||
$ helm install --name my-release -f values-production.yaml --set persistence.storageClass=nfs stable/wordpress
|
||||
```
|
||||
|
||||
## Persistence
|
||||
|
||||
The [Bitnami WordPress](https://github.com/bitnami/bitnami-docker-wordpress) image stores the WordPress data and configurations at the `/bitnami` path of the container.
|
||||
|
||||
Persistent Volume Claims are used to keep the data across deployments. This is known to work in GCE, AWS, and minikube.
|
||||
See the [Configuration](#configuration) section to configure the PVC or to disable persistence.
|
||||
|
||||
## Using an external database
|
||||
|
||||
Sometimes you may want to have Wordpress connect to an external database rather than installing one inside your cluster, e.g. to use a managed database service, or use run a single database server for all your applications. To do this, the chart allows you to specify credentials for an external database under the [`externalDatabase` parameter](#configuration). You should also disable the MariaDB installation with the `mariadb.enabled` option. For example:
|
||||
|
||||
```console
|
||||
$ helm install stable/wordpress \
|
||||
--set mariadb.enabled=false,externalDatabase.host=myexternalhost,externalDatabase.user=myuser,externalDatabase.password=mypassword,externalDatabase.database=mydatabase,externalDatabase.port=3306
|
||||
```
|
||||
|
||||
Note also if you disable MariaDB per above you MUST supply values for the `externalDatabase` connection.
|
||||
|
||||
## Ingress
|
||||
|
||||
This chart provides support for ingress resources. If you have an
|
||||
ingress controller installed on your cluster, such as [nginx-ingress](https://kubeapps.com/charts/stable/nginx-ingress)
|
||||
or [traefik](https://kubeapps.com/charts/stable/traefik) you can utilize
|
||||
the ingress controller to serve your WordPress application.
|
||||
|
||||
To enable ingress integration, please set `ingress.enabled` to `true`
|
||||
|
||||
### Hosts
|
||||
|
||||
Most likely you will only want to have one hostname that maps to this
|
||||
WordPress installation, however, it is possible to have more than one
|
||||
host. To facilitate this, the `ingress.hosts` object is an array.
|
||||
|
||||
For each item, please indicate a `name`, `tls`, `tlsSecret`, and any
|
||||
`annotations` that you may want the ingress controller to know about.
|
||||
|
||||
Indicating TLS will cause WordPress to generate HTTPS URLs, and
|
||||
WordPress will be connected to at port 443. The actual secret that
|
||||
`tlsSecret` references do not have to be generated by this chart.
|
||||
However, please note that if TLS is enabled, the ingress record will not
|
||||
work until this secret exists.
|
||||
|
||||
For annotations, please see [this document](https://github.com/kubernetes/ingress-nginx/blob/master/docs/user-guide/nginx-configuration/annotations.md).
|
||||
Not all annotations are supported by all ingress controllers, but this
|
||||
document does a good job of indicating which annotation is supported by
|
||||
many popular ingress controllers.
|
||||
|
||||
### TLS Secrets
|
||||
|
||||
This chart will facilitate the creation of TLS secrets for use with the
|
||||
ingress controller, however, this is not required. There are three
|
||||
common use cases:
|
||||
|
||||
* helm generates/manages certificate secrets
|
||||
* user generates/manages certificates separately
|
||||
* an additional tool (like [kube-lego](https://kubeapps.com/charts/stable/kube-lego))
|
||||
manages the secrets for the application
|
||||
|
||||
In the first two cases, one will need a certificate and a key. We would
|
||||
expect them to look like this:
|
||||
|
||||
* certificate files should look like (and there can be more than one
|
||||
certificate if there is a certificate chain)
|
||||
|
||||
```
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIID6TCCAtGgAwIBAgIJAIaCwivkeB5EMA0GCSqGSIb3DQEBCwUAMFYxCzAJBgNV
|
||||
...
|
||||
jScrvkiBO65F46KioCL9h5tDvomdU1aqpI/CBzhvZn1c0ZTf87tGQR8NK7v7
|
||||
-----END CERTIFICATE-----
|
||||
```
|
||||
* keys should look like:
|
||||
```
|
||||
-----BEGIN RSA PRIVATE KEY-----
|
||||
MIIEogIBAAKCAQEAvLYcyu8f3skuRyUgeeNpeDvYBCDcgq+LsWap6zbX5f8oLqp4
|
||||
...
|
||||
wrj2wDbCDCFmfqnSJ+dKI3vFLlEz44sAV8jX/kd4Y6ZTQhlLbYc=
|
||||
-----END RSA PRIVATE KEY-----
|
||||
````
|
||||
|
||||
If you are going to use Helm to manage the certificates, please copy
|
||||
these values into the `certificate` and `key` values for a given
|
||||
`ingress.secrets` entry.
|
||||
|
||||
If you are going are going to manage TLS secrets outside of Helm, please
|
||||
know that you can create a TLS secret by doing the following:
|
||||
|
||||
```
|
||||
kubectl create secret tls wordpress.local-tls --key /path/to/key.key --cert /path/to/cert.crt
|
||||
```
|
||||
|
||||
Please see [this example](https://github.com/kubernetes/contrib/tree/master/ingress/controllers/nginx/examples/tls)
|
||||
for more information.
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
dependencies:
|
||||
- name: mariadb
|
||||
repository: https://charts.bitnami.com/bitnami
|
||||
version: 8.0.7
|
||||
digest: sha256:6af34a77f088f79d80297001290927808d81346210ef1336ea5d26a1099213f2
|
||||
generated: "2020-11-07T16:37:58.659489501+01:00"
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
dependencies:
|
||||
- name: mariadb
|
||||
version: 8.x.x
|
||||
repository: https://charts.bitnami.com/bitnami
|
||||
condition: mariadb.enabled
|
||||
tags:
|
||||
- wordpress-database
|
||||
|
|
@ -1,38 +0,0 @@
|
|||
1. Get the WordPress URL:
|
||||
|
||||
{{- if .Values.ingress.enabled }}
|
||||
|
||||
You should be able to access your new WordPress installation through
|
||||
|
||||
{{- range .Values.ingress.hosts }}
|
||||
{{ if .tls }}https{{ else }}http{{ end }}://{{ .name }}/admin
|
||||
{{- end }}
|
||||
|
||||
{{- else if contains "LoadBalancer" .Values.serviceType }}
|
||||
|
||||
NOTE: It may take a few minutes for the LoadBalancer IP to be available.
|
||||
Watch the status with: 'kubectl get svc --namespace {{ .Release.Namespace }} -w {{ template "fullname" . }}'
|
||||
|
||||
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ template "fullname" . }} -o jsonpath='{.status.loadBalancer.ingress[0].ip}')
|
||||
echo "WordPress URL: http://$SERVICE_IP/"
|
||||
echo "WordPress Admin URL: http://$SERVICE_IP/admin"
|
||||
|
||||
{{- else if contains "ClusterIP" .Values.serviceType }}
|
||||
|
||||
echo "WordPress URL: http://127.0.0.1:8080/"
|
||||
echo "WordPress Admin URL: http://127.0.0.1:8080/admin"
|
||||
kubectl port-forward --namespace {{ .Release.Namespace }} svc/{{ template "fullname" . }} 8080:80
|
||||
|
||||
{{- else if contains "NodePort" .Values.serviceType }}
|
||||
|
||||
export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ template "fullname" . }})
|
||||
export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}")
|
||||
echo "WordPress URL: http://$NODE_IP:$NODE_PORT/"
|
||||
echo "WordPress Admin URL: http://$NODE_IP:$NODE_PORT/admin"
|
||||
|
||||
{{- end }}
|
||||
|
||||
2. Login with the following credentials to see your blog
|
||||
|
||||
echo Username: {{ .Values.wordpressUsername }}
|
||||
echo Password: $(kubectl get secret --namespace {{ .Release.Namespace }} {{ template "fullname" . }} -o jsonpath="{.data.wordpress-password}" | base64 --decode)
|
||||
|
|
@ -1,24 +0,0 @@
|
|||
{{/* vim: set filetype=mustache: */}}
|
||||
{{/*
|
||||
Expand the name of the chart.
|
||||
*/}}
|
||||
{{- define "name" -}}
|
||||
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Create a default fully qualified app name.
|
||||
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
|
||||
*/}}
|
||||
{{- define "fullname" -}}
|
||||
{{- $name := default .Chart.Name .Values.nameOverride -}}
|
||||
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Create a default fully qualified app name.
|
||||
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
|
||||
*/}}
|
||||
{{- define "mariadb.fullname" -}}
|
||||
{{- printf "%s-%s" .Release.Name "mariadb" | trunc 63 | trimSuffix "-" -}}
|
||||
{{- end -}}
|
||||
|
|
@ -1,159 +0,0 @@
|
|||
apiVersion: extensions/v1beta1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: {{ template "fullname" . }}
|
||||
labels:
|
||||
app: {{ template "fullname" . }}
|
||||
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
|
||||
release: "{{ .Release.Name }}"
|
||||
heritage: "{{ .Release.Service }}"
|
||||
spec:
|
||||
replicas: {{ .Values.replicaCount }}
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: {{ template "fullname" . }}
|
||||
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
|
||||
release: "{{ .Release.Name }}"
|
||||
spec:
|
||||
{{- if .Values.image.pullSecrets }}
|
||||
imagePullSecrets:
|
||||
{{- range .Values.image.pullSecrets }}
|
||||
- name: {{ . }}
|
||||
{{- end}}
|
||||
{{- end }}
|
||||
containers:
|
||||
- name: {{ template "fullname" . }}
|
||||
image: "{{ .Values.image.registry }}/{{ .Values.image.repository }}:{{ .Values.image.tag }}"
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy | quote }}
|
||||
env:
|
||||
- name: ALLOW_EMPTY_PASSWORD
|
||||
{{- if .Values.allowEmptyPassword }}
|
||||
value: "yes"
|
||||
{{- else }}
|
||||
value: "no"
|
||||
{{- end }}
|
||||
- name: MARIADB_HOST
|
||||
{{- if .Values.mariadb.enabled }}
|
||||
value: {{ template "mariadb.fullname" . }}
|
||||
{{- else }}
|
||||
value: {{ .Values.externalDatabase.host | quote }}
|
||||
{{- end }}
|
||||
- name: MARIADB_PORT_NUMBER
|
||||
{{- if .Values.mariadb.enabled }}
|
||||
value: "3306"
|
||||
{{- else }}
|
||||
value: {{ .Values.externalDatabase.port | quote }}
|
||||
{{- end }}
|
||||
- name: WORDPRESS_DATABASE_NAME
|
||||
{{- if .Values.mariadb.enabled }}
|
||||
value: {{ .Values.mariadb.db.name | quote }}
|
||||
{{- else }}
|
||||
value: {{ .Values.externalDatabase.database | quote }}
|
||||
{{- end }}
|
||||
- name: WORDPRESS_DATABASE_USER
|
||||
{{- if .Values.mariadb.enabled }}
|
||||
value: {{ .Values.mariadb.db.user | quote }}
|
||||
{{- else }}
|
||||
value: {{ .Values.externalDatabase.user | quote }}
|
||||
{{- end }}
|
||||
- name: WORDPRESS_DATABASE_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
{{- if .Values.mariadb.enabled }}
|
||||
name: {{ template "mariadb.fullname" . }}
|
||||
key: mariadb-password
|
||||
{{- else }}
|
||||
name: {{ printf "%s-%s" .Release.Name "externaldb" }}
|
||||
key: db-password
|
||||
{{- end }}
|
||||
- name: WORDPRESS_USERNAME
|
||||
value: {{ .Values.wordpressUsername | quote }}
|
||||
- name: WORDPRESS_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ template "fullname" . }}
|
||||
key: wordpress-password
|
||||
- name: WORDPRESS_EMAIL
|
||||
value: {{ .Values.wordpressEmail | quote }}
|
||||
- name: WORDPRESS_FIRST_NAME
|
||||
value: {{ .Values.wordpressFirstName | quote }}
|
||||
- name: WORDPRESS_LAST_NAME
|
||||
value: {{ .Values.wordpressLastName | quote }}
|
||||
- name: WORDPRESS_BLOG_NAME
|
||||
value: {{ .Values.wordpressBlogName | quote }}
|
||||
- name: WORDPRESS_TABLE_PREFIX
|
||||
value: {{ .Values.wordpressTablePrefix | quote }}
|
||||
- name: SMTP_HOST
|
||||
value: {{ .Values.smtpHost | quote }}
|
||||
- name: SMTP_PORT
|
||||
value: {{ .Values.smtpPort | quote }}
|
||||
- name: SMTP_USER
|
||||
value: {{ .Values.smtpUser | quote }}
|
||||
- name: SMTP_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ template "fullname" . }}
|
||||
key: smtp-password
|
||||
- name: SMTP_USERNAME
|
||||
value: {{ .Values.smtpUsername | quote }}
|
||||
- name: SMTP_PROTOCOL
|
||||
value: {{ .Values.smtpProtocol | quote }}
|
||||
ports:
|
||||
- name: http
|
||||
containerPort: 80
|
||||
- name: https
|
||||
containerPort: 443
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /wp-login.php
|
||||
{{- if not .Values.healthcheckHttps }}
|
||||
port: http
|
||||
{{- else }}
|
||||
port: https
|
||||
scheme: HTTPS
|
||||
{{- end }}
|
||||
{{ toYaml .Values.livenessProbe | indent 10 }}
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /wp-login.php
|
||||
{{- if not .Values.healthcheckHttps }}
|
||||
port: http
|
||||
{{- else }}
|
||||
port: https
|
||||
scheme: HTTPS
|
||||
{{- end }}
|
||||
{{ toYaml .Values.readinessProbe | indent 10 }}
|
||||
volumeMounts:
|
||||
- mountPath: /bitnami/apache
|
||||
name: wordpress-data
|
||||
subPath: apache
|
||||
- mountPath: /bitnami/wordpress
|
||||
name: wordpress-data
|
||||
subPath: wordpress
|
||||
- mountPath: /bitnami/php
|
||||
name: wordpress-data
|
||||
subPath: php
|
||||
resources:
|
||||
{{ toYaml .Values.resources | indent 10 }}
|
||||
volumes:
|
||||
- name: wordpress-data
|
||||
{{- if .Values.persistence.enabled }}
|
||||
persistentVolumeClaim:
|
||||
claimName: {{ .Values.persistence.existingClaim | default (include "fullname" .) }}
|
||||
{{- else }}
|
||||
emptyDir: {}
|
||||
{{ end }}
|
||||
{{- if .Values.nodeSelector }}
|
||||
nodeSelector:
|
||||
{{ toYaml .Values.nodeSelector | indent 8 }}
|
||||
{{- end -}}
|
||||
{{- with .Values.affinity }}
|
||||
affinity:
|
||||
{{ toYaml . | indent 8 }}
|
||||
{{- end }}
|
||||
{{- with .Values.tolerations }}
|
||||
tolerations:
|
||||
{{ toYaml . | indent 8 }}
|
||||
{{- end }}
|
||||
|
||||
|
|
@ -1,14 +0,0 @@
|
|||
{{- if not .Values.mariadb.enabled }}
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: {{ printf "%s-%s" .Release.Name "externaldb" }}
|
||||
labels:
|
||||
app: {{ printf "%s-%s" .Release.Name "externaldb" }}
|
||||
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
|
||||
release: "{{ .Release.Name }}"
|
||||
heritage: "{{ .Release.Service }}"
|
||||
type: Opaque
|
||||
data:
|
||||
db-password: {{ .Values.externalDatabase.password | b64enc | quote }}
|
||||
{{- end }}
|
||||
|
|
@ -1,36 +0,0 @@
|
|||
{{- if .Values.ingress.enabled }}
|
||||
{{- range .Values.ingress.hosts }}
|
||||
apiVersion: extensions/v1beta1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: "{{- printf "%s-%s" .name $.Release.Name | trunc 63 | trimSuffix "-" -}}"
|
||||
labels:
|
||||
app: {{ template "fullname" $ }}
|
||||
chart: "{{ $.Chart.Name }}-{{ $.Chart.Version }}"
|
||||
release: "{{ $.Release.Name }}"
|
||||
heritage: "{{ $.Release.Service }}"
|
||||
annotations:
|
||||
{{- if .tls }}
|
||||
ingress.kubernetes.io/secure-backends: "true"
|
||||
{{- end }}
|
||||
{{- range $key, $value := .annotations }}
|
||||
{{ $key }}: {{ $value | quote }}
|
||||
{{- end }}
|
||||
spec:
|
||||
rules:
|
||||
- host: {{ .name }}
|
||||
http:
|
||||
paths:
|
||||
- path: {{ default "/" .path }}
|
||||
backend:
|
||||
serviceName: {{ template "fullname" $ }}
|
||||
servicePort: 80
|
||||
{{- if .tls }}
|
||||
tls:
|
||||
- hosts:
|
||||
- {{ .name }}
|
||||
secretName: {{ .tlsSecret }}
|
||||
{{- end }}
|
||||
---
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
|
@ -1,24 +0,0 @@
|
|||
{{- if and .Values.persistence.enabled (not .Values.persistence.existingClaim) }}
|
||||
kind: PersistentVolumeClaim
|
||||
apiVersion: v1
|
||||
metadata:
|
||||
name: {{ template "fullname" . }}
|
||||
labels:
|
||||
app: {{ template "fullname" . }}
|
||||
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
|
||||
release: "{{ .Release.Name }}"
|
||||
heritage: "{{ .Release.Service }}"
|
||||
spec:
|
||||
accessModes:
|
||||
- {{ .Values.persistence.accessMode | quote }}
|
||||
resources:
|
||||
requests:
|
||||
storage: {{ .Values.persistence.size | quote }}
|
||||
{{- if .Values.persistence.storageClass }}
|
||||
{{- if (eq "-" .Values.persistence.storageClass) }}
|
||||
storageClassName: ""
|
||||
{{- else }}
|
||||
storageClassName: "{{ .Values.persistence.storageClass }}"
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end -}}
|
||||
|
|
@ -1,17 +0,0 @@
|
|||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: {{ template "fullname" . }}
|
||||
labels:
|
||||
app: {{ template "fullname" . }}
|
||||
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
|
||||
release: "{{ .Release.Name }}"
|
||||
heritage: "{{ .Release.Service }}"
|
||||
type: Opaque
|
||||
data:
|
||||
{{ if .Values.wordpressPassword }}
|
||||
wordpress-password: {{ default "" .Values.wordpressPassword | b64enc | quote }}
|
||||
{{ else }}
|
||||
wordpress-password: {{ randAlphaNum 10 | b64enc | quote }}
|
||||
{{ end }}
|
||||
smtp-password: {{ default "" .Values.smtpPassword | b64enc | quote }}
|
||||
|
|
@ -1,29 +0,0 @@
|
|||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: {{ template "fullname" . }}
|
||||
labels:
|
||||
app: {{ template "fullname" . }}
|
||||
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
|
||||
release: "{{ .Release.Name }}"
|
||||
heritage: "{{ .Release.Service }}"
|
||||
spec:
|
||||
type: {{ .Values.serviceType }}
|
||||
{{- if (or (eq .Values.serviceType "LoadBalancer") (eq .Values.serviceType "NodePort")) }}
|
||||
externalTrafficPolicy: {{ .Values.serviceExternalTrafficPolicy | quote }}
|
||||
{{- end }}
|
||||
ports:
|
||||
- name: http
|
||||
port: 80
|
||||
targetPort: http
|
||||
{{- if (and (eq .Values.serviceType "NodePort") (not (empty .Values.nodePorts.http)))}}
|
||||
nodePort: {{ .Values.nodePorts.http }}
|
||||
{{- end }}
|
||||
- name: https
|
||||
port: 443
|
||||
targetPort: https
|
||||
{{- if (and (eq .Values.serviceType "NodePort") (not (empty .Values.nodePorts.https)))}}
|
||||
nodePort: {{ .Values.nodePorts.https }}
|
||||
{{- end }}
|
||||
selector:
|
||||
app: {{ template "fullname" . }}
|
||||
|
|
@ -1,29 +0,0 @@
|
|||
{{- if .Values.mariadb.enabled }}
|
||||
apiVersion: v1
|
||||
kind: Pod
|
||||
metadata:
|
||||
name: "{{ .Release.Name }}-credentials-test"
|
||||
annotations:
|
||||
"helm.sh/hook": test-success
|
||||
spec:
|
||||
containers:
|
||||
- name: {{ .Release.Name }}-credentials-test
|
||||
image: "{{ .Values.image.registry }}/{{ .Values.image.repository }}:{{ .Values.image.tag }}"
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy | quote }}
|
||||
env:
|
||||
- name: MARIADB_HOST
|
||||
value: {{ template "mariadb.fullname" . }}
|
||||
- name: MARIADB_PORT
|
||||
value: "3306"
|
||||
- name: WORDPRESS_DATABASE_NAME
|
||||
value: {{ default "" .Values.mariadb.db.name | quote }}
|
||||
- name: WORDPRESS_DATABASE_USER
|
||||
value: {{ default "" .Values.mariadb.db.user | quote }}
|
||||
- name: WORDPRESS_DATABASE_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ template "mariadb.fullname" . }}
|
||||
key: mariadb-password
|
||||
command: ["sh", "-c", "mysql --host=$MARIADB_HOST --port=$MARIADB_PORT --user=$WORDPRESS_DATABASE_USER --password=$WORDPRESS_DATABASE_PASSWORD"]
|
||||
restartPolicy: Never
|
||||
{{- end }}
|
||||
|
|
@ -1,18 +0,0 @@
|
|||
{{- if .Values.ingress.enabled }}
|
||||
{{- range .Values.ingress.secrets }}
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: {{ .name }}
|
||||
labels:
|
||||
app: {{ template "fullname" $ }}
|
||||
chart: "{{ $.Chart.Name }}-{{ $.Chart.Version }}"
|
||||
release: "{{ $.Release.Name }}"
|
||||
heritage: "{{ $.Release.Service }}"
|
||||
type: kubernetes.io/tls
|
||||
data:
|
||||
tls.crt: {{ .certificate | b64enc }}
|
||||
tls.key: {{ .key | b64enc }}
|
||||
---
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
|
@ -1,256 +0,0 @@
|
|||
## Bitnami WordPress image version
|
||||
## ref: https://hub.docker.com/r/bitnami/wordpress/tags/
|
||||
##
|
||||
image:
|
||||
registry: docker.io
|
||||
repository: bitnami/wordpress
|
||||
tag: 4.9.8-debian-9
|
||||
pullPolicy: IfNotPresent
|
||||
## Optionally specify an array of imagePullSecrets.
|
||||
## Secrets must be manually created in the namespace.
|
||||
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/
|
||||
##
|
||||
# pullSecrets:
|
||||
# - myRegistrKeySecretName
|
||||
|
||||
## User of the application
|
||||
## ref: https://github.com/bitnami/bitnami-docker-wordpress#environment-variables
|
||||
##
|
||||
wordpressUsername: user
|
||||
|
||||
## Application password
|
||||
## Defaults to a random 10-character alphanumeric string if not set
|
||||
## ref: https://github.com/bitnami/bitnami-docker-wordpress#environment-variables
|
||||
##
|
||||
# wordpressPassword:
|
||||
|
||||
## Admin email
|
||||
## ref: https://github.com/bitnami/bitnami-docker-wordpress#environment-variables
|
||||
##
|
||||
wordpressEmail: user@example.com
|
||||
|
||||
## First name
|
||||
## ref: https://github.com/bitnami/bitnami-docker-wordpress#environment-variables
|
||||
##
|
||||
wordpressFirstName: FirstName
|
||||
|
||||
## Last name
|
||||
## ref: https://github.com/bitnami/bitnami-docker-wordpress#environment-variables
|
||||
##
|
||||
wordpressLastName: LastName
|
||||
|
||||
## Blog name
|
||||
## ref: https://github.com/bitnami/bitnami-docker-wordpress#environment-variables
|
||||
##
|
||||
wordpressBlogName: User's Blog!
|
||||
|
||||
## Table prefix
|
||||
## ref: https://github.com/bitnami/bitnami-docker-wordpress#environment-variables
|
||||
##
|
||||
wordpressTablePrefix: wp_
|
||||
|
||||
## Set to `yes` to allow the container to be started with blank passwords
|
||||
## ref: https://github.com/bitnami/bitnami-docker-wordpress#environment-variables
|
||||
allowEmptyPassword: "yes"
|
||||
|
||||
## SMTP mail delivery configuration
|
||||
## ref: https://github.com/bitnami/bitnami-docker-wordpress/#smtp-configuration
|
||||
##
|
||||
# smtpHost:
|
||||
# smtpPort:
|
||||
# smtpUser:
|
||||
# smtpPassword:
|
||||
# smtpUsername:
|
||||
# smtpProtocol:
|
||||
|
||||
replicaCount: 3
|
||||
|
||||
externalDatabase:
|
||||
## All of these values are only used when mariadb.enabled is set to false
|
||||
## Database host
|
||||
host: localhost
|
||||
|
||||
## non-root Username for Wordpress Database
|
||||
user: bn_wordpress
|
||||
|
||||
## Database password
|
||||
password: ""
|
||||
|
||||
## Database name
|
||||
database: bitnami_wordpress
|
||||
|
||||
## Database port number
|
||||
port: 3306
|
||||
|
||||
##
|
||||
## MariaDB chart configuration
|
||||
##
|
||||
mariadb:
|
||||
## Whether to deploy a mariadb server to satisfy the applications database requirements. To use an external database set this to false and configure the externalDatabase parameters
|
||||
enabled: true
|
||||
## Disable MariaDB replication
|
||||
replication:
|
||||
enabled: false
|
||||
|
||||
## Create a database and a database user
|
||||
## ref: https://github.com/bitnami/bitnami-docker-mariadb/blob/master/README.md#creating-a-database-user-on-first-run
|
||||
##
|
||||
db:
|
||||
name: bitnami_wordpress
|
||||
user: bn_wordpress
|
||||
## If the password is not specified, mariadb will generates a random password
|
||||
##
|
||||
# password:
|
||||
|
||||
## MariaDB admin password
|
||||
## ref: https://github.com/bitnami/bitnami-docker-mariadb/blob/master/README.md#setting-the-root-password-on-first-run
|
||||
##
|
||||
# rootUser:
|
||||
# password:
|
||||
|
||||
## Enable persistence using Persistent Volume Claims
|
||||
## ref: http://kubernetes.io/docs/user-guide/persistent-volumes/
|
||||
##
|
||||
master:
|
||||
persistence:
|
||||
enabled: true
|
||||
## mariadb data Persistent Volume Storage Class
|
||||
## If defined, storageClassName: <storageClass>
|
||||
## If set to "-", storageClassName: "", which disables dynamic provisioning
|
||||
## If undefined (the default) or set to null, no storageClassName spec is
|
||||
## set, choosing the default provisioner. (gp2 on AWS, standard on
|
||||
## GKE, AWS & OpenStack)
|
||||
##
|
||||
# storageClass: "-"
|
||||
accessMode: ReadWriteOnce
|
||||
size: 8Gi
|
||||
|
||||
## Kubernetes configuration
|
||||
## For minikube, set this to NodePort, elsewhere use LoadBalancer or ClusterIP
|
||||
##
|
||||
serviceType: ClusterIP
|
||||
##
|
||||
## serviceType: NodePort
|
||||
## nodePorts:
|
||||
## http: <to set explicitly, choose port between 30000-32767>
|
||||
## https: <to set explicitly, choose port between 30000-32767>
|
||||
nodePorts:
|
||||
http: ""
|
||||
https: ""
|
||||
## Enable client source IP preservation
|
||||
## ref http://kubernetes.io/docs/tasks/access-application-cluster/create-external-load-balancer/#preserving-the-client-source-ip
|
||||
##
|
||||
serviceExternalTrafficPolicy: Local
|
||||
|
||||
## Allow health checks to be pointed at the https port
|
||||
healthcheckHttps: false
|
||||
|
||||
## Configure extra options for liveness and readiness probes
|
||||
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/#configure-probes)
|
||||
livenessProbe:
|
||||
initialDelaySeconds: 120
|
||||
periodSeconds: 10
|
||||
timeoutSeconds: 5
|
||||
failureThreshold: 6
|
||||
successThreshold: 1
|
||||
readinessProbe:
|
||||
initialDelaySeconds: 30
|
||||
periodSeconds: 10
|
||||
timeoutSeconds: 5
|
||||
failureThreshold: 6
|
||||
successThreshold: 1
|
||||
|
||||
## Configure the ingress resource that allows you to access the
|
||||
## Wordpress installation. Set up the URL
|
||||
## ref: http://kubernetes.io/docs/user-guide/ingress/
|
||||
##
|
||||
ingress:
|
||||
## Set to true to enable ingress record generation
|
||||
enabled: true
|
||||
|
||||
## The list of hostnames to be covered with this ingress record.
|
||||
## Most likely this will be just one host, but in the event more hosts are needed, this is an array
|
||||
## Please make sure to change the name and tlsSecret to your own settings
|
||||
hosts:
|
||||
- name: wordpress.local
|
||||
|
||||
## Set this to true in order to enable TLS on the ingress record
|
||||
## A side effect of this will be that the backend wordpress service will be connected at port 443
|
||||
tls: true
|
||||
|
||||
## If TLS is set to true, you must declare what secret will store the key/certificate for TLS
|
||||
tlsSecret: wordpress.local-tls
|
||||
|
||||
## Ingress annotations done as key:value pairs
|
||||
## If you're using kube-lego, you will want to add:
|
||||
## kubernetes.io/tls-acme: true
|
||||
##
|
||||
## For a full list of possible ingress annotations, please see
|
||||
## ref: https://github.com/kubernetes/ingress-nginx/blob/master/docs/user-guide/nginx-configuration/annotations.md
|
||||
##
|
||||
## If tls is set to true, annotation ingress.kubernetes.io/secure-backends: "true" will automatically be set
|
||||
annotations:
|
||||
# kubernetes.io/ingress.class: nginx
|
||||
# kubernetes.io/tls-acme: true
|
||||
|
||||
secrets:
|
||||
## If you're providing your own certificates, please use this to add the certificates as secrets
|
||||
## key and certificate should start with -----BEGIN CERTIFICATE----- or
|
||||
## -----BEGIN RSA PRIVATE KEY-----
|
||||
##
|
||||
## name should line up with a tlsSecret set further up
|
||||
## If you're using kube-lego, this is unneeded, as it will create the secret for you if it is not set
|
||||
##
|
||||
## It is also possible to create and manage the certificates outside of this helm chart
|
||||
## Please see README.md for more information
|
||||
# - name: wordpress.local-tls
|
||||
# key:
|
||||
# certificate:
|
||||
|
||||
## Enable persistence using Persistent Volume Claims
|
||||
## ref: http://kubernetes.io/docs/user-guide/persistent-volumes/
|
||||
##
|
||||
persistence:
|
||||
enabled: true
|
||||
## wordpress data Persistent Volume Storage Class
|
||||
## If defined, storageClassName: <storageClass>
|
||||
## If set to "-", storageClassName: "", which disables dynamic provisioning
|
||||
## If undefined (the default) or set to null, no storageClassName spec is
|
||||
## set, choosing the default provisioner. (gp2 on AWS, standard on
|
||||
## GKE, AWS & OpenStack)
|
||||
##
|
||||
# storageClass: "-"
|
||||
##
|
||||
## If you want to reuse an existing claim, you can pass the name of the PVC using
|
||||
## the existingClaim variable
|
||||
# existingClaim: your-claim
|
||||
##
|
||||
## To use the /admin portal and to ensure you can scale wordpress you need to provide a
|
||||
## ReadWriteMany PVC, if you dont have a provisioner for this type of storage
|
||||
## We recommend that you install the nfs provisioner and map it to a RWO volume
|
||||
## helm install stable/nfs-server-provisioner --set persistence.enabled=true,persistence.size=10Gi
|
||||
accessMode: ReadWriteMany
|
||||
size: 10Gi
|
||||
|
||||
## Configure resource requests and limits
|
||||
## ref: http://kubernetes.io/docs/user-guide/compute-resources/
|
||||
##
|
||||
resources:
|
||||
requests:
|
||||
memory: 512Mi
|
||||
cpu: 300m
|
||||
|
||||
## Node labels for pod assignment
|
||||
## Ref: https://kubernetes.io/docs/user-guide/node-selection/
|
||||
##
|
||||
nodeSelector: {}
|
||||
|
||||
## Tolerations for pod assignment
|
||||
## Ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/
|
||||
##
|
||||
tolerations: []
|
||||
|
||||
## Affinity for pod assignment
|
||||
## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity
|
||||
##
|
||||
affinity: {}
|
||||
Loading…
Reference in a new issue