Skip to content

Commit

Permalink
Automatically generate the bootstrap config documentation
Browse files Browse the repository at this point in the history
The bootstrap config documentation may get out of sync as a result
of apiv1.BootstrapConfig changes.

To avoid this, we're going to automatically generate the documentation
based on the apiv1.BootstrapConfig structure definition and docstrings.

This change adds the necessary tooling as part of the ``docgen``
package, which may be reused for other structures or projects.
  • Loading branch information
petrutlucian94 committed Oct 3, 2024
1 parent edd536f commit 4035ef6
Show file tree
Hide file tree
Showing 8 changed files with 669 additions and 512 deletions.
291 changes: 291 additions & 0 deletions docs/src/_parts/bootstrap_config.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,291 @@
## cluster-config.network.enabled
**Type:** `bool`<br>


## cluster-config.dns.enabled
**Type:** `bool`<br>


## cluster-config.dns.cluster-domain
**Type:** `string`<br>


## cluster-config.dns.service-ip
**Type:** `string`<br>


## cluster-config.dns.upstream-nameservers
**Type:** `[]string`<br>


## cluster-config.ingress.enabled
**Type:** `bool`<br>


## cluster-config.ingress.default-tls-secret
**Type:** `string`<br>


## cluster-config.ingress.enable-proxy-protocol
**Type:** `bool`<br>


## cluster-config.load-balancer.enabled
**Type:** `bool`<br>


## cluster-config.load-balancer.cidrs
**Type:** `[]string`<br>


## cluster-config.load-balancer.l2-mode
**Type:** `bool`<br>


## cluster-config.load-balancer.l2-interfaces
**Type:** `[]string`<br>


## cluster-config.load-balancer.bgp-mode
**Type:** `bool`<br>


## cluster-config.load-balancer.bgp-local-asn
**Type:** `int`<br>


## cluster-config.load-balancer.bgp-peer-address
**Type:** `string`<br>


## cluster-config.load-balancer.bgp-peer-asn
**Type:** `int`<br>


## cluster-config.load-balancer.bgp-peer-port
**Type:** `int`<br>


## cluster-config.local-storage.enabled
**Type:** `bool`<br>


## cluster-config.local-storage.local-path
**Type:** `string`<br>


## cluster-config.local-storage.reclaim-policy
**Type:** `string`<br>


## cluster-config.local-storage.default
**Type:** `bool`<br>


## cluster-config.gateway.enabled
**Type:** `bool`<br>


## cluster-config.metrics-server.enabled
**Type:** `bool`<br>


## cluster-config.cloud-provider
**Type:** `string`<br>


## cluster-config.annotations
**Type:** `map[string]string`<br>


## control-plane-taints
**Type:** `[]string`<br>

Seed configuration for the control plane (flat on purpose). Empty values are ignored

## pod-cidr
**Type:** `string`<br>


## service-cidr
**Type:** `string`<br>


## disable-rbac
**Type:** `bool`<br>


## secure-port
**Type:** `int`<br>


## k8s-dqlite-port
**Type:** `int`<br>


## datastore-type
**Type:** `string`<br>


## datastore-servers
**Type:** `[]string`<br>


## datastore-ca-crt
**Type:** `string`<br>


## datastore-client-crt
**Type:** `string`<br>


## datastore-client-key
**Type:** `string`<br>


## extra-sans
**Type:** `[]string`<br>

Seed configuration for certificates

## ca-crt
**Type:** `string`<br>

Seed configuration for external certificates (cluster-wide)

## ca-key
**Type:** `string`<br>


## client-ca-crt
**Type:** `string`<br>


## client-ca-key
**Type:** `string`<br>


## front-proxy-ca-crt
**Type:** `string`<br>


## front-proxy-ca-key
**Type:** `string`<br>


## front-proxy-client-crt
**Type:** `string`<br>


## front-proxy-client-key
**Type:** `string`<br>


## apiserver-kubelet-client-crt
**Type:** `string`<br>


## apiserver-kubelet-client-key
**Type:** `string`<br>


## admin-client-crt
**Type:** `string`<br>


## admin-client-key
**Type:** `string`<br>


## kube-proxy-client-crt
**Type:** `string`<br>


## kube-proxy-client-key
**Type:** `string`<br>


## kube-scheduler-client-crt
**Type:** `string`<br>


## kube-scheduler-client-key
**Type:** `string`<br>


## kube-controller-manager-client-crt
**Type:** `string`<br>


## kube-controller-manager-client-key
**Type:** `string`<br>


## service-account-key
**Type:** `string`<br>


## apiserver-crt
**Type:** `string`<br>

Seed configuration for external certificates (node-specific)

## apiserver-key
**Type:** `string`<br>


## kubelet-crt
**Type:** `string`<br>


## kubelet-key
**Type:** `string`<br>


## kubelet-client-crt
**Type:** `string`<br>


## kubelet-client-key
**Type:** `string`<br>


## extra-node-config-files
**Type:** `map[string]string`<br>

ExtraNodeConfigFiles will be written to /var/snap/k8s/common/args/conf.d

## extra-node-kube-apiserver-args
**Type:** `map[string]string`<br>

Extra args to add to individual services (set any arg to null to delete)

## extra-node-kube-controller-manager-args
**Type:** `map[string]string`<br>


## extra-node-kube-scheduler-args
**Type:** `map[string]string`<br>


## extra-node-kube-proxy-args
**Type:** `map[string]string`<br>


## extra-node-kubelet-args
**Type:** `map[string]string`<br>


## extra-node-containerd-args
**Type:** `map[string]string`<br>


## extra-node-k8s-dqlite-args
**Type:** `map[string]string`<br>


## extra-node-containerd-config
**Type:** `apiv1.MapStringAny`<br>

Extra configuration for the containerd config.toml

Loading

0 comments on commit 4035ef6

Please sign in to comment.