Skip to content

Commit e647f78

Browse files
authored
docs: fix newlines and tabs (#923)
1 parent b521530 commit e647f78

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

docs/parse.go

+5-2
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ package docs
33
import (
44
"bytes"
55
"fmt"
6+
"regexp"
67

78
extv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1"
89
"k8s.io/apimachinery/pkg/util/yaml"
@@ -68,10 +69,12 @@ func Flatten(key string, src extv1.JSONSchemaProps) (map[string]*Object, error)
6869
return objects, nil
6970
}
7071

72+
var reWS = regexp.MustCompile(`(?:[\s\n\t]|\\t|\\n)+`)
73+
7174
func flatten(key string, src extv1.JSONSchemaProps, objects map[string]*Object) error {
7275
obj := &Object{
7376
ID: key,
74-
Description: src.Description,
77+
Description: reWS.ReplaceAllString(src.Description, " "),
7578
Properties: make(map[string]*Property),
7679
}
7780

@@ -119,7 +122,7 @@ func flatten(key string, src extv1.JSONSchemaProps, objects map[string]*Object)
119122
return fmt.Errorf("%s: %w", key, err)
120123
}
121124
val.ID = key
122-
val.Description = prop.Description
125+
val.Description = reWS.ReplaceAllString(prop.Description, " ")
123126
obj.Properties[key] = val
124127
}
125128

reference.md

+3-6
Original file line numberDiff line numberDiff line change
@@ -200,8 +200,7 @@ PomeriumSpec defines Pomerium-specific configuration parameters.
200200
</p>
201201
<p>
202202
<strong>Required.</strong>&#160;
203-
Secrets references a Secret with Pomerium bootstrap parameters.
204-
<p> <ul> <li><a href="https://pomerium.com/docs/reference/shared-secret"><code>shared_secret</code></a> - secures inter-Pomerium service communications. </li> <li><a href="https://pomerium.com/docs/reference/cookie-secret"><code>cookie_secret</code></a> - encrypts Pomerium session browser cookie. See also other <a href="#cookie">Cookie</a> parameters. </li> <li><a href="https://pomerium.com/docs/reference/signing-key"><code>signing_key</code></a> signs Pomerium JWT assertion header. See <a href="https://www.pomerium.com/docs/topics/getting-users-identity">Getting the user's identity</a> guide. </li> </ul> </p> <p> In a default Pomerium installation manifest, they would be generated via a <a href="https://github.com/pomerium/ingress-controller/blob/main/config/gen_secrets/job.yaml">one-time job</a> and stored in a <code>pomerium/bootstrap</code> Secret. You may re-run the job to rotate the secrets, or update the Secret values manually. </p>
203+
Secrets references a Secret with Pomerium bootstrap parameters. <p> <ul> <li><a href="https://pomerium.com/docs/reference/shared-secret"><code>shared_secret</code></a> - secures inter-Pomerium service communications. </li> <li><a href="https://pomerium.com/docs/reference/cookie-secret"><code>cookie_secret</code></a> - encrypts Pomerium session browser cookie. See also other <a href="#cookie">Cookie</a> parameters. </li> <li><a href="https://pomerium.com/docs/reference/signing-key"><code>signing_key</code></a> signs Pomerium JWT assertion header. See <a href="https://www.pomerium.com/docs/topics/getting-users-identity">Getting the user's identity</a> guide. </li> </ul> </p> <p> In a default Pomerium installation manifest, they would be generated via a <a href="https://github.com/pomerium/ingress-controller/blob/main/config/gen_secrets/job.yaml">one-time job</a> and stored in a <code>pomerium/bootstrap</code> Secret. You may re-run the job to rotate the secrets, or update the Secret values manually. </p>
205204
</p>
206205

207206
Format: reference to Kubernetes resource with namespace prefix: <code>namespace/name</code> format.
@@ -299,8 +298,7 @@ Authenticate sets authenticate service parameters. If not specified, a Pomerium-
299298
</p>
300299
<p>
301300

302-
CallbackPath sets the path at which the authenticate service receives callback responses from your identity provider. The value must exactly match one of the authorized redirect URIs for the OAuth 2.0 client.
303-
<p>This value is referred to as the redirect_url in the OpenIDConnect and OAuth2 specs.</p> <p>Defaults to <code>/oauth2/callback</code></p>
301+
CallbackPath sets the path at which the authenticate service receives callback responses from your identity provider. The value must exactly match one of the authorized redirect URIs for the OAuth 2.0 client. <p>This value is referred to as the redirect_url in the OpenIDConnect and OAuth2 specs.</p> <p>Defaults to <code>/oauth2/callback</code></p>
304302
</p>
305303

306304
</td>
@@ -317,8 +315,7 @@ Authenticate sets authenticate service parameters. If not specified, a Pomerium-
317315
</p>
318316
<p>
319317
<strong>Required.</strong>&#160;
320-
AuthenticateURL is a dedicated domain URL the non-authenticated persons would be referred to.
321-
<p><ul> <li>You do not need to create a dedicated <code>Ingress</code> for this virtual route, as it is handled by Pomerium internally. </li> <li>You do need create a secret with corresponding TLS certificate for this route and reference it via <a href="#prop-certificates"><code>certificates</code></a>. If you use <code>cert-manager</code> with <code>HTTP01</code> challenge, you may use <code>pomerium</code> <code>ingressClass</code> to solve it.</li> </ul></p>
318+
AuthenticateURL is a dedicated domain URL the non-authenticated persons would be referred to. <p><ul> <li>You do not need to create a dedicated <code>Ingress</code> for this virtual route, as it is handled by Pomerium internally. </li> <li>You do need create a secret with corresponding TLS certificate for this route and reference it via <a href="#prop-certificates"><code>certificates</code></a>. If you use <code>cert-manager</code> with <code>HTTP01</code> challenge, you may use <code>pomerium</code> <code>ingressClass</code> to solve it.</li> </ul></p>
322319
</p>
323320

324321
Format: an URI as parsed by Golang net/url.ParseRequestURI.

0 commit comments

Comments
 (0)