Skip to content

Commit

Permalink
Additional CRD readability improvements
Browse files Browse the repository at this point in the history
Signed-off-by: Kimmo Lehto <[email protected]>
  • Loading branch information
kke committed Jan 17, 2024
1 parent b281759 commit 48e6870
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 23 deletions.
12 changes: 6 additions & 6 deletions pkg/apis/k0s/v1beta1/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,20 +32,20 @@ var _ Validateable = (*APISpec)(nil)

// APISpec defines the settings for the K0s API
type APISpec struct {
// Local address on which to bind an API.
// The local bind address for API servers.
Address string `json:"address"`

// The loadbalancer address (for k0s controllers running behind a loadbalancer).
// The external loadbalancer address for k0s controllers.
ExternalAddress string `json:"externalAddress,omitempty"`
// Map of key-values (strings) for any extra arguments to pass down to Kubernetes api-server process.
// Key-value pairs of additional arguments for kube-API server.
ExtraArgs map[string]string `json:"extraArgs,omitempty"`
// Custom port for k0s-api server to listen on (default: 9443).
// The listening port for k0s-API server (default: 9443).
K0sAPIPort int `json:"k0sApiPort,omitempty"`

// Custom port for kube-api server to listen on (default: 6443).
// The listening port for kube-API server (default: 6443).
Port int `json:"port"`

// List of additional addresses to push to API servers serving the certificate.
// A list of additional SANs for the API server's TLS certificate.
SANs []string `json:"sans"`
}

Expand Down
4 changes: 2 additions & 2 deletions pkg/apis/k0s/v1beta1/calico.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,11 @@ type Calico struct {
// MTU for overlay network (default: 0).
MTU int `json:"mtu" yaml:"mtu"`

// vxlan (default) or ipip.
// Calico networking mode, one of vxlan or ipip (default: vxlan).
Mode string `json:"mode"`

// Overlay Type (Always, Never or CrossSubnet).
Overlay string `json:"overlay" validate:"oneof=Always Never CrossSubnet" `
Overlay string `json:"overlay" validate:"oneof=Always Never CrossSubnet"`

// The UDP port for VXLAN (default: 4789).
VxlanPort int `json:"vxlanPort"`
Expand Down
4 changes: 2 additions & 2 deletions pkg/apis/k0s/v1beta1/feature_gates.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,9 @@ func (fgs FeatureGates) AsSliceOfStrings(component string) []string {
type FeatureGate struct {
// Name of the feature gate.
Name string `json:"name,omitempty"`
// Enabled or disabled.
// A flag indicating if the feature gate is enabled.
Enabled bool `json:"enabled,omitempty"`
// Components to use feature gate on, if empty `KubernetesComponents` is used as the list.
// A list of Components to use the feature gate on, (default: `KubernetesComponents`).
Components []string `json:"components,omitempty"`
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,29 +43,28 @@ spec:
description: APISpec defines the settings for the K0s API
properties:
address:
description: Local address on which to bind an API.
description: The local bind address for API servers.
type: string
externalAddress:
description: The loadbalancer address (for k0s controllers running
behind a loadbalancer).
description: The external loadbalancer address for k0s controllers.
type: string
extraArgs:
additionalProperties:
type: string
description: Map of key-values (strings) for any extra arguments
to pass down to Kubernetes api-server process.
description: Key-value pairs of additional arguments for kube-API
server.
type: object
k0sApiPort:
description: 'Custom port for k0s-api server to listen on (default:
description: 'The listening port for k0s-API server (default:
9443).'
type: integer
port:
description: 'Custom port for kube-api server to listen on (default:
description: 'The listening port for kube-API server (default:
6443).'
type: integer
sans:
description: List of additional addresses to push to API servers
serving the certificate.
description: A list of additional SANs for the API server's TLS
certificate.
items:
type: string
type: array
Expand Down Expand Up @@ -155,13 +154,13 @@ spec:
description: FeatureGate specifies single feature gate
properties:
components:
description: Components to use feature gate on, if empty `KubernetesComponents`
is used as the list.
description: 'A list of Components to use the feature gate on,
(default: `KubernetesComponents`).'
items:
type: string
type: array
enabled:
description: Enabled or disabled.
description: A flag indicating if the feature gate is enabled.
type: boolean
name:
description: Name of the feature gate.
Expand Down Expand Up @@ -340,7 +339,8 @@ spec:
description: Host's IPv6 Auto-detection method for Calico.
type: string
mode:
description: vxlan (default) or ipip.
description: 'Calico networking mode, one of vxlan or ipip
(default: vxlan).'
type: string
mtu:
description: 'MTU for overlay network (default: 0).'
Expand Down

0 comments on commit 48e6870

Please sign in to comment.