Skip to content

feat: Include CABPK APIs #445

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
/*
Copyright 2021 The Kubernetes Authors.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

package v1beta1

import clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1"

// Conditions and condition Reasons for the KubeadmConfig object.

const (
// DataSecretAvailableCondition documents the status of the bootstrap secret generation process.
//
// NOTE: When the DataSecret generation starts the process completes immediately and within the
// same reconciliation, so the user will always see a transition from Wait to Generated without having
// evidence that BootstrapSecret generation is started/in progress.
DataSecretAvailableCondition clusterv1.ConditionType = "DataSecretAvailable"

// WaitingForClusterInfrastructureReason (Severity=Info) document a bootstrap secret generation process
// waiting for the cluster infrastructure to be ready.
//
// NOTE: Having the cluster infrastructure ready is a pre-condition for starting to create machines;
// the KubeadmConfig controller ensure this pre-condition is satisfied.
WaitingForClusterInfrastructureReason = "WaitingForClusterInfrastructure"

// DataSecretGenerationFailedReason (Severity=Warning) documents a KubeadmConfig controller detecting
// an error while generating a data secret; those kind of errors are usually due to misconfigurations
// and user intervention is required to get them fixed.
DataSecretGenerationFailedReason = "DataSecretGenerationFailed"
)

const (
// CertificatesAvailableCondition documents that cluster certificates are available.
//
// NOTE: Cluster certificates are generated only for the KubeadmConfig object linked to the initial control plane
// machine, if the cluster is not using a control plane ref object, if the certificates are not provided
// by the users.
// IMPORTANT: This condition won't be re-created after clusterctl move.
CertificatesAvailableCondition clusterv1.ConditionType = "CertificatesAvailable"

// CertificatesGenerationFailedReason (Severity=Warning) documents a KubeadmConfig controller detecting
// an error while generating certificates; those kind of errors are usually temporary and the controller
// automatically recover from them.
CertificatesGenerationFailedReason = "CertificatesGenerationFailed"

// CertificatesCorruptedReason (Severity=Error) documents a KubeadmConfig controller detecting
// an error while retrieving certificates for a joining node.
CertificatesCorruptedReason = "CertificatesCorrupted"
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
/*
Copyright 2021 The Kubernetes Authors.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

package v1beta1

func (*KubeadmConfig) Hub() {}
func (*KubeadmConfigList) Hub() {}
func (*KubeadmConfigTemplate) Hub() {}
func (*KubeadmConfigTemplateList) Hub() {}

func (*ClusterConfiguration) Hub() {}
func (*ClusterStatus) Hub() {}
func (*InitConfiguration) Hub() {}
func (*JoinConfiguration) Hub() {}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
/*
Copyright 2021 The Kubernetes Authors.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

package v1beta1
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
/*
Copyright 2021 The Kubernetes Authors.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

// Package v1beta1 contains API Schema definitions for the kubeadm v1beta1 API group
// +kubebuilder:object:generate=true
// +groupName=bootstrap.cluster.x-k8s.io
package v1beta1

import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/runtime/schema"
)

var (
// GroupVersion is group version used to register these objects.
GroupVersion = schema.GroupVersion{Group: "bootstrap.cluster.x-k8s.io", Version: "v1beta1"}

// schemeBuilder is used to add go types to the GroupVersionKind scheme.
schemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)

// AddToScheme adds the types in this group-version to the given scheme.
AddToScheme = schemeBuilder.AddToScheme

objectTypes = []runtime.Object{}
)

func addKnownTypes(scheme *runtime.Scheme) error {
scheme.AddKnownTypes(GroupVersion, objectTypes...)
metav1.AddToGroupVersion(scheme, GroupVersion)
return nil
}
Loading