From 4d379065e584680e93711dd7ff16809dcb175fc7 Mon Sep 17 00:00:00 2001 From: Thomas Kosiewski Date: Thu, 12 Feb 2026 11:12:03 +0000 Subject: [PATCH 1/2] =?UTF-8?q?=F0=9F=A4=96=20fix:=20render=20API=20refere?= =?UTF-8?q?nce=20field=20hierarchy=20as=20a=20tree?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Replace non-breaking-space indentation in generated API reference tables with visible tree prefixes (`├─`, `└─`, `│`) so nested fields are easier to scan. Regenerated affected API reference docs with the updated template. --- _Generated with `mux` • Model: `openai:gpt-5.3-codex` • Thinking: `xhigh` • Cost: `$0.56`_ --- docs/reference/api/codercontrolplane.md | 16 +++++----- docs/reference/api/coderprovisioner.md | 20 ++++++------ docs/reference/api/workspaceproxy.md | 32 +++++++++---------- .../templates/markdown/gv_list.tpl | 32 +++++++++++++++---- 4 files changed, 60 insertions(+), 40 deletions(-) diff --git a/docs/reference/api/codercontrolplane.md b/docs/reference/api/codercontrolplane.md index 785bed27..2b3d1434 100644 --- a/docs/reference/api/codercontrolplane.md +++ b/docs/reference/api/codercontrolplane.md @@ -16,16 +16,16 @@ | `image` | `string` | Image is the container image used for the Coder control plane pod. | | `replicas` | `int32` | Replicas is the desired number of control plane pods. | | `service` | `ServiceSpec` | Service controls the service created in front of the control plane. | -|   `type` | `corev1.ServiceType` | Type controls the Kubernetes service type. | -|   `port` | `int32` | Port controls the exposed service port. | -|   `annotations` | `map[string]string` | Annotations are applied to the reconciled service object. | +| ├─ `type` | `corev1.ServiceType` | Type controls the Kubernetes service type. | +| ├─ `port` | `int32` | Port controls the exposed service port. | +| └─ `annotations` | `map[string]string` | Annotations are applied to the reconciled service object. | | `extraArgs` | `[]string` | ExtraArgs are appended to the default Coder server arguments. | | `extraEnv` | `[]corev1.EnvVar` | ExtraEnv are injected into the Coder control plane container. | | `imagePullSecrets` | `[]corev1.LocalObjectReference` | ImagePullSecrets are used by the pod to pull private images. | -|   `name` | `string` | Name of the referent. This field is effectively required, but due to backwards compatibility is allowed to be empty. Instances of this type with an empty value here are almost certainly wrong. More info: [https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) | +| └─ `name` | `string` | Name of the referent. This field is effectively required, but due to backwards compatibility is allowed to be empty. Instances of this type with an empty value here are almost certainly wrong. More info: [https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) | | `operatorAccess` | `OperatorAccessSpec` | OperatorAccess configures bootstrap API access to the coderd instance. | -|   `disabled` | `bool` | Disabled turns off creation and management of the `coder-k8s-operator` user and API token. | -|   `generatedTokenSecretName` | `string` | GeneratedTokenSecretName stores the generated operator API token. | +| ├─ `disabled` | `bool` | Disabled turns off creation and management of the `coder-k8s-operator` user and API token. | +| └─ `generatedTokenSecretName` | `string` | GeneratedTokenSecretName stores the generated operator API token. | ## Status @@ -35,8 +35,8 @@ | `readyReplicas` | `int32` | ReadyReplicas is the number of ready pods observed in the deployment. | | `url` | `string` | URL is the in-cluster URL for the control plane service. | | `operatorTokenSecretRef` | `SecretKeySelector` | OperatorTokenSecretRef points to the Secret key containing the `coder-k8s-operator` API token. | -|   `name` | `string` | Name is the Kubernetes Secret name. | -|   `key` | `string` | Key is the key inside the Secret data map. | +| ├─ `name` | `string` | Name is the Kubernetes Secret name. | +| └─ `key` | `string` | Key is the key inside the Secret data map. | | `operatorAccessReady` | `bool` | OperatorAccessReady reports whether operator API access bootstrap succeeded. | | `phase` | `string` | Phase is a high-level readiness indicator. | | `conditions` | `[]metav1.Condition` | Conditions are Kubernetes-standard conditions for this resource. | diff --git a/docs/reference/api/coderprovisioner.md b/docs/reference/api/coderprovisioner.md index 9574aeff..083a6c7f 100644 --- a/docs/reference/api/coderprovisioner.md +++ b/docs/reference/api/coderprovisioner.md @@ -14,16 +14,16 @@ | Field | Type | Description | | --- | --- | --- | | `controlPlaneRef` | `corev1.LocalObjectReference` | ControlPlaneRef identifies which CoderControlPlane instance to join. | -|   `name` | `string` | Name of the referent. This field is effectively required, but due to backwards compatibility is allowed to be empty. Instances of this type with an empty value here are almost certainly wrong. More info: [https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) | +| └─ `name` | `string` | Name of the referent. This field is effectively required, but due to backwards compatibility is allowed to be empty. Instances of this type with an empty value here are almost certainly wrong. More info: [https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) | | `organizationName` | `string` | OrganizationName is the Coder organization. Defaults to "default". | | `bootstrap` | `CoderProvisionerBootstrapSpec` | Bootstrap configures credentials for provisioner key management. | -|   `credentialsSecretRef` | `SecretKeySelector` | CredentialsSecretRef points to a Secret containing a Coder session token with permission to manage provisioner keys. | -|     `name` | `string` | Name is the Kubernetes Secret name. | -|     `key` | `string` | Key is the key inside the Secret data map. | +| └─ `credentialsSecretRef` | `SecretKeySelector` | CredentialsSecretRef points to a Secret containing a Coder session token with permission to manage provisioner keys. | +| ├─ `name` | `string` | Name is the Kubernetes Secret name. | +| └─ `key` | `string` | Key is the key inside the Secret data map. | | `key` | `CoderProvisionerKeySpec` | Key configures provisioner key naming and secret storage. | -|   `name` | `string` | Name is the provisioner key name in coderd. Defaults to the CR name. | -|   `secretName` | `string` | SecretName is the Kubernetes Secret to store the key. Defaults to "\{crName\}-provisioner-key". | -|   `secretKey` | `string` | SecretKey is the data key in the Secret. Defaults to "key". | +| ├─ `name` | `string` | Name is the provisioner key name in coderd. Defaults to the CR name. | +| ├─ `secretName` | `string` | SecretName is the Kubernetes Secret to store the key. Defaults to "\{crName\}-provisioner-key". | +| └─ `secretKey` | `string` | SecretKey is the data key in the Secret. Defaults to "key". | | `replicas` | `int32` | Replicas is the desired number of provisioner pods. | | `tags` | `map[string]string` | Tags are attached to the provisioner key for job routing. | | `image` | `string` | Image is the container image. Defaults to the control plane image. | @@ -31,7 +31,7 @@ | `extraEnv` | `[]corev1.EnvVar` | ExtraEnv are injected into the provisioner container. | | `resources` | `corev1.ResourceRequirements` | Resources for the provisioner container. | | `imagePullSecrets` | `[]corev1.LocalObjectReference` | ImagePullSecrets are used by the pod to pull private images. | -|   `name` | `string` | Name of the referent. This field is effectively required, but due to backwards compatibility is allowed to be empty. Instances of this type with an empty value here are almost certainly wrong. More info: [https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) | +| └─ `name` | `string` | Name of the referent. This field is effectively required, but due to backwards compatibility is allowed to be empty. Instances of this type with an empty value here are almost certainly wrong. More info: [https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) | | `terminationGracePeriodSeconds` | `int64` | TerminationGracePeriodSeconds for the provisioner pods. | ## Status @@ -50,8 +50,8 @@ | `controlPlaneRefName` | `string` | ControlPlaneRefName is the control plane ref name last applied to the provisioner key. | | `controlPlaneURL` | `string` | ControlPlaneURL is the control plane URL last applied to the provisioner key. | | `secretRef` | `SecretKeySelector` | SecretRef references the provisioner key secret data currently in use. | -|   `name` | `string` | Name is the Kubernetes Secret name. | -|   `key` | `string` | Key is the key inside the Secret data map. | +| ├─ `name` | `string` | Name is the Kubernetes Secret name. | +| └─ `key` | `string` | Key is the key inside the Secret data map. | ## Source diff --git a/docs/reference/api/workspaceproxy.md b/docs/reference/api/workspaceproxy.md index e56fe52b..3f6cc321 100644 --- a/docs/reference/api/workspaceproxy.md +++ b/docs/reference/api/workspaceproxy.md @@ -16,27 +16,27 @@ | `image` | `string` | Image is the container image used for the workspace proxy pod. | | `replicas` | `int32` | Replicas is the desired number of proxy pods. | | `service` | `ServiceSpec` | Service controls the service created in front of the workspace proxy. | -|   `type` | `corev1.ServiceType` | Type controls the Kubernetes service type. | -|   `port` | `int32` | Port controls the exposed service port. | -|   `annotations` | `map[string]string` | Annotations are applied to the reconciled service object. | +| ├─ `type` | `corev1.ServiceType` | Type controls the Kubernetes service type. | +| ├─ `port` | `int32` | Port controls the exposed service port. | +| └─ `annotations` | `map[string]string` | Annotations are applied to the reconciled service object. | | `primaryAccessURL` | `string` | PrimaryAccessURL is the coderd URL the proxy should connect to. | | `proxySessionTokenSecretRef` | `SecretKeySelector` | ProxySessionTokenSecretRef points to a Secret key containing the proxy token. | -|   `name` | `string` | Name is the Kubernetes Secret name. | -|   `key` | `string` | Key is the key inside the Secret data map. | +| ├─ `name` | `string` | Name is the Kubernetes Secret name. | +| └─ `key` | `string` | Key is the key inside the Secret data map. | | `bootstrap` | `ProxyBootstrapSpec` | Bootstrap optionally registers the proxy and mints a proxy token. | -|   `coderURL` | `string` | CoderURL is the URL for the primary Coder control plane API. | -|   `credentialsSecretRef` | `SecretKeySelector` | CredentialsSecretRef points to a Secret containing a Coder session token. | -|     `name` | `string` | Name is the Kubernetes Secret name. | -|     `key` | `string` | Key is the key inside the Secret data map. | -|   `proxyName` | `string` | ProxyName is the name used when registering the proxy in Coder. | -|   `displayName` | `string` | DisplayName is the human-readable name for the proxy region. | -|   `icon` | `string` | Icon is the optional icon URL or emoji path for the proxy region. | -|   `generatedTokenSecretName` | `string` | GeneratedTokenSecretName stores the generated proxy token. | +| ├─ `coderURL` | `string` | CoderURL is the URL for the primary Coder control plane API. | +| ├─ `credentialsSecretRef` | `SecretKeySelector` | CredentialsSecretRef points to a Secret containing a Coder session token. | +| │ ├─ `name` | `string` | Name is the Kubernetes Secret name. | +| │ └─ `key` | `string` | Key is the key inside the Secret data map. | +| ├─ `proxyName` | `string` | ProxyName is the name used when registering the proxy in Coder. | +| ├─ `displayName` | `string` | DisplayName is the human-readable name for the proxy region. | +| ├─ `icon` | `string` | Icon is the optional icon URL or emoji path for the proxy region. | +| └─ `generatedTokenSecretName` | `string` | GeneratedTokenSecretName stores the generated proxy token. | | `derpOnly` | `bool` | DerpOnly configures the workspace proxy to only serve DERP traffic. | | `extraArgs` | `[]string` | ExtraArgs are appended to the default workspace proxy arguments. | | `extraEnv` | `[]corev1.EnvVar` | ExtraEnv are injected into the workspace proxy container. | | `imagePullSecrets` | `[]corev1.LocalObjectReference` | ImagePullSecrets are used by the pod to pull private images. | -|   `name` | `string` | Name of the referent. This field is effectively required, but due to backwards compatibility is allowed to be empty. Instances of this type with an empty value here are almost certainly wrong. More info: [https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) | +| └─ `name` | `string` | Name of the referent. This field is effectively required, but due to backwards compatibility is allowed to be empty. Instances of this type with an empty value here are almost certainly wrong. More info: [https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) | ## Status @@ -46,8 +46,8 @@ | `readyReplicas` | `int32` | ReadyReplicas is the number of ready pods observed in the deployment. | | `registered` | `bool` | Registered reports whether bootstrap registration completed successfully. | | `proxyTokenSecretRef` | `SecretKeySelector` | ProxyTokenSecretRef is the Secret used for the proxy session token. | -|   `name` | `string` | Name is the Kubernetes Secret name. | -|   `key` | `string` | Key is the key inside the Secret data map. | +| ├─ `name` | `string` | Name is the Kubernetes Secret name. | +| └─ `key` | `string` | Key is the key inside the Secret data map. | | `phase` | `string` | Phase is a high-level readiness indicator. | | `conditions` | `[]metav1.Condition` | Conditions are Kubernetes-standard conditions for this resource. | diff --git a/hack/crd-ref-docs/templates/markdown/gv_list.tpl b/hack/crd-ref-docs/templates/markdown/gv_list.tpl index 97493d19..827a7f4d 100644 --- a/hack/crd-ref-docs/templates/markdown/gv_list.tpl +++ b/hack/crd-ref-docs/templates/markdown/gv_list.tpl @@ -17,8 +17,9 @@ {{- $fields := .fields -}} {{- $depth := int .depth -}} {{- $maxDepth := int .maxDepth -}} -{{- $indent := repeat $depth "  " -}} -{{- range $field := $fields }} +{{- $treePrefix := .treePrefix -}} +{{- $fieldCount := len $fields -}} +{{- range $index, $field := $fields }} {{- if not $field.Type }}{{ fail (printf "field %q is missing type information" $field.Name) }}{{- end }} {{- $memberType := $field.Type -}} {{- $members := $memberType.Members -}} @@ -27,11 +28,30 @@ {{- $isProjectLocal := contains "github.com/coder/coder-k8s/api/" $memberTypeString -}} {{- $isLocalObjectRef := contains "k8s.io/api/core/v1.LocalObjectReference" $memberTypeString -}} {{- $shouldExpand := and $hasMembers (lt $depth $maxDepth) (or $isProjectLocal $isLocalObjectRef) -}} +{{- $isLast := eq (add $index 1) $fieldCount -}} +{{- $branch := "" -}} +{{- if gt $depth 0 -}} +{{- if $isLast -}} +{{- $branch = "└─ " -}} +{{- else -}} +{{- $branch = "├─ " -}} +{{- end -}} +{{- end -}} {{- $fieldDoc := markdownRenderFieldDoc $field.Doc -}} {{- $fieldDoc = $fieldDoc | replace "
" " " -}} {{- $fieldDoc = regexReplaceAll "(https?://[^[:space:]<]+)" $fieldDoc "[$1]($1)" -}} -| {{ $indent }}`{{ $field.Name }}` | `{{ template "typeName" $memberType }}` | {{ $fieldDoc }} | -{{ if $shouldExpand }}{{ template "renderFields" (dict "fields" $members "depth" (add $depth 1) "maxDepth" $maxDepth) }}{{ end }} +| {{ $treePrefix }}{{ $branch }}`{{ $field.Name }}` | `{{ template "typeName" $memberType }}` | {{ $fieldDoc }} | +{{ $childPrefix := $treePrefix -}} +{{- if gt $depth 0 -}} +{{- if $isLast -}} +{{- $childPrefix = printf "%s " $treePrefix -}} +{{- else -}} +{{- $childPrefix = printf "%s│ " $treePrefix -}} +{{- end -}} +{{- else -}} +{{- $childPrefix = "" -}} +{{- end -}} +{{ if $shouldExpand }}{{ template "renderFields" (dict "fields" $members "depth" (add $depth 1) "maxDepth" $maxDepth "treePrefix" $childPrefix) }}{{ end }} {{- end -}} {{- end -}} @@ -103,12 +123,12 @@ | Field | Type | Description | | --- | --- | --- | -{{ template "renderFields" (dict "fields" $specMembers "depth" 0 "maxDepth" $maxFieldDepth) }} +{{ template "renderFields" (dict "fields" $specMembers "depth" 0 "maxDepth" $maxFieldDepth "treePrefix" "") }} ## Status | Field | Type | Description | | --- | --- | --- | -{{ template "renderFields" (dict "fields" $statusMembers "depth" 0 "maxDepth" $maxFieldDepth) }} +{{ template "renderFields" (dict "fields" $statusMembers "depth" 0 "maxDepth" $maxFieldDepth "treePrefix" "") }} ## Source - Go type: `{{ $goType }}` From 2870fd69933f8ea07d553870482a2b0642f3592c Mon Sep 17 00:00:00 2001 From: Thomas Kosiewski Date: Thu, 12 Feb 2026 11:17:39 +0000 Subject: [PATCH 2/2] =?UTF-8?q?=F0=9F=A4=96=20fix:=20preserve=20nested=20t?= =?UTF-8?q?ree=20indentation=20in=20markdown=20tables?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Use non-collapsible spacing entities in recursive tree prefixes so deeper last-child branches keep their visual nesting in markdown table renderers. Regenerated affected API reference docs. --- _Generated with `mux` • Model: `openai:gpt-5.3-codex` • Thinking: `xhigh` • Cost: `$0.56`_ --- docs/reference/api/coderprovisioner.md | 4 ++-- docs/reference/api/workspaceproxy.md | 4 ++-- hack/crd-ref-docs/templates/markdown/gv_list.tpl | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/reference/api/coderprovisioner.md b/docs/reference/api/coderprovisioner.md index 083a6c7f..5c7a2d8d 100644 --- a/docs/reference/api/coderprovisioner.md +++ b/docs/reference/api/coderprovisioner.md @@ -18,8 +18,8 @@ | `organizationName` | `string` | OrganizationName is the Coder organization. Defaults to "default". | | `bootstrap` | `CoderProvisionerBootstrapSpec` | Bootstrap configures credentials for provisioner key management. | | └─ `credentialsSecretRef` | `SecretKeySelector` | CredentialsSecretRef points to a Secret containing a Coder session token with permission to manage provisioner keys. | -| ├─ `name` | `string` | Name is the Kubernetes Secret name. | -| └─ `key` | `string` | Key is the key inside the Secret data map. | +|    ├─ `name` | `string` | Name is the Kubernetes Secret name. | +|    └─ `key` | `string` | Key is the key inside the Secret data map. | | `key` | `CoderProvisionerKeySpec` | Key configures provisioner key naming and secret storage. | | ├─ `name` | `string` | Name is the provisioner key name in coderd. Defaults to the CR name. | | ├─ `secretName` | `string` | SecretName is the Kubernetes Secret to store the key. Defaults to "\{crName\}-provisioner-key". | diff --git a/docs/reference/api/workspaceproxy.md b/docs/reference/api/workspaceproxy.md index 3f6cc321..462712c7 100644 --- a/docs/reference/api/workspaceproxy.md +++ b/docs/reference/api/workspaceproxy.md @@ -26,8 +26,8 @@ | `bootstrap` | `ProxyBootstrapSpec` | Bootstrap optionally registers the proxy and mints a proxy token. | | ├─ `coderURL` | `string` | CoderURL is the URL for the primary Coder control plane API. | | ├─ `credentialsSecretRef` | `SecretKeySelector` | CredentialsSecretRef points to a Secret containing a Coder session token. | -| │ ├─ `name` | `string` | Name is the Kubernetes Secret name. | -| │ └─ `key` | `string` | Key is the key inside the Secret data map. | +| │  ├─ `name` | `string` | Name is the Kubernetes Secret name. | +| │  └─ `key` | `string` | Key is the key inside the Secret data map. | | ├─ `proxyName` | `string` | ProxyName is the name used when registering the proxy in Coder. | | ├─ `displayName` | `string` | DisplayName is the human-readable name for the proxy region. | | ├─ `icon` | `string` | Icon is the optional icon URL or emoji path for the proxy region. | diff --git a/hack/crd-ref-docs/templates/markdown/gv_list.tpl b/hack/crd-ref-docs/templates/markdown/gv_list.tpl index 827a7f4d..29c4578e 100644 --- a/hack/crd-ref-docs/templates/markdown/gv_list.tpl +++ b/hack/crd-ref-docs/templates/markdown/gv_list.tpl @@ -44,9 +44,9 @@ {{ $childPrefix := $treePrefix -}} {{- if gt $depth 0 -}} {{- if $isLast -}} -{{- $childPrefix = printf "%s " $treePrefix -}} +{{- $childPrefix = printf "%s   " $treePrefix -}} {{- else -}} -{{- $childPrefix = printf "%s│ " $treePrefix -}} +{{- $childPrefix = printf "%s│  " $treePrefix -}} {{- end -}} {{- else -}} {{- $childPrefix = "" -}}