Skip to content

Commit

Permalink
Remove unneeded cat calls from our docs (#9837)
Browse files Browse the repository at this point in the history
* remove unneeded cat calls from our docs

* add skipCI to changelog for kube regresssion

* try it without a space?
  • Loading branch information
jbohanon authored Jul 30, 2024
1 parent 08c9242 commit cc31de1
Show file tree
Hide file tree
Showing 16 changed files with 39 additions and 33 deletions.
6 changes: 6 additions & 0 deletions changelog/v1.18.0-beta12/remove-unneeded-cat.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
changelog:
- type: NON_USER_FACING
description: >-
Remove unneeded cat calls from our docs
skipCI-kube-tests:true
8 changes: 4 additions & 4 deletions docs/content/guides/dev/example-proxy-controller.txt
Original file line number Diff line number Diff line change
Expand Up @@ -892,7 +892,7 @@ the configmap you'll need:


```bash
cat << EOF | kubectl apply -f -
kubectl apply -f - << EOF
apiVersion: v1
kind: ConfigMap
metadata:
Expand Down Expand Up @@ -957,7 +957,7 @@ if you're using a Kubernetes Cluster without an external load balancer (e.g. min
Run the following command to create the service:

```bash
cat << EOF | kubectl apply -f -
kubectl apply -f - << EOF
apiVersion: v1
kind: Service
metadata:
Expand All @@ -980,7 +980,7 @@ EOF
Finally we'll want to create the deployment itself which will launch a pod with Envoy running inside.

```bash
cat << EOF | kubectl apply -f -
kubectl apply -f - << EOF
apiVersion: apps/v1
kind: Deployment
metadata:
Expand Down Expand Up @@ -1150,4 +1150,4 @@ returns
[{"id":1,"name":"Dog","status":"available"},{"id":2,"name":"Cat","status":"pending"}]
```

Nice. You've configured Gloo Gateway to proactively create routes to discovered consul services!
Nice. You've configured Gloo Gateway to proactively create routes to discovered consul services!
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ Note that this example uses _local execution_, which means the Envoy server exec

5. Update the `default` virtual service that you previously created to route traffic to `/graphql` to the new `bookinfo-graphql` GraphQL API.
{{< highlight yaml "hl_lines=12-16" >}}
cat << EOF | kubectl apply -f -
kubectl apply -f - << EOF
apiVersion: gateway.solo.io/v1
kind: VirtualService
metadata:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ In the previous section, you used local execution to resolve GraphQL queries to

4. Update the `default` virtual service that you previously created to route traffic to `/graphql` to the new `default-todos-80` GraphQL API.
{{< highlight yaml "hl_lines=12-16" >}}
cat << EOF | kubectl apply -f -
kubectl apply -f - << EOF
apiVersion: gateway.solo.io/v1
kind: VirtualService
metadata:
Expand Down Expand Up @@ -108,4 +108,4 @@ EOF
curl -X POST -d '{"query":"{todoList{id,text,done}}"}' "$(glooctl proxy url)/graphql"
```

**Up next**: [Protect the GraphQL API that you created in the previous sections by using an API key.]({{% versioned_link_path fromRoot="/guides/graphql/getting_started/secure_api" %}})
**Up next**: [Protect the GraphQL API that you created in the previous sections by using an API key.]({{% versioned_link_path fromRoot="/guides/graphql/getting_started/secure_api" %}})
4 changes: 2 additions & 2 deletions docs/content/guides/graphql/getting_started/secure_api.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Protect the GraphQL API that you created in the previous sections by using an AP
4. Update the `default` virtual service that you previously created to reference the `apikey-auth` AuthConfig.
{{< highlight yaml "hl_lines=17-21" >}}
cat << EOF | kubectl apply -f -
kubectl apply -f - << EOF
apiVersion: gateway.solo.io/v1
kind: VirtualService
metadata:
Expand Down Expand Up @@ -83,4 +83,4 @@ Now that you've tried out GraphQL with Gloo Gateway, check out the following pag
* [Manually configure resolvers and schema for your GraphQL API]({{% versioned_link_path fromRoot="/guides/graphql/resolver_config/" %}})
* [Stitch GraphQL schemas]({{% versioned_link_path fromRoot="/guides/graphql/stitching/" %}})
* [Monitor your GraphQL services]({{% versioned_link_path fromRoot="/guides/graphql/observability/" %}})
* [Gloo Gateway API reference for GraphQL]({{% versioned_link_path fromRoot="/reference/api/github.com/solo-io/gloo/projects/gloo/api/v1/enterprise/options/graphql/v1beta1/graphql.proto.sk/" %}})
* [Gloo Gateway API reference for GraphQL]({{% versioned_link_path fromRoot="/reference/api/github.com/solo-io/gloo/projects/gloo/api/v1/enterprise/options/graphql/v1beta1/graphql.proto.sk/" %}})
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ Explore basic GraphQL service discovery with the Pet Store sample application.
5. Create a virtual service that defines a `Route` with a `graphqlApiRef` as the destination. In this example, all traffic to `/graphql` is handled by the GraphQL server in the Envoy proxy.
{{< highlight yaml "hl_lines=12-16" >}}
cat << EOF | kubectl apply -f -
kubectl apply -f - << EOF
apiVersion: gateway.solo.io/v1
kind: VirtualService
metadata:
Expand Down
4 changes: 2 additions & 2 deletions docs/content/guides/graphql/resolver_config.md
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ After you automatically or manually create your GraphQL resolver and schema, cre

In this example, all traffic to `/graphql` is handled by the GraphQL server, which uses the `default-petstore-8080` GraphQL API.
{{< highlight yaml "hl_lines=12-16" >}}
cat << EOF | kubectl apply -f -
kubectl apply -f - << EOF
apiVersion: gateway.solo.io/v1
kind: VirtualService
metadata:
Expand All @@ -240,4 +240,4 @@ EOF

## Reference

For more information, see the [Gloo Gateway API reference for GraphQL]({{% versioned_link_path fromRoot="/reference/api/github.com/solo-io/gloo/projects/gloo/api/v1/enterprise/options/graphql/v1beta1/graphql.proto.sk/" %}}).
For more information, see the [Gloo Gateway API reference for GraphQL]({{% versioned_link_path fromRoot="/reference/api/github.com/solo-io/gloo/projects/gloo/api/v1/enterprise/options/graphql/v1beta1/graphql.proto.sk/" %}}).
14 changes: 7 additions & 7 deletions docs/content/guides/integrations/cert_manager/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ For development and testing environments, you can use an AWS key pair to grant c
```
3. Create a cluster issuer for the Let's Encrypt CA with Route 53 that refers to secret.
```shell
cat << EOF | kubectl apply -f -
kubectl apply -f - << EOF
apiVersion: cert-manager.io/v1
kind: ClusterIssuer
metadata:
Expand Down Expand Up @@ -211,7 +211,7 @@ Now that the AWS access is configured, you can configure the Gloo Gateway resour
```
2. Create the certificate for the Gloo Gateway ingress traffic along your host domain, such as `test-123456789.solo.io`.
```shell
cat << EOF | kubectl apply -f -
kubectl apply -f - << EOF
apiVersion: cert-manager.io/v1
kind: Certificate
metadata:
Expand All @@ -234,7 +234,7 @@ Now that the AWS access is configured, you can configure the Gloo Gateway resour
```
4. Configure Gloo Gateway's default VirtualService to refer to the TLS secret and to route the pet clinic sample app to the host domain.
```shell
cat <<EOF | kubectl create -f -
kubectl create -f - << EOF
apiVersion: gateway.solo.io/v1
kind: VirtualService
metadata:
Expand Down Expand Up @@ -278,7 +278,7 @@ These steps are specific for Gloo Gateway running in gateway mode. When running
* Sets the ingress service type to `ClusterIP`. By default, cert-manager creates a NodePort service that an Ingress resource routes to. However, because you run Gloo Gateway in gateway mode, incoming traffic is routed through a VirtualService instead. Therefore, you do not need a NodePort and can set the service type to ClusterIP.
* Sets the `dnsName` to be a [nip.io](https://nip.io/) subdomain with the IP address of the externally facing LoadBalancer IP address. The inline command uses `glooctl proxy address` to get the externally facing IP address of the proxy. Then, you append the `nip.io` domain, which results in a domain that looks something like: `34.71.xx.xx.nip.io`.
```shell
cat << EOF | kubectl apply -f -
kubectl apply -f - << EOF
apiVersion: cert-manager.io/v1
kind: ClusterIssuer
metadata:
Expand All @@ -302,7 +302,7 @@ These steps are specific for Gloo Gateway running in gateway mode. When running
2. Create the `Certificate` that uses the `ClusterIssuer`. Behind the scenes, cert-manager creates the relevant `CertificateRequest` and `Order` resources. To satisfy the order, cert-manager spins up a pod and service that present the correct token.
```shell
cat << EOF | kubectl apply -f -
kubectl apply -f - << EOF
apiVersion: cert-manager.io/v1
kind: Certificate
metadata:
Expand Down Expand Up @@ -356,7 +356,7 @@ Now that the pod to serve the token is created, you must configure Gloo Gateway
4. Create a VirtualService to route to the cert-manager token pod at the expected well known path. Note that the domain matches the [nip.io](https://nip.io/) domain and routes requests for the path that Let's Encrypt expects, `/.well-known/acme-challenge/<TOKEN>` to the Upstream.
```shell
cat << EOF | kubectl apply -f -
kubectl apply -f - << EOF
apiVersion: gateway.solo.io/v1
kind: VirtualService
metadata:
Expand Down Expand Up @@ -395,7 +395,7 @@ Now that the server can reach the cert-manager token pod, the HTTP-01 challenge
```
3. Configure the VirtualService to use the newly created TLS secret and to route to the pet store sample app.
```shell
cat << EOF | kubectl apply -f -
kubectl apply -f - << EOF
apiVersion: gateway.solo.io/v1
kind: VirtualService
metadata:
Expand Down
4 changes: 2 additions & 2 deletions docs/content/guides/integrations/ingress/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ great way to get a cluster up quickly.
3. Let's create a Kubernetes Ingress object to route requests to the petstore:
```yaml
cat <<EOF | kubectl apply --filename -
kubectl apply --filename - << EOF
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
Expand Down Expand Up @@ -146,7 +146,7 @@ example using `gloo.system.com` domain.
1. If you want to add server-side TLS to your Ingress, you can add it as shown below. Note that it is important that the hostnames match in both the `tls` section and in the `rules` that you want to be covered by TLS.
{{< highlight yaml "hl_lines=9-12 14" >}}
cat <<EOF | kubectl apply --filename -
kubectl apply --filename - << EOF
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
Expand Down
10 changes: 5 additions & 5 deletions docs/content/guides/security/csrf/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ This example was created and tested using a GKE cluster running k8s v1.16.15, bu
{{< /notice >}}

```shell
cat <<EOF | kubectl apply -f -
kubectl apply -f - << EOF
apiVersion: v1
kind: ServiceAccount
metadata:
Expand Down Expand Up @@ -96,7 +96,7 @@ Gloo Gateway discovers Kubernetes services automatically. So, running the `gloo
Create the following Gloo Gateway `VirtualService` that will route all its requests to the new `Upstream`.

```shell
cat <<EOF | kubectl apply -f -
kubectl apply -f - << EOF
apiVersion: gateway.solo.io/v1
kind: VirtualService
metadata:
Expand Down Expand Up @@ -210,7 +210,7 @@ The CSRF filter configuration supports both policy shadowing and policy enforcem
In this section, we will modify our `VirtualService` to apply the filter to all requests and report evaluation results using the Envoy metrics. Note that we have added a `shadowEnabled` policy that evaluates 100% of the traffic and reports -- but does not block -- violations.

```shell
cat <<EOF | kubectl apply -f -
kubectl apply -f - << EOF
apiVersion: gateway.solo.io/v1
kind: VirtualService
metadata:
Expand Down Expand Up @@ -256,7 +256,7 @@ Note that CSRF policies may be scoped at different levels of the Gloo Gateway hi
Next we enable CSRF policy enforcement for our `VirtualService`. This requires only a single-line change to our policy from `shadowEnabled` to `filterEnabled`.

```shell
cat <<EOF | kubectl apply -f -
kubectl apply -f - << EOF
apiVersion: gateway.solo.io/v1
kind: VirtualService
metadata:
Expand Down Expand Up @@ -373,7 +373,7 @@ http.http.csrf.request_valid: 2
The `origin` header and target host require a precise match by default. However, you may configure `additionalOrigins` as a filter option to allow alternative request sources. For example, in our case assume we want to allow requests that originate from any derivative of example.com. We could modify our `VirtualService` to supply a single `additionalOrigins` entry as follows.

```shell
cat <<EOF | kubectl apply -f -
kubectl apply -f - << EOF
apiVersion: gateway.solo.io/v1
kind: VirtualService
metadata:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ You can use a clustered Redis instance as the backing storage database for the G
```
2. Create a secret with your Redis credentials in the same namespace as your Gloo Gateway installation, such as `gloo-system`. Make sure to encode your credentials in base64. For more information, see the [Redis security docs](https://redis.io/docs/management/security/acl/).
```yaml
cat << EOF | kubectl apply -f -
kubectl apply -f - << EOF
apiVersion: v1
kind: Secret
metadata:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ func App() error {
The following command will create our DaemonSet and a matching Service.

```yaml
cat << EOF | kubectl apply -f -
kubectl apply -f - << EOF
apiVersion: apps/v1
kind: DaemonSet
metadata:
Expand Down
2 changes: 1 addition & 1 deletion docs/content/installation/enterprise/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ For OpenShift clusters, make sure to include the `--values values.yaml` option t
If you followed the cluster setup instructions for Kind <a href="{{< versioned_link_path fromRoot="/installation/platform_configuration/cluster_setup/#kind" >}}">here</a>, then you should have exposed custom ports 31500 (for http) and 32500 (https) from your cluster's Docker container to its host machine. The purpose of this is to make it easier to access your service endpoints from your host workstation. Use the following custom installation for Gloo Gateway to publish those same ports from the proxy as well.

```bash
cat <<EOF | glooctl install gateway enterprise --license-key YOUR_LICENSE_KEY --values -
glooctl install gateway enterprise --license-key YOUR_LICENSE_KEY --values - << EOF
gloo:
gatewayProxies:
gatewayProxy:
Expand Down
2 changes: 1 addition & 1 deletion docs/content/installation/gateway/kubernetes/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ glooctl install gateway
If you followed the cluster setup instructions for Kind <a href="{{< versioned_link_path fromRoot="/installation/platform_configuration/cluster_setup/#kind" >}}">here</a>, then you should have exposed custom ports 31500 (for http) and 32500 (https) from your cluster's Docker container to its host machine. The purpose of this is to make it easier to access your service endpoints from your host workstation. Use the following custom installation for Gloo Gateway to publish those same ports from the proxy as well.

```bash
cat <<EOF | glooctl install gateway --values -
glooctl install gateway --values - << EOF
gatewayProxies:
gatewayProxy:
service:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ Kind is ideal for getting started with Gloo Gateway on your personal workstation
We advise customizing kind cluster creation slightly to make it easier to access your services from your host workstation. Since services deployed in kind are inside a Docker container, you cannot easily access them. It is more convenient if you expose ports from inside the container to your host machine.

```bash
cat <<EOF | kind create cluster --name kind --image kindest/node:v1.25.3 --config=-
kind create cluster --name kind --image kindest/node:v1.25.3 --config=- << EOF
kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
nodes:
Expand Down
4 changes: 2 additions & 2 deletions docs/content/installation/preparation.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ You must provide the license key during the installation process.
* **Provide license key in a secret**: You can specify your license key by creating a secret before you install Gloo Gateway.
1. Create a secret with your license key in the `gloo-system` namespace of your cluster.
```yaml
cat << EOF | kubectl apply -n gloo-system -f -
kubectl apply -n gloo-system -f - << EOF
apiVersion: v1
kind: Secret
type: Opaque
Expand Down Expand Up @@ -82,4 +82,4 @@ The most common starting point is to [install Gloo Gateway]({{% versioned_link_p
- Need to install the Gloo Gateway? Start [here]({{% versioned_link_path fromRoot="/installation/" %}}).
- Want to know more about Gloo Gateway Routing? Start [here]({{% versioned_link_path fromRoot="/introduction/traffic_management/" %}}).
- Concerned about security? Start [here]({{% versioned_link_path fromRoot="/guides/security/" %}}). (*Enterprise Gloo Gateway only*)
- Monitoring your thing? Start [here]({{% versioned_link_path fromRoot="/guides/observability/" %}}). (*Enterprise Gloo Gateway only*)
- Monitoring your thing? Start [here]({{% versioned_link_path fromRoot="/guides/observability/" %}}). (*Enterprise Gloo Gateway only*)

0 comments on commit cc31de1

Please sign in to comment.