From 4b1eed4346d2457b2ee2df8560a622ddf90d441b Mon Sep 17 00:00:00 2001 From: jiangpengcheng Date: Tue, 25 Jun 2024 15:43:57 +0800 Subject: [PATCH 01/10] Fix custom log config (#765) * Fix log path when using custom java log yaml config * fix ci * Update * fix ci --- .../cases/java-log-config-yaml/manifests.yaml | 130 ++++++++++++++++++ .../cases/java-log-config-yaml/verify.sh | 59 ++++++++ .ci/tests/integration-oauth2/e2e.yaml | 2 + controllers/spec/common.go | 9 +- 4 files changed, 194 insertions(+), 6 deletions(-) create mode 100644 .ci/tests/integration-oauth2/cases/java-log-config-yaml/manifests.yaml create mode 100644 .ci/tests/integration-oauth2/cases/java-log-config-yaml/verify.sh diff --git a/.ci/tests/integration-oauth2/cases/java-log-config-yaml/manifests.yaml b/.ci/tests/integration-oauth2/cases/java-log-config-yaml/manifests.yaml new file mode 100644 index 000000000..36357d667 --- /dev/null +++ b/.ci/tests/integration-oauth2/cases/java-log-config-yaml/manifests.yaml @@ -0,0 +1,130 @@ +apiVersion: compute.functionmesh.io/v1alpha1 +kind: Function +metadata: + name: java-log-config-yaml + namespace: default +spec: + image: streamnative/pulsar-functions-java-sample:2.9.2.23 + className: org.apache.pulsar.functions.api.examples.ExclamationFunction + forwardSourceMessageProperty: true + maxPendingAsyncRequests: 1000 + replicas: 1 + maxReplicas: 5 + logTopic: persistent://public/default/logging-function-logs + input: + topics: + - persistent://public/default/input-java-log-config-yaml-topic + typeClassName: java.lang.String + output: + topic: persistent://public/default/output-java-log-config-yaml-topic + typeClassName: java.lang.String + resources: + requests: + cpu: 50m + memory: 1G + limits: + cpu: "0.2" + memory: 1.1G + # each secret will be loaded ad an env variable from the `path` secret with the `key` in that secret in the name of `name` + secretsMap: + "name": + path: "test-secret" + key: "username" + "pwd": + path: "test-secret" + key: "password" + pulsar: + pulsarConfig: "test-pulsar" + tlsConfig: + enabled: false + allowInsecure: false + hostnameVerification: true + certSecretName: sn-platform-tls-broker + certSecretKey: "" + authConfig: + oauth2Config: + audience: urn:sn:pulsar:sndev:test + issuerUrl: https://auth.sncloud-stg.dev/ + keySecretName: sn-platform-oauth2-private-key + keySecretKey: auth.json + java: + log: + javaLog4JConfigFileType: yaml + logConfig: + name: "java-log-config-cm" + key: "log.yaml" + jar: /pulsar/examples/api-examples.jar + # to be delete & use admission hook + clusterName: test + autoAck: true +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: test-pulsar +data: + webServiceURL: http://sn-platform-pulsar-broker.default.svc.cluster.local:8080 + brokerServiceURL: pulsar://sn-platform-pulsar-broker.default.svc.cluster.local:6650 +--- +apiVersion: v1 +data: + username: YWRtaW4= + password: MWYyZDFlMmU2N2Rm +kind: Secret +metadata: + name: test-secret +type: Opaque +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: java-log-config-cm +data: + log.yaml: | + Configuration: + name: pulsar-functions-kubernetes-instance + monitorInterval: 30 + Properties: + Property: + - name: pulsar.log.level + value: DEBUG + - name: bk.log.level + value: DEBUG + + Appenders: + Console: + name: Console + target: SYSTEM_OUT + + PatternLayout: + Pattern: "%d{ISO8601_OFFSET_DATE_TIME_HHMM} [%t] %-5level %logger{36} - %msg%n" + + + RollingRandomAccessFile: + name: RollingRandomAccessFile + fileName: "${sys:pulsar.function.log.dir}/${sys:pulsar.function.log.file}.log" + filePattern: "${sys:pulsar.function.log.dir}/${sys:pulsar.function.log.file}.%d{yyyy-MM-dd}-%i.log.gz" + + PatternLayout: + Pattern: "%d{yyyy-MMM-dd HH:mm:ss a} [%t] %-5level %logger{36} - %msg%n" + + Policies: + SizeBasedTriggeringPolicy: + size: "10MB" + DefaultRolloverStrategy: + max: 5 + + Loggers: + Root: + level: "${sys:pulsar.log.level}" + AppenderRef: + - ref: Console + level: "${sys:pulsar.log.level}" + - ref: RollingRandomAccessFile + Logger: + name: org.apache.pulsar.functions.runtime.shaded.org.apache.bookkeeper + level: "${sys:bk.log.level}" + additivity: false + AppenderRef: + - ref: Console + - ref: RollingRandomAccessFile diff --git a/.ci/tests/integration-oauth2/cases/java-log-config-yaml/verify.sh b/.ci/tests/integration-oauth2/cases/java-log-config-yaml/verify.sh new file mode 100644 index 000000000..d1eb931c5 --- /dev/null +++ b/.ci/tests/integration-oauth2/cases/java-log-config-yaml/verify.sh @@ -0,0 +1,59 @@ +#!/usr/bin/env bash +# +# 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. +# + +set -e + +E2E_DIR=$(dirname "$0") +BASE_DIR=$(cd "${E2E_DIR}"/../../../../..;pwd) +PULSAR_NAMESPACE=${PULSAR_NAMESPACE:-"default"} +PULSAR_RELEASE_NAME=${PULSAR_RELEASE_NAME:-"sn-platform"} +E2E_KUBECONFIG=${E2E_KUBECONFIG:-"/tmp/e2e-k8s.config"} + +source "${BASE_DIR}"/.ci/helm.sh + +if [ ! "$KUBECONFIG" ]; then + export KUBECONFIG=${E2E_KUBECONFIG} +fi + +manifests_file="${BASE_DIR}"/.ci/tests/integration-oauth2/cases/java-log-config-yaml/manifests.yaml + +kubectl apply -f "${manifests_file}" > /dev/null 2>&1 + +verify_fm_result=$(ci::verify_function_mesh java-log-config-yaml 2>&1) +if [ $? -ne 0 ]; then + echo "$verify_fm_result" + kubectl delete -f "${manifests_file}" > /dev/null 2>&1 || true + exit 1 +fi + +verify_java_result=$(NAMESPACE=${PULSAR_NAMESPACE} CLUSTER=${PULSAR_RELEASE_NAME} ci::verify_exclamation_function_with_auth "persistent://public/default/input-java-log-config-yaml-topic" "persistent://public/default/output-java-log-config-yaml-topic" "test-message" "test-message!" 10 2>&1) +if [ $? -ne 0 ]; then + echo "$verify_java_result" + kubectl delete -f "${manifests_file}" > /dev/null 2>&1 || true + exit 1 +fi + +verify_log_config_result=$(kubectl logs -l compute.functionmesh.io/name=java-log-config-yaml --tail=-1 | grep "Got result: object:" 2>&1) +if [ $? -eq 0 ]; then + echo "e2e-test: ok" | yq eval - +else + echo "$verify_log_config_result" +fi +kubectl delete -f "${manifests_file}" > /dev/null 2>&1 || true diff --git a/.ci/tests/integration-oauth2/e2e.yaml b/.ci/tests/integration-oauth2/e2e.yaml index 3d36c13ac..5f2877574 100644 --- a/.ci/tests/integration-oauth2/e2e.yaml +++ b/.ci/tests/integration-oauth2/e2e.yaml @@ -117,6 +117,8 @@ verify: cases: - query: timeout 5m bash .ci/tests/integration-oauth2/cases/java-function/verify.sh expected: expected.data.yaml + - query: timeout 5m bash .ci/tests/integration-oauth2/cases/java-log-config-yaml/verify.sh + expected: expected.data.yaml - query: timeout 5m bash .ci/tests/integration-oauth2/cases/java-download-function/verify.sh expected: expected.data.yaml - query: timeout 5m bash .ci/tests/integration-oauth2/cases/java-download-function-generic-auth/verify.sh diff --git a/controllers/spec/common.go b/controllers/spec/common.go index c63d66e78..abc72c654 100644 --- a/controllers/spec/common.go +++ b/controllers/spec/common.go @@ -20,9 +20,6 @@ package spec import ( "bytes" "context" - "regexp" - - autoscalingv2beta2 "k8s.io/api/autoscaling/v2beta2" // used for template _ "embed" @@ -32,10 +29,13 @@ import ( "html/template" "os" "reflect" + "regexp" "sort" "strconv" "strings" + autoscalingv2beta2 "k8s.io/api/autoscaling/v2beta2" + appsv1 "k8s.io/api/apps/v1" autov2 "k8s.io/api/autoscaling/v2" v1 "k8s.io/api/batch/v1" @@ -773,9 +773,6 @@ func generateJavaLogConfigCommand(runtime *v1alpha1.JavaRuntime, agent v1alpha1. } func generateJavaLogConfigFileName(runtime *v1alpha1.JavaRuntime) string { - if runtime == nil || (runtime.Log != nil && runtime.Log.LogConfig != nil) { - return DefaultJavaLogConfigPath - } configFileType := v1alpha1.XML if runtime != nil && runtime.Log != nil && runtime.Log.JavaLog4JConfigFileType != nil { configFileType = *runtime.Log.JavaLog4JConfigFileType From b0f3dc96fed001d385c9de02d534ce0e540c6e7e Mon Sep 17 00:00:00 2001 From: jiangpengcheng Date: Wed, 26 Jun 2024 15:28:02 +0800 Subject: [PATCH 02/10] Release v0.17.2 --- .ci/olm-tests/catalog.yml | 2 +- .ci/olm-tests/subs.yml | 2 +- Makefile | 2 +- README.md | 2 +- install.sh | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.ci/olm-tests/catalog.yml b/.ci/olm-tests/catalog.yml index 9b7a2f559..05dae720e 100644 --- a/.ci/olm-tests/catalog.yml +++ b/.ci/olm-tests/catalog.yml @@ -5,4 +5,4 @@ metadata: namespace: olm spec: sourceType: grpc - image: kind-registry:5000/streamnativeio/function-mesh-catalog:v0.17.1 + image: kind-registry:5000/streamnativeio/function-mesh-catalog:v0.17.2 diff --git a/.ci/olm-tests/subs.yml b/.ci/olm-tests/subs.yml index af165c571..a812b4c79 100644 --- a/.ci/olm-tests/subs.yml +++ b/.ci/olm-tests/subs.yml @@ -6,6 +6,6 @@ metadata: spec: channel: alpha name: function-mesh - startingCSV: function-mesh.v0.17.1 + startingCSV: function-mesh.v0.17.2 source: my-test-catalog sourceNamespace: olm diff --git a/Makefile b/Makefile index 17f13ff4b..7fc201ee0 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ # Current Operator version -VERSION ?= 0.17.1 +VERSION ?= 0.17.2 # Default image tag DOCKER_REPO := $(if $(DOCKER_REPO),$(DOCKER_REPO),streamnative) OPERATOR_IMG ?= ${DOCKER_REPO}/function-mesh:v$(VERSION) diff --git a/README.md b/README.md index 4863faddc..5e1b450e7 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ A Kubernetes-Native way to run pulsar functions, connectors and composed functio ## Install ```bash -curl -sSL https://github.com/streamnative/function-mesh/releases/download/v0.17.1/install.sh | bash +curl -sSL https://github.com/streamnative/function-mesh/releases/download/v0.17.2/install.sh | bash ``` The above command installs all the CRDs, required service account configuration, and all function-mesh operator components. Before you start running a function-mesh example, verify if Function Mesh is installed correctly. diff --git a/install.sh b/install.sh index d0967325c..374754186 100755 --- a/install.sh +++ b/install.sh @@ -56,7 +56,7 @@ EOF main() { local local_kube="kind" - local fm_version="v0.17.1" + local fm_version="v0.17.2" local kind_name="kind" local kind_version="v0.7.0" local node_num=2 From 64ec5af0c2db7a0aa7a5dbe31d9c05fe32c8e31c Mon Sep 17 00:00:00 2001 From: jiangpengcheng Date: Wed, 26 Jun 2024 15:42:29 +0800 Subject: [PATCH 03/10] Fix ci --- .ci/helm.sh | 2 +- .ci/tests/integration-oauth2/e2e.yaml | 2 +- .../e2e_with_downloader.yaml | 2 +- .ci/tests/integration/e2e.yaml | 2 +- .ci/tests/integration/e2e_with_tls.yaml | 2 +- Makefile | 2 +- api/compute/v1alpha1/zz_generated.deepcopy.go | 1 - ...compute.functionmesh.io-functionmeshes.yaml | 2 +- .../crd-compute.functionmesh.io-functions.yaml | 2 +- .../crd-compute.functionmesh.io-sinks.yaml | 2 +- .../crd-compute.functionmesh.io-sources.yaml | 2 +- ...compute.functionmesh.io_functionmeshes.yaml | 3 +-- .../compute.functionmesh.io_functions.yaml | 3 +-- .../bases/compute.functionmesh.io_sinks.yaml | 3 +-- .../bases/compute.functionmesh.io_sources.yaml | 3 +-- config/rbac/role.yaml | 1 - config/webhook/manifests.yaml | 2 -- controllers/spec/common.go | 18 ------------------ 18 files changed, 14 insertions(+), 40 deletions(-) diff --git a/.ci/helm.sh b/.ci/helm.sh index 042eaba47..931744862 100644 --- a/.ci/helm.sh +++ b/.ci/helm.sh @@ -85,7 +85,7 @@ function ci::install_pulsar_charts() { if [ -d "pulsar-charts" ]; then rm -rf pulsar-charts fi - git clone https://github.com/streamnative/charts.git pulsar-charts + git clone --branch pulsar-operator-0.17.10 https://github.com/streamnative/charts.git pulsar-charts cp ${values} pulsar-charts/charts/pulsar/mini_values.yaml cd pulsar-charts ./scripts/pulsar/prepare_helm_release.sh -n default -k sn-platform -c diff --git a/.ci/tests/integration-oauth2/e2e.yaml b/.ci/tests/integration-oauth2/e2e.yaml index 5f2877574..2fd0854ca 100644 --- a/.ci/tests/integration-oauth2/e2e.yaml +++ b/.ci/tests/integration-oauth2/e2e.yaml @@ -33,7 +33,7 @@ setup: command: | helm repo add streamnative https://charts.streamnative.io rm -rf pulsar-charts/ - git clone https://github.com/streamnative/charts.git pulsar-charts + git clone --branch pulsar-operator-0.17.10 https://github.com/streamnative/charts.git pulsar-charts cd pulsar-charts/ ./scripts/pulsar/prepare_helm_release.sh -n default -k ${PULSAR_RELEASE_NAME} -c helm repo add grafana https://grafana.github.io/helm-charts diff --git a/.ci/tests/integration-oauth2/e2e_with_downloader.yaml b/.ci/tests/integration-oauth2/e2e_with_downloader.yaml index a5b4a8cc4..975be3a88 100644 --- a/.ci/tests/integration-oauth2/e2e_with_downloader.yaml +++ b/.ci/tests/integration-oauth2/e2e_with_downloader.yaml @@ -33,7 +33,7 @@ setup: command: | helm repo add streamnative https://charts.streamnative.io rm -rf pulsar-charts/ - git clone https://github.com/streamnative/charts.git pulsar-charts + git clone --branch pulsar-operator-0.17.10 https://github.com/streamnative/charts.git pulsar-charts cd pulsar-charts/ ./scripts/pulsar/prepare_helm_release.sh -n default -k ${PULSAR_RELEASE_NAME} -c helm repo add grafana https://grafana.github.io/helm-charts diff --git a/.ci/tests/integration/e2e.yaml b/.ci/tests/integration/e2e.yaml index bf11a8df8..bdf6a518e 100644 --- a/.ci/tests/integration/e2e.yaml +++ b/.ci/tests/integration/e2e.yaml @@ -39,7 +39,7 @@ setup: command: | helm repo add streamnative https://charts.streamnative.io rm -rf pulsar-charts/ - git clone https://github.com/streamnative/charts.git pulsar-charts + git clone --branch pulsar-operator-0.17.10 https://github.com/streamnative/charts.git pulsar-charts cd pulsar-charts/ ./scripts/pulsar/prepare_helm_release.sh -n default -k ${PULSAR_RELEASE_NAME} -c helm repo add grafana https://grafana.github.io/helm-charts diff --git a/.ci/tests/integration/e2e_with_tls.yaml b/.ci/tests/integration/e2e_with_tls.yaml index 7cfb87460..0f2a36e59 100644 --- a/.ci/tests/integration/e2e_with_tls.yaml +++ b/.ci/tests/integration/e2e_with_tls.yaml @@ -28,7 +28,7 @@ setup: command: | helm repo add streamnative https://charts.streamnative.io rm -rf pulsar-charts/ - git clone https://github.com/streamnative/charts.git pulsar-charts + git clone --branch pulsar-operator-0.17.10 https://github.com/streamnative/charts.git pulsar-charts cd pulsar-charts/ ./scripts/pulsar/prepare_helm_release.sh -n default -k ${PULSAR_RELEASE_NAME} -c helm repo add grafana https://grafana.github.io/helm-charts diff --git a/Makefile b/Makefile index 7fc201ee0..d510bdd59 100644 --- a/Makefile +++ b/Makefile @@ -130,7 +130,7 @@ image-push: # find or download controller-gen # download controller-gen if necessary controller-gen: - $(call go-get-tool,$(CONTROLLER_GEN),sigs.k8s.io/controller-tools/cmd/controller-gen@v0.9.2) + $(call go-get-tool,$(CONTROLLER_GEN),sigs.k8s.io/controller-tools/cmd/controller-gen@v0.15.0) kustomize: ## Download kustomize locally if necessary. $(call go-get-tool,$(KUSTOMIZE),sigs.k8s.io/kustomize/kustomize/v4@v4.5.5) diff --git a/api/compute/v1alpha1/zz_generated.deepcopy.go b/api/compute/v1alpha1/zz_generated.deepcopy.go index 054ae4ab6..00617fdeb 100644 --- a/api/compute/v1alpha1/zz_generated.deepcopy.go +++ b/api/compute/v1alpha1/zz_generated.deepcopy.go @@ -1,5 +1,4 @@ //go:build !ignore_autogenerated -// +build !ignore_autogenerated // Licensed to the Apache Software Foundation (ASF) under one // or more contributor license agreements. See the NOTICE file diff --git a/charts/function-mesh-operator/charts/admission-webhook/templates/crd-compute.functionmesh.io-functionmeshes.yaml b/charts/function-mesh-operator/charts/admission-webhook/templates/crd-compute.functionmesh.io-functionmeshes.yaml index 82a51281d..53d520b0e 100644 --- a/charts/function-mesh-operator/charts/admission-webhook/templates/crd-compute.functionmesh.io-functionmeshes.yaml +++ b/charts/function-mesh-operator/charts/admission-webhook/templates/crd-compute.functionmesh.io-functionmeshes.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.9.2 + controller-gen.kubebuilder.io/version: v0.15.0 name: functionmeshes.compute.functionmesh.io spec: group: compute.functionmesh.io diff --git a/charts/function-mesh-operator/charts/admission-webhook/templates/crd-compute.functionmesh.io-functions.yaml b/charts/function-mesh-operator/charts/admission-webhook/templates/crd-compute.functionmesh.io-functions.yaml index ad1874b0e..ceef3a926 100644 --- a/charts/function-mesh-operator/charts/admission-webhook/templates/crd-compute.functionmesh.io-functions.yaml +++ b/charts/function-mesh-operator/charts/admission-webhook/templates/crd-compute.functionmesh.io-functions.yaml @@ -6,7 +6,7 @@ metadata: {{- if eq .Values.admissionWebhook.certificate.provider "cert-manager" }} {{- include "function-mesh-operator.certManager.annotation" . | nindent 4 -}} {{- end }} - controller-gen.kubebuilder.io/version: v0.9.2 + controller-gen.kubebuilder.io/version: v0.15.0 name: functions.compute.functionmesh.io spec: conversion: diff --git a/charts/function-mesh-operator/charts/admission-webhook/templates/crd-compute.functionmesh.io-sinks.yaml b/charts/function-mesh-operator/charts/admission-webhook/templates/crd-compute.functionmesh.io-sinks.yaml index a3fb9ab2f..def73527f 100644 --- a/charts/function-mesh-operator/charts/admission-webhook/templates/crd-compute.functionmesh.io-sinks.yaml +++ b/charts/function-mesh-operator/charts/admission-webhook/templates/crd-compute.functionmesh.io-sinks.yaml @@ -6,7 +6,7 @@ metadata: {{- if eq .Values.admissionWebhook.certificate.provider "cert-manager" }} {{- include "function-mesh-operator.certManager.annotation" . | nindent 4 -}} {{- end }} - controller-gen.kubebuilder.io/version: v0.9.2 + controller-gen.kubebuilder.io/version: v0.15.0 name: sinks.compute.functionmesh.io spec: conversion: diff --git a/charts/function-mesh-operator/charts/admission-webhook/templates/crd-compute.functionmesh.io-sources.yaml b/charts/function-mesh-operator/charts/admission-webhook/templates/crd-compute.functionmesh.io-sources.yaml index 076359d84..2a1607a35 100644 --- a/charts/function-mesh-operator/charts/admission-webhook/templates/crd-compute.functionmesh.io-sources.yaml +++ b/charts/function-mesh-operator/charts/admission-webhook/templates/crd-compute.functionmesh.io-sources.yaml @@ -6,7 +6,7 @@ metadata: {{- if eq .Values.admissionWebhook.certificate.provider "cert-manager" }} {{- include "function-mesh-operator.certManager.annotation" . | nindent 4 -}} {{- end }} - controller-gen.kubebuilder.io/version: v0.9.2 + controller-gen.kubebuilder.io/version: v0.15.0 name: sources.compute.functionmesh.io spec: conversion: diff --git a/config/crd/bases/compute.functionmesh.io_functionmeshes.yaml b/config/crd/bases/compute.functionmesh.io_functionmeshes.yaml index 4c0b466ad..b17779935 100644 --- a/config/crd/bases/compute.functionmesh.io_functionmeshes.yaml +++ b/config/crd/bases/compute.functionmesh.io_functionmeshes.yaml @@ -3,8 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.9.2 - creationTimestamp: null + controller-gen.kubebuilder.io/version: v0.15.0 name: functionmeshes.compute.functionmesh.io spec: group: compute.functionmesh.io diff --git a/config/crd/bases/compute.functionmesh.io_functions.yaml b/config/crd/bases/compute.functionmesh.io_functions.yaml index 1fd92fc00..75d4adf0e 100644 --- a/config/crd/bases/compute.functionmesh.io_functions.yaml +++ b/config/crd/bases/compute.functionmesh.io_functions.yaml @@ -3,8 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.9.2 - creationTimestamp: null + controller-gen.kubebuilder.io/version: v0.15.0 name: functions.compute.functionmesh.io spec: group: compute.functionmesh.io diff --git a/config/crd/bases/compute.functionmesh.io_sinks.yaml b/config/crd/bases/compute.functionmesh.io_sinks.yaml index c54b582b6..12ec4893b 100644 --- a/config/crd/bases/compute.functionmesh.io_sinks.yaml +++ b/config/crd/bases/compute.functionmesh.io_sinks.yaml @@ -3,8 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.9.2 - creationTimestamp: null + controller-gen.kubebuilder.io/version: v0.15.0 name: sinks.compute.functionmesh.io spec: group: compute.functionmesh.io diff --git a/config/crd/bases/compute.functionmesh.io_sources.yaml b/config/crd/bases/compute.functionmesh.io_sources.yaml index 57d8fe42e..0fc790014 100644 --- a/config/crd/bases/compute.functionmesh.io_sources.yaml +++ b/config/crd/bases/compute.functionmesh.io_sources.yaml @@ -3,8 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.9.2 - creationTimestamp: null + controller-gen.kubebuilder.io/version: v0.15.0 name: sources.compute.functionmesh.io spec: group: compute.functionmesh.io diff --git a/config/rbac/role.yaml b/config/rbac/role.yaml index d35761a72..b727e966a 100644 --- a/config/rbac/role.yaml +++ b/config/rbac/role.yaml @@ -2,7 +2,6 @@ apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole metadata: - creationTimestamp: null name: manager-role rules: - apiGroups: diff --git a/config/webhook/manifests.yaml b/config/webhook/manifests.yaml index 79400e6d4..47cbd5b2d 100644 --- a/config/webhook/manifests.yaml +++ b/config/webhook/manifests.yaml @@ -2,7 +2,6 @@ apiVersion: admissionregistration.k8s.io/v1 kind: MutatingWebhookConfiguration metadata: - creationTimestamp: null name: mutating-webhook-configuration webhooks: - admissionReviewVersions: @@ -72,7 +71,6 @@ webhooks: apiVersion: admissionregistration.k8s.io/v1 kind: ValidatingWebhookConfiguration metadata: - creationTimestamp: null name: validating-webhook-configuration webhooks: - admissionReviewVersions: diff --git a/controllers/spec/common.go b/controllers/spec/common.go index abc72c654..5168fa4eb 100644 --- a/controllers/spec/common.go +++ b/controllers/spec/common.go @@ -1852,24 +1852,6 @@ func getPythonSecretProviderArgs(secretMaps map[string]v1alpha1.SecretRef) []str return ret } -func getGenericSecretProviderArgs(secretMaps map[string]v1alpha1.SecretRef, language string) []string { - var ret []string - if len(secretMaps) > 0 { - if language == "python" { - ret = []string{ - "--secrets_provider", - "secrets_provider.EnvironmentBasedSecretsProvider", - } - } else if language == "nodejs" { - ret = []string{ - "--secrets_provider", - "EnvironmentBasedSecretsProvider", - } - } - } - return ret -} - func getTLSTrustCertPath(tlsVolume TLSConfig, path string) string { return fmt.Sprintf("%s/%s", tlsVolume.GetMountPath(), path) } From 4b4c513ef88be2bbdb4e07958895697ab8a01ef2 Mon Sep 17 00:00:00 2001 From: jiangpengcheng Date: Wed, 26 Jun 2024 15:51:10 +0800 Subject: [PATCH 04/10] Fix ci --- .ci/clusters/values.yaml | 18 +++++++++--------- .ci/clusters/values_cluster.yaml | 16 ++++++++-------- .ci/clusters/values_custom_runner_images.yaml | 16 ++++++++-------- .ci/clusters/values_runner_images.yaml | 18 +++++++++--------- .../values_skywalking_e2e_cluster.yaml | 12 ++++++------ ...lues_skywalking_e2e_cluster_with_oauth.yaml | 4 ++-- ...values_skywalking_e2e_cluster_with_tls.yaml | 12 ++++++------ .ci/tests/integration-oauth2/e2e.yaml | 2 +- .../e2e_with_downloader.yaml | 2 +- .ci/tests/integration/e2e.yaml | 2 +- .ci/tests/integration/e2e_with_tls.yaml | 2 +- .github/workflows/bundle-release.yml | 4 ++-- .github/workflows/olm-verify.yml | 2 +- .github/workflows/project.yml | 2 +- .github/workflows/release.yml | 2 +- .github/workflows/test-function-runner.yml | 2 +- .github/workflows/test-helm-charts.yml | 2 +- .github/workflows/trivy.yml | 2 +- ...te_v1alpha1_function_key_based_batcher.yaml | 2 +- images/build.sh | 2 +- images/samples/build.sh | 2 +- .../samples/java-function-samples/Dockerfile | 2 +- .../samples/python-function-samples/Dockerfile | 2 +- 23 files changed, 65 insertions(+), 65 deletions(-) diff --git a/.ci/clusters/values.yaml b/.ci/clusters/values.yaml index 99e352bb3..e8c994f7c 100644 --- a/.ci/clusters/values.yaml +++ b/.ci/clusters/values.yaml @@ -44,25 +44,25 @@ monitoring: images: zookeeper: - repository: streamnative/pulsar-all + repository: streamnative/sn-platform tag: 2.9.2.23 bookie: - repository: streamnative/pulsar-all + repository: streamnative/sn-platform tag: 2.9.2.23 autorecovery: - repository: streamnative/pulsar-all + repository: streamnative/sn-platform tag: 2.9.2.23 broker: - repository: streamnative/pulsar-all + repository: streamnative/sn-platform tag: 2.9.2.23 functions: - repository: streamnative/pulsar-all + repository: streamnative/sn-platform tag: 2.9.2.23 proxy: - repository: streamnative/pulsar-all + repository: streamnative/sn-platform tag: 2.9.2.23 presto: - repository: streamnative/pulsar-all + repository: streamnative/sn-platform tag: 2.9.2.23 zookeeper: @@ -73,7 +73,7 @@ bookkeeper: replicaCount: 0 metadata: image: - repository: streamnative/pulsar-all + repository: streamnative/sn-platform tag: 2.9.2.23 configData: PULSAR_PREFIX_autoRecoveryDaemonEnabled: "false" @@ -107,7 +107,7 @@ bookkeeper: pulsar_metadata: image: - repository: streamnative/pulsar-all + repository: streamnative/sn-platform tag: 2.9.2.23 broker: diff --git a/.ci/clusters/values_cluster.yaml b/.ci/clusters/values_cluster.yaml index c3a1f8fc2..5a6eaf024 100644 --- a/.ci/clusters/values_cluster.yaml +++ b/.ci/clusters/values_cluster.yaml @@ -41,22 +41,22 @@ monitoring: images: zookeeper: - repository: streamnative/pulsar-all + repository: streamnative/sn-platform tag: 2.10.0.0-rc10 bookie: - repository: streamnative/pulsar-all + repository: streamnative/sn-platform tag: 2.10.0.0-rc10 autorecovery: - repository: streamnative/pulsar-all + repository: streamnative/sn-platform tag: 2.10.0.0-rc10 broker: - repository: streamnative/pulsar-all + repository: streamnative/sn-platform tag: 2.10.0.0-rc10 functions: - repository: streamnative/pulsar-all + repository: streamnative/sn-platform tag: 2.10.0.0-rc10 proxy: - repository: streamnative/pulsar-all + repository: streamnative/sn-platform tag: 2.10.0.0-rc10 zookeeper: @@ -66,7 +66,7 @@ bookkeeper: replicaCount: 1 metadata: image: - repository: streamnative/pulsar-all + repository: streamnative/sn-platform tag: 2.10.0.0-rc10 configData: # `BOOKIE_MEM` is used for `bookie shell` @@ -96,7 +96,7 @@ bookkeeper: pulsar_metadata: image: - repository: streamnative/pulsar-all + repository: streamnative/sn-platform tag: 2.10.0.0-rc10 broker: diff --git a/.ci/clusters/values_custom_runner_images.yaml b/.ci/clusters/values_custom_runner_images.yaml index 68d7fc216..1ef1c0435 100644 --- a/.ci/clusters/values_custom_runner_images.yaml +++ b/.ci/clusters/values_custom_runner_images.yaml @@ -40,27 +40,27 @@ monitoring: images: zookeeper: - repository: streamnative/pulsar-all + repository: streamnative/sn-platform tag: 2.9.2.23 pullPolicy: IfNotPresent bookie: - repository: streamnative/pulsar-all + repository: streamnative/sn-platform tag: 2.9.2.23 pullPolicy: IfNotPresent autorecovery: - repository: streamnative/pulsar-all + repository: streamnative/sn-platform tag: 2.9.2.23 pullPolicy: IfNotPresent broker: - repository: streamnative/pulsar-all + repository: streamnative/sn-platform tag: 2.9.2.23 pullPolicy: IfNotPresent proxy: - repository: streamnative/pulsar-all + repository: streamnative/sn-platform tag: 2.9.2.23 pullPolicy: IfNotPresent functions: - repository: streamnative/pulsar-all + repository: streamnative/sn-platform tag: 2.9.2.23 pullPolicy: IfNotPresent @@ -71,7 +71,7 @@ bookkeeper: replicaCount: 1 metadata: image: - repository: streamnative/pulsar-all + repository: streamnative/sn-platform tag: 2.9.2.23 configData: PULSAR_PREFIX_autoRecoveryDaemonEnabled: "false" @@ -108,7 +108,7 @@ bookkeeper: pulsar_metadata: image: - repository: streamnative/pulsar-all + repository: streamnative/sn-platform tag: 2.9.2.23 pullPolicy: IfNotPresent diff --git a/.ci/clusters/values_runner_images.yaml b/.ci/clusters/values_runner_images.yaml index c224bb782..49c6cd840 100644 --- a/.ci/clusters/values_runner_images.yaml +++ b/.ci/clusters/values_runner_images.yaml @@ -40,31 +40,31 @@ monitoring: images: zookeeper: - repository: streamnative/pulsar-all + repository: streamnative/sn-platform tag: 2.9.2.23 pullPolicy: IfNotPresent bookie: - repository: streamnative/pulsar-all + repository: streamnative/sn-platform tag: 2.9.2.23 pullPolicy: IfNotPresent autorecovery: - repository: streamnative/pulsar-all + repository: streamnative/sn-platform tag: 2.9.2.23 pullPolicy: IfNotPresent broker: - repository: streamnative/pulsar-all + repository: streamnative/sn-platform tag: 2.9.2.23 pullPolicy: IfNotPresent proxy: - repository: streamnative/pulsar-all + repository: streamnative/sn-platform tag: 2.9.2.23 pullPolicy: IfNotPresent functions: - repository: streamnative/pulsar-all + repository: streamnative/sn-platform tag: 2.9.2.23 pullPolicy: IfNotPresent presto: - repository: streamnative/pulsar-all + repository: streamnative/sn-platform tag: 2.9.2.23 pullPolicy: IfNotPresent @@ -75,7 +75,7 @@ bookkeeper: replicaCount: 0 metadata: image: - repository: streamnative/pulsar-all + repository: streamnative/sn-platform tag: 2.9.2.23 configData: PULSAR_PREFIX_autoRecoveryDaemonEnabled: "false" @@ -109,7 +109,7 @@ bookkeeper: pulsar_metadata: image: - repository: streamnative/pulsar-all + repository: streamnative/sn-platform tag: 2.9.2.23 pullPolicy: IfNotPresent diff --git a/.ci/clusters/values_skywalking_e2e_cluster.yaml b/.ci/clusters/values_skywalking_e2e_cluster.yaml index 54f1d3f8d..99824113e 100644 --- a/.ci/clusters/values_skywalking_e2e_cluster.yaml +++ b/.ci/clusters/values_skywalking_e2e_cluster.yaml @@ -43,16 +43,16 @@ monitoring: images: zookeeper: - repository: streamnative/pulsar-all + repository: streamnative/sn-platform tag: 2.9.2.23 bookie: - repository: streamnative/pulsar-all + repository: streamnative/sn-platform tag: 2.9.2.23 broker: - repository: streamnative/pulsar-all + repository: streamnative/sn-platform tag: 2.9.2.23 functions: - repository: streamnative/pulsar-all + repository: streamnative/sn-platform tag: 2.9.2.23 zookeeper: @@ -66,7 +66,7 @@ bookkeeper: replicaCount: 0 metadata: image: - repository: streamnative/pulsar-all + repository: streamnative/sn-platform tag: 2.9.2.23 resources: requests: @@ -104,7 +104,7 @@ bookkeeper: pulsar_metadata: image: - repository: streamnative/pulsar-all + repository: streamnative/sn-platform tag: 2.9.2.23 broker: diff --git a/.ci/clusters/values_skywalking_e2e_cluster_with_oauth.yaml b/.ci/clusters/values_skywalking_e2e_cluster_with_oauth.yaml index 2270c8cdc..6467dec0d 100644 --- a/.ci/clusters/values_skywalking_e2e_cluster_with_oauth.yaml +++ b/.ci/clusters/values_skywalking_e2e_cluster_with_oauth.yaml @@ -66,7 +66,7 @@ bookkeeper: replicaCount: 0 metadata: image: - repository: streamnative/pulsar-all + repository: streamnative/sn-platform tag: 2.9.2.23 resources: requests: @@ -104,7 +104,7 @@ bookkeeper: pulsar_metadata: image: - repository: streamnative/pulsar-all + repository: streamnative/sn-platform tag: 2.9.2.23 broker: diff --git a/.ci/clusters/values_skywalking_e2e_cluster_with_tls.yaml b/.ci/clusters/values_skywalking_e2e_cluster_with_tls.yaml index b73af0800..cfdb9e86b 100644 --- a/.ci/clusters/values_skywalking_e2e_cluster_with_tls.yaml +++ b/.ci/clusters/values_skywalking_e2e_cluster_with_tls.yaml @@ -43,16 +43,16 @@ monitoring: images: zookeeper: - repository: streamnative/pulsar-all + repository: streamnative/sn-platform tag: 2.9.2.23 bookie: - repository: streamnative/pulsar-all + repository: streamnative/sn-platform tag: 2.9.2.23 broker: - repository: streamnative/pulsar-all + repository: streamnative/sn-platform tag: 2.9.2.23 functions: - repository: streamnative/pulsar-all + repository: streamnative/sn-platform tag: 2.9.2.23 zookeeper: @@ -66,7 +66,7 @@ bookkeeper: replicaCount: 0 metadata: image: - repository: streamnative/pulsar-all + repository: streamnative/sn-platform tag: 2.9.2.23 resources: requests: @@ -104,7 +104,7 @@ bookkeeper: pulsar_metadata: image: - repository: streamnative/pulsar-all + repository: streamnative/sn-platform tag: 2.9.2.23 broker: diff --git a/.ci/tests/integration-oauth2/e2e.yaml b/.ci/tests/integration-oauth2/e2e.yaml index 2fd0854ca..68b5c5de5 100644 --- a/.ci/tests/integration-oauth2/e2e.yaml +++ b/.ci/tests/integration-oauth2/e2e.yaml @@ -6,7 +6,7 @@ setup: - name: build images command: | chmod +x images/build.sh images/samples/build.sh - PULSAR_IMAGE_TAG=2.9.2.23 PULSAR_IMAGE=streamnative/pulsar-all KIND_PUSH=true images/build.sh + PULSAR_IMAGE_TAG=2.9.2.23 PULSAR_IMAGE=streamnative/sn-platform KIND_PUSH=true images/build.sh PULSAR_IMAGE_TAG=2.9.2.23 KIND_PUSH=true images/samples/build.sh - name: install helm diff --git a/.ci/tests/integration-oauth2/e2e_with_downloader.yaml b/.ci/tests/integration-oauth2/e2e_with_downloader.yaml index 975be3a88..9b67536e4 100644 --- a/.ci/tests/integration-oauth2/e2e_with_downloader.yaml +++ b/.ci/tests/integration-oauth2/e2e_with_downloader.yaml @@ -6,7 +6,7 @@ setup: - name: build images command: | chmod +x images/build.sh images/samples/build.sh - PULSAR_IMAGE_TAG=2.9.2.23 PULSAR_IMAGE=streamnative/pulsar-all KIND_PUSH=true images/build.sh + PULSAR_IMAGE_TAG=2.9.2.23 PULSAR_IMAGE=streamnative/sn-platform KIND_PUSH=true images/build.sh PULSAR_IMAGE_TAG=2.9.2.23 KIND_PUSH=true images/samples/build.sh - name: install helm diff --git a/.ci/tests/integration/e2e.yaml b/.ci/tests/integration/e2e.yaml index bdf6a518e..1f885010c 100644 --- a/.ci/tests/integration/e2e.yaml +++ b/.ci/tests/integration/e2e.yaml @@ -6,7 +6,7 @@ setup: - name: build images command: | chmod +x images/build.sh images/samples/build.sh - PULSAR_IMAGE_TAG=2.9.2.23 PULSAR_IMAGE=streamnative/pulsar-all KIND_PUSH=true images/build.sh + PULSAR_IMAGE_TAG=2.9.2.23 PULSAR_IMAGE=streamnative/sn-platform KIND_PUSH=true images/build.sh PULSAR_IMAGE_TAG=2.9.2.23 KIND_PUSH=true images/samples/build.sh - name: install helm diff --git a/.ci/tests/integration/e2e_with_tls.yaml b/.ci/tests/integration/e2e_with_tls.yaml index 0f2a36e59..b750c85b8 100644 --- a/.ci/tests/integration/e2e_with_tls.yaml +++ b/.ci/tests/integration/e2e_with_tls.yaml @@ -6,7 +6,7 @@ setup: - name: build images command: | chmod +x images/build.sh images/samples/build.sh - PULSAR_IMAGE_TAG=2.9.2.23 PULSAR_IMAGE=streamnative/pulsar-all KIND_PUSH=true images/build.sh + PULSAR_IMAGE_TAG=2.9.2.23 PULSAR_IMAGE=streamnative/sn-platform KIND_PUSH=true images/build.sh PULSAR_IMAGE_TAG=2.9.2.23 KIND_PUSH=true images/samples/build.sh - name: install helm diff --git a/.github/workflows/bundle-release.yml b/.github/workflows/bundle-release.yml index 925d6554a..35ee162de 100644 --- a/.github/workflows/bundle-release.yml +++ b/.github/workflows/bundle-release.yml @@ -34,7 +34,7 @@ jobs: - name: Set up GO 1.20.4 uses: actions/setup-go@v1 with: - go-version: 1.20.4 + go-version: 1.22.4 id: go - name: InstallKubebuilder @@ -157,7 +157,7 @@ jobs: - name: Set up GO 1.20.4 uses: actions/setup-go@v1 with: - go-version: 1.20.4 + go-version: 1.22.4 id: go - name: InstallKubebuilder diff --git a/.github/workflows/olm-verify.yml b/.github/workflows/olm-verify.yml index 31f052e29..25396a921 100644 --- a/.github/workflows/olm-verify.yml +++ b/.github/workflows/olm-verify.yml @@ -30,7 +30,7 @@ jobs: - name: Set up GO 1.20.4 uses: actions/setup-go@v1 with: - go-version: 1.20.4 + go-version: 1.22.4 id: go - name: InstallKubebuilder diff --git a/.github/workflows/project.yml b/.github/workflows/project.yml index a1140296f..11453ecc4 100644 --- a/.github/workflows/project.yml +++ b/.github/workflows/project.yml @@ -18,7 +18,7 @@ jobs: strategy: fail-fast: false matrix: - go-version: [1.18, 1.19, 1.20.4] + go-version: [1.21.9, 1.22.4] steps: - name: clean disk run: | diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 081e96429..b2af376a3 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -30,7 +30,7 @@ jobs: - name: Set up GO 1.20.4 uses: actions/setup-go@v1 with: - go-version: 1.20.4 + go-version: 1.22.4 id: go - name: InstallKubebuilder diff --git a/.github/workflows/test-function-runner.yml b/.github/workflows/test-function-runner.yml index cc850ffe9..003cbf047 100644 --- a/.github/workflows/test-function-runner.yml +++ b/.github/workflows/test-function-runner.yml @@ -44,7 +44,7 @@ jobs: env: DOCKER_REPO: localhost:5000 run: | - PULSAR_IMAGE_TAG=2.9.2.23 PULSAR_IMAGE=streamnative/pulsar-all KIND_PUSH=false images/build.sh + PULSAR_IMAGE_TAG=2.9.2.23 PULSAR_IMAGE=streamnative/sn-platform KIND_PUSH=false images/build.sh - name: Verify function runner run: | diff --git a/.github/workflows/test-helm-charts.yml b/.github/workflows/test-helm-charts.yml index 2fe8f610c..b5e177435 100644 --- a/.github/workflows/test-helm-charts.yml +++ b/.github/workflows/test-helm-charts.yml @@ -80,7 +80,7 @@ jobs: if: steps.list-changed.outputs.changed == 'true' uses: actions/setup-go@v1 with: - go-version: 1.20.4 + go-version: 1.22.4 id: go - name: setup kubebuilder 3.6.0 diff --git a/.github/workflows/trivy.yml b/.github/workflows/trivy.yml index a43c02d0c..8da7b7d9a 100644 --- a/.github/workflows/trivy.yml +++ b/.github/workflows/trivy.yml @@ -26,7 +26,7 @@ jobs: - name: Set up GO 1.20.4 uses: actions/setup-go@v1 with: - go-version: 1.20.4 + go-version: 1.22.4 id: go - name: InstallKubebuilder diff --git a/config/samples/compute_v1alpha1_function_key_based_batcher.yaml b/config/samples/compute_v1alpha1_function_key_based_batcher.yaml index ada9e13c0..774337dc8 100644 --- a/config/samples/compute_v1alpha1_function_key_based_batcher.yaml +++ b/config/samples/compute_v1alpha1_function_key_based_batcher.yaml @@ -5,7 +5,7 @@ metadata: namespace: default spec: className: org.apache.pulsar.functions.api.examples.ExclamationFunction - image: streamnative/pulsar-all:2.7.1 + image: streamnative/sn-platform:2.7.1 forwardSourceMessageProperty: true maxPendingAsyncRequests: 1000 replicas: 1 diff --git a/images/build.sh b/images/build.sh index 8f1600131..d292f24d4 100755 --- a/images/build.sh +++ b/images/build.sh @@ -19,7 +19,7 @@ # set -e -PULSAR_IMAGE=${PULSAR_IMAGE:-"streamnative/pulsar-all"} +PULSAR_IMAGE=${PULSAR_IMAGE:-"streamnative/sn-platform"} PULSAR_IMAGE_TAG=${PULSAR_IMAGE_TAG:-"2.7.1"} DOCKER_REPO=${DOCKER_REPO:-"streamnative"} RUNNER_BASE="pulsar-functions-runner-base" diff --git a/images/samples/build.sh b/images/samples/build.sh index 445826957..9e753b3d2 100755 --- a/images/samples/build.sh +++ b/images/samples/build.sh @@ -21,7 +21,7 @@ set -e PULSAR_IMAGE_TAG=${PULSAR_IMAGE_TAG:-"2.7.1"} -PULSAR_IMAGE=${PULSAR_IMAGE:-"streamnative/pulsar-all"} +PULSAR_IMAGE=${PULSAR_IMAGE:-"streamnative/sn-platform"} JAVA_RUNNER_IMAGE=${RUNNER_IMAGE:-"streamnative/pulsar-functions-java-runner"} DOCKER_REPO=${DOCKER_REPO:-"streamnative"} JAVA_SAMPLE="pulsar-functions-java-sample" diff --git a/images/samples/java-function-samples/Dockerfile b/images/samples/java-function-samples/Dockerfile index c4ad2769a..53316ea77 100644 --- a/images/samples/java-function-samples/Dockerfile +++ b/images/samples/java-function-samples/Dockerfile @@ -1,4 +1,4 @@ ARG PULSAR_IMAGE_TAG -FROM streamnative/pulsar-all:${PULSAR_IMAGE_TAG} as pulsar-all +FROM streamnative/sn-platform:${PULSAR_IMAGE_TAG} as pulsar-all FROM streamnative/pulsar-functions-java-runner:${PULSAR_IMAGE_TAG} COPY --from=pulsar-all --chown=$UID:$GID /pulsar/examples /pulsar/examples diff --git a/images/samples/python-function-samples/Dockerfile b/images/samples/python-function-samples/Dockerfile index 6771c1393..c754d2f36 100644 --- a/images/samples/python-function-samples/Dockerfile +++ b/images/samples/python-function-samples/Dockerfile @@ -1,4 +1,4 @@ ARG PULSAR_IMAGE_TAG -FROM streamnative/pulsar-all:${PULSAR_IMAGE_TAG} as pulsar-all +FROM streamnative/sn-platform:${PULSAR_IMAGE_TAG} as pulsar-all FROM streamnative/pulsar-functions-python-runner:${PULSAR_IMAGE_TAG} COPY --from=pulsar-all --chown=$UID:$GID /pulsar/examples /pulsar/examples From 4f6dd231cbac6cb18fc0ac52879accc79fff49bf Mon Sep 17 00:00:00 2001 From: jiangpengcheng Date: Wed, 26 Jun 2024 16:06:53 +0800 Subject: [PATCH 05/10] Fix ci --- .github/workflows/project.yml | 2 +- .github/workflows/test-function-runner.yml | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/project.yml b/.github/workflows/project.yml index 11453ecc4..042287818 100644 --- a/.github/workflows/project.yml +++ b/.github/workflows/project.yml @@ -44,7 +44,7 @@ jobs: - name: InstallTool run: | - wget -O - -q https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh| sh -s v1.52.2 + wget -O - -q https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh| sh -s v1.57.2 ./bin/golangci-lint --version - name: validate controller-gen diff --git a/.github/workflows/test-function-runner.yml b/.github/workflows/test-function-runner.yml index 003cbf047..1af434465 100644 --- a/.github/workflows/test-function-runner.yml +++ b/.github/workflows/test-function-runner.yml @@ -23,6 +23,14 @@ jobs: docker rmi $(docker images -q) -f df -h + # the runner machine has a disk /dev/sdb1 which mounted to /mnt, and it has more free disk than /dev/sda1. + # we can use it to save docker's data to avoid bookie error due to lack of disk. + - name: change docker data dir + run: | + sudo service docker stop + echo '{ "exec-opts": ["native.cgroupdriver=cgroupfs"], "cgroup-parent": "/actions_job", "data-root": "/mnt/docker" }' | sudo tee /etc/docker/daemon.json + sudo service docker start + - name: Checkout uses: actions/checkout@v2 with: From e6d4edf16394a6f98337481fc04ad3d8fded7e7b Mon Sep 17 00:00:00 2001 From: jiangpengcheng Date: Wed, 26 Jun 2024 18:47:10 +0800 Subject: [PATCH 06/10] fix oauth2 ci --- ...values_skywalking_e2e_cluster_with_oauth.yaml | 16 ++++++++-------- .../cases/batch-source/manifests.yaml | 10 ++++------ .../manifests.yaml | 2 +- .../cases/java-download-function/manifests.yaml | 5 ++--- .../cases/java-function/manifests.yaml | 5 ++--- .../manifests.yaml | 5 ++--- .../py-download-function-legacy/manifests.yaml | 2 +- .../cases/py-download-function/manifests.yaml | 5 ++--- .ci/tests/integration-oauth2/e2e.yaml | 2 -- 9 files changed, 22 insertions(+), 30 deletions(-) diff --git a/.ci/clusters/values_skywalking_e2e_cluster_with_oauth.yaml b/.ci/clusters/values_skywalking_e2e_cluster_with_oauth.yaml index 6467dec0d..2d84cacef 100644 --- a/.ci/clusters/values_skywalking_e2e_cluster_with_oauth.yaml +++ b/.ci/clusters/values_skywalking_e2e_cluster_with_oauth.yaml @@ -135,12 +135,12 @@ auth: enabled: true provider: "oauth2" oauth2: - issuerUrl: https://sts.windows.net/06a8a086-ae6e-45b5-a22e-ad90de23013e/ - issuerUrlParam: https://sts.windows.net/06a8a086-ae6e-45b5-a22e-ad90de23013e/v2.0 - audience: api://56c1bd14-3ba7-4804-b47b-d46de6dce33e - audienceParam: api://56c1bd14-3ba7-4804-b47b-d46de6dce33e/.default - brokerClientCredential: '{"client_id":"CLIENT_ID","client_secret":"CLIENT_SECRET","issuer_url":"https://sts.windows.net/06a8a086-ae6e-45b5-a22e-ad90de23013e/v2.0"}' - subjectClaim: appid - adminScope: appid - adminScopeParam: api://56c1bd14-3ba7-4804-b47b-d46de6dce33e/.default + issuerUrl: https://auth.sncloud-stg.dev/ + issuerUrlParam: https://auth.sncloud-stg.dev/ + audience: "urn:sn:pulsar:sndev:test" + audienceParam: "urn:sn:pulsar:sndev:test" + brokerClientCredential: '{"client_id":"CLIENT_ID","client_secret":"CLIENT_SECRET","issuer_url":"https://auth.sncloud-stg.dev/"}' + subjectClaim: https://streamnative.io/username + adminScope: https://streamnative.io/username + adminScopeParam: "" authenticationProviders: io.streamnative.pulsar.broker.authentication.AuthenticationProviderOAuth diff --git a/.ci/tests/integration-oauth2/cases/batch-source/manifests.yaml b/.ci/tests/integration-oauth2/cases/batch-source/manifests.yaml index 3ec6cd99b..d64d72622 100644 --- a/.ci/tests/integration-oauth2/cases/batch-source/manifests.yaml +++ b/.ci/tests/integration-oauth2/cases/batch-source/manifests.yaml @@ -37,16 +37,14 @@ spec: certSecretKey: "" authConfig: oauth2Config: - audience: api://56c1bd14-3ba7-4804-b47b-d46de6dce33e/.default - issuerUrl: https://sts.windows.net/06a8a086-ae6e-45b5-a22e-ad90de23013e/v2.0 - scope: api://56c1bd14-3ba7-4804-b47b-d46de6dce33e/.default + audience: urn:sn:pulsar:sndev:test + issuerUrl: https://auth.sncloud-stg.dev/ keySecretName: sn-platform-oauth2-private-key keySecretKey: auth.json cleanupAuthConfig: oauth2Config: - audience: api://56c1bd14-3ba7-4804-b47b-d46de6dce33e/.default - issuerUrl: https://sts.windows.net/06a8a086-ae6e-45b5-a22e-ad90de23013e/v2.0 - scope: api://56c1bd14-3ba7-4804-b47b-d46de6dce33e/.default + audience: urn:sn:pulsar:sndev:test + issuerUrl: https://auth.sncloud-stg.dev/ keySecretName: sn-platform-oauth2-private-key keySecretKey: auth.json image: streamnative/pulsar-io-batch-data-generator:2.9.2.23 diff --git a/.ci/tests/integration-oauth2/cases/java-download-function-generic-auth/manifests.yaml b/.ci/tests/integration-oauth2/cases/java-download-function-generic-auth/manifests.yaml index 8e4623ddc..fc69aa96f 100644 --- a/.ci/tests/integration-oauth2/cases/java-download-function-generic-auth/manifests.yaml +++ b/.ci/tests/integration-oauth2/cases/java-download-function-generic-auth/manifests.yaml @@ -42,7 +42,7 @@ spec: certSecretKey: "" authConfig: genericAuth: - clientAuthenticationParameters: '{"audience":"api://56c1bd14-3ba7-4804-b47b-d46de6dce33e/.default","issuerUrl":"https://sts.windows.net/06a8a086-ae6e-45b5-a22e-ad90de23013e/v2.0","privateKey":"/mnt/secrets/auth.json","type":"client_credentials","scope":"api://56c1bd14-3ba7-4804-b47b-d46de6dce33e/.default","issuer_url":"https://sts.windows.net/06a8a086-ae6e-45b5-a22e-ad90de23013e/v2.0","private_key":"/mnt/secrets/auth.json"}' + clientAuthenticationParameters: '{"audience":"urn:sn:pulsar:sndev:test","issuerUrl":"https://auth.sncloud-stg.dev/","privateKey":"/mnt/secrets/auth.json","type":"client_credentials","issuer_url":"https://auth.sncloud-stg.dev/","private_key":"/mnt/secrets/auth.json"}' clientAuthenticationPlugin: org.apache.pulsar.client.impl.auth.oauth2.AuthenticationOAuth2 java: jar: pulsar-functions-api-examples.jar diff --git a/.ci/tests/integration-oauth2/cases/java-download-function/manifests.yaml b/.ci/tests/integration-oauth2/cases/java-download-function/manifests.yaml index 853c51bf7..6ad5a233e 100644 --- a/.ci/tests/integration-oauth2/cases/java-download-function/manifests.yaml +++ b/.ci/tests/integration-oauth2/cases/java-download-function/manifests.yaml @@ -45,9 +45,8 @@ spec: certSecretKey: "" authConfig: oauth2Config: - audience: api://56c1bd14-3ba7-4804-b47b-d46de6dce33e/.default - issuerUrl: https://sts.windows.net/06a8a086-ae6e-45b5-a22e-ad90de23013e/v2.0 - scope: api://56c1bd14-3ba7-4804-b47b-d46de6dce33e/.default + audience: urn:sn:pulsar:sndev:test + issuerUrl: https://auth.sncloud-stg.dev/ keySecretName: sn-platform-oauth2-private-key keySecretKey: auth.json java: diff --git a/.ci/tests/integration-oauth2/cases/java-function/manifests.yaml b/.ci/tests/integration-oauth2/cases/java-function/manifests.yaml index 328c7a1c8..8a0794717 100644 --- a/.ci/tests/integration-oauth2/cases/java-function/manifests.yaml +++ b/.ci/tests/integration-oauth2/cases/java-function/manifests.yaml @@ -42,9 +42,8 @@ spec: certSecretKey: "" authConfig: oauth2Config: - audience: api://56c1bd14-3ba7-4804-b47b-d46de6dce33e/.default - issuerUrl: https://sts.windows.net/06a8a086-ae6e-45b5-a22e-ad90de23013e/v2.0 - scope: api://56c1bd14-3ba7-4804-b47b-d46de6dce33e/.default + audience: urn:sn:pulsar:sndev:test + issuerUrl: https://auth.sncloud-stg.dev/ keySecretName: sn-platform-oauth2-private-key keySecretKey: auth.json java: diff --git a/.ci/tests/integration-oauth2/cases/py-download-from-http-function/manifests.yaml b/.ci/tests/integration-oauth2/cases/py-download-from-http-function/manifests.yaml index 6bfb436e5..c4562215c 100644 --- a/.ci/tests/integration-oauth2/cases/py-download-from-http-function/manifests.yaml +++ b/.ci/tests/integration-oauth2/cases/py-download-from-http-function/manifests.yaml @@ -39,9 +39,8 @@ spec: hostnameVerification: true authConfig: oauth2Config: - audience: api://56c1bd14-3ba7-4804-b47b-d46de6dce33e/.default - issuerUrl: https://sts.windows.net/06a8a086-ae6e-45b5-a22e-ad90de23013e/v2.0 - scope: api://56c1bd14-3ba7-4804-b47b-d46de6dce33e/.default + audience: urn:sn:pulsar:sndev:test + issuerUrl: https://auth.sncloud-stg.dev/ keySecretName: sn-platform-oauth2-private-key keySecretKey: auth.json python: diff --git a/.ci/tests/integration-oauth2/cases/py-download-function-legacy/manifests.yaml b/.ci/tests/integration-oauth2/cases/py-download-function-legacy/manifests.yaml index 67603b658..c45bb93b6 100644 --- a/.ci/tests/integration-oauth2/cases/py-download-function-legacy/manifests.yaml +++ b/.ci/tests/integration-oauth2/cases/py-download-function-legacy/manifests.yaml @@ -52,7 +52,7 @@ data: --- apiVersion: v1 data: - clientAuthenticationParameters: eyJhdWRpZW5jZSI6ImFwaTovLzU2YzFiZDE0LTNiYTctNDgwNC1iNDdiLWQ0NmRlNmRjZTMzZS8uZGVmYXVsdCIsImlzc3VlclVybCI6Imh0dHBzOi8vc3RzLndpbmRvd3MubmV0LzA2YThhMDg2LWFlNmUtNDViNS1hMjJlLWFkOTBkZTIzMDEzZS92Mi4wIiwicHJpdmF0ZUtleSI6Ii9tbnQvc2VjcmV0cy9hdXRoLmpzb24iLCJ0eXBlIjoiY2xpZW50X2NyZWRlbnRpYWxzIiwic2NvcGUiOiJhcGk6Ly81NmMxYmQxNC0zYmE3LTQ4MDQtYjQ3Yi1kNDZkZTZkY2UzM2UvLmRlZmF1bHQiLCJpc3N1ZXJfdXJsIjoiaHR0cHM6Ly9zdHMud2luZG93cy5uZXQvMDZhOGEwODYtYWU2ZS00NWI1LWEyMmUtYWQ5MGRlMjMwMTNlL3YyLjAiLCJwcml2YXRlX2tleSI6Ii9tbnQvc2VjcmV0cy9hdXRoLmpzb24ifQo= + clientAuthenticationParameters: eyJhdWRpZW5jZSI6InVybjpzbjpwdWxzYXI6c25kZXY6dGVzdCIsImlzc3VlclVybCI6Imh0dHBzOi8vYXV0aC5zbmNsb3VkLXN0Zy5kZXYvIiwicHJpdmF0ZUtleSI6Ii9tbnQvc2VjcmV0cy9hdXRoLmpzb24iLCJ0eXBlIjoiY2xpZW50X2NyZWRlbnRpYWxzIiwiaXNzdWVyX3VybCI6Imh0dHBzOi8vYXV0aC5zbmNsb3VkLXN0Zy5kZXYvIiwicHJpdmF0ZV9rZXkiOiIvbW50L3NlY3JldHMvYXV0aC5qc29uIn0= clientAuthenticationPlugin: b3JnLmFwYWNoZS5wdWxzYXIuY2xpZW50LmltcGwuYXV0aC5vYXV0aDIuQXV0aGVudGljYXRpb25PQXV0aDI= kind: Secret metadata: diff --git a/.ci/tests/integration-oauth2/cases/py-download-function/manifests.yaml b/.ci/tests/integration-oauth2/cases/py-download-function/manifests.yaml index d5563bde3..3807c89c3 100644 --- a/.ci/tests/integration-oauth2/cases/py-download-function/manifests.yaml +++ b/.ci/tests/integration-oauth2/cases/py-download-function/manifests.yaml @@ -39,9 +39,8 @@ spec: hostnameVerification: true authConfig: oauth2Config: - audience: api://56c1bd14-3ba7-4804-b47b-d46de6dce33e/.default - issuerUrl: https://sts.windows.net/06a8a086-ae6e-45b5-a22e-ad90de23013e/v2.0 - scope: api://56c1bd14-3ba7-4804-b47b-d46de6dce33e/.default + audience: urn:sn:pulsar:sndev:test + issuerUrl: https://auth.sncloud-stg.dev/ keySecretName: sn-platform-oauth2-private-key keySecretKey: auth.json python: diff --git a/.ci/tests/integration-oauth2/e2e.yaml b/.ci/tests/integration-oauth2/e2e.yaml index 68b5c5de5..cc975da35 100644 --- a/.ci/tests/integration-oauth2/e2e.yaml +++ b/.ci/tests/integration-oauth2/e2e.yaml @@ -125,8 +125,6 @@ verify: expected: expected.data.yaml - query: timeout 5m bash .ci/tests/integration-oauth2/cases/py-download-function/verify.sh expected: expected.data.yaml - - query: timeout 5m bash .ci/tests/integration-oauth2/cases/py-download-function-legacy/verify.sh - expected: expected.data.yaml - query: timeout 5m bash .ci/tests/integration-oauth2/cases/py-download-from-http-function/verify.sh expected: expected.data.yaml - query: timeout 5m bash .ci/tests/integration-oauth2/cases/batch-source/verify.sh From c64c5148cc3a26f24c2731712f4c3107dc707b22 Mon Sep 17 00:00:00 2001 From: jiangpengcheng Date: Wed, 26 Jun 2024 19:30:44 +0800 Subject: [PATCH 07/10] update runner images --- .ci/clusters/compute_v1alpha1_function.yaml | 2 +- .../compute_v1alpha1_function_builtin_hpa.yaml | 2 +- .ci/clusters/compute_v1alpha1_function_hpa.yaml | 2 +- .ci/clusters/compute_v1alpha1_function_stateful.yaml | 2 +- .ci/clusters/compute_v1alpha1_functionmesh.yaml | 6 +++--- .ci/clusters/compute_v1alpha1_go_function.yaml | 2 +- .ci/clusters/compute_v1alpha1_py_function.yaml | 2 +- .ci/clusters/values_custom_runner_images.yaml | 6 +++--- .ci/clusters/values_runner_images.yaml | 6 +++--- .../cases/batch-source/manifests.yaml | 4 ++-- .../cases/java-download-function/manifests.yaml | 2 +- .../cases/java-function/manifests.yaml | 2 +- .../cases/java-log-config-yaml/manifests.yaml | 2 +- .../py-download-from-http-function/manifests.yaml | 2 +- .../cases/py-download-function-legacy/manifests.yaml | 2 +- .../cases/py-download-function/manifests.yaml | 2 +- .ci/tests/integration-oauth2/e2e.yaml | 4 ++-- .ci/tests/integration-oauth2/e2e_with_downloader.yaml | 4 ++-- .ci/tests/integration/cases/builtin-hpa/manifests.yaml | 2 +- .../integration/cases/crypto-function/manifests.yaml | 2 +- .../integration/cases/functionmesh/manifests.yaml | 6 +++--- .../cases/go-download-function/manifests.yaml | 2 +- .ci/tests/integration/cases/go-function/manifests.yaml | 2 +- .../integration/cases/health-check/manifests.yaml | 2 +- .ci/tests/integration/cases/hpa/manifests.yaml | 2 +- .../cases/java-download-function/manifests.yaml | 2 +- .../integration/cases/java-function-vpa/manifests.yaml | 2 +- .../integration/cases/java-function/manifests.yaml | 2 +- .../integration/cases/java-log-config/manifests.yaml | 2 +- .../cases/java-log-format-json/manifests.yaml | 2 +- .../integration/cases/java-log-level/manifests.yaml | 2 +- .../integration/cases/java-log-yaml/manifests.yaml | 2 +- .../cases/logging-window-function/manifests.yaml | 2 +- .../integration/cases/mongodb-source/manifests.yaml | 4 ++-- .../integration/cases/pvc-templates/manifests.yaml | 2 +- .../cases/py-download-pip-function/manifests.yaml | 2 +- .../integration/cases/python-function/manifests.yaml | 2 +- .../integration/cases/python-log-config/manifests.yaml | 2 +- .../cases/python-log-format-json/manifests.yaml | 2 +- .../integration/cases/python-log-level/manifests.yaml | 2 +- .../cases/python-stateful-function/manifests.yaml | 2 +- .../cases/reconciliation/manifests-one.yaml | 10 +++++----- .../cases/reconciliation/manifests-two.yaml | 10 +++++----- .../integration/cases/scale-to-zero/manifests.yaml | 2 +- .ci/tests/integration/e2e.yaml | 4 ++-- .ci/tests/integration/e2e_with_tls.yaml | 4 ++-- .github/workflows/test-function-runner.yml | 2 +- config/samples/compute_v1alpha1_function.yaml | 2 +- config/samples/compute_v1alpha1_function_crypto.yaml | 2 +- config/samples/compute_v1alpha1_functionmesh.yaml | 4 ++-- 50 files changed, 73 insertions(+), 73 deletions(-) diff --git a/.ci/clusters/compute_v1alpha1_function.yaml b/.ci/clusters/compute_v1alpha1_function.yaml index 017a274aa..a25be1de1 100644 --- a/.ci/clusters/compute_v1alpha1_function.yaml +++ b/.ci/clusters/compute_v1alpha1_function.yaml @@ -4,7 +4,7 @@ metadata: name: function-sample namespace: default spec: - image: streamnative/pulsar-functions-java-sample:2.9.2.23 + image: streamnative/pulsar-functions-java-sample:3.2.2.1 className: org.apache.pulsar.functions.api.examples.ExclamationFunction forwardSourceMessageProperty: true maxPendingAsyncRequests: 1000 diff --git a/.ci/clusters/compute_v1alpha1_function_builtin_hpa.yaml b/.ci/clusters/compute_v1alpha1_function_builtin_hpa.yaml index d9bbaf8c9..dfb744367 100644 --- a/.ci/clusters/compute_v1alpha1_function_builtin_hpa.yaml +++ b/.ci/clusters/compute_v1alpha1_function_builtin_hpa.yaml @@ -4,7 +4,7 @@ metadata: name: function-builtin-hpa-sample namespace: default spec: - image: streamnative/pulsar-functions-java-sample:2.9.2.23 + image: streamnative/pulsar-functions-java-sample:3.2.2.1 className: org.apache.pulsar.functions.api.examples.ExclamationFunction forwardSourceMessageProperty: true maxPendingAsyncRequests: 1000 diff --git a/.ci/clusters/compute_v1alpha1_function_hpa.yaml b/.ci/clusters/compute_v1alpha1_function_hpa.yaml index 3a0dc0ffe..005cb3999 100644 --- a/.ci/clusters/compute_v1alpha1_function_hpa.yaml +++ b/.ci/clusters/compute_v1alpha1_function_hpa.yaml @@ -4,7 +4,7 @@ metadata: name: function-hpa-sample namespace: default spec: - image: streamnative/pulsar-functions-java-sample:2.9.2.23 + image: streamnative/pulsar-functions-java-sample:3.2.2.1 className: org.apache.pulsar.functions.api.examples.ExclamationFunction forwardSourceMessageProperty: true maxPendingAsyncRequests: 1000 diff --git a/.ci/clusters/compute_v1alpha1_function_stateful.yaml b/.ci/clusters/compute_v1alpha1_function_stateful.yaml index 99ec81c6b..ec2239dc4 100644 --- a/.ci/clusters/compute_v1alpha1_function_stateful.yaml +++ b/.ci/clusters/compute_v1alpha1_function_stateful.yaml @@ -4,7 +4,7 @@ metadata: name: python-function-stateful-sample namespace: default spec: - image: streamnative/pulsar-functions-python-sample:2.9.2.23 + image: streamnative/pulsar-functions-python-sample:3.2.2.1 className: wordcount_function.WordCountFunction forwardSourceMessageProperty: true maxPendingAsyncRequests: 1000 diff --git a/.ci/clusters/compute_v1alpha1_functionmesh.yaml b/.ci/clusters/compute_v1alpha1_functionmesh.yaml index bf6f4e6a9..0d4254e2d 100644 --- a/.ci/clusters/compute_v1alpha1_functionmesh.yaml +++ b/.ci/clusters/compute_v1alpha1_functionmesh.yaml @@ -5,7 +5,7 @@ metadata: spec: functions: - name: java-function - image: streamnative/pulsar-functions-java-sample:2.9.2.23 + image: streamnative/pulsar-functions-java-sample:3.2.2.1 className: org.apache.pulsar.functions.api.examples.ExclamationFunction replicas: 1 maxReplicas: 1 @@ -31,7 +31,7 @@ spec: memory: 1.1G clusterName: test - name: golang-function - image: streamnative/pulsar-functions-go-sample:2.9.2.23 + image: streamnative/pulsar-functions-go-sample:3.2.2.1 replicas: 1 maxReplicas: 1 input: @@ -56,7 +56,7 @@ spec: memory: 1.1G clusterName: test - name: python-function - image: streamnative/pulsar-functions-python-sample:2.9.2.23 + image: streamnative/pulsar-functions-python-sample:3.2.2.1 className: exclamation_function.ExclamationFunction replicas: 1 maxReplicas: 1 diff --git a/.ci/clusters/compute_v1alpha1_go_function.yaml b/.ci/clusters/compute_v1alpha1_go_function.yaml index e478063e9..1b5e15a9f 100644 --- a/.ci/clusters/compute_v1alpha1_go_function.yaml +++ b/.ci/clusters/compute_v1alpha1_go_function.yaml @@ -4,7 +4,7 @@ metadata: name: go-function-sample namespace: default spec: - image: streamnative/pulsar-functions-go-sample:2.9.2.23 + image: streamnative/pulsar-functions-go-sample:3.2.2.1 forwardSourceMessageProperty: true maxPendingAsyncRequests: 1000 replicas: 1 diff --git a/.ci/clusters/compute_v1alpha1_py_function.yaml b/.ci/clusters/compute_v1alpha1_py_function.yaml index 0b09db339..c1bea6694 100644 --- a/.ci/clusters/compute_v1alpha1_py_function.yaml +++ b/.ci/clusters/compute_v1alpha1_py_function.yaml @@ -4,7 +4,7 @@ metadata: name: py-function-sample namespace: default spec: - image: streamnative/pulsar-functions-python-sample:2.9.2.23 + image: streamnative/pulsar-functions-python-sample:3.2.2.1 className: exclamation_function.ExclamationFunction forwardSourceMessageProperty: true maxPendingAsyncRequests: 1000 diff --git a/.ci/clusters/values_custom_runner_images.yaml b/.ci/clusters/values_custom_runner_images.yaml index 1ef1c0435..30dde9839 100644 --- a/.ci/clusters/values_custom_runner_images.yaml +++ b/.ci/clusters/values_custom_runner_images.yaml @@ -157,9 +157,9 @@ functions: narExtractionDirectory: "" functionRuntimeFactoryConfigs: functionDockerImages: - JAVA: "streamnative/pulsar-functions-java-runner:2.9.2.23" - PYTHON: "streamnative/pulsar-functions-python-runner:2.9.2.23" - GO: "streamnative/pulsar-functions-go-runner:2.9.2.23" + JAVA: "streamnative/pulsar-functions-java-runner:3.2.2.1" + PYTHON: "streamnative/pulsar-functions-python-runner:3.2.2.1" + GO: "streamnative/pulsar-functions-go-runner:3.2.2.1" proxy: replicaCount: 1 diff --git a/.ci/clusters/values_runner_images.yaml b/.ci/clusters/values_runner_images.yaml index 49c6cd840..a2a5325e9 100644 --- a/.ci/clusters/values_runner_images.yaml +++ b/.ci/clusters/values_runner_images.yaml @@ -172,9 +172,9 @@ functions: disk: 1048576000 functionRuntimeFactoryConfigs: functionDockerImages: - JAVA: "localhost:5000/pulsar-functions-java-runner:2.9.2.23" - PYTHON: "localhost:5000/pulsar-functions-python-runner:2.9.2.23" - GO: "localhost:5000/pulsar-functions-go-runner:2.9.2.23" + JAVA: "localhost:5000/pulsar-functions-java-runner:3.2.2.1" + PYTHON: "localhost:5000/pulsar-functions-python-runner:3.2.2.1" + GO: "localhost:5000/pulsar-functions-go-runner:3.2.2.1" functionInstanceMinResources: cpu: 0.1 ram: 10485760 diff --git a/.ci/tests/integration-oauth2/cases/batch-source/manifests.yaml b/.ci/tests/integration-oauth2/cases/batch-source/manifests.yaml index d64d72622..f395ac97d 100644 --- a/.ci/tests/integration-oauth2/cases/batch-source/manifests.yaml +++ b/.ci/tests/integration-oauth2/cases/batch-source/manifests.yaml @@ -47,9 +47,9 @@ spec: issuerUrl: https://auth.sncloud-stg.dev/ keySecretName: sn-platform-oauth2-private-key keySecretKey: auth.json - image: streamnative/pulsar-io-batch-data-generator:2.9.2.23 + image: streamnative/pulsar-io-batch-data-generator:3.2.2.1 java: - jar: connectors/pulsar-io-batch-data-generator-2.9.2.23.nar + jar: connectors/pulsar-io-batch-data-generator-3.2.2.1.nar jarLocation: "" # use pulsar provided connectors # use package name: # jarLocation: function://public/default/nul-test-java-source@v1 diff --git a/.ci/tests/integration-oauth2/cases/java-download-function/manifests.yaml b/.ci/tests/integration-oauth2/cases/java-download-function/manifests.yaml index 6ad5a233e..c8fab06b3 100644 --- a/.ci/tests/integration-oauth2/cases/java-download-function/manifests.yaml +++ b/.ci/tests/integration-oauth2/cases/java-download-function/manifests.yaml @@ -4,7 +4,7 @@ metadata: name: function-download-sample namespace: default spec: - image: streamnative/pulsar-functions-pulsarctl-java-runner:2.9.2.23 + image: streamnative/pulsar-functions-pulsarctl-java-runner:3.2.2.1 className: org.apache.pulsar.functions.api.examples.ExclamationFunction cleanupSubscription: true subscriptionName: java-download-subscription diff --git a/.ci/tests/integration-oauth2/cases/java-function/manifests.yaml b/.ci/tests/integration-oauth2/cases/java-function/manifests.yaml index 8a0794717..4c1079c26 100644 --- a/.ci/tests/integration-oauth2/cases/java-function/manifests.yaml +++ b/.ci/tests/integration-oauth2/cases/java-function/manifests.yaml @@ -4,7 +4,7 @@ metadata: name: function-sample namespace: default spec: - image: streamnative/pulsar-functions-java-sample:2.9.2.23 + image: streamnative/pulsar-functions-java-sample:3.2.2.1 className: org.apache.pulsar.functions.api.examples.ExclamationFunction forwardSourceMessageProperty: true maxPendingAsyncRequests: 1000 diff --git a/.ci/tests/integration-oauth2/cases/java-log-config-yaml/manifests.yaml b/.ci/tests/integration-oauth2/cases/java-log-config-yaml/manifests.yaml index 36357d667..6189f3154 100644 --- a/.ci/tests/integration-oauth2/cases/java-log-config-yaml/manifests.yaml +++ b/.ci/tests/integration-oauth2/cases/java-log-config-yaml/manifests.yaml @@ -4,7 +4,7 @@ metadata: name: java-log-config-yaml namespace: default spec: - image: streamnative/pulsar-functions-java-sample:2.9.2.23 + image: streamnative/pulsar-functions-java-sample:3.2.2.1 className: org.apache.pulsar.functions.api.examples.ExclamationFunction forwardSourceMessageProperty: true maxPendingAsyncRequests: 1000 diff --git a/.ci/tests/integration-oauth2/cases/py-download-from-http-function/manifests.yaml b/.ci/tests/integration-oauth2/cases/py-download-from-http-function/manifests.yaml index c4562215c..cfd39e97d 100644 --- a/.ci/tests/integration-oauth2/cases/py-download-from-http-function/manifests.yaml +++ b/.ci/tests/integration-oauth2/cases/py-download-from-http-function/manifests.yaml @@ -4,7 +4,7 @@ metadata: name: py-function-download-from-http-sample namespace: default spec: - image: streamnative/pulsar-functions-pulsarctl-python-runner:2.9.2.23 + image: streamnative/pulsar-functions-pulsarctl-python-runner:3.2.2.1 className: exclamation forwardSourceMessageProperty: true maxPendingAsyncRequests: 1000 diff --git a/.ci/tests/integration-oauth2/cases/py-download-function-legacy/manifests.yaml b/.ci/tests/integration-oauth2/cases/py-download-function-legacy/manifests.yaml index c45bb93b6..2964b828c 100644 --- a/.ci/tests/integration-oauth2/cases/py-download-function-legacy/manifests.yaml +++ b/.ci/tests/integration-oauth2/cases/py-download-function-legacy/manifests.yaml @@ -4,7 +4,7 @@ metadata: name: py-function-download-legacy-sample namespace: default spec: - image: streamnative/pulsar-functions-pulsarctl-python-runner:2.9.2.23 + image: streamnative/pulsar-functions-pulsarctl-python-runner:3.2.2.1 className: exclamation_function.ExclamationFunction forwardSourceMessageProperty: true maxPendingAsyncRequests: 1000 diff --git a/.ci/tests/integration-oauth2/cases/py-download-function/manifests.yaml b/.ci/tests/integration-oauth2/cases/py-download-function/manifests.yaml index 3807c89c3..4f6fbb3a5 100644 --- a/.ci/tests/integration-oauth2/cases/py-download-function/manifests.yaml +++ b/.ci/tests/integration-oauth2/cases/py-download-function/manifests.yaml @@ -4,7 +4,7 @@ metadata: name: py-function-download-sample namespace: default spec: - image: streamnative/pulsar-functions-pulsarctl-python-runner:2.9.2.23 + image: streamnative/pulsar-functions-pulsarctl-python-runner:3.2.2.1 className: exclamation_function.ExclamationFunction forwardSourceMessageProperty: true maxPendingAsyncRequests: 1000 diff --git a/.ci/tests/integration-oauth2/e2e.yaml b/.ci/tests/integration-oauth2/e2e.yaml index cc975da35..03bc7f4d4 100644 --- a/.ci/tests/integration-oauth2/e2e.yaml +++ b/.ci/tests/integration-oauth2/e2e.yaml @@ -6,8 +6,8 @@ setup: - name: build images command: | chmod +x images/build.sh images/samples/build.sh - PULSAR_IMAGE_TAG=2.9.2.23 PULSAR_IMAGE=streamnative/sn-platform KIND_PUSH=true images/build.sh - PULSAR_IMAGE_TAG=2.9.2.23 KIND_PUSH=true images/samples/build.sh + PULSAR_IMAGE_TAG=3.2.2.1 PULSAR_IMAGE=streamnative/sn-platform KIND_PUSH=true images/build.sh + PULSAR_IMAGE_TAG=3.2.2.1 KIND_PUSH=true images/samples/build.sh - name: install helm command: | diff --git a/.ci/tests/integration-oauth2/e2e_with_downloader.yaml b/.ci/tests/integration-oauth2/e2e_with_downloader.yaml index 9b67536e4..14445cfca 100644 --- a/.ci/tests/integration-oauth2/e2e_with_downloader.yaml +++ b/.ci/tests/integration-oauth2/e2e_with_downloader.yaml @@ -6,8 +6,8 @@ setup: - name: build images command: | chmod +x images/build.sh images/samples/build.sh - PULSAR_IMAGE_TAG=2.9.2.23 PULSAR_IMAGE=streamnative/sn-platform KIND_PUSH=true images/build.sh - PULSAR_IMAGE_TAG=2.9.2.23 KIND_PUSH=true images/samples/build.sh + PULSAR_IMAGE_TAG=3.2.2.1 PULSAR_IMAGE=streamnative/sn-platform KIND_PUSH=true images/build.sh + PULSAR_IMAGE_TAG=3.2.2.1 KIND_PUSH=true images/samples/build.sh - name: install helm command: | diff --git a/.ci/tests/integration/cases/builtin-hpa/manifests.yaml b/.ci/tests/integration/cases/builtin-hpa/manifests.yaml index b1303f409..4cd25d6a3 100644 --- a/.ci/tests/integration/cases/builtin-hpa/manifests.yaml +++ b/.ci/tests/integration/cases/builtin-hpa/manifests.yaml @@ -4,7 +4,7 @@ metadata: name: function-builtin-hpa-sample namespace: default spec: - image: streamnative/pulsar-functions-java-sample:2.9.2.23 + image: streamnative/pulsar-functions-java-sample:3.2.2.1 className: org.apache.pulsar.functions.api.examples.ExclamationFunction forwardSourceMessageProperty: true maxPendingAsyncRequests: 1000 diff --git a/.ci/tests/integration/cases/crypto-function/manifests.yaml b/.ci/tests/integration/cases/crypto-function/manifests.yaml index cf57b4404..3535ed51c 100644 --- a/.ci/tests/integration/cases/crypto-function/manifests.yaml +++ b/.ci/tests/integration/cases/crypto-function/manifests.yaml @@ -4,7 +4,7 @@ metadata: name: java-function-crypto-sample namespace: default spec: - image: streamnative/pulsar-functions-java-sample:2.9.2.23 + image: streamnative/pulsar-functions-java-sample:3.2.2.1 className: org.apache.pulsar.functions.api.examples.ExclamationFunction forwardSourceMessageProperty: true maxPendingAsyncRequests: 1000 diff --git a/.ci/tests/integration/cases/functionmesh/manifests.yaml b/.ci/tests/integration/cases/functionmesh/manifests.yaml index 28bc897a3..8ceeed9c9 100644 --- a/.ci/tests/integration/cases/functionmesh/manifests.yaml +++ b/.ci/tests/integration/cases/functionmesh/manifests.yaml @@ -5,7 +5,7 @@ metadata: spec: functions: - name: java-function - image: streamnative/pulsar-functions-java-sample:2.9.2.23 + image: streamnative/pulsar-functions-java-sample:3.2.2.1 className: org.apache.pulsar.functions.api.examples.ExclamationFunction replicas: 1 maxReplicas: 1 @@ -31,7 +31,7 @@ spec: memory: 1.1G clusterName: test - name: golang-function - image: streamnative/pulsar-functions-go-sample:2.9.2.23 + image: streamnative/pulsar-functions-go-sample:3.2.2.1 replicas: 1 maxReplicas: 1 input: @@ -56,7 +56,7 @@ spec: memory: 1.1G clusterName: test - name: python-function - image: streamnative/pulsar-functions-python-sample:2.9.2.23 + image: streamnative/pulsar-functions-python-sample:3.2.2.1 className: exclamation_function.ExclamationFunction replicas: 1 maxReplicas: 1 diff --git a/.ci/tests/integration/cases/go-download-function/manifests.yaml b/.ci/tests/integration/cases/go-download-function/manifests.yaml index 446f47dd0..8bdfca010 100644 --- a/.ci/tests/integration/cases/go-download-function/manifests.yaml +++ b/.ci/tests/integration/cases/go-download-function/manifests.yaml @@ -4,7 +4,7 @@ metadata: name: go-function-download-sample namespace: default spec: - image: streamnative/pulsar-functions-pulsarctl-go-runner:2.9.2.23 + image: streamnative/pulsar-functions-pulsarctl-go-runner:3.2.2.1 forwardSourceMessageProperty: true maxPendingAsyncRequests: 1000 replicas: 1 diff --git a/.ci/tests/integration/cases/go-function/manifests.yaml b/.ci/tests/integration/cases/go-function/manifests.yaml index 6b9d62371..35c961c43 100644 --- a/.ci/tests/integration/cases/go-function/manifests.yaml +++ b/.ci/tests/integration/cases/go-function/manifests.yaml @@ -4,7 +4,7 @@ metadata: name: go-function-sample namespace: default spec: - image: streamnative/pulsar-functions-go-sample:2.9.2.23 + image: streamnative/pulsar-functions-go-sample:3.2.2.1 forwardSourceMessageProperty: true maxPendingAsyncRequests: 1000 replicas: 1 diff --git a/.ci/tests/integration/cases/health-check/manifests.yaml b/.ci/tests/integration/cases/health-check/manifests.yaml index 723b2bf56..8d1b5a022 100644 --- a/.ci/tests/integration/cases/health-check/manifests.yaml +++ b/.ci/tests/integration/cases/health-check/manifests.yaml @@ -4,7 +4,7 @@ metadata: name: health-check-sample namespace: default spec: - image: streamnative/pulsar-functions-java-sample:2.9.2.23 + image: streamnative/pulsar-functions-java-sample:3.2.2.1 className: org.apache.pulsar.functions.api.examples.ExclamationFunction forwardSourceMessageProperty: true maxPendingAsyncRequests: 1000 diff --git a/.ci/tests/integration/cases/hpa/manifests.yaml b/.ci/tests/integration/cases/hpa/manifests.yaml index 53329a1a1..e5373bb2d 100644 --- a/.ci/tests/integration/cases/hpa/manifests.yaml +++ b/.ci/tests/integration/cases/hpa/manifests.yaml @@ -4,7 +4,7 @@ metadata: name: function-hpa-sample namespace: default spec: - image: streamnative/pulsar-functions-java-sample:2.9.2.23 + image: streamnative/pulsar-functions-java-sample:3.2.2.1 className: org.apache.pulsar.functions.api.examples.ExclamationFunction forwardSourceMessageProperty: true maxPendingAsyncRequests: 1000 diff --git a/.ci/tests/integration/cases/java-download-function/manifests.yaml b/.ci/tests/integration/cases/java-download-function/manifests.yaml index a6558c828..e6eb76dcf 100644 --- a/.ci/tests/integration/cases/java-download-function/manifests.yaml +++ b/.ci/tests/integration/cases/java-download-function/manifests.yaml @@ -4,7 +4,7 @@ metadata: name: function-download-sample namespace: default spec: - image: streamnative/pulsar-functions-pulsarctl-java-runner:2.9.2.23 + image: streamnative/pulsar-functions-pulsarctl-java-runner:3.2.2.1 className: org.apache.pulsar.functions.api.examples.ExclamationFunction cleanupSubscription: true subscriptionName: java-download-subscription diff --git a/.ci/tests/integration/cases/java-function-vpa/manifests.yaml b/.ci/tests/integration/cases/java-function-vpa/manifests.yaml index 4c5cd052b..219ae5456 100644 --- a/.ci/tests/integration/cases/java-function-vpa/manifests.yaml +++ b/.ci/tests/integration/cases/java-function-vpa/manifests.yaml @@ -4,7 +4,7 @@ metadata: name: function-sample-vpa namespace: default spec: - image: streamnative/pulsar-functions-java-sample:2.9.2.23 + image: streamnative/pulsar-functions-java-sample:3.2.2.1 className: org.apache.pulsar.functions.api.examples.ExclamationFunction forwardSourceMessageProperty: true maxPendingAsyncRequests: 1000 diff --git a/.ci/tests/integration/cases/java-function/manifests.yaml b/.ci/tests/integration/cases/java-function/manifests.yaml index 9d17d83bb..d2b7391dc 100644 --- a/.ci/tests/integration/cases/java-function/manifests.yaml +++ b/.ci/tests/integration/cases/java-function/manifests.yaml @@ -4,7 +4,7 @@ metadata: name: function-sample namespace: default spec: - image: streamnative/pulsar-functions-java-sample:2.9.2.23 + image: streamnative/pulsar-functions-java-sample:3.2.2.1 className: org.apache.pulsar.functions.api.examples.ExclamationFunction forwardSourceMessageProperty: true maxPendingAsyncRequests: 1000 diff --git a/.ci/tests/integration/cases/java-log-config/manifests.yaml b/.ci/tests/integration/cases/java-log-config/manifests.yaml index b58ea69d9..1e0c2fb96 100644 --- a/.ci/tests/integration/cases/java-log-config/manifests.yaml +++ b/.ci/tests/integration/cases/java-log-config/manifests.yaml @@ -4,7 +4,7 @@ metadata: name: java-log-config namespace: default spec: - image: streamnative/pulsar-functions-java-sample:2.9.2.23 + image: streamnative/pulsar-functions-java-sample:3.2.2.1 className: org.apache.pulsar.functions.api.examples.ExclamationFunction forwardSourceMessageProperty: true maxPendingAsyncRequests: 1000 diff --git a/.ci/tests/integration/cases/java-log-format-json/manifests.yaml b/.ci/tests/integration/cases/java-log-format-json/manifests.yaml index a027de134..6b9cbab1a 100644 --- a/.ci/tests/integration/cases/java-log-format-json/manifests.yaml +++ b/.ci/tests/integration/cases/java-log-format-json/manifests.yaml @@ -4,7 +4,7 @@ metadata: name: java-log-format-json namespace: default spec: - image: streamnative/pulsar-functions-java-sample:2.9.2.23 + image: streamnative/pulsar-functions-java-sample:3.2.2.1 className: org.apache.pulsar.functions.api.examples.ExclamationFunction forwardSourceMessageProperty: true maxPendingAsyncRequests: 1000 diff --git a/.ci/tests/integration/cases/java-log-level/manifests.yaml b/.ci/tests/integration/cases/java-log-level/manifests.yaml index 66a6e9a69..fcf18d555 100644 --- a/.ci/tests/integration/cases/java-log-level/manifests.yaml +++ b/.ci/tests/integration/cases/java-log-level/manifests.yaml @@ -4,7 +4,7 @@ metadata: name: java-log-level namespace: default spec: - image: streamnative/pulsar-functions-java-sample:2.9.2.23 + image: streamnative/pulsar-functions-java-sample:3.2.2.1 className: org.apache.pulsar.functions.api.examples.ExclamationFunction forwardSourceMessageProperty: true maxPendingAsyncRequests: 1000 diff --git a/.ci/tests/integration/cases/java-log-yaml/manifests.yaml b/.ci/tests/integration/cases/java-log-yaml/manifests.yaml index be219dacb..9d8f78551 100644 --- a/.ci/tests/integration/cases/java-log-yaml/manifests.yaml +++ b/.ci/tests/integration/cases/java-log-yaml/manifests.yaml @@ -4,7 +4,7 @@ metadata: name: java-log-yaml namespace: default spec: - image: streamnative/pulsar-functions-java-sample:2.9.2.23 + image: streamnative/pulsar-functions-java-sample:3.2.2.1 className: org.apache.pulsar.functions.api.examples.ExclamationFunction forwardSourceMessageProperty: true maxPendingAsyncRequests: 1000 diff --git a/.ci/tests/integration/cases/logging-window-function/manifests.yaml b/.ci/tests/integration/cases/logging-window-function/manifests.yaml index cae6602bc..3c1492b9d 100644 --- a/.ci/tests/integration/cases/logging-window-function/manifests.yaml +++ b/.ci/tests/integration/cases/logging-window-function/manifests.yaml @@ -4,7 +4,7 @@ metadata: name: window-function-sample namespace: default spec: - image: streamnative/pulsar-functions-java-sample:2.9.2.23 + image: streamnative/pulsar-functions-java-sample:3.2.2.1 className: org.apache.pulsar.functions.api.examples.window.LoggingWindowFunction forwardSourceMessageProperty: true maxPendingAsyncRequests: 1000 diff --git a/.ci/tests/integration/cases/mongodb-source/manifests.yaml b/.ci/tests/integration/cases/mongodb-source/manifests.yaml index 653808f3d..954b936ca 100644 --- a/.ci/tests/integration/cases/mongodb-source/manifests.yaml +++ b/.ci/tests/integration/cases/mongodb-source/manifests.yaml @@ -38,9 +38,9 @@ spec: hostnameVerification: true certSecretName: sn-platform-tls-broker certSecretKey: "" - image: streamnative/pulsar-io-debezium-mongodb:2.9.2.23 + image: streamnative/pulsar-io-debezium-mongodb:3.2.2.1 java: - jar: connectors/pulsar-io-debezium-mongodb-2.9.2.23.nar + jar: connectors/pulsar-io-debezium-mongodb-3.2.2.1.nar jarLocation: "" # use pulsar provided connectors # use package name: # jarLocation: function://public/default/nul-test-java-source@v1 diff --git a/.ci/tests/integration/cases/pvc-templates/manifests.yaml b/.ci/tests/integration/cases/pvc-templates/manifests.yaml index e9b5c9f48..ce0dc367d 100644 --- a/.ci/tests/integration/cases/pvc-templates/manifests.yaml +++ b/.ci/tests/integration/cases/pvc-templates/manifests.yaml @@ -4,7 +4,7 @@ metadata: name: py-function-multi-pvs namespace: default spec: - image: streamnative/pulsar-functions-python-sample:2.9.2.23 + image: streamnative/pulsar-functions-python-sample:3.2.2.1 className: exclamation_function.ExclamationFunction forwardSourceMessageProperty: true maxPendingAsyncRequests: 1000 diff --git a/.ci/tests/integration/cases/py-download-pip-function/manifests.yaml b/.ci/tests/integration/cases/py-download-pip-function/manifests.yaml index 06c6c18af..91a9ffff0 100644 --- a/.ci/tests/integration/cases/py-download-pip-function/manifests.yaml +++ b/.ci/tests/integration/cases/py-download-pip-function/manifests.yaml @@ -4,7 +4,7 @@ metadata: name: py-function-download-pip-sample namespace: default spec: - image: streamnative/pulsar-functions-pulsarctl-python-runner:2.9.2.23 + image: streamnative/pulsar-functions-pulsarctl-python-runner:3.2.2.1 className: pulsarfunction.exclamation.ExclamationFunction forwardSourceMessageProperty: true maxPendingAsyncRequests: 1000 diff --git a/.ci/tests/integration/cases/python-function/manifests.yaml b/.ci/tests/integration/cases/python-function/manifests.yaml index fd456041a..00cf818a5 100644 --- a/.ci/tests/integration/cases/python-function/manifests.yaml +++ b/.ci/tests/integration/cases/python-function/manifests.yaml @@ -4,7 +4,7 @@ metadata: name: py-function-sample namespace: default spec: - image: streamnative/pulsar-functions-python-sample:2.9.2.23 + image: streamnative/pulsar-functions-python-sample:3.2.2.1 className: exclamation_function.ExclamationFunction forwardSourceMessageProperty: true maxPendingAsyncRequests: 1000 diff --git a/.ci/tests/integration/cases/python-log-config/manifests.yaml b/.ci/tests/integration/cases/python-log-config/manifests.yaml index f072ebbb2..bfef11e69 100644 --- a/.ci/tests/integration/cases/python-log-config/manifests.yaml +++ b/.ci/tests/integration/cases/python-log-config/manifests.yaml @@ -4,7 +4,7 @@ metadata: name: python-log-config namespace: default spec: - image: streamnative/pulsar-functions-python-sample:2.9.2.23 + image: streamnative/pulsar-functions-python-sample:3.2.2.1 className: exclamation_function.ExclamationFunction forwardSourceMessageProperty: true maxPendingAsyncRequests: 1000 diff --git a/.ci/tests/integration/cases/python-log-format-json/manifests.yaml b/.ci/tests/integration/cases/python-log-format-json/manifests.yaml index 3fe333739..fc77ede8f 100644 --- a/.ci/tests/integration/cases/python-log-format-json/manifests.yaml +++ b/.ci/tests/integration/cases/python-log-format-json/manifests.yaml @@ -4,7 +4,7 @@ metadata: name: python-log-format-json namespace: default spec: - image: streamnative/pulsar-functions-python-sample:2.9.2.23 + image: streamnative/pulsar-functions-python-sample:3.2.2.1 className: exclamation_function.ExclamationFunction forwardSourceMessageProperty: true maxPendingAsyncRequests: 1000 diff --git a/.ci/tests/integration/cases/python-log-level/manifests.yaml b/.ci/tests/integration/cases/python-log-level/manifests.yaml index 9b68e3ae7..8d16fd432 100644 --- a/.ci/tests/integration/cases/python-log-level/manifests.yaml +++ b/.ci/tests/integration/cases/python-log-level/manifests.yaml @@ -4,7 +4,7 @@ metadata: name: python-log-level namespace: default spec: - image: streamnative/pulsar-functions-python-sample:2.9.2.23 + image: streamnative/pulsar-functions-python-sample:3.2.2.1 className: exclamation_function.ExclamationFunction forwardSourceMessageProperty: true maxPendingAsyncRequests: 1000 diff --git a/.ci/tests/integration/cases/python-stateful-function/manifests.yaml b/.ci/tests/integration/cases/python-stateful-function/manifests.yaml index 9daf6c491..aa4d24eec 100644 --- a/.ci/tests/integration/cases/python-stateful-function/manifests.yaml +++ b/.ci/tests/integration/cases/python-stateful-function/manifests.yaml @@ -4,7 +4,7 @@ metadata: name: python-function-stateful-sample namespace: default spec: - image: streamnative/pulsar-functions-python-sample:2.9.2.23 + image: streamnative/pulsar-functions-python-sample:3.2.2.1 className: wordcount_function.WordCountFunction forwardSourceMessageProperty: true maxPendingAsyncRequests: 1000 diff --git a/.ci/tests/integration/cases/reconciliation/manifests-one.yaml b/.ci/tests/integration/cases/reconciliation/manifests-one.yaml index 451fa1a34..0a60207d8 100644 --- a/.ci/tests/integration/cases/reconciliation/manifests-one.yaml +++ b/.ci/tests/integration/cases/reconciliation/manifests-one.yaml @@ -5,7 +5,7 @@ metadata: spec: sinks: - name: sink-one - image: streamnative/pulsar-io-elastic-search:2.9.2.23 + image: streamnative/pulsar-io-elastic-search:3.2.2.1 className: org.apache.pulsar.io.elasticsearch.ElasticSearchSink replicas: 1 maxReplicas: 1 @@ -29,13 +29,13 @@ spec: cpu: "0.1" memory: 1G java: - jar: connectors/pulsar-io-elastic-search-2.9.2.23.nar + jar: connectors/pulsar-io-elastic-search-3.2.2.1.nar jarLocation: "" # use pulsar provided connectors clusterName: test-pulsar autoAck: true functions: - name: function-one - image: streamnative/pulsar-functions-java-sample:2.9.2.23 + image: streamnative/pulsar-functions-java-sample:3.2.2.1 className: org.apache.pulsar.functions.api.examples.ExclamationFunction replicas: 1 maxReplicas: 1 @@ -90,9 +90,9 @@ spec: pulsar.service.url: pulsar://test-pulsar-broker.default.svc.cluster.local:6650 pulsar: pulsarConfig: "mesh-test-pulsar" - image: streamnative/pulsar-io-debezium-mongodb:2.9.2.23 + image: streamnative/pulsar-io-debezium-mongodb:3.2.2.1 java: - jar: connectors/pulsar-io-debezium-mongodb-2.9.2.23.nar + jar: connectors/pulsar-io-debezium-mongodb-3.2.2.1.nar jarLocation: "" # use pulsar provided connectors clusterName: test-pulsar --- diff --git a/.ci/tests/integration/cases/reconciliation/manifests-two.yaml b/.ci/tests/integration/cases/reconciliation/manifests-two.yaml index a68b4413f..d289f07db 100644 --- a/.ci/tests/integration/cases/reconciliation/manifests-two.yaml +++ b/.ci/tests/integration/cases/reconciliation/manifests-two.yaml @@ -5,7 +5,7 @@ metadata: spec: sinks: - name: sink-two - image: streamnative/pulsar-io-elastic-search:2.9.2.23 + image: streamnative/pulsar-io-elastic-search:3.2.2.1 className: org.apache.pulsar.io.elasticsearch.ElasticSearchSink replicas: 1 maxReplicas: 1 @@ -29,13 +29,13 @@ spec: cpu: "0.1" memory: 1G java: - jar: connectors/pulsar-io-elastic-search-2.9.2.23.nar + jar: connectors/pulsar-io-elastic-search-3.2.2.1.nar jarLocation: "" # use pulsar provided connectors clusterName: test-pulsar autoAck: true functions: - name: function-two - image: streamnative/pulsar-functions-java-sample:2.9.2.23 + image: streamnative/pulsar-functions-java-sample:3.2.2.1 className: org.apache.pulsar.functions.api.examples.ExclamationFunction replicas: 1 maxReplicas: 1 @@ -90,9 +90,9 @@ spec: pulsar.service.url: pulsar://test-pulsar-broker.default.svc.cluster.local:6650 pulsar: pulsarConfig: "mesh-test-pulsar" - image: streamnative/pulsar-io-debezium-mongodb:2.9.2.23 + image: streamnative/pulsar-io-debezium-mongodb:3.2.2.1 java: - jar: connectors/pulsar-io-debezium-mongodb-2.9.2.23.nar + jar: connectors/pulsar-io-debezium-mongodb-3.2.2.1.nar jarLocation: "" # use pulsar provided connectors clusterName: test-pulsar --- diff --git a/.ci/tests/integration/cases/scale-to-zero/manifests.yaml b/.ci/tests/integration/cases/scale-to-zero/manifests.yaml index acf7885bf..b3136fdce 100644 --- a/.ci/tests/integration/cases/scale-to-zero/manifests.yaml +++ b/.ci/tests/integration/cases/scale-to-zero/manifests.yaml @@ -4,7 +4,7 @@ metadata: name: py-function-replica-one namespace: default spec: - image: streamnative/pulsar-functions-python-sample:2.9.2.23 + image: streamnative/pulsar-functions-python-sample:3.2.2.1 className: exclamation_function.ExclamationFunction forwardSourceMessageProperty: true maxPendingAsyncRequests: 1000 diff --git a/.ci/tests/integration/e2e.yaml b/.ci/tests/integration/e2e.yaml index 1f885010c..ed4020639 100644 --- a/.ci/tests/integration/e2e.yaml +++ b/.ci/tests/integration/e2e.yaml @@ -6,8 +6,8 @@ setup: - name: build images command: | chmod +x images/build.sh images/samples/build.sh - PULSAR_IMAGE_TAG=2.9.2.23 PULSAR_IMAGE=streamnative/sn-platform KIND_PUSH=true images/build.sh - PULSAR_IMAGE_TAG=2.9.2.23 KIND_PUSH=true images/samples/build.sh + PULSAR_IMAGE_TAG=3.2.2.1 PULSAR_IMAGE=streamnative/sn-platform KIND_PUSH=true images/build.sh + PULSAR_IMAGE_TAG=3.2.2.1 KIND_PUSH=true images/samples/build.sh - name: install helm command: | diff --git a/.ci/tests/integration/e2e_with_tls.yaml b/.ci/tests/integration/e2e_with_tls.yaml index b750c85b8..654903283 100644 --- a/.ci/tests/integration/e2e_with_tls.yaml +++ b/.ci/tests/integration/e2e_with_tls.yaml @@ -6,8 +6,8 @@ setup: - name: build images command: | chmod +x images/build.sh images/samples/build.sh - PULSAR_IMAGE_TAG=2.9.2.23 PULSAR_IMAGE=streamnative/sn-platform KIND_PUSH=true images/build.sh - PULSAR_IMAGE_TAG=2.9.2.23 KIND_PUSH=true images/samples/build.sh + PULSAR_IMAGE_TAG=3.2.2.1 PULSAR_IMAGE=streamnative/sn-platform KIND_PUSH=true images/build.sh + PULSAR_IMAGE_TAG=3.2.2.1 KIND_PUSH=true images/samples/build.sh - name: install helm command: | diff --git a/.github/workflows/test-function-runner.yml b/.github/workflows/test-function-runner.yml index 1af434465..23ed89e2f 100644 --- a/.github/workflows/test-function-runner.yml +++ b/.github/workflows/test-function-runner.yml @@ -52,7 +52,7 @@ jobs: env: DOCKER_REPO: localhost:5000 run: | - PULSAR_IMAGE_TAG=2.9.2.23 PULSAR_IMAGE=streamnative/sn-platform KIND_PUSH=false images/build.sh + PULSAR_IMAGE_TAG=3.2.2.1 PULSAR_IMAGE=streamnative/sn-platform KIND_PUSH=false images/build.sh - name: Verify function runner run: | diff --git a/config/samples/compute_v1alpha1_function.yaml b/config/samples/compute_v1alpha1_function.yaml index 82377f32d..987800876 100644 --- a/config/samples/compute_v1alpha1_function.yaml +++ b/config/samples/compute_v1alpha1_function.yaml @@ -8,7 +8,7 @@ spec: maxPendingAsyncRequests: 1000 replicas: 1 maxReplicas: 5 - image: streamnative/pulsar-functions-java-sample:2.9.2.23 + image: streamnative/pulsar-functions-java-sample:3.2.2.1 logTopic: persistent://public/default/logging-function-logs input: topics: diff --git a/config/samples/compute_v1alpha1_function_crypto.yaml b/config/samples/compute_v1alpha1_function_crypto.yaml index ab7ad03d8..d96ce6a82 100644 --- a/config/samples/compute_v1alpha1_function_crypto.yaml +++ b/config/samples/compute_v1alpha1_function_crypto.yaml @@ -4,7 +4,7 @@ metadata: name: java-function-crypto-sample namespace: default spec: - image: streamnative/pulsar-functions-java-sample:2.9.2.23 + image: streamnative/pulsar-functions-java-sample:3.2.2.1 className: org.apache.pulsar.functions.api.examples.ExclamationFunction forwardSourceMessageProperty: true maxPendingAsyncRequests: 1000 diff --git a/config/samples/compute_v1alpha1_functionmesh.yaml b/config/samples/compute_v1alpha1_functionmesh.yaml index c2e0229ec..23b94dbbf 100644 --- a/config/samples/compute_v1alpha1_functionmesh.yaml +++ b/config/samples/compute_v1alpha1_functionmesh.yaml @@ -6,7 +6,7 @@ spec: functions: - name: ex1 className: org.apache.pulsar.functions.api.examples.ExclamationFunction - image: streamnative/pulsar-functions-java-sample:2.9.2.23 + image: streamnative/pulsar-functions-java-sample:3.2.2.1 replicas: 1 maxReplicas: 1 logTopic: persistent://public/default/logging-function-log @@ -37,7 +37,7 @@ spec: clusterName: test-pulsar - name: ex2 className: org.apache.pulsar.functions.api.examples.ExclamationFunction - image: streamnative/pulsar-functions-java-sample:2.9.2.23 + image: streamnative/pulsar-functions-java-sample:3.2.2.1 replicas: 1 maxReplicas: 1 logTopic: persistent://public/default/logging-function-logs From 71c1797ee023a2e7d7f8b2e762b4cd0f8f075dfa Mon Sep 17 00:00:00 2001 From: jiangpengcheng Date: Wed, 26 Jun 2024 19:59:25 +0800 Subject: [PATCH 08/10] fix ci --- .ci/tests/integration-oauth2/cases/batch-source/verify.sh | 2 +- .../integration-oauth2/cases/java-download-function/verify.sh | 2 +- .ci/tests/integration/cases/java-download-function/verify.sh | 2 +- .ci/tests/integration/cases/mongodb-source/verify.sh | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.ci/tests/integration-oauth2/cases/batch-source/verify.sh b/.ci/tests/integration-oauth2/cases/batch-source/verify.sh index 306187892..9b92ea0d1 100644 --- a/.ci/tests/integration-oauth2/cases/batch-source/verify.sh +++ b/.ci/tests/integration-oauth2/cases/batch-source/verify.sh @@ -50,7 +50,7 @@ if [ $? -ne 0 ]; then exit 1 fi -verify_log_topic=$(ci::verify_log_topic_with_auth persistent://public/default/batch-source-logs "org.apache.pulsar.functions.runtime.JavaInstanceStarter" 10 2>&1) +verify_log_topic=$(ci::verify_log_topic_with_auth persistent://public/default/batch-source-logs "it may be a NAR file" 10 2>&1) if [ $? -ne 0 ]; then echo "$verify_log_topic" kubectl delete -f "${manifests_file}" > /dev/null 2>&1 || true diff --git a/.ci/tests/integration-oauth2/cases/java-download-function/verify.sh b/.ci/tests/integration-oauth2/cases/java-download-function/verify.sh index d709ae5d5..bb6e54af5 100644 --- a/.ci/tests/integration-oauth2/cases/java-download-function/verify.sh +++ b/.ci/tests/integration-oauth2/cases/java-download-function/verify.sh @@ -48,7 +48,7 @@ if [ $? -ne 0 ]; then exit 1 fi -verify_log_topic=$(ci::verify_log_topic_with_auth persistent://public/default/logging-function-logs-sidecar "org.apache.pulsar.functions.runtime.JavaInstanceStarter" 10 2>&1) +verify_log_topic=$(ci::verify_log_topic_with_auth persistent://public/default/logging-function-logs-sidecar "it is not a NAR file" 10 2>&1) if [ $? -ne 0 ]; then echo "$verify_log_topic" kubectl delete -f "${BASE_DIR}"/.ci/tests/integration-oauth2/cases/java-download-function/manifests.yaml > /dev/null 2>&1 || true diff --git a/.ci/tests/integration/cases/java-download-function/verify.sh b/.ci/tests/integration/cases/java-download-function/verify.sh index 591974cb1..b40904261 100644 --- a/.ci/tests/integration/cases/java-download-function/verify.sh +++ b/.ci/tests/integration/cases/java-download-function/verify.sh @@ -55,7 +55,7 @@ if [ $? -ne 0 ]; then fi if [ $USE_TLS == "false" ]; then - verify_log_topic=$(ci::verify_log_topic persistent://public/default/logging-function-logs-sidecar "org.apache.pulsar.functions.runtime.JavaInstanceStarter" 10 2>&1) + verify_log_topic=$(ci::verify_log_topic persistent://public/default/logging-function-logs-sidecar "it is not a NAR file" 10 2>&1) if [ $? -ne 0 ]; then echo "$verify_log_topic" kubectl delete -f "${BASE_DIR}"/.ci/tests/integration/cases/java-download-function/manifests.yaml > /dev/null 2>&1 || true diff --git a/.ci/tests/integration/cases/mongodb-source/verify.sh b/.ci/tests/integration/cases/mongodb-source/verify.sh index 5f41493c4..2d9c0b382 100644 --- a/.ci/tests/integration/cases/mongodb-source/verify.sh +++ b/.ci/tests/integration/cases/mongodb-source/verify.sh @@ -78,7 +78,7 @@ if [ $? -ne 0 ]; then fi if [ $USE_TLS == "false" ]; then - verify_log_topic=$(ci::verify_log_topic persistent://public/default/mongo-source-logs "org.apache.pulsar.functions.runtime.JavaInstanceStarter" 10 2>&1) + verify_log_topic=$(ci::verify_log_topic persistent://public/default/mongo-source-logs "it may be a NAR file" 10 2>&1) if [ $? -ne 0 ]; then echo "$verify_log_topic" kubectl delete -f "${manifests_file}" > /dev/null 2>&1 || true From 2879e1fd725c39a3d1417895ed11d845b59799c8 Mon Sep 17 00:00:00 2001 From: jiangpengcheng Date: Wed, 26 Jun 2024 20:55:24 +0800 Subject: [PATCH 09/10] fix mongodb source te --- .ci/helm.sh | 2 +- .ci/tests/integration/cases/mongodb-source/mongodb-dbz.yaml | 4 ++-- .ci/tests/integration/cases/mongodb-source/verify.sh | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.ci/helm.sh b/.ci/helm.sh index 931744862..3fc79b76a 100644 --- a/.ci/helm.sh +++ b/.ci/helm.sh @@ -453,7 +453,7 @@ function ci::verify_elasticsearch_sink() { function ci::verify_mongodb_source() { timesleep=$1 - kubectl exec mongo-dbz-0 -c mongo -- mongo -u debezium -p dbz --authenticationDatabase admin localhost:27017/inventory --eval 'db.products.update({"_id":NumberLong(104)},{$set:{weight:1.25}})' + kubectl exec mongo-dbz-0 -c mongo -- mongosh -u debezium -p dbz --authenticationDatabase admin localhost:27017/inventory --eval 'db.products.update({"_id":NumberLong(104)},{$set:{weight:1.25}})' sleep "$timesleep" kubectl logs --tail=-1 -l compute.functionmesh.io/name=source-sample | grep "records sent" if [ $? -eq 0 ]; then diff --git a/.ci/tests/integration/cases/mongodb-source/mongodb-dbz.yaml b/.ci/tests/integration/cases/mongodb-source/mongodb-dbz.yaml index 60c64d6e4..7c1f32384 100644 --- a/.ci/tests/integration/cases/mongodb-source/mongodb-dbz.yaml +++ b/.ci/tests/integration/cases/mongodb-source/mongodb-dbz.yaml @@ -35,7 +35,7 @@ spec: matchLabels: role: mongo serviceName: "mongo" - replicas: 3 + replicas: 1 template: metadata: labels: @@ -44,7 +44,7 @@ spec: terminationGracePeriodSeconds: 10 containers: - name: mongo - image: debezium/example-mongodb:0.10 + image: debezium/example-mongodb:2.6 env: - name: MONGODB_USER value: "debezium" diff --git a/.ci/tests/integration/cases/mongodb-source/verify.sh b/.ci/tests/integration/cases/mongodb-source/verify.sh index 2d9c0b382..6065d8029 100644 --- a/.ci/tests/integration/cases/mongodb-source/verify.sh +++ b/.ci/tests/integration/cases/mongodb-source/verify.sh @@ -45,7 +45,7 @@ function install_mongodb_server() { # install mongodb server kubectl apply -f "${mongodb_file}" num=0 - while [[ ${num} -lt 3 ]]; do + while [[ ${num} -lt 1 ]]; do sleep 5 kubectl get pods num=$(kubectl get pods -l role=mongo | wc -l) From c58d823b1d60763a89723e4077f4bc6d57ee853e Mon Sep 17 00:00:00 2001 From: jiangpengcheng Date: Thu, 27 Jun 2024 08:27:38 +0800 Subject: [PATCH 10/10] fix mongodb source test --- .ci/tests/integration/cases/mongodb-source/manifests.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.ci/tests/integration/cases/mongodb-source/manifests.yaml b/.ci/tests/integration/cases/mongodb-source/manifests.yaml index 954b936ca..188a1d1f2 100644 --- a/.ci/tests/integration/cases/mongodb-source/manifests.yaml +++ b/.ci/tests/integration/cases/mongodb-source/manifests.yaml @@ -23,7 +23,7 @@ spec: cpu: "0.1" memory: 1G sourceConfig: - mongodb.hosts: rs0/mongo-dbz-0.mongo.default.svc.cluster.local:27017,rs0/mongo-dbz-1.mongo.default.svc.cluster.local:27017,rs0/mongo-dbz-2.mongo.default.svc.cluster.local:27017 + mongodb.hosts: rs0/mongo-dbz-0.mongo.default.svc.cluster.local:27017 mongodb.name: dbserver1 mongodb.user: debezium mongodb.password: dbz