-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Install gcompat in java runner images (#761)
* Install gcompat in java runner images * Bump go to 1.22.4 * Fix oauth2 * Fix oauth2 settings * Disable legacy oauth2 params test case * Add testcase for google pubsub io * Set gsa credential * Set GSA credential * fix ci * print expected result
- Loading branch information
1 parent
6e02ca1
commit 47ee638
Showing
15 changed files
with
167 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
62 changes: 62 additions & 0 deletions
62
.ci/tests/integration-oauth2/cases/google-pubsub-source/manifests.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
apiVersion: compute.functionmesh.io/v1alpha1 | ||
kind: Source | ||
metadata: | ||
name: pubsub-source | ||
namespace: default | ||
spec: | ||
className: org.apache.pulsar.ecosystem.io.pubsub.PubsubSource | ||
clusterName: test-pulsar | ||
forwardSourceMessageProperty: true | ||
image: streamnative/pulsar-functions-pulsarctl-java-runner:3.2.2.1 | ||
java: | ||
jar: /tmp/pulsar-io-google-pubsub.nar | ||
jarLocation: function://public/default/pubsub | ||
minReplicas: 1 | ||
name: test | ||
namespace: default | ||
output: | ||
producerConf: {} | ||
topic: persistent://public/default/test-pubsub-output | ||
typeClassName: '[B' | ||
processingGuarantee: atleast_once | ||
pulsar: | ||
pulsarConfig: test-pulsar | ||
authConfig: | ||
oauth2Config: | ||
audience: urn:sn:pulsar:sndev:test | ||
issuerUrl: https://auth.sncloud-stg.dev/ | ||
keySecretName: sn-platform-oauth2-private-key | ||
keySecretKey: auth.json | ||
replicas: 1 | ||
resources: | ||
limits: | ||
cpu: "0.2" | ||
memory: 1.1G | ||
requests: | ||
cpu: "0.1" | ||
memory: 1G | ||
secretsMap: | ||
pubsubCredential: | ||
key: GCP_KEY | ||
path: gcp-account | ||
sourceConfig: | ||
pubsubProjectId: sncloud-dev-pengcheng | ||
pubsubTopicId: test-input | ||
tenant: public | ||
--- | ||
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: | ||
GCP_KEY: GCP_KEY_DATA | ||
kind: Secret | ||
metadata: | ||
name: gcp-account | ||
namespace: default | ||
type: Opaque |
52 changes: 52 additions & 0 deletions
52
.ci/tests/integration-oauth2/cases/google-pubsub-source/verify.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
#!/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 | ||
|
||
kubectl apply -f "${BASE_DIR}"/.ci/tests/integration-oauth2/cases/google-pubsub-source/manifests.yaml > /dev/null 2>&1 | ||
|
||
verify_fm_result=$(ci::verify_function_mesh pubsub-source 2>&1) | ||
if [ $? -ne 0 ]; then | ||
echo "$verify_fm_result" | ||
kubectl delete -f "${BASE_DIR}"/.ci/tests/integration-oauth2/cases/google-pubsub-source/manifests.yaml > /dev/null 2>&1 || true | ||
exit 1 | ||
fi | ||
|
||
verify_pod_log_result=$(NAMESPACE=${PULSAR_NAMESPACE} ci::verify_pod_log pubsub-source-source-0 "listening for messages on projects/sncloud-dev-pengcheng/subscriptions/test-input" 2>&1) | ||
if [ $? -ne 0 ]; then | ||
echo "$verify_pod_log_result" | ||
kubectl delete -f "${BASE_DIR}"/.ci/tests/integration-oauth2/cases/google-pubsub-source/manifests.yaml > /dev/null 2>&1 || true | ||
exit 1 | ||
fi | ||
|
||
echo "e2e-test: ok" | yq eval - | ||
kubectl delete -f "${BASE_DIR}"/.ci/tests/integration-oauth2/cases/google-pubsub-source/manifests.yaml > /dev/null 2>&1 || true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters