Skip to content

Commit

Permalink
Add min k8s requirement and updates Patches Usage
Browse files Browse the repository at this point in the history
  • Loading branch information
asifdxtreme committed Jan 18, 2022
1 parent 810e6e1 commit 4201336
Show file tree
Hide file tree
Showing 6 changed files with 40 additions and 4 deletions.
3 changes: 3 additions & 0 deletions bootstrap/kubeadm/api/v1beta1/kubeadm_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -520,6 +520,9 @@ type Patches struct {
// The default "patchtype" is "strategic". "extension" must be either "json" or "yaml".
// "suffix" is an optional string that can be used to determine which patches are applied
// first alpha-numerically.
// These files can be written into the target directory via KubeadmConfig.Files which
// specifies additional files to be created on the machine, either with content inline or
// by referencing a secret.
// +optional
Directory string `json:"directory,omitempty"`
}
Original file line number Diff line number Diff line change
Expand Up @@ -2659,7 +2659,10 @@ spec:
by kubectl. The default "patchtype" is "strategic". "extension"
must be either "json" or "yaml". "suffix" is an optional
string that can be used to determine which patches are applied
first alpha-numerically.
first alpha-numerically. These files can be written into
the target directory via KubeadmConfig.Files which specifies
additional files to be created on the machine, either with
content inline or by referencing a secret.
type: string
type: object
type: object
Expand Down Expand Up @@ -2859,7 +2862,10 @@ spec:
by kubectl. The default "patchtype" is "strategic". "extension"
must be either "json" or "yaml". "suffix" is an optional
string that can be used to determine which patches are applied
first alpha-numerically.
first alpha-numerically. These files can be written into
the target directory via KubeadmConfig.Files which specifies
additional files to be created on the machine, either with
content inline or by referencing a secret.
type: string
type: object
type: object
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2691,6 +2691,10 @@ spec:
"extension" must be either "json" or "yaml". "suffix"
is an optional string that can be used to determine
which patches are applied first alpha-numerically.
These files can be written into the target directory
via KubeadmConfig.Files which specifies additional
files to be created on the machine, either with
content inline or by referencing a secret.
type: string
type: object
type: object
Expand Down Expand Up @@ -2905,6 +2909,10 @@ spec:
"extension" must be either "json" or "yaml". "suffix"
is an optional string that can be used to determine
which patches are applied first alpha-numerically.
These files can be written into the target directory
via KubeadmConfig.Files which specifies additional
files to be created on the machine, either with
content inline or by referencing a secret.
type: string
type: object
type: object
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3128,6 +3128,10 @@ spec:
is "strategic". "extension" must be either "json" or
"yaml". "suffix" is an optional string that can be used
to determine which patches are applied first alpha-numerically.
These files can be written into the target directory
via KubeadmConfig.Files which specifies additional files
to be created on the machine, either with content inline
or by referencing a secret.
type: string
type: object
type: object
Expand Down Expand Up @@ -3336,6 +3340,10 @@ spec:
is "strategic". "extension" must be either "json" or
"yaml". "suffix" is an optional string that can be used
to determine which patches are applied first alpha-numerically.
These files can be written into the target directory
via KubeadmConfig.Files which specifies additional files
to be created on the machine, either with content inline
or by referencing a secret.
type: string
type: object
type: object
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1928,7 +1928,11 @@ spec:
is "strategic". "extension" must be either "json"
or "yaml". "suffix" is an optional string that
can be used to determine which patches are applied
first alpha-numerically.
first alpha-numerically. These files can be
written into the target directory via KubeadmConfig.Files
which specifies additional files to be created
on the machine, either with content inline or
by referencing a secret.
type: string
type: object
type: object
Expand Down Expand Up @@ -2152,7 +2156,11 @@ spec:
is "strategic". "extension" must be either "json"
or "yaml". "suffix" is an optional string that
can be used to determine which patches are applied
first alpha-numerically.
first alpha-numerically. These files can be
written into the target directory via KubeadmConfig.Files
which specifies additional files to be created
on the machine, either with content inline or
by referencing a secret.
type: string
type: object
type: object
Expand Down
3 changes: 3 additions & 0 deletions docs/book/src/tasks/kubeadm-bootstrap.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,9 @@ The cloud-init script will be saved into a secret `KubeadmConfig.Status.DataSecr
The `KubeadmConfig` object allows full control of Kubeadm init/join operations by exposing raw `InitConfiguration`,
`ClusterConfiguration` and `JoinConfiguration` objects.

`InitConfiguration` and `JoinConfiguration` exposes `Patches` field which can be used to specify the patches from a directory,
this support is available from K8s 1.22 version onwards.

CABPK will fill in some values if they are left empty with sensible defaults:

| `KubeadmConfig` field | Default |
Expand Down

0 comments on commit 4201336

Please sign in to comment.