This file contains hidden or 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
$ go run src/grpc_client.go --host xds:///be-srv | |
2022/06/04 08:04:55 INFO: [core] [Channel #1] Channel created | |
2022/06/04 08:04:55 INFO: [core] [Channel #1] original dial target is: "xds:///be-srv" | |
2022/06/04 08:04:55 INFO: [core] [Channel #1] parsed dial target is: {Scheme:xds Authority: Endpoint:be-srv URL:{Scheme:xds Opaque: User: Host: Path:/be-srv RawPath: ForceQuery:false RawQuery: Fragment: RawFragment:}} | |
2022/06/04 08:04:55 INFO: [core] [Channel #1] Channel authority set to "be-srv" | |
2022/06/04 08:04:55 INFO: [xds] [xds-resolver 0xc0003a0cc0] Creating resolver for target: {Scheme:xds Authority: Endpoint:be-srv URL:{Scheme:xds Opaque: User: Host: Path:/be-srv RawPath: ForceQuery:false RawQuery: Fragment: RawFragment:}} | |
2022/06/04 08:04:55 INFO: [xds] [xds-bootstrap] Bootstrap content: { | |
"xds_servers": [ | |
{ |
This file contains hidden or 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
admin: | |
access_log_path: /dev/null | |
address: | |
socket_address: | |
address: 127.0.0.1 | |
port_value: 9000 | |
node: | |
cluster: service_greeter | |
id: test-id | |
static_resources: |
This file contains hidden or 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
admin: | |
access_log_path: /dev/null | |
address: | |
socket_address: | |
address: 127.0.0.1 | |
port_value: 19000 | |
node: | |
cluster: service_greeter | |
id: test-id | |
static_resources: |
This file contains hidden or 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
package main | |
import ( | |
"bytes" | |
"flag" | |
"fmt" | |
"io" | |
"google.golang.org/protobuf/encoding/protojson" |
This file contains hidden or 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
package main | |
import ( | |
"fmt" | |
"time" | |
"flag" | |
"cloud.google.com/go/pubsub" | |
"golang.org/x/net/context" |
This file contains hidden or 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
package main | |
import ( | |
"encoding/json" | |
"flag" | |
"fmt" | |
"golang.org/x/net/context" | |
"google.golang.org/api/policyanalyzer/v1" | |
) |
This file contains hidden or 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
package main | |
/* | |
see https://blog.salrashid.dev/articles/2022/search_group_membership/ | |
*/ | |
import ( |
This file contains hidden or 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
package main | |
/* | |
see https://blog.salrashid.dev/articles/2022/search_group_membership/ | |
*/ | |
import ( |
This file contains hidden or 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
export PROJECT_ID=`gcloud config get-value core/project` | |
export PROJECT_NUMBER=`gcloud projects describe $PROJECT_ID --format='value(projectNumber)'` | |
gcloud iam service-accounts create ocsp-svc | |
gcloud container clusters create cluster-1 --workload-pool=$PROJECT_ID.svc.id.goog | |
kubectl create namespace ns1 | |
kubectl create serviceaccount --namespace ns1 ksa-1 | |
gcloud iam service-accounts add-iam-policy-binding \ |
This file contains hidden or 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
import os | |
import json | |
import time | |
from google.auth import impersonated_credentials | |
from google.auth.transport.requests import AuthorizedSession, Request | |
import google.oauth2.credentials | |
from google.cloud import iam_credentials_v1 | |
# export GCLOUD_USER=`gcloud config get-value core/account` |