Fix GitHub Actions based CI checks which have been failing (#370)

* Upgrade upgrade kind, chart releaser and helm versions

* Disable podMonitory for values-broker-tls.yaml file

- was missing from #317

* Use k8s 1.18.20

* Use ubuntu-20.04 runtime

- k8s < 1.19 doesn't support cgroup v2

* Upgrade to k8s 1.19 as baseline

* Baseline to k8s 1.20

* Set ip family to ipv4

* Add more logging to kind cluster creation

* Simplify duplicate job deletion

* use verbosity flag

* Upgrade to k8s 1.24

* Replace removed tolerate-unready-endpoints annotation with publishNotReadyAddresses

(cherry picked from commit e90926053a2b01bb95529fbaddc8d2ce2cdeec63)

* Use k8s 1.21 as baseline

* Run on ubuntu-22.04

* Use Pulsar 2.10.4
This commit is contained in:
Lari Hotari 2023-07-10 22:45:37 +03:00 committed by GitHub
parent b3c19fd7fc
commit f43c6f6d9e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
20 changed files with 96 additions and 130 deletions

View File

@ -39,9 +39,15 @@ components:
zookeeper:
replicaCount: 1
# Disable pod monitor since we're disabling CRD installation
podMonitor:
enabled: false
bookkeeper:
replicaCount: 3
# Disable pod monitor since we're disabling CRD installation
podMonitor:
enabled: false
configData:
diskUsageThreshold: "0.999"
diskUsageWarnThreshold: "0.999"
@ -50,6 +56,9 @@ bookkeeper:
broker:
replicaCount: 1
# Disable pod monitor since we're disabling CRD installation
podMonitor:
enabled: false
configData:
## Enable `autoSkipNonRecoverableData` since bookkeeper is running
## without persistence
@ -59,8 +68,16 @@ broker:
managedLedgerDefaultWriteQuorum: "1"
managedLedgerDefaultAckQuorum: "1"
autorecovery:
# Disable pod monitor since we're disabling CRD installation
podMonitor:
enabled: false
proxy:
replicaCount: 1
# Disable pod monitor since we're disabling CRD installation
podMonitor:
enabled: false
toolset:
useProxy: false

View File

@ -1,106 +0,0 @@
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#
name: Cancel duplicate workflows
on:
workflow_run:
# this could be any workflow that is always executed by PUSH/PR operation
workflows: ["Precommit Style Check"]
types: ['requested']
jobs:
cancel-workflow-runs:
runs-on: ubuntu-20.04
steps:
# the potiuk/cancel-workflow-run action has been allow-listed by
# the Apache Infrastructure
- name: cancel duplicate lint.yml
uses: potiuk/cancel-workflow-runs@953e057dc81d3458935a18d1184c386b0f6b5738
with:
token: ${{ secrets.GITHUB_TOKEN }}
cancelMode: allDuplicates
workflowFileName: lint.yml
- name: cancel duplicate pulsar_bk_tls.yml
uses: potiuk/cancel-workflow-runs@953e057dc81d3458935a18d1184c386b0f6b5738
with:
token: ${{ secrets.GITHUB_TOKEN }}
cancelMode: allDuplicates
workflowFileName: pulsar_bk_tls.yml
- name: cancel duplicate pulsar_broker_tls.yml
uses: potiuk/cancel-workflow-runs@953e057dc81d3458935a18d1184c386b0f6b5738
with:
token: ${{ secrets.GITHUB_TOKEN }}
cancelMode: allDuplicates
workflowFileName: pulsar_broker_tls.yml
- name: cancel duplicate pulsar_function.yml
uses: potiuk/cancel-workflow-runs@953e057dc81d3458935a18d1184c386b0f6b5738
with:
token: ${{ secrets.GITHUB_TOKEN }}
cancelMode: allDuplicates
workflowFileName: pulsar_function.yml
- name: cancel duplicate pulsar_image.yml
uses: potiuk/cancel-workflow-runs@953e057dc81d3458935a18d1184c386b0f6b5738
with:
token: ${{ secrets.GITHUB_TOKEN }}
cancelMode: allDuplicates
workflowFileName: pulsar_image.yml
- name: cancel duplicate pulsar_jwt_asymmetric.yml
uses: potiuk/cancel-workflow-runs@953e057dc81d3458935a18d1184c386b0f6b5738
with:
token: ${{ secrets.GITHUB_TOKEN }}
cancelMode: allDuplicates
workflowFileName: pulsar_jwt_asymmetric.yml
- name: cancel duplicate pulsar_jwt_symmetric.yml
uses: potiuk/cancel-workflow-runs@953e057dc81d3458935a18d1184c386b0f6b5738
with:
token: ${{ secrets.GITHUB_TOKEN }}
cancelMode: allDuplicates
workflowFileName: pulsar_jwt_symmetric.yml
- name: cancel duplicate pulsar_tls.yml
uses: potiuk/cancel-workflow-runs@953e057dc81d3458935a18d1184c386b0f6b5738
with:
token: ${{ secrets.GITHUB_TOKEN }}
cancelMode: allDuplicates
workflowFileName: pulsar_tls.yml
- name: cancel duplicate pulsar.yml
uses: potiuk/cancel-workflow-runs@953e057dc81d3458935a18d1184c386b0f6b5738
with:
token: ${{ secrets.GITHUB_TOKEN }}
cancelMode: allDuplicates
workflowFileName: pulsar.yml
- name: cancel duplicate pulsar_zkbk_tls.yml
uses: potiuk/cancel-workflow-runs@953e057dc81d3458935a18d1184c386b0f6b5738
with:
token: ${{ secrets.GITHUB_TOKEN }}
cancelMode: allDuplicates
workflowFileName: pulsar_zkbk_tls.yml
- name: cancel duplicate pulsar_zk_tls.yml
uses: potiuk/cancel-workflow-runs@953e057dc81d3458935a18d1184c386b0f6b5738
with:
token: ${{ secrets.GITHUB_TOKEN }}
cancelMode: allDuplicates
workflowFileName: pulsar_zk_tls.yml
- name: cancel duplicate style.yml
uses: potiuk/cancel-workflow-runs@953e057dc81d3458935a18d1184c386b0f6b5738
with:
token: ${{ secrets.GITHUB_TOKEN }}
cancelMode: allDuplicates
workflowFileName: style.yml

View File

@ -22,9 +22,14 @@ on:
pull_request:
branches:
- '*'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
lint-test:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
timeout-minutes: 45
steps:
- name: checkout

View File

@ -23,9 +23,13 @@ on:
branches:
- '*'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
lint-test:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
timeout-minutes: 45
steps:
- name: checkout

View File

@ -22,9 +22,14 @@ on:
pull_request:
branches:
- '*'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
lint-test:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
timeout-minutes: 45
steps:
- name: checkout

View File

@ -23,9 +23,13 @@ on:
branches:
- '*'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
lint-test:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
timeout-minutes: 45
steps:
- name: checkout

View File

@ -23,9 +23,13 @@ on:
branches:
- '*'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
lint-test:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
timeout-minutes: 45
steps:
- name: checkout

View File

@ -23,9 +23,13 @@ on:
branches:
- '*'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
lint-test:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
timeout-minutes: 45
steps:
- name: checkout

View File

@ -23,9 +23,13 @@ on:
branches:
- '*'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
lint-test:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
timeout-minutes: 45
steps:
- name: checkout

View File

@ -23,9 +23,13 @@ on:
branches:
- '*'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
lint-test:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
timeout-minutes: 45
steps:
- name: checkout

View File

@ -23,9 +23,13 @@ on:
branches:
- '*'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
lint-test:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
timeout-minutes: 45
steps:
- name: checkout

View File

@ -23,9 +23,13 @@ on:
branches:
- '*'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
lint-test:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
timeout-minutes: 45
steps:
- name: checkout

View File

@ -23,9 +23,13 @@ on:
branches:
- '*'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
lint-test:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
timeout-minutes: 45
steps:
- name: checkout

View File

@ -22,11 +22,16 @@ on:
pull_request:
branches:
- '*'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
name: Build
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
timeout-minutes: 45
steps:
- name: Set up Go 1.12

View File

@ -73,9 +73,9 @@ It includes support for:
In order to use this chart to deploy Apache Pulsar on Kubernetes, the followings are required.
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))
1. kubectl 1.21 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.18 or higher.
3. A Kubernetes cluster, version 1.21 or higher.
## Environment setup
@ -95,7 +95,7 @@ helm repo add apache https://pulsar.apache.org/charts
## Kubernetes cluster preparation
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.
You need a Kubernetes cluster whose version is 1.21 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/helm-prepare/

View File

@ -18,7 +18,7 @@
#
apiVersion: v2
appVersion: "2.10.2"
appVersion: "2.10.4"
description: Apache Pulsar Helm chart for Kubernetes
name: pulsar
version: 3.0.0

View File

@ -45,6 +45,7 @@ spec:
port: {{ .Values.zookeeper.ports.clientTls }}
{{- end }}
clusterIP: None
publishNotReadyAddresses: true
selector:
{{- include "pulsar.matchLabels" . | nindent 4 }}
component: {{ .Values.zookeeper.component }}

View File

@ -398,8 +398,7 @@ zookeeper:
## templates/zookeeper-service.yaml
##
service:
annotations:
service.alpha.kubernetes.io/tolerate-unready-endpoints: "true"
annotations: {}
## Zookeeper PodDisruptionBudget
## templates/zookeeper-pdb.yaml
##

View File

@ -25,14 +25,14 @@ fi
OUTPUT=${PULSAR_CHART_HOME}/output
OUTPUT_BIN=${OUTPUT}/bin
KUBECTL_VERSION=1.18.20
KUBECTL_VERSION=1.21.14
KUBECTL_BIN=$OUTPUT_BIN/kubectl
HELM_BIN=$OUTPUT_BIN/helm
HELM_VERSION=3.7.2
KIND_VERSION=0.11.1
HELM_VERSION=3.12.0
KIND_VERSION=0.20.0
KIND_BIN=$OUTPUT_BIN/kind
CR_BIN=$OUTPUT_BIN/cr
CR_VERSION=1.3.0
CR_VERSION=1.6.0
export PATH="$OUTPUT_BIN:$PATH"
test -d "$OUTPUT_BIN" || mkdir -p "$OUTPUT_BIN"

View File

@ -83,7 +83,9 @@ done
clusterName=${clusterName:-pulsar-dev}
nodeNum=${nodeNum:-6}
k8sVersion=${k8sVersion:-v1.18.19}
# k8sVersion must be compatible with the used kind version
# see https://github.com/kubernetes-sigs/kind/releases/tag/v0.20.0 for the list of supported k8s versions for kind 0.20.0
k8sVersion=${k8sVersion:-v1.21.14@sha256:8a4e9bb3f415d2bb81629ce33ef9c76ba514c14d707f9797a01e3216376ba093}
volumeNum=${volumeNum:-9}
echo "clusterName: ${clusterName}"
@ -119,6 +121,8 @@ configFile=${workDir}/kind-config.yaml
cat <<EOF > ${configFile}
kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
networking:
ipFamily: ipv4
nodes:
- role: control-plane
extraPortMappings:
@ -151,7 +155,7 @@ if [[ "${matchedCluster}" == "${clusterName}" ]]; then
kind delete cluster --name=${clusterName}
fi
echo "start to create k8s cluster"
kind create cluster --config ${configFile} --image kindest/node:${k8sVersion} --name=${clusterName}
kind create cluster --config ${configFile} --image kindest/node:${k8sVersion} --name=${clusterName} --verbosity 3
export KUBECONFIG=${workDir}/kubeconfig.yaml
kind get kubeconfig --name=${clusterName} > ${KUBECONFIG}