### Datadog Pods Output Example Source: https://github.com/solo-io/gloo/blob/main/docs/content/guides/integrations/datadog/_index.md This is an example output showing the expected Datadog pods running after installation. It includes pods for the agent, cluster agent, and kube-state-metrics. ```console datadog-gloo-6d7wk 1/1 Running 0 3m1s datadog-gloo-cluster-agent-646f8f947d-sdm2z 1/1 Running 0 3m1s datadog-gloo-j227x 1/1 Running 0 3m1s datadog-gloo-kube-state-metrics-678b97d74f-w69jz 1/1 Running 0 3m1s datadog-gloo-prn8j 1/1 Running 0 3m1s ``` -------------------------------- ### Install Gloo Gateway with glooctl Source: https://github.com/solo-io/gloo/blob/main/docs/content/support/support-info.md Share the complete command used to install Gloo Gateway with `glooctl`. This example shows a typical enterprise installation command. ```shell glooctl install gateway enterprise --license-key --values foo,bar ``` -------------------------------- ### Example Output of kubectl get all Source: https://github.com/solo-io/gloo/blob/main/docs/content/installation/gateway/kubernetes/_index.md This is an example of the expected output when checking Gloo Gateway resources. It shows the status of pods, services, deployments, and replica sets. ```noop NAME READY STATUS RESTARTS AGE pod/discovery-f7548d984-slddk 1/1 Running 0 5m pod/gateway-proxy-9d79d48cd-wg8b8 1/1 Running 0 5m pod/gloo-5b7b748dbf-jdsvg 1/1 Running 0 5m NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE service/gateway-proxy LoadBalancer 10.97.232.107 80:30221/TCP,443:32340/TCP 5m service/gloo ClusterIP 10.100.64.166 9977/TCP,9988/TCP,9966/TCP 5m NAME READY UP-TO-DATE AVAILABLE AGE deployment.apps/discovery 1/1 1 1 5m deployment.apps/gateway-proxy 1/1 1 1 5m deployment.apps/gloo 1/1 1 1 5m NAME DESIRED CURRENT READY AGE replicaset.apps/discovery-f7548d984 1 1 1 5m replicaset.apps/gateway-proxy-9d79d48cd 1 1 1 5m replicaset.apps/gloo-5b7b748dbf 1 1 1 5m ``` -------------------------------- ### Install Petclinic Application Source: https://github.com/solo-io/gloo/blob/main/docs/content/guides/security/rate_limiting/simple/_index.md Installs the example petclinic application using kubectl. This is a prerequisite for testing rate limit configurations. ```shell kubectl apply \ --filename https://raw.githubusercontent.com/solo-io/gloo/v1.2.9/example/petclinic/petclinic.yaml ``` -------------------------------- ### Install Build Tools and Go Source: https://github.com/solo-io/gloo/blob/main/docs/content/guides/dev/setting-up-dev-environment.md Installs essential build tools and a specific version of Go required for Gloo Gateway development. Adapt the Go installation command based on your operating system. ```bash # install build tools # - macOS xcode-select --install # - other operating systems: # distro meta-packages, like "build-essential", should have what is required ############################################ # install version of go in go.mod ############################################ # - macOS: brew install go@1.24 # - other operating systems: # follow directions at https://go.dev/doc/install # install protoc make install-protoc # install go related tools make install-go-tools ``` -------------------------------- ### Install Istio Source: https://github.com/solo-io/gloo/blob/main/devel/architecture/istio-integration.md Installs Istio on the kind cluster. ```shell ./projects/gateway2/istio.sh ``` -------------------------------- ### Example Petstore App Output Source: https://github.com/solo-io/gloo/blob/main/docs/content/guides/traffic_management/listener_configuration/tap.md This is an example of the expected output when requesting all pets from the Petstore application. ```json [{"id":1,"name":"Dog","status":"available"},{"id":2,"name":"Cat","status":"pending"}] ``` -------------------------------- ### Install Dex using Helm Source: https://github.com/solo-io/gloo/blob/main/docs/content/guides/security/auth/extauth/oauth/dex/_index.md Install Dex into the 'gloo-system' namespace using the Helm chart and the custom values file. ```shell helm install dex --namespace gloo-system dex/dex -f dex-values.yaml ``` -------------------------------- ### Example Upstream Output Source: https://github.com/solo-io/gloo/blob/main/docs/content/guides/traffic_management/destination_types/grpc/simple-routing.md Shows an example of the upstream configuration with 'useHttp2: true' enabled. ```yaml ... services: - solo.examples.v1.StoreService useHttp2: true ``` -------------------------------- ### SDS Server Log Examples Source: https://github.com/solo-io/gloo/blob/main/docs/content/guides/security/tls/mtls/_index.md Example log output from the SDS server, indicating it is listening and updating configuration. ```text "caller":"server/server.go:57","msg":"sds server listening on 127.0.0.1:8234" "logger":"sds_server","caller":"server/server.go:97","msg":"Updating SDS config. Snapshot version is xxxx" ``` -------------------------------- ### Install Gloo Gateway with Helm (Defaults) Source: https://github.com/solo-io/gloo/blob/main/docs/content/installation/gateway/kubernetes/_index.md Installs Gloo Gateway using the Helm chart with all default configuration values. ```shell helm install gloo gloo/gloo --namespace my-namespace ``` -------------------------------- ### Setup Environment and Kind Cluster Source: https://github.com/solo-io/gloo/blob/main/devel/architecture/istio-integration.md Initializes the environment and builds/loads a kind cluster for testing. ```shell ci/kind/setup-kind.sh; make kind-build-and-load ``` -------------------------------- ### Example Gloo UI Pods Output Source: https://github.com/solo-io/gloo/blob/main/docs/content/guides/observability/ui/setup.md This is an example output of the `kubectl get pods -n gloo-system` command, showing the status of installed Gloo UI components. ```yaml NAME READY STATUS RESTARTS AGE extauth-f7695bf7f-f6dkt 1/1 Running 0 10m gloo-587b79d556-tpvfj 1/1 Running 0 10m gloo-mesh-ui-66db8d9584-kgjld 3/3 Running 0 72m gloo-telemetry-collector-68b8cf6f49-zhx87 1/1 Running 0 57m prometheus-server-7484d8bfd-tx5s4 2/2 Running 0 72m rate-limit-557dcb857f-9zq2t 1/1 Running 0 10m redis-5d6c6bcd4-cnmbm 1/1 Running 0 10m ``` -------------------------------- ### Setup Kind Cluster and Build Docker Images Source: https://github.com/solo-io/gloo/blob/main/projects/gateway2/README.md Run this script to create the local test environment in kind and build the necessary Docker images. ```shell ./ci/kind/setup-kind.sh ``` -------------------------------- ### Install CRDOC Tool Source: https://github.com/solo-io/gloo/blob/main/docs/content/crds/README.md Install the CRDOC tool locally to generate documentation. This is a prerequisite for running the generation script. ```bash make install-go-gools ``` -------------------------------- ### Serve Gloo Gateway Documentation Site Locally Source: https://github.com/solo-io/gloo/blob/main/docs/content/contributing/documentation/editing_locally.md Navigate to the 'docs' directory and run 'make serve-site' to build and serve the documentation. Environment variables are used to skip certain generation steps. ```bash cd docs export GITHUB_TOKEN=foo SKIP_CHANGELOG_GENERATION=true SKIP_SECURITY_SCAN=true SKIP_ENTERPRISE_DOCS_GENERATION=true HUGO_PARAMS_noSecurityScan=true make serve-site -B ``` -------------------------------- ### Set up Kind Cluster and Install Gloo Gateway Source: https://github.com/solo-io/gloo/blob/main/docs/content/guides/dev/setting-up-dev-environment.md Prepares a Kind cluster, builds images, and installs Gloo Gateway using Helm. This is for developers without a pre-existing Kubernetes cluster. ```bash # Prepare the kind cluster, build images, and upload them. make kind-setup # Install Gloo Gateway helm upgrade --install -n gloo-system --create-namespace gloo ./_test/gloo-1.0.1-dev.tgz --values ./test/kubernetes/e2e/tests/manifests/common-recommendations.yaml ############################################ # Make changes to the code in the Gloo Gateway repo. ############################################ # Update the Gloo Gateway installation in your cluster to apply your changes make -B kind-build-and-load-gloo ``` -------------------------------- ### Complete Main File Example Source: https://github.com/solo-io/gloo/blob/main/docs/content/guides/dev/example-proxy-controller.txt This is the complete `main` file for the Gloo Gateway proxy controller, integrating client initialization, upstream watching, and the event loop for proxy synchronization. ```go package main import ( "context" "log" "os" "time" "github.com/solo-io/gloo/projects/gloo/pkg/api/v1" "github.com/solo-io/k8s-utils/kubeutils" "github.com/solo-io/solo-kit/pkg/api/v1/clients" "github.com/solo-io/solo-kit/pkg/api/v1/clients/factory" "github.com/solo-io/solo-kit/pkg/api/v1/clients/kube" "github.com/solo-io/solo-kit/pkg/api/v1/resources/core" // import for GKE _ "k8s.io/client-go/plugin/pkg/client/auth/gcp" ) func main() { // root context for the whole thing ctx := context.Background() // initialize Gloo Gateway API clients, built on top of CRDs upstreamClient, proxyClient := initGlooClients(ctx) // start a watch on upstreams. we'll use this as our trigger // whenever upstreams are modified, we'll trigger our sync function upstreamWatch, watchErrors, initError := upstreamClient.Watch("gloo-system", clients.WatchOpts{Ctx: ctx}) must(initError) // our "event loop". an event occurs whenever the list of upstreams has been updated for { select { // if we error during watch, just exit case err := <-watchErrors: must(err) // process a new upstream list case newUpstreamList := <-upstreamWatch: resync(ctx, newUpstreamList, proxyClient) } } } func initGlooClients(ctx context.Context) (v1.UpstreamClient, v1.ProxyClient) { // root rest config restConfig, err := kubeutils.GetConfig( os.Getenv("KUBERNETES_MASTER_URL"), os.Getenv("KUBECONFIG")) must(err) // wrapper for kubernetes shared informer factory cache := kube.NewKubeCache(ctx) // initialize the CRD client for Gloo Gateway Upstreams upstreamClient, err := v1.NewUpstreamClient(ctx, &factory.KubeResourceClientFactory{ Crd: v1.UpstreamCrd, Cfg: restConfig, SharedCache: cache, }) must(err) // registering the client registers the type with the client cache err = upstreamClient.Register() must(err) // initialize the CRD client for Gloo Gateway Proxies proxyClient, err := v1.NewProxyClient(ctx, &factory.KubeResourceClientFactory{ Crd: v1.ProxyCrd, Cfg: restConfig, SharedCache: cache, }) must(err) // registering the client registers the type with the client cache err = proxyClient.Register() must(err) return upstreamClient, proxyClient } // we received a new list of upstreams! regenerate the desired proxy // and write it as a CRD to Kubernetes func resync(ctx context.Context, upstreams v1.UpstreamList, client v1.ProxyClient) { desiredProxy := makeDesiredProxy(upstreams) ``` -------------------------------- ### Deploy Sample Application Source: https://github.com/solo-io/gloo/blob/main/docs/content/guides/integrations/cert_manager/_index.md Apply the pet store sample application to test TLS configuration. ```shell kubectl apply -f https://raw.githubusercontent.com/solo-io/gloo/v1.14.x/example/petstore/petstore.yaml ``` -------------------------------- ### Get Usages in Namespace Source: https://github.com/solo-io/gloo/blob/main/docs/content/installation/advanced_configuration/multiple-gloo-installs.md Use this command to list all Upstreams within a specific namespace after installing a namespace-scoped Gloo Gateway. This helps verify that the installation is correctly scoped. ```bash kubectl get us -n gloo2 ``` -------------------------------- ### Install goversion CLI Source: https://github.com/solo-io/gloo/blob/main/docs/content/installation/advanced_configuration/fips.md Download and install the `goversion` CLI tool, which is used to inspect Go binaries for crypto library information. ```sh go install github.com/rsc/goversion@latest ``` -------------------------------- ### Helm Chart Values Overrides Example Source: https://github.com/solo-io/gloo/blob/main/docs/content/installation/gateway/kubernetes/_index.md Example YAML content for a values file to customize Gloo Gateway installation via Helm, disabling RBAC and configuring namespaces. ```yaml global: glooRbac: # do not create kubernetes rbac resources create: false settings: # configure gloo to write generated custom resources to a custom namespace writeNamespace: my-custom-namespace watchNamespaces: - default - my-custom-namespace gloo: gateway: # For multiple gateways: read Gateway config in all 'watchNamespaces', # not just the namespace that the gateway controller is deployed to readGatewaysFromAllNamespaces: true ``` -------------------------------- ### Start Vagrant VM for Nomad, Consul, Vault Source: https://github.com/solo-io/gloo/blob/main/docs/content/installation/gateway/nomad/_index.md Provisions and starts a virtual machine using Vagrant to run Nomad, Consul, and Vault. This command requires Vagrant to be installed. ```bash vagrant up ``` -------------------------------- ### Initial main.go for Proxy Controller Source: https://github.com/solo-io/gloo/blob/main/docs/content/guides/dev/example-proxy-controller.txt Sets up the main package, imports necessary libraries for Kubernetes interaction and Gloo, and defines a basic `main` function and a helper `must` function for error handling. ```go package main // all the import's we'll need for this controller import ( "context" "log" "os" "time" v1 "github.com/solo-io/gloo/projects/gloo/pkg/api/v1" matchers "github.com/solo-io/gloo/projects/gloo/pkg/api/v1/core/matchers" "github.com/solo-io/k8s-utils/kubeutils" "github.com/solo-io/solo-kit/pkg/api/v1/clients" "github.com/solo-io/solo-kit/pkg/api/v1/clients/factory" "github.com/solo-io/solo-kit/pkg/api/v1/clients/kube" core "github.com/solo-io/solo-kit/pkg/api/v1/resources/core" // import for GKE _ "k8s.io/client-go/plugin/pkg/client/auth/gcp" ) func main() {} // make our lives easy func must(err error) { if err != nil { panic(err) } } ``` -------------------------------- ### HTTP to gRPC Transcoding Example Source: https://github.com/solo-io/gloo/blob/main/docs/content/guides/traffic_management/destination_types/grpc/transcoding-reference.md Illustrates the transcoding of an HTTP GET request to a gRPC GetAuthor call. The example shows how a URL path parameter maps to a gRPC request field. ```bash curl -X GET http://{$DOMAIN_NAME}/authors/1 | GetAuthor(author: "1") ``` -------------------------------- ### Regenerate Descriptors for Bookstore Example Source: https://github.com/solo-io/gloo/blob/main/docs/examples/grpc-json-transcoding/bookstore/README.md This snippet shows the commands to clone the necessary protobuf and Google API repositories, set environment variables for their locations, and then generate the descriptors. This is a prerequisite for running the bookstore example. ```bash cd /tmp/ git clone https://github.com/protocolbuffers/protobuf git clone http://github.com/googleapis/googleapis export PROTOBUF_HOME=$PWD/protobuf/src export GOOGLE_PROTOS_HOME=$PWD/googleapis cd - go generate ``` -------------------------------- ### Install Ory Hydra with Development Settings Source: https://github.com/solo-io/gloo/blob/main/docs/content/guides/security/auth/extauth/oauth/access_token/_index.md Installs Ory Hydra using Helm, configured for a development environment with an in-memory database and HTTP enabled. This setup is for demonstration purposes only and not recommended for production. ```bash helm install \ --set 'hydra.config.secrets.system={$(LC_ALL=C tr -dc 'A-Za-z0-9' < /dev/urandom | base64 | head -c 32)}' \ --set 'hydra.config.dsn=memory' \ --set 'hydra.config.urls.self.issuer=http://public.hydra.localhost/' \ --set 'hydra.config.urls.login=http://example-idp.localhost/login' \ --set 'hydra.config.urls.consent=http://example-idp.localhost/consent' \ --set 'hydra.config.urls.logout=http://example-idp.localhost/logout' \ --set 'ingress.public.enabled=true' \ --set 'ingress.admin.enabled=true' \ --set 'hydra.dangerousForceHttp=true' \ --set 'hydra.dev=true' \ hydra-example \ ory/hydra --version 0.53.0 ``` -------------------------------- ### Run Tilt Source: https://github.com/solo-io/gloo/blob/main/devel/tilt/tilt.md Start the Tilt development environment. If issues arise, manually triggering an update on the problematic resource may resolve them. ```bash tilt up ``` -------------------------------- ### Get Gloo Gateway Version Source: https://github.com/solo-io/gloo/blob/main/docs/content/support/support-info.md Retrieve the installed Gloo Gateway version using the `glooctl` command. ```shell glooctl version -o yaml ``` -------------------------------- ### Tilt provider configuration example Source: https://github.com/solo-io/gloo/blob/main/devel/tilt/tilt.md Example configuration for a provider in `tilt-settings.yaml`. Specifies build commands, image details, live reload dependencies, and debugging options. ```yaml gloo: context: _output/projects/gloo image: quay.io/solo-io/gloo live_reload_deps: - projects/gloo label: gloo build_binary: make -B gloo binary_name: gloo-linux-arm64 dockerfile_contents: ... debug_port: 50100 port_forwards": - 50100 ``` -------------------------------- ### Multicluster Roles in Gloo System Source: https://github.com/solo-io/gloo/blob/main/docs/content/guides/gloo_federation/multicluster_rbac.md Example output showing the 'gloo-fed' and 'gloo-fed-console' MultiClusterRoles created by the installation. ```console NAME AGE gloo-fed 35m gloo-fed-console 35m ``` -------------------------------- ### Get Gloo Gateway Helm Values Source: https://github.com/solo-io/gloo/blob/main/docs/content/guides/integrations/service_mesh/istio.md Fetches the current Helm values for the Gloo Gateway installation to modify for Istio integration. ```sh helm get values gloo -n gloo-system -o yaml > gloo-gateway.yaml open gloo-gateway.yaml ``` -------------------------------- ### Run Gloo Federation Demo Source: https://github.com/solo-io/gloo/blob/main/docs/content/reference/cli/glooctl_demo_federation.md Bootstrap a multicluster demo with Gloo Federation. Requires glooctl, kubectl, docker, and kind to be installed. ```bash glooctl demo federation [flags] ``` -------------------------------- ### Example Hydra Pod Output Source: https://github.com/solo-io/gloo/blob/main/docs/content/guides/security/auth/extauth/oauth/access_token/_index.md Sample output from 'kubectl get pods' command, showing the status of the Ory Hydra pods. ```text NAME READY STATUS RESTARTS AGE hydra-example-58cd5bf699-9jgz5 1/1 Running 0 10m hydra-example-maester-75c985dd5b-s4b27 1/1 Running 0 10m ``` -------------------------------- ### Setup Kind Kubernetes Cluster Source: https://github.com/solo-io/gloo/blob/main/devel/testing/kube-e2e-tests.md Creates a Kind Kubernetes cluster for testing Gloo Gateway. ```bash # create kind K8s cluster make kind-setup ``` -------------------------------- ### Interactive Plugin Manager Initialization Source: https://github.com/solo-io/gloo/blob/main/docs/content/reference/cli/glooctl_init-plugin-manager.md Initializes the plugin manager in interactive mode, prompting the user for input. This is helpful for guided setup. ```bash glooctl init-plugin-manager -i ``` -------------------------------- ### GatewayParameters.spec.kube.istio.customSidecars[index].lifecycle.postStart.exec Source: https://github.com/solo-io/gloo/blob/main/docs/content/reference/api/github.com/solo-io/gloo/projects/gateway2/api/v1alpha1/gateway_parameters.md Defines the command to be executed as part of the post-start lifecycle hook. ```APIDOC ## GatewayParameters.spec.kube.istio.customSidecars[index].lifecycle.postStart.exec ### Description Executes a command within the sidecar container. ### Fields - **command** ([]string) - Required: false - Description: The command and arguments to execute. ``` -------------------------------- ### Get Gloo Proxy URL Source: https://github.com/solo-io/gloo/blob/main/docs/content/guides/dev/example-proxy-controller.txt Retrieves the HTTP endpoint of the Gloo proxy using the glooctl command-line tool. Ensure glooctl is installed. ```bash glooctl proxy url -n default --name my-cool-proxy ``` -------------------------------- ### HttpRule Query Parameter Mapping Example Source: https://github.com/solo-io/gloo/blob/main/docs/content/reference/api/github.com/solo-io/solo-kit/api/external/google/api/http.proto.sk.md Shows the resulting HTTP GET request with query parameters for fields not included in the path pattern. ```http GET /v1/messages/123456?revision=2&sub.subfield=foo ``` -------------------------------- ### Compute Timestamp from Python Current Time Source: https://github.com/solo-io/gloo/blob/main/docs/content/reference/api/github.com/solo-io/protoc-gen-ext/external/google/protobuf/timestamp.proto.sk.md This Python example shows how to get the current time and set it on a Timestamp object using the `GetCurrentTime()` method. ```python timestamp = Timestamp() timestamp.GetCurrentTime() ``` -------------------------------- ### Install and Apply Admin User Addons Source: https://github.com/solo-io/gloo/blob/main/docs/content/installation/platform_configuration/cluster_setup.md Installs default addons and applies the admin-user addon for Minishift. This is required for subsequent administrative tasks. ```bash minishift addons install --defaults minishift addons apply admin-user ``` -------------------------------- ### Virtual Service Table Output Source: https://github.com/solo-io/gloo/blob/main/docs/content/introduction/faq.md Example output from `glooctl get virtualservice`. An empty 'ROUTES' column indicates that the corresponding listeners on the gateway-proxy will not be active. ```noop +-----------------|--------------|---------|------|----------|-----------------|--------+ | VIRTUAL SERVICE | DISPLAY NAME | DOMAINS | SSL | STATUS | LISTENERPLUGINS | ROUTES | +-----------------|--------------|---------|------|----------|-----------------|--------+ | default | default | * | none | Accepted | | | +-----------------|--------------|---------|------|----------|-----------------|--------+ ``` -------------------------------- ### Send Request to Application Source: https://github.com/solo-io/gloo/blob/main/docs/content/guides/observability/tracing/envoy.md Initiate a request to your application using curl to generate traffic that can be traced. This example sends a GET request to the '/abc' path. ```shell curl localhost:31500/abc ``` -------------------------------- ### Get Gloo Edge Knative Ingress URL (Standard) Source: https://github.com/solo-io/gloo/blob/main/projects/clusteringress/README.md Retrieves the URL for the Gloo Edge Knative Ingress proxy for standard cluster setups. ```bash export INGRESS=$(glooctl proxy url --name clusteringress-proxy) echo $INGRESS ``` -------------------------------- ### Deploy Gloo Federation Demo Environment Source: https://github.com/solo-io/gloo/blob/main/docs/content/guides/gloo_federation/demo.md Use this command to set up a local demonstration environment for Gloo Gateway Federation. It deploys two Kind clusters, installs Gloo Gateway Enterprise and Federation, and registers the instances. ```bash glooctl demo federation --license-key ``` -------------------------------- ### gRPC Proto Definition with HTTP Mapping Source: https://github.com/solo-io/gloo/blob/main/docs/content/guides/traffic_management/destination_types/grpc/migration.txt Example of a gRPC proto definition for the GetShelf method, including an HTTP GET option for mapping to a specific route. ```protobuf rpc GetShelf(GetShelfRequest) returns (Shelf) { option (google.api.http) = { get: "/shelves/{shelf}" }; } ``` -------------------------------- ### Build and Deploy Sample Auth Service in Minikube Source: https://github.com/solo-io/gloo/blob/main/docs/content/guides/security/auth/custom_auth/_index.md Commands to build a Docker image for the sample auth service and redeploy its pod in a Minikube environment. This is useful for iterating on the server code locally. ```shell eval $(minikube docker-env) docker build -t quay.io/solo-io/sample-auth . kubectl --namespace gloo-system delete pod -l app=sample-auth ``` -------------------------------- ### Set Environment Variables for Gloo UI Setup Source: https://github.com/solo-io/gloo/blob/main/docs/content/guides/observability/ui/setup.md Before installing the Gloo UI, set your cluster name and Gloo Gateway license key as environment variables. ```sh export CLUSTER_NAME= export GLOO_GATEWAY_LICENSE_KEY= ``` -------------------------------- ### Initialize Go Module Source: https://github.com/solo-io/gloo/blob/main/docs/content/guides/dev/example-proxy-controller.txt Initializes a new Go module for your project. Replace `` with your desired module name. ```shell go mod init ``` -------------------------------- ### Test POST Request (after GET VS creation) Source: https://github.com/solo-io/gloo/blob/main/docs/content/guides/traffic_management/destination_selection/http_method_matching/_index.md Send a POST request after creating the GET Virtual Service. This request should now result in a 404 response because the POST method is no longer matched. ```shell curl -v -H "Host: foo" -XPOST $(glooctl proxy url)/posts ``` -------------------------------- ### HttpRule RPC to HTTP Mapping Example Source: https://github.com/solo-io/gloo/blob/main/docs/content/reference/api/github.com/solo-io/solo-kit/api/external/google/api/http.proto.sk.md Illustrates mapping an RPC method to an HTTP GET operation using a path template that references request message fields. ```go service Messaging { rpc GetMessage(GetMessageRequest) returns (Message) { option (google.api.http).get = "/v1/messages/{message_id}/{sub.subfield}"; } } message GetMessageRequest { message SubMessage { string subfield = 1; } string message_id = 1; // mapped to the URL SubMessage sub = 2; // `sub.subfield` is url-mapped } message Message { string text = 1; // content of the resource } ``` -------------------------------- ### Serve Gloo Gateway Docs Locally Source: https://github.com/solo-io/gloo/blob/main/docs/README.md Run this command to serve the Gloo Gateway documentation on a local test site. ```bash make serve-site ``` -------------------------------- ### Envoy Sidecar Connection Failure Log Source: https://github.com/solo-io/gloo/blob/main/docs/content/guides/security/tls/mtls/_index.md Example log message from an Envoy sidecar indicating a connection failure to the SDS server, which should resolve once the SDS server starts. ```text StreamSecrets gRPC config stream closed: 14, upstream connect error or disconnect/reset before headers. reset reason: connection failure ``` -------------------------------- ### Virtual Service Status Output Source: https://github.com/solo-io/gloo/blob/main/docs/content/guides/traffic_management/configuration_validation/invalid_route_replacement.md Example output of `kubectl get vs -n default partially-valid -o yaml`, showing a warning status due to an invalid route. ```yaml apiVersion: gateway.solo.io/v1 kind: VirtualService # ... status: reason: "warning: Route Warning: InvalidDestinationWarning. Reason: *v1.Upstream {kube-svc:anywhere-does-not-exist-1234 anywhere} not found" reportedBy: gateway state: 3 ``` -------------------------------- ### Install Gloo UI with Configuration Source: https://github.com/solo-io/gloo/blob/main/docs/content/guides/observability/ui/setup.md Deploy the Gloo UI and Gloo Platform components using Helm, providing necessary configurations via a values file or stdin. ```yaml helm upgrade -i gloo-platform gloo-platform/gloo-platform \ --namespace gloo-system \ --version={{< readfile file="static/content/version-platform.md" markdown="true">}} \ -f - <` and `` with your specific values. ```shell kubectl get applications.argoproj.io/ -n -o yaml ``` -------------------------------- ### Configure Istio Integration (Enterprise Edition) Source: https://github.com/solo-io/gloo/blob/main/docs/content/guides/integrations/service_mesh/istio.md YAML configuration for enabling Istio integration and auto-mTLS in Gloo Gateway for Enterprise Edition installations. Ensure `istioDiscoveryAddress` matches your Istio setup. ```yaml global: istioIntegration: enableAutoMtls: true enabled: true istioSDS: enabled: true gloo: gatewayProxies: gatewayProxy: istioDiscoveryAddress: istiod-1-21.istio-system.svc:15012 istioMetaClusterId: mycluster istioMetaMeshId: mycluster ``` -------------------------------- ### HttpRule with Query Parameters Example Source: https://github.com/solo-io/gloo/blob/main/docs/content/reference/api/github.com/solo-io/solo-kit/api/external/google/api/http.proto.sk.md Demonstrates how fields not bound by the path pattern automatically become optional HTTP query parameters. ```go service Messaging { rpc GetMessage(GetMessageRequest) returns (Message) { option (google.api.http).get = "/v1/messages/{message_id}"; } } message GetMessageRequest { message SubMessage { string subfield = 1; } string message_id = 1; // mapped to the URL int64 revision = 2; // becomes a parameter SubMessage sub = 3; // `sub.subfield` becomes a parameter } ``` -------------------------------- ### Get Allocated NodePort for Gateway Proxy Source: https://github.com/solo-io/gloo/blob/main/docs/content/installation/advanced_configuration/node_port.md After installation, use this kubectl command to inspect the gateway-proxy service and determine the allocated NodePort. This is useful for finding the exact port to access your Gloo Gateway. ```yaml apiVersion: v1 kind: Service metadata: labels: app: gloo gloo: gateway-proxy name: gateway-proxy namespace: gloo-system spec: clusterIP: 10.106.198.61 externalTrafficPolicy: Cluster ports: - name: http nodePort: 30348 port: 80 protocol: TCP targetPort: 8080 selector: gloo: gateway-proxy sessionAffinity: None type: NodePort status: loadBalancer: {} ``` -------------------------------- ### Example Access Logs from Custom File Source: https://github.com/solo-io/gloo/blob/main/docs/content/guides/security/access_logging/_index.md These are example log entries as they would appear in the custom log file when using the file sink configuration. ```json {"duration":"4","upstreamCluster":"default-petstore-8080_gloo-system","protocol":"HTTP/1.1","upstreamHost":"10.52.0.54:8080"} {"upstreamCluster":"default-petstore-8080_gloo-system","protocol":"HTTP/1.1","upstreamHost":"10.52.0.54:8080","duration":"1"} {"upstreamCluster":"default-petstore-8080_gloo-system","protocol":"HTTP/1.1","upstreamHost":"10.52.0.54:8080","duration":"1"} ``` -------------------------------- ### Add Route to TLS Server Source: https://github.com/solo-io/gloo/blob/main/docs/content/guides/security/tls/client_tls.md Configures a route in Gloo Gateway to direct traffic to the discovered TLS upstream. This example assumes a basic route setup similar to a 'hello world' tutorial. ```bash glooctl add route \ --path-exact /hello \ --dest-name default-example-tls-server-8080 ``` -------------------------------- ### List Plugins with Help Flag Source: https://github.com/solo-io/gloo/blob/main/docs/content/reference/cli/glooctl_plugin_list.md Display help information for the 'glooctl plugin list' command. ```bash glooctl plugin list -h, --help help for list ``` -------------------------------- ### Cluster Role and Role Binding for OPA Source: https://github.com/solo-io/gloo/blob/main/docs/content/guides/security/opa/_index.md Example YAML for a cluster role and cluster role binding to grant view-only permissions to Gloo Gateway resources for the OPA admission controller setup. ```yaml apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole metadata: name: gloo-view rules: - apiGroups: - gateway.solo.io resources: - virtualservices verbs: - get - list - watch --- kind: ClusterRoleBinding apiVersion: rbac.authorization.k8s.io/v1 metadata: name: opa-gloo-viewer roleRef: kind: ClusterRole name: gloo-view apiGroup: rbac.authorization.k8s.io subjects: - kind: Group name: system:serviceaccounts:opa apiGroup: rbac.authorization.k8s.io ``` -------------------------------- ### Get Argo CD Application Manifest (Argo CD CLI) Source: https://github.com/solo-io/gloo/blob/main/docs/content/support/support-info.md Retrieve the Argo CD application manifest for Gloo Gateway installation using the Argo CD CLI. Replace `` with your specific value. ```shell argocd app get -o yaml ``` -------------------------------- ### Initialize Plugin Manager Source: https://github.com/solo-io/gloo/blob/main/docs/content/reference/cli/glooctl_init-plugin-manager.md Installs the Gloo Gateway Enterprise CLI plugin manager. Use the `--force` flag to overwrite existing plugin data. ```bash glooctl init-plugin-manager [flags] ``` -------------------------------- ### Example Caching Service Log Entries Source: https://github.com/solo-io/gloo/blob/main/docs/content/guides/traffic_management/listener_configuration/caching/setup.md These log entries indicate that the Redis caching service has started and successfully created a connection pool for caching operations. They are useful for verifying the caching server's operational status. ```json {"level":"info","ts":"2022-08-02T20:47:30.057Z","caller":"radix/server.go:31","msg":"Starting our basic redis caching service","version":"1.12.0"} ``` ```json {"level":"info","ts":"2022-08-02T20:47:30.057Z","caller":"radix/server.go:35","msg":"Created redis pool for caching","version":"1.12.0"} ``` -------------------------------- ### Run Complete Gloo Gateway Demo Locally Source: https://github.com/solo-io/gloo/blob/main/docs/content/installation/gateway/nomad/_index.md Executes a script to set up a local demo environment for Gloo Gateway and the PetStore application. Requires Docker, Nomad, Consul, Vault, and Levant to be installed. ```bash ./demo-local.sh ``` -------------------------------- ### Run CI Install Script for Kind Cluster Source: https://github.com/solo-io/gloo/blob/main/test/kube2e/README.md Execute the CI script to set up a Kind cluster and deploy Gloo resources. Customize cluster name, node version, and Gloo image version as needed. Skip Docker image building if testing a released version. ```bash CLUSTER_NAME=solo-test-cluster CLUSTER_NODE_VERSION=v1.28.0 VERSION=v1.0.0-solo-test ci/kind/setup-kind.sh ```