Skip to content

Commit

Permalink
🏃 Remove private APIs from Kubeadm v1beta1 types
Browse files Browse the repository at this point in the history
Signed-off-by: Vince Prignano <[email protected]>
  • Loading branch information
vincepri committed Mar 9, 2020
1 parent 96ccd37 commit cd602ce
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 92 deletions.
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,8 @@ generate-go-core: $(CONTROLLER_GEN) $(CONVERSION_GEN)
generate-go-kubeadm-bootstrap: $(CONTROLLER_GEN) $(CONVERSION_GEN) ## Runs Go related generate targets for the kubeadm bootstrapper
$(CONTROLLER_GEN) \
object:headerFile=./hack/boilerplate/boilerplate.generatego.txt \
paths=./bootstrap/kubeadm/api/...
paths=./bootstrap/kubeadm/api/... \
paths=./bootstrap/kubeadm/types/...
$(CONVERSION_GEN) \
--input-dirs=./bootstrap/kubeadm/api/v1alpha2 \
--output-file-base=zz_generated.conversion \
Expand Down
10 changes: 0 additions & 10 deletions bootstrap/kubeadm/types/v1beta1/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,6 @@ import (
type InitConfiguration struct {
metav1.TypeMeta `json:",inline"`

// ClusterConfiguration holds the cluster-wide information, and embeds that struct (which can be (un)marshalled separately as well)
// When InitConfiguration is marshalled to bytes in the external version, this information IS NOT preserved (which can be seen from
// the `json:"-"` tag. This is due to that when InitConfiguration is (un)marshalled, it turns into two YAML documents, one for the
// InitConfiguration and ClusterConfiguration. Hence, the information must not be duplicated, and is therefore omitted here.
ClusterConfiguration `json:"-"`

// `kubeadm init`-only information. These fields are solely used the first time `kubeadm init` runs.
// After that, the information in the fields IS NOT uploaded to the `kubeadm-config` ConfigMap
// that is used by `kubeadm upgrade` for instance. These fields must be omitempty.

// BootstrapTokens is respected at `kubeadm init` time and describes a set of Bootstrap Tokens to create.
// This information IS NOT uploaded to the kubeadm cluster configmap, partly because of its sensitive nature
BootstrapTokens []BootstrapToken `json:"bootstrapTokens,omitempty"`
Expand Down
28 changes: 3 additions & 25 deletions bootstrap/kubeadm/types/v1beta1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit cd602ce

Please sign in to comment.