Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs: updates first batch of reference settings #980

Merged
merged 33 commits into from
Dec 13, 2023

Conversation

ZPain8464
Copy link
Contributor

Related to #912

This PR updates a small batch of reference settings. Pages with only one setting set the toc_max_heading_level to 2, so ### Examples sections are included in the Core tab but aren't visible on the sidebar ToC. Pages with multiple settings (like AutoCert) change the Examples to an h4; h4s aren't visible in the sidebar ToC be default.

I wanted to get an opinion on this approach before applying it everywhere.

@ZPain8464 ZPain8464 added docs backport 0-23-0 Backports this PR to branch 0-23-0 labels Sep 12, 2023
@netlify
Copy link

netlify bot commented Sep 12, 2023

Deploy Preview for pomerium-docs ready!

Name Link
🔨 Latest commit 3174b0b
🔍 Latest deploy log https://app.netlify.com/sites/pomerium-docs/deploys/65776ae34938b2000890cbf1
😎 Deploy Preview https://deploy-preview-980--pomerium-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@ZPain8464
Copy link
Contributor Author

@desimone to review this PR and determine what to do with these settings.

Copy link
Collaborator

@desimone desimone left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

toc_max_heading_level 2 makes sense to me.

@ZPain8464 ZPain8464 marked this pull request as ready for review November 29, 2023 14:07
@ZPain8464 ZPain8464 requested a review from a team as a code owner November 29, 2023 14:07
@ZPain8464 ZPain8464 requested review from cmo-pomerium and removed request for a team November 29, 2023 14:07
@ZPain8464
Copy link
Contributor Author

@kenjenkins this is a big commit, but do you mind giving these global settings changes a quick cursory review at some point this week?

I'll do the route settings in a separate commit.


```yaml
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Technically the environment variable examples aren't YAML, so it feels a little off to use yaml syntax highlighting for these.

I used bash for the environment variable examples on the downstream mTLS settings page, but the difference in the rendered output is pretty subtle (at least in light mode), so it probably doesn't matter too much either way.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah I actually applied the bash syntax after seeing your example. I think the output pops more. I'll update all these to follow suit.

@@ -65,12 +66,13 @@ See the [Kubernetes Deployment Reference](/docs/deploy/k8s/reference#authenticat
### Examples

```yaml
# config file key
authenticate_callback_path: "/custom/callback"
authenticate_callback_path: '/custom/callback'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you mean to move these into the tabs above?

Copy link
Contributor Author

@ZPain8464 ZPain8464 Nov 30, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I may have misunderstood your suggestion. I didn't move these under the tab because there are Core and Kubernetes examples, but no Enterprise example. I kept examples underneath/outside the tabs if 2 or more tabs had examples. This setting has Core and K8s examples.

However, this K8s setting is for Core, so we could just include it under the K8s tab.


```yaml
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and here as well?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So, this one is configurable in the Console. The original ask here (#912) was to move examples into the Core tab if the setting only has Core examples, right? Again, I may have misunderstood the suggestion.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, I see. Yes, that was what I originally wrote in #912, but what do you think about moving all 'Examples' into their corresponding tabs? I think it would be good to keep the page structure consistent between reference pages.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's a good point, I'll have to comb through these again but it should be quick.

@ZPain8464 ZPain8464 added backport 0-24-0 and removed backport 0-23-0 Backports this PR to branch 0-23-0 labels Dec 5, 2023
@ZPain8464
Copy link
Contributor Author

@desimone and @kenjenkins changes are made in global and route settings. However, there are a number of settings that don't provide K8s examples, but link directly to the K8s reference. It's time consuming to untangle the inconsistencies, so I made a list in Notion and will add a ticket to update these settings, followed with a PR at a later time.

For now, this applies formatting changes consistently across the reference page examples.

### Examples

```yaml
accessLogFields: '[{"authority"},{"duration"},{"path"}]'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@wasaga can you confirm if this example is correct?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kenjenkins I had @wasaga review and incorporated his feedback into the commit below. I'm going to start working on updating K8s settings in a separate PR. I'll have @wasaga review the changes.

Copy link
Contributor

@wasaga wasaga left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://github.com/pomerium/documentation/pull/980/files#diff-ca14d8afcddd18b3acbf56a8a81b492ceab27ab1d32903a6fa1c09fa6d28a703R68

this is incorrect, host rewrite is supported.

also, it need be consistent in indicating whether this is an Ingress annotation or a CRD.

If it's an ingress annotation it has to be full.
image

i.e. here it should say ingress.pomerium.io/allow_websockets and type string (cause annotations are strings)

content/docs/reference/authenticate-service-url.mdx Outdated Show resolved Hide resolved
content/docs/reference/authorize-log-fields.mdx Outdated Show resolved Hide resolved
content/docs/reference/cookies.mdx Outdated Show resolved Hide resolved
content/docs/reference/pass-identity-headers.mdx Outdated Show resolved Hide resolved
ZPain8464 and others added 7 commits December 7, 2023 13:46
Co-authored-by: Denis Mishin <dmishin@pomerium.com>
Co-authored-by: Denis Mishin <dmishin@pomerium.com>
Co-authored-by: Denis Mishin <dmishin@pomerium.com>
Co-authored-by: Denis Mishin <dmishin@pomerium.com>
Co-authored-by: Denis Mishin <dmishin@pomerium.com>
@ZPain8464 ZPain8464 requested a review from wasaga December 7, 2023 19:45
content/docs/reference/authenticate-callback-path.mdx Outdated Show resolved Hide resolved
content/docs/reference/authenticate-service-url.mdx Outdated Show resolved Hide resolved
content/docs/reference/certificates.mdx Outdated Show resolved Hide resolved
content/docs/reference/global-timeouts.mdx Outdated Show resolved Hide resolved
content/docs/reference/global-timeouts.mdx Outdated Show resolved Hide resolved
content/docs/reference/global-timeouts.mdx Outdated Show resolved Hide resolved
Comment on lines 39 to 40
| `kubernetes_service_account_token` | `string` | **optional** |
| `kubernetes_service_account_token_file` | `bearer token` file path | **optional** |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

those are not supported

Comment on lines 42 to 49
### Examples

```yaml
kubernetes_service_account_token: eyJ0eXAiOiJKV1QiLCJhbGciOiJ...
ingress.pomerium.io/kubernetes_service_account_token: eyJ0eXAiOiJKV1QiLCJhbGciOiJ...

kubernetes_service_account_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token
ingress.pomerium.io/kubernetes_service_account_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token
```

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove

@@ -40,15 +47,15 @@ Enable **Public Access** in the **Policy Builder** in the Console:

| **Name** | **Type** | **Default** | **Usage** |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for follow-up: the column names are inconsistent. sometimes its "name", sometimes its "annotation", somtimes its "YAML", etc.

route level options are almost all annotations.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah I plan on updating these to be consistent as well. I'll do this in another PR; this one is pretty big already.

content/docs/reference/routes/timeouts.mdx Outdated Show resolved Hide resolved
ZPain8464 and others added 10 commits December 11, 2023 14:33
Co-authored-by: Denis Mishin <dmishin@pomerium.com>
Co-authored-by: Denis Mishin <dmishin@pomerium.com>
Co-authored-by: Denis Mishin <dmishin@pomerium.com>
Co-authored-by: Denis Mishin <dmishin@pomerium.com>
Co-authored-by: Denis Mishin <dmishin@pomerium.com>
Co-authored-by: Denis Mishin <dmishin@pomerium.com>
Co-authored-by: Denis Mishin <dmishin@pomerium.com>
Co-authored-by: Denis Mishin <dmishin@pomerium.com>
@ZPain8464 ZPain8464 requested a review from wasaga December 11, 2023 20:02
Copy link
Contributor

@wasaga wasaga left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

some comments are not yet resolved.

Could you please collect links to those that were not resolved into separate ticket that would be addressed in the follow-up PR?

@ZPain8464 ZPain8464 merged commit 3f9b754 into main Dec 13, 2023
4 checks passed
@ZPain8464 ZPain8464 deleted the zpain/fix-reference-examples branch December 13, 2023 16:07
@backport-actions-token
Copy link

The backport to 0-24-0 failed:

The process '/usr/bin/git' failed with exit code 1

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-0-24-0 0-24-0
# Navigate to the new working tree
cd .worktrees/backport-0-24-0
# Create a new branch
git switch --create backport-980-to-0-24-0
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick --mainline 1 3f9b754fc1081d88f004f429fe17574e198687f8
# Push it to GitHub
git push --set-upstream origin backport-980-to-0-24-0
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-0-24-0

Then, create a pull request where the base branch is 0-24-0 and the compare/head branch is backport-980-to-0-24-0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants