Skip to content

Commit e644570

Browse files
authored
feat: Pull in EKS APIs (#1253)
**What problem does this PR solve?**: Adds EKS APIs to external to start work on EKS support in CAREN. **Which issue(s) this PR fixes**: Fixes # **How Has This Been Tested?**: <!-- Please describe the tests that you ran to verify your changes. Provide output from the tests and any manual steps needed to replicate the tests. --> **Special notes for your reviewer**: <!-- Use this to provide any additional information to the reviewers. This may include: - Best way to review the PR. - Where the author wants the most review attention on. - etc. --> This depends on upstream changes that have been merged but not released so we need to wait until we get a CAPA release that includes the EKS ClusterClass support.
1 parent 1d50fb4 commit e644570

24 files changed

+3202
-22
lines changed
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
/*
2+
Copyright 2022 The Kubernetes Authors.
3+
4+
Licensed under the Apache License, Version 2.0 (the "License");
5+
you may not use this file except in compliance with the License.
6+
You may obtain a copy of the License at
7+
8+
http://www.apache.org/licenses/LICENSE-2.0
9+
10+
Unless required by applicable law or agreed to in writing, software
11+
distributed under the License is distributed on an "AS IS" BASIS,
12+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
See the License for the specific language governing permissions and
14+
limitations under the License.
15+
*/
16+
17+
package v1beta2
18+
19+
import clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1"
20+
21+
// Conditions and condition Reasons for the EKSConfig object
22+
// FROM: https://github.com/kubernetes-sigs/cluster-api/blob/main/bootstrap/kubeadm/api/v1beta1/condition_consts.go
23+
24+
const (
25+
// DataSecretAvailableCondition documents the status of the bootstrap secret generation process.
26+
//
27+
// NOTE: When the DataSecret generation starts the process completes immediately and within the
28+
// same reconciliation, so the user will always see a transition from Wait to Generated without having
29+
// evidence that BootstrapSecret generation is started/in progress.
30+
DataSecretAvailableCondition clusterv1.ConditionType = "DataSecretAvailable"
31+
32+
// DataSecretGenerationFailedReason (Severity=Warning) documents a EKSConfig controller detecting
33+
// an error while generating a data secret; those kind of errors are usually due to misconfigurations
34+
// and user intervention is required to get them fixed.
35+
DataSecretGenerationFailedReason = "DataSecretGenerationFailed"
36+
37+
// WaitingForClusterInfrastructureReason (Severity=Info) document a bootstrap secret generation process
38+
// waiting for the cluster infrastructure to be ready.
39+
//
40+
// NOTE: Having the cluster infrastructure ready is a pre-condition for starting to create machines;
41+
// the EKSConfig controller ensure this pre-condition is satisfied.
42+
WaitingForClusterInfrastructureReason = "WaitingForClusterInfrastructure"
43+
44+
// WaitingForControlPlaneInitializationReason (Severity=Info) documents a bootstrap secret generation process
45+
// waiting for the control plane to be initialized.
46+
//
47+
// NOTE: This is a pre-condition for starting to create machines;
48+
// the EKSConfig controller ensure this pre-condition is satisfied.
49+
WaitingForControlPlaneInitializationReason = "WaitingForControlPlaneInitialization"
50+
)
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
/*
2+
Copyright 2022 The Kubernetes Authors.
3+
4+
Licensed under the Apache License, Version 2.0 (the "License");
5+
you may not use this file except in compliance with the License.
6+
You may obtain a copy of the License at
7+
8+
http://www.apache.org/licenses/LICENSE-2.0
9+
10+
Unless required by applicable law or agreed to in writing, software
11+
distributed under the License is distributed on an "AS IS" BASIS,
12+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
See the License for the specific language governing permissions and
14+
limitations under the License.
15+
*/
16+
17+
package v1beta2
18+
19+
// Hub marks EKSConfig as a conversion hub.
20+
func (*EKSConfig) Hub() {}
21+
22+
// Hub marks EKSConfigList as a conversion hub.
23+
func (*EKSConfigList) Hub() {}
24+
25+
// Hub marks EKSConfigTemplate as a conversion hub.
26+
func (*EKSConfigTemplate) Hub() {}
27+
28+
// Hub marks EKSConfigTemplateList as a conversion hub.
29+
func (*EKSConfigTemplateList) Hub() {}
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
/*
2+
Copyright 2022 The Kubernetes Authors.
3+
4+
Licensed under the Apache License, Version 2.0 (the "License");
5+
you may not use this file except in compliance with the License.
6+
You may obtain a copy of the License at
7+
8+
http://www.apache.org/licenses/LICENSE-2.0
9+
10+
Unless required by applicable law or agreed to in writing, software
11+
distributed under the License is distributed on an "AS IS" BASIS,
12+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
See the License for the specific language governing permissions and
14+
limitations under the License.
15+
*/
16+
17+
// Package v1beta2 contains API Schema definitions for the Amazon EKS Bootstrap v1beta2 API group.
18+
// +gencrdrefdocs:force //nolint: revive
19+
// +groupName=bootstrap.cluster.x-k8s.io
20+
// +k8s:conversion-gen=sigs.k8s.io/cluster-api-provider-aws/v2/bootstrap/eks/api/v1beta1
21+
package v1beta2

0 commit comments

Comments
 (0)