Skip to content

Commit

Permalink
Enforce capitalization in API fields (#51)
Browse files Browse the repository at this point in the history
  • Loading branch information
neoaggelos authored Nov 29, 2022
1 parent d6d001e commit 2e865a6
Show file tree
Hide file tree
Showing 4 changed files with 64 additions and 64 deletions.
4 changes: 2 additions & 2 deletions apis/v1beta1/microk8sconfig_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,13 +73,13 @@ type InitConfiguration struct {
// The confinement (strict or classic) configuration
// +optional
// +kubebuilder:validation:Enum=classic;strict
Confinement string `json:"Confinement,omitempty"`
Confinement string `json:"confinement,omitempty"`

// The risk-level (stable, candidate, beta, or edge) for the snaps
// +optional
// +kubebuilder:validation:Enum=stable;candidate;beta;edge
// +kubebuilder:default:=stable
RiskLevel string `json:"RiskLevel,omitempty"`
RiskLevel string `json:"riskLevel,omitempty"`

// ExtraWriteFiles is a list of extra files to inject with cloud-init.
// +optional
Expand Down
60 changes: 30 additions & 30 deletions bootstrap-components.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,24 +57,9 @@ spec:
type: object
initConfiguration:
properties:
Confinement:
description: The confinement (strict or classic) configuration
enum:
- classic
- strict
type: string
IPinIP:
description: The optional IPinIP configuration
type: boolean
RiskLevel:
default: stable
description: The risk-level (stable, candidate, beta, or edge) for the snaps
enum:
- stable
- candidate
- beta
- edge
type: string
addons:
description: List of addons to be enabled upon cluster creation
items:
Expand All @@ -83,6 +68,12 @@ spec:
apiVersion:
description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
type: string
confinement:
description: The confinement (strict or classic) configuration
enum:
- classic
- strict
type: string
extraKubeletArgs:
description: ExtraKubeletArgs is a list of extra arguments to add to the kubelet.
items:
Expand Down Expand Up @@ -130,6 +121,15 @@ spec:
noProxy:
description: The optional no proxy configuration
type: string
riskLevel:
default: stable
description: The risk-level (stable, candidate, beta, or edge) for the snaps
enum:
- stable
- candidate
- beta
- edge
type: string
type: object
type: object
status:
Expand Down Expand Up @@ -250,24 +250,9 @@ spec:
type: object
initConfiguration:
properties:
Confinement:
description: The confinement (strict or classic) configuration
enum:
- classic
- strict
type: string
IPinIP:
description: The optional IPinIP configuration
type: boolean
RiskLevel:
default: stable
description: The risk-level (stable, candidate, beta, or edge) for the snaps
enum:
- stable
- candidate
- beta
- edge
type: string
addons:
description: List of addons to be enabled upon cluster creation
items:
Expand All @@ -276,6 +261,12 @@ spec:
apiVersion:
description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
type: string
confinement:
description: The confinement (strict or classic) configuration
enum:
- classic
- strict
type: string
extraKubeletArgs:
description: ExtraKubeletArgs is a list of extra arguments to add to the kubelet.
items:
Expand Down Expand Up @@ -323,6 +314,15 @@ spec:
noProxy:
description: The optional no proxy configuration
type: string
riskLevel:
default: stable
description: The risk-level (stable, candidate, beta, or edge) for the snaps
enum:
- stable
- candidate
- beta
- edge
type: string
type: object
type: object
type: object
Expand Down
32 changes: 16 additions & 16 deletions config/crd/bases/bootstrap.cluster.x-k8s.io_microk8sconfigs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,25 +61,9 @@ spec:
type: object
initConfiguration:
properties:
Confinement:
description: The confinement (strict or classic) configuration
enum:
- classic
- strict
type: string
IPinIP:
description: The optional IPinIP configuration
type: boolean
RiskLevel:
default: stable
description: The risk-level (stable, candidate, beta, or edge)
for the snaps
enum:
- stable
- candidate
- beta
- edge
type: string
addons:
description: List of addons to be enabled upon cluster creation
items:
Expand All @@ -91,6 +75,12 @@ spec:
schemas to the latest internal value, and may reject unrecognized
values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
type: string
confinement:
description: The confinement (strict or classic) configuration
enum:
- classic
- strict
type: string
extraKubeletArgs:
description: ExtraKubeletArgs is a list of extra arguments to
add to the kubelet.
Expand Down Expand Up @@ -145,6 +135,16 @@ spec:
noProxy:
description: The optional no proxy configuration
type: string
riskLevel:
default: stable
description: The risk-level (stable, candidate, beta, or edge)
for the snaps
enum:
- stable
- candidate
- beta
- edge
type: string
type: object
type: object
status:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,25 +67,9 @@ spec:
type: object
initConfiguration:
properties:
Confinement:
description: The confinement (strict or classic) configuration
enum:
- classic
- strict
type: string
IPinIP:
description: The optional IPinIP configuration
type: boolean
RiskLevel:
default: stable
description: The risk-level (stable, candidate, beta,
or edge) for the snaps
enum:
- stable
- candidate
- beta
- edge
type: string
addons:
description: List of addons to be enabled upon cluster
creation
Expand All @@ -98,6 +82,12 @@ spec:
convert recognized schemas to the latest internal value,
and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
type: string
confinement:
description: The confinement (strict or classic) configuration
enum:
- classic
- strict
type: string
extraKubeletArgs:
description: ExtraKubeletArgs is a list of extra arguments
to add to the kubelet.
Expand Down Expand Up @@ -153,6 +143,16 @@ spec:
noProxy:
description: The optional no proxy configuration
type: string
riskLevel:
default: stable
description: The risk-level (stable, candidate, beta,
or edge) for the snaps
enum:
- stable
- candidate
- beta
- edge
type: string
type: object
type: object
type: object
Expand Down

0 comments on commit 2e865a6

Please sign in to comment.