-
Notifications
You must be signed in to change notification settings - Fork 74
Manual verification - Trace GCP Source -> GCP Broker -> Cloud Run Service #1147
Comments
Helper scripts to setup and tear down auth: #!/bin/bash
set -e -u
export GSA_PROJECT=fill_me_in
export PROJECT=fill_me_in
export CLUSTER_NAME=fill_me_in
function secrets() {
type=$1
secret_name=$2
gcloud iam service-accounts create "${CLUSTER_NAME}-$type" --project $GSA_PROJECT
gcloud iam service-accounts keys create $type.json --project $GSA_PROJECT \
--iam-account="${CLUSTER_NAME}-$type@$GSA_PROJECT.iam.gserviceaccount.com"
kubectl --namespace cloud-run-events create secret generic $secret_name --from-file=key.json=$type.json
rm -f "$type.json"
}
secrets "control" "google-cloud-key"
secrets "broker" "google-cloud-broker-key"
secrets "sources" "google-cloud-sources-key"
function iamPolicy() {
type=$1
shift 1
roles=("$@")
member="serviceAccount:${CLUSTER_NAME}-$type@$GSA_PROJECT.iam.gserviceaccount.com"
for role in "${roles[@]}"; do
gcloud projects add-iam-policy-binding $PROJECT \
--role "roles/$role" \
--member="$member"
done
}
iamPolicy "control" \
"logging.admin" \
"pubsub.editor" \
"cloudscheduler.admin" \
"storage.admin"
iamPolicy "broker" \
"pubsub.editor"
iamPolicy "sources" \
"pubsub.editor" \
"cloudtrace.agent" Clean up #!/bin/bash
set -u
export GSA_PROJECT=fill_me_in
export PROJECT=fill_me_in
export CLUSTER_NAME=fill_me_in
function deleteSecrets() {
type=$1
secret_name=$2
gcloud iam service-accounts delete "${CLUSTER_NAME}-$type@$GSA_PROJECT.iam.gserviceaccount.com" --project $GSA_PROJECT --quiet
kubectl --namespace cloud-run-events delete secret $secret_name
}
deleteSecrets "control" "google-cloud-key"
deleteSecrets "broker" "google-cloud-broker-key"
deleteSecrets "sources" "google-cloud-sources-key"
function deleteIamPolicy() {
type=$1
shift 1
roles=("$@")
member="serviceAccount:${CLUSTER_NAME}-$type@$GSA_PROJECT.iam.gserviceaccount.com"
for role in "${roles[@]}"; do
gcloud projects remove-iam-policy-binding $PROJECT \
--role "roles/$role" \
--member="$member" \
--quiet
done
}
deleteIamPolicy "control" \
"logging.admin" \
"pubsub.editor" \
"cloudscheduler.admin" \
"storage.admin"
deleteIamPolicy "broker" \
"pubsub.editor"
deleteIamPolicy "sources" \
"pubsub.editor" \
"cloudtrace.agent" |
Moving secrets: kubectl --namespace cloud-run-events get secret google-cloud-sources-key -o yaml | \
sed -e 's/^.*namespace: cloud-run-events.*$//g' \
-e 's/name: google-cloud-sources-key/name: google-cloud-key/g' | \
kubectl --namespace default apply -f - |
From what I can see in the serving code, serving uses B3 headers. https://github.com/knative/serving/blob/a77fe5e1b0850202f8f28a82c862a252e2999659/pkg/activator/handler/handler.go#L58 creates an
Whereas the trigger is sending |
@Harwayne: Closing this issue. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Exit Criteria
Manual verification that a complete Trace GCP Source -> GCP Broker -> Cloud Run Service is visible in StackDriver.
The text was updated successfully, but these errors were encountered: