This is an automated email from the ASF dual-hosted git repository.

lhotari 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 46689ab  [CI] Upgrade k8s to 1.18 and also upgrade helm, kind & chart 
releaser versions (#192)
46689ab is described below

commit 46689ab30d88099076c73f35603282779c1bc89e
Author: Lari Hotari <[email protected]>
AuthorDate: Mon Jan 10 22:57:58 2022 +0200

    [CI] Upgrade k8s to 1.18 and also upgrade helm, kind & chart releaser 
versions (#192)
---
 .ci/chart_test.sh                            |  3 ---
 .ci/clusters/values-bk-tls.yaml              |  2 --
 .ci/clusters/values-broker-tls.yaml          |  2 --
 .ci/clusters/values-function.yaml            |  2 --
 .ci/clusters/values-jwt-asymmetric.yaml      |  4 +---
 .ci/clusters/values-jwt-symmetric.yaml       |  4 +---
 .ci/clusters/values-local-pv.yaml            |  4 +---
 .ci/clusters/values-tls.yaml                 |  4 +---
 .ci/clusters/values-zk-tls.yaml              |  4 +---
 .ci/clusters/values-zkbk-tls.yaml            |  4 +---
 .ci/helm.sh                                  | 16 +------------
 .gitignore                                   |  3 +++
 README.md                                    |  6 ++---
 Vagrantfile                                  | 34 ++++++++++++++++++++++++++++
 charts/pulsar/Chart.yaml                     |  2 +-
 hack/common.sh                               | 11 +++++----
 hack/kind-cluster-build.sh                   | 12 +++-------
 scripts/cert-manager/install-cert-manager.sh |  6 ++---
 18 files changed, 60 insertions(+), 63 deletions(-)

diff --git a/.ci/chart_test.sh b/.ci/chart_test.sh
index e9bdab4..4b3e495 100755
--- a/.ci/chart_test.sh
+++ b/.ci/chart_test.sh
@@ -32,9 +32,6 @@ source ${PULSAR_HOME}/.ci/helm.sh
 # create cluster
 ci::create_cluster
 
-# install storage provisioner
-ci::install_storage_provisioner
-
 extra_opts=""
 if [[ "x${SYMMETRIC}" == "xtrue" ]]; then
     extra_opts="-s"
diff --git a/.ci/clusters/values-bk-tls.yaml b/.ci/clusters/values-bk-tls.yaml
index bc2b97d..71fda5e 100644
--- a/.ci/clusters/values-bk-tls.yaml
+++ b/.ci/clusters/values-bk-tls.yaml
@@ -23,8 +23,6 @@ monitoring:
   node_exporter: false
   alert_manager: false
 
-volumes:
-  local_storage: true
 
 # disabled AntiAffinity
 affinity:
diff --git a/.ci/clusters/values-broker-tls.yaml 
b/.ci/clusters/values-broker-tls.yaml
index 4b0d7bf..bb1f966 100644
--- a/.ci/clusters/values-broker-tls.yaml
+++ b/.ci/clusters/values-broker-tls.yaml
@@ -23,8 +23,6 @@ monitoring:
   node_exporter: false
   alert_manager: false
 
-volumes:
-  local_storage: true
 
 # disabled AntiAffinity
 affinity:
diff --git a/.ci/clusters/values-function.yaml 
b/.ci/clusters/values-function.yaml
index 1107207..efc99fc 100644
--- a/.ci/clusters/values-function.yaml
+++ b/.ci/clusters/values-function.yaml
@@ -23,8 +23,6 @@ monitoring:
   node_exporter: false
   alert_manager: false
 
-volumes:
-  local_storage: true
 
 # disabled AntiAffinity
 affinity:
diff --git a/.ci/clusters/values-jwt-asymmetric.yaml 
b/.ci/clusters/values-jwt-asymmetric.yaml
index 5fdc5ed..fbbf18b 100644
--- a/.ci/clusters/values-jwt-asymmetric.yaml
+++ b/.ci/clusters/values-jwt-asymmetric.yaml
@@ -23,8 +23,6 @@ monitoring:
   node_exporter: false
   alert_manager: false
 
-volumes:
-  local_storage: true
 
 # disabled AntiAffinity
 affinity:
@@ -80,4 +78,4 @@ auth:
     # proxy to broker communication
     proxy: "proxy-admin"
     # pulsar-admin client to broker/proxy communication
-    client: "admin"
\ No newline at end of file
+    client: "admin"
diff --git a/.ci/clusters/values-jwt-symmetric.yaml 
b/.ci/clusters/values-jwt-symmetric.yaml
index e0f2003..3bfba2d 100644
--- a/.ci/clusters/values-jwt-symmetric.yaml
+++ b/.ci/clusters/values-jwt-symmetric.yaml
@@ -23,8 +23,6 @@ monitoring:
   node_exporter: false
   alert_manager: false
 
-volumes:
-  local_storage: true
 
 # disabled AntiAffinity
 affinity:
@@ -80,4 +78,4 @@ auth:
     # proxy to broker communication
     proxy: "proxy-admin"
     # pulsar-admin client to broker/proxy communication
-    client: "admin"
\ No newline at end of file
+    client: "admin"
diff --git a/.ci/clusters/values-local-pv.yaml 
b/.ci/clusters/values-local-pv.yaml
index 53cf680..123424d 100644
--- a/.ci/clusters/values-local-pv.yaml
+++ b/.ci/clusters/values-local-pv.yaml
@@ -23,8 +23,6 @@ monitoring:
   node_exporter: false
   alert_manager: false
 
-volumes:
-  local_storage: true
 
 # disabled AntiAffinity
 affinity:
@@ -61,4 +59,4 @@ proxy:
   replicaCount: 1
 
 toolset:
-  useProxy: false
\ No newline at end of file
+  useProxy: false
diff --git a/.ci/clusters/values-tls.yaml b/.ci/clusters/values-tls.yaml
index ae31496..611bd84 100644
--- a/.ci/clusters/values-tls.yaml
+++ b/.ci/clusters/values-tls.yaml
@@ -23,8 +23,6 @@ monitoring:
   node_exporter: false
   alert_manager: false
 
-volumes:
-  local_storage: true
 
 # disabled AntiAffinity
 affinity:
@@ -78,4 +76,4 @@ tls:
 # disable cert-manager
 certs:
   internal_issuer:
-    enabled: false
\ No newline at end of file
+    enabled: false
diff --git a/.ci/clusters/values-zk-tls.yaml b/.ci/clusters/values-zk-tls.yaml
index b4a7498..442f52f 100644
--- a/.ci/clusters/values-zk-tls.yaml
+++ b/.ci/clusters/values-zk-tls.yaml
@@ -23,8 +23,6 @@ monitoring:
   node_exporter: false
   alert_manager: false
 
-volumes:
-  local_storage: true
 
 # disabled AntiAffinity
 affinity:
@@ -72,4 +70,4 @@ tls:
 # disable cert manager
 certs:
   internal_issuer:
-    enabled: false
\ No newline at end of file
+    enabled: false
diff --git a/.ci/clusters/values-zkbk-tls.yaml 
b/.ci/clusters/values-zkbk-tls.yaml
index c380bb8..a8c096e 100644
--- a/.ci/clusters/values-zkbk-tls.yaml
+++ b/.ci/clusters/values-zkbk-tls.yaml
@@ -23,8 +23,6 @@ monitoring:
   node_exporter: false
   alert_manager: false
 
-volumes:
-  local_storage: true
 
 # disabled AntiAffinity
 affinity:
@@ -74,4 +72,4 @@ tls:
 # disable cert manager
 certs:
   internal_issuer:
-    enabled: false
\ No newline at end of file
+    enabled: false
diff --git a/.ci/helm.sh b/.ci/helm.sh
index a967f38..a9349e6 100644
--- a/.ci/helm.sh
+++ b/.ci/helm.sh
@@ -28,6 +28,7 @@ KUBECTL=${OUTPUT_BIN}/kubectl
 NAMESPACE=pulsar
 CLUSTER=pulsar-ci
 CLUSTER_ID=$(uuidgen)
+export PATH="$OUTPUT_BIN:$PATH"
 
 # brew package 'coreutils' is required on MacOSX
 # coreutils includes the 'timeout' command
@@ -63,21 +64,6 @@ function ci::delete_cluster() {
     echo "Successfully delete a kind cluster."
 }
 
-function ci::install_storage_provisioner() {
-    echo "Installing the local storage provisioner ..."
-    ${HELM} repo add streamnative https://charts.streamnative.io
-    ${HELM} repo update
-    ${HELM} install local-storage-provisioner 
streamnative/local-storage-provisioner
-    WC=$(${KUBECTL} get pods --field-selector=status.phase=Running | grep 
local-storage-provisioner | wc -l)
-    while [[ ${WC} -lt 1 ]]; do
-      echo ${WC};
-      sleep 15
-      ${KUBECTL} get pods --field-selector=status.phase=Running
-      WC=$(${KUBECTL} get pods --field-selector=status.phase=Running | grep 
local-storage-provisioner | wc -l)
-    done
-    echo "Successfully installed the local storage provisioner."
-}
-
 function ci::install_cert_manager() {
     echo "Installing the cert-manager ..."
     ${KUBECTL} create namespace cert-manager
diff --git a/.gitignore b/.gitignore
index 4fe84e3..8f64298 100644
--- a/.gitignore
+++ b/.gitignore
@@ -16,3 +16,6 @@ charts/**/*.lock
 
 PRIVATEKEY
 PUBLICKEY
+.vagrant/
+pulsarctl-*-*.tar.gz
+pulsarctl-*-*/
diff --git a/README.md b/README.md
index 3def6d0..bdc48ce 100644
--- a/README.md
+++ b/README.md
@@ -72,9 +72,9 @@ It includes support for:
 
 In order to use this chart to deploy Apache Pulsar on Kubernetes, the 
followings are required.
 
-1. kubectl 1.14 or higher, compatible with your cluster ([+/- 1 minor release 
from your 
cluster](https://kubernetes.io/docs/tasks/tools/install-kubectl/#before-you-begin))
+1. kubectl 1.18 or higher, compatible with your cluster ([+/- 1 minor release 
from your 
cluster](https://kubernetes.io/docs/tasks/tools/install-kubectl/#before-you-begin))
 2. Helm v3 (3.0.2 or higher)
-3. A Kubernetes cluster, version 1.14 or higher.
+3. A Kubernetes cluster, version 1.18 or higher.
 
 ## Environment setup
 
@@ -100,7 +100,7 @@ helm install <release-name> apache/pulsar
 
 ## Kubernetes cluster preparation
 
-You need a Kubernetes cluster whose version is 1.14 or higher in order to use 
this chart, due to the usage of certain Kubernetes features.
+You need a Kubernetes cluster whose version is 1.18 or higher in order to use 
this chart, due to the usage of certain Kubernetes features.
 
 We provide some instructions to guide you through the preparation: 
http://pulsar.apache.org/docs/en/helm-prepare/
 
diff --git a/Vagrantfile b/Vagrantfile
new file mode 100644
index 0000000..eddd6c4
--- /dev/null
+++ b/Vagrantfile
@@ -0,0 +1,34 @@
+# -*- mode: ruby -*-
+# vi: set ft=ruby :
+
+# vagrant configuration file for setting up local environment for Pulsar Helm 
Chart 
+# CI script development.
+#
+# usage: 
+# Starting vagrant box:
+#   vagrant up
+# Connecting to vagrant box and running a ci script:
+#   vagrant ssh
+#   byobu
+#   cd /vagrant
+#   .ci/chart_test.sh .ci/clusters/values-local-pv.yaml
+# Shutting down vagrant box:
+#   vagrant halt
+# Destroying vagrant box:
+#   vagrant destroy
+Vagrant.configure("2") do |config|
+  config.vm.box = "ubuntu/focal64"
+
+  config.vm.provider "virtualbox" do |vb|
+    vb.memory = "7168"
+    vb.cpus = 2
+  end
+
+  config.vm.provision "shell", inline: <<-SHELL
+    export DEBIAN_FRONTEND=noninteractive
+    sudo apt-get update
+    sudo apt-get -y install docker.io
+    sudo adduser vagrant docker
+    echo 'PATH="/vagrant/output/bin:$PATH"' >> /home/vagrant/.profile
+  SHELL
+end
diff --git a/charts/pulsar/Chart.yaml b/charts/pulsar/Chart.yaml
index d7fa500..e56c009 100644
--- a/charts/pulsar/Chart.yaml
+++ b/charts/pulsar/Chart.yaml
@@ -17,7 +17,7 @@
 # under the License.
 #
 
-apiVersion: v1
+apiVersion: v2
 appVersion: "2.7.4"
 description: Apache Pulsar Helm chart for Kubernetes
 name: pulsar
diff --git a/hack/common.sh b/hack/common.sh
index 3d13b06..512ef4a 100755
--- a/hack/common.sh
+++ b/hack/common.sh
@@ -25,14 +25,15 @@ fi
 
 OUTPUT=${PULSAR_CHART_HOME}/output
 OUTPUT_BIN=${OUTPUT}/bin
-KUBECTL_VERSION=1.14.3
+KUBECTL_VERSION=1.18.20
 KUBECTL_BIN=$OUTPUT_BIN/kubectl
 HELM_BIN=$OUTPUT_BIN/helm
-HELM_VERSION=3.0.1
-KIND_VERSION=0.6.1
+HELM_VERSION=3.7.2
+KIND_VERSION=0.11.1
 KIND_BIN=$OUTPUT_BIN/kind
 CR_BIN=$OUTPUT_BIN/cr
-CR_VERSION=1.0.0-beta.1
+CR_VERSION=1.3.0
+export PATH="$OUTPUT_BIN:$PATH"
 
 test -d "$OUTPUT_BIN" || mkdir -p "$OUTPUT_BIN"
 
@@ -65,7 +66,7 @@ function hack::ensure_kubectl() {
     echo "Installing kubectl v$KUBECTL_VERSION..."
     tmpfile=$(mktemp)
     trap "test -f $tmpfile && rm $tmpfile" RETURN
-    curl --retry 10 -L -o $tmpfile 
https://storage.googleapis.com/kubernetes-release/release/v${KUBECTL_VERSION}/bin/${OS}/${ARCH}/kubectl
+    curl --retry 10 -L -o $tmpfile 
https://dl.k8s.io/release/v${KUBECTL_VERSION}/bin/${OS}/${ARCH}/kubectl
     mv $tmpfile $KUBECTL_BIN
     chmod +x $KUBECTL_BIN
 }
diff --git a/hack/kind-cluster-build.sh b/hack/kind-cluster-build.sh
index 8b21ea3..7e6eb3b 100755
--- a/hack/kind-cluster-build.sh
+++ b/hack/kind-cluster-build.sh
@@ -25,6 +25,7 @@ source ${PULSAR_CHART_HOME}/hack/common.sh
 
 hack::ensure_kubectl
 hack::ensure_helm
+hack::ensure_kind
 
 usage() {
     cat <<EOF
@@ -82,7 +83,7 @@ done
 
 clusterName=${clusterName:-pulsar-dev}
 nodeNum=${nodeNum:-6}
-k8sVersion=${k8sVersion:-v1.14.10}
+k8sVersion=${k8sVersion:-v1.18.19}
 volumeNum=${volumeNum:-9}
 
 echo "clusterName: ${clusterName}"
@@ -229,13 +230,6 @@ spec:
 EOF
 $KUBECTL_BIN apply -f ${registryFile}
 
-echo "init pulsar  env"
-$KUBECTL_BIN apply -f 
${PULSAR_CHART_HOME}/manifests/local-dind/local-volume-provisioner.yaml
-
-docker pull gcr.io/google-containers/kube-scheduler:${k8sVersion}
-docker tag gcr.io/google-containers/kube-scheduler:${k8sVersion} 
mirantis/hypokube:final
-kind load docker-image --name=${clusterName} mirantis/hypokube:final
-
 echo "############# success create cluster:[${clusterName}] #############"
 
 echo "To start using your cluster, run:"
@@ -248,4 +242,4 @@ because http proxy is inaccessible.
 If you cannot remove http proxy settings, you can either whitelist image
 domains in NO_PROXY environment or use 'docker pull <image> && kind load
 docker-image <image>' command to load images into nodes.
-EOF
\ No newline at end of file
+EOF
diff --git a/scripts/cert-manager/install-cert-manager.sh 
b/scripts/cert-manager/install-cert-manager.sh
index 5670b92..1dbf205 100755
--- a/scripts/cert-manager/install-cert-manager.sh
+++ b/scripts/cert-manager/install-cert-manager.sh
@@ -21,11 +21,11 @@
 
 NAMESPACE=cert-manager
 NAME=cert-manager
-VERSION=v0.13.0
+VERSION=v1.1.0
 
 # Install cert-manager CustomResourceDefinition resources
 echo "Installing cert-manager CRD resources ..."
-kubectl apply --validate=false -f 
https://raw.githubusercontent.com/jetstack/cert-manager/${VERSION}/deploy/manifests/00-crds.yaml
+kubectl apply --validate=false -f 
https://github.com/jetstack/cert-manager/releases/download/${VERSION}/cert-manager.crds.yaml
 
 # Create the namespace 
 kubectl get ns ${NAMESPACE}
@@ -52,4 +52,4 @@ helm install \
   --version ${VERSION} \
   ${NAME} \
   jetstack/cert-manager
-echo "Successfully installed cert-manager ${VERSION}."
\ No newline at end of file
+echo "Successfully installed cert-manager ${VERSION}."

Reply via email to