You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by si...@apache.org on 2020/11/11 18:48:49 UTC
[pulsar-helm-chart] branch master updated: Fix "unknown apiVersion:
kind.sigs.k8s.io/v1alpha3" (#76)
This is an automated email from the ASF dual-hosted git repository.
sijie pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pulsar-helm-chart.git
The following commit(s) were added to refs/heads/master by this push:
new 669af78 Fix "unknown apiVersion: kind.sigs.k8s.io/v1alpha3" (#76)
669af78 is described below
commit 669af788ff6757b251e5aa8b2fd56ec0cee4d7de
Author: Sijie Guo <si...@apache.org>
AuthorDate: Wed Nov 11 11:48:42 2020 -0700
Fix "unknown apiVersion: kind.sigs.k8s.io/v1alpha3" (#76)
* Fix "unknown apiVersion: kind.sigs.k8s.io/v1alpha3"
*Motivation*
The api version `kind.sigs.k8s.io/v1alpha3` is not available anymore for kind clusters.
So all the CI actions are broken now. This PR fix the issue.
Additionally it adds a helm chart lint job to lint the chart changes.
* Trigger CI when kind cluster build script is changed
---
.ci/ct.sh | 22 ++--------------------
.github/workflows/{pulsar_zk_tls.yml => lint.yml} | 13 +++++++------
.github/workflows/pulsar.yml | 1 +
.github/workflows/pulsar_bk_tls.yml | 1 +
.github/workflows/pulsar_broker_tls.yml | 1 +
.github/workflows/pulsar_function.yml | 1 +
.github/workflows/pulsar_image.yml | 1 +
.github/workflows/pulsar_jwt_asymmetric.yml | 1 +
.github/workflows/pulsar_jwt_symmetric.yml | 1 +
.github/workflows/pulsar_tls.yml | 1 +
.github/workflows/pulsar_zk_tls.yml | 1 +
.github/workflows/pulsar_zkbk_tls.yml | 1 +
hack/kind-cluster-build.sh | 2 +-
13 files changed, 20 insertions(+), 27 deletions(-)
diff --git a/.ci/ct.sh b/.ci/ct.sh
index e2c1f53..14c7641 100755
--- a/.ci/ct.sh
+++ b/.ci/ct.sh
@@ -23,7 +23,7 @@ set -o errexit
set -o nounset
set -o pipefail
-DEFAULT_IMAGE=quay.io/helmpack/chart-testing:v2.4.0
+DEFAULT_IMAGE=quay.io/helmpack/chart-testing:v3.0.0
show_help() {
cat << EOF
@@ -65,12 +65,9 @@ main() {
# charts changed.
echo "::set-output name=changed::true"
- if [[ "$command" == "lint" ]] || [[ "$command" == "list-changed" ]]; then
- helm_init
# All other ct commands require a cluster to be created in a previous step.
- else
+ if [[ "$command" != "lint" ]] && [[ "$command" != "list-changed" ]]; then
configure_kube
- install_tiller
fi
run_ct
@@ -151,21 +148,6 @@ configure_kube() {
docker cp "$kubeconfig" ct:/root/.kube/config
}
-install_tiller() {
- echo 'Installing Tiller...'
- docker_exec sh -c 'kubectl create serviceaccount tiller --namespace kube-system --save-config --dry-run \
- --output=yaml | kubectl apply -f -'
- docker_exec sh -c 'kubectl create clusterrolebinding tiller-cluster-rule --clusterrole=cluster-admin \
- --serviceaccount=kube-system:tiller --save-config --dry-run --output=yaml | kubectl apply -f -'
- docker_exec helm init --service-account tiller --upgrade --wait
- echo
-}
-
-helm_init() {
- docker_exec helm init --client-only
- echo
-}
-
run_ct() {
echo "Running 'ct $command'..."
docker_exec ct "$command"
diff --git a/.github/workflows/pulsar_zk_tls.yml b/.github/workflows/lint.yml
similarity index 82%
copy from .github/workflows/pulsar_zk_tls.yml
copy to .github/workflows/lint.yml
index e0e4470..a8c807e 100644
--- a/.github/workflows/pulsar_zk_tls.yml
+++ b/.github/workflows/lint.yml
@@ -17,13 +17,14 @@
# under the License.
#
-name: Precommit - Pulsar Helm Chart (ZK TLS Only)
+name: Precommit - Helm Chart Lint
on:
pull_request:
branches:
- '*'
paths:
- 'charts/pulsar/**'
+ - '.ci/ct.sh'
jobs:
lint-test:
runs-on: ubuntu-latest
@@ -40,8 +41,8 @@ jobs:
with:
args: site2 .asf.yaml ct.yaml
- - name: Install chart
- run: |
- .ci/chart_test.sh .ci/clusters/values-zk-tls.yaml
- # Only build a kind cluster if there are chart changes to test.
- if: steps.docs.outputs.changed_only == 'no'
+ - name: Lint chart
+ id: lint
+ uses: helm/chart-testing-action@v1.0.0
+ with:
+ command: lint
diff --git a/.github/workflows/pulsar.yml b/.github/workflows/pulsar.yml
index f06764b..cf8286d 100644
--- a/.github/workflows/pulsar.yml
+++ b/.github/workflows/pulsar.yml
@@ -24,6 +24,7 @@ on:
- '*'
paths:
- 'charts/pulsar/**'
+ - 'hack/kind-cluster-build.sh'
jobs:
lint-test:
runs-on: ubuntu-latest
diff --git a/.github/workflows/pulsar_bk_tls.yml b/.github/workflows/pulsar_bk_tls.yml
index 85cf41a..0110f1e 100644
--- a/.github/workflows/pulsar_bk_tls.yml
+++ b/.github/workflows/pulsar_bk_tls.yml
@@ -24,6 +24,7 @@ on:
- '*'
paths:
- 'charts/pulsar/**'
+ - 'hack/kind-cluster-build.sh'
jobs:
lint-test:
runs-on: ubuntu-latest
diff --git a/.github/workflows/pulsar_broker_tls.yml b/.github/workflows/pulsar_broker_tls.yml
index f07617a..63e8ff8 100644
--- a/.github/workflows/pulsar_broker_tls.yml
+++ b/.github/workflows/pulsar_broker_tls.yml
@@ -24,6 +24,7 @@ on:
- '*'
paths:
- 'charts/pulsar/**'
+ - 'hack/kind-cluster-build.sh'
jobs:
lint-test:
runs-on: ubuntu-latest
diff --git a/.github/workflows/pulsar_function.yml b/.github/workflows/pulsar_function.yml
index e67f302..59d60ac 100644
--- a/.github/workflows/pulsar_function.yml
+++ b/.github/workflows/pulsar_function.yml
@@ -24,6 +24,7 @@ on:
- '*'
paths:
- 'charts/pulsar/**'
+ - 'hack/kind-cluster-build.sh'
jobs:
lint-test:
runs-on: ubuntu-latest
diff --git a/.github/workflows/pulsar_image.yml b/.github/workflows/pulsar_image.yml
index 567cc89..e83a224 100644
--- a/.github/workflows/pulsar_image.yml
+++ b/.github/workflows/pulsar_image.yml
@@ -24,6 +24,7 @@ on:
- '*'
paths:
- 'charts/pulsar/**'
+ - 'hack/kind-cluster-build.sh'
jobs:
lint-test:
runs-on: ubuntu-latest
diff --git a/.github/workflows/pulsar_jwt_asymmetric.yml b/.github/workflows/pulsar_jwt_asymmetric.yml
index e766dba..7c7b191 100644
--- a/.github/workflows/pulsar_jwt_asymmetric.yml
+++ b/.github/workflows/pulsar_jwt_asymmetric.yml
@@ -24,6 +24,7 @@ on:
- '*'
paths:
- 'charts/pulsar/**'
+ - 'hack/kind-cluster-build.sh'
jobs:
lint-test:
runs-on: ubuntu-latest
diff --git a/.github/workflows/pulsar_jwt_symmetric.yml b/.github/workflows/pulsar_jwt_symmetric.yml
index 382eac2..c617ea5 100644
--- a/.github/workflows/pulsar_jwt_symmetric.yml
+++ b/.github/workflows/pulsar_jwt_symmetric.yml
@@ -24,6 +24,7 @@ on:
- '*'
paths:
- 'charts/pulsar/**'
+ - 'hack/kind-cluster-build.sh'
jobs:
lint-test:
runs-on: ubuntu-latest
diff --git a/.github/workflows/pulsar_tls.yml b/.github/workflows/pulsar_tls.yml
index a3673b9..9c924c7 100644
--- a/.github/workflows/pulsar_tls.yml
+++ b/.github/workflows/pulsar_tls.yml
@@ -24,6 +24,7 @@ on:
- '*'
paths:
- 'charts/pulsar/**'
+ - 'hack/kind-cluster-build.sh'
jobs:
lint-test:
runs-on: ubuntu-latest
diff --git a/.github/workflows/pulsar_zk_tls.yml b/.github/workflows/pulsar_zk_tls.yml
index e0e4470..716ba78 100644
--- a/.github/workflows/pulsar_zk_tls.yml
+++ b/.github/workflows/pulsar_zk_tls.yml
@@ -24,6 +24,7 @@ on:
- '*'
paths:
- 'charts/pulsar/**'
+ - 'hack/kind-cluster-build.sh'
jobs:
lint-test:
runs-on: ubuntu-latest
diff --git a/.github/workflows/pulsar_zkbk_tls.yml b/.github/workflows/pulsar_zkbk_tls.yml
index 7c5037d..e51cc36 100644
--- a/.github/workflows/pulsar_zkbk_tls.yml
+++ b/.github/workflows/pulsar_zkbk_tls.yml
@@ -24,6 +24,7 @@ on:
- '*'
paths:
- 'charts/pulsar/**'
+ - 'hack/kind-cluster-build.sh'
jobs:
lint-test:
runs-on: ubuntu-latest
diff --git a/hack/kind-cluster-build.sh b/hack/kind-cluster-build.sh
index 0ae3468..8b21ea3 100755
--- a/hack/kind-cluster-build.sh
+++ b/hack/kind-cluster-build.sh
@@ -117,7 +117,7 @@ configFile=${workDir}/kind-config.yaml
cat <<EOF > ${configFile}
kind: Cluster
-apiVersion: kind.sigs.k8s.io/v1alpha3
+apiVersion: kind.x-k8s.io/v1alpha4
nodes:
- role: control-plane
extraPortMappings: