Skip to content

tmp v1.1.5 #7

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

Open
wants to merge 75 commits into
base: release/v1.1.3-d2iq.5
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
75 commits
Select commit Hold shift + click to select a range
da8cccb
fix the version assumption in topology plan command
Mar 8, 2022
c8b9f3f
Merge pull request #6301 from k8s-infra-cherrypick-robot/cherry-pick-…
k8s-ci-robot Mar 15, 2022
2210653
🌱 Add CAPOCI provider
joekr Mar 10, 2022
4f16895
Merge pull request #6314 from k8s-infra-cherrypick-robot/cherry-pick-…
k8s-ci-robot Mar 18, 2022
891ad9c
seedling: update talos/sidero references
rsmitty Mar 24, 2022
c4c9df9
Merge pull request #6343 from k8s-infra-cherrypick-robot/cherry-pick-…
k8s-ci-robot Mar 31, 2022
3a4358c
Upgrade to controller-runtime v0.11.2
sbueringer Mar 31, 2022
f47e565
bug: Make sure MachinePool Version is a valid Kubernetes version
Mar 17, 2022
162dba4
Merge pull request #6360 from sbueringer/pr-upgrade-cr-v0.11.2-v1.1
k8s-ci-robot Mar 31, 2022
d1abb1e
Merge pull request #6364 from k8s-infra-cherrypick-robot/cherry-pick-…
k8s-ci-robot Apr 1, 2022
cb513e2
Update golangci-lint action
killianmuldoon Apr 4, 2022
be57626
Merge pull request #6371 from killianmuldoon/fix/lint-release-1.1
k8s-ci-robot Apr 4, 2022
acb01e9
Add Nutanix Provider
tuxtof Mar 29, 2022
3906843
Merge pull request #6378 from nutanix-cloud-native/release-1.1-capx
k8s-ci-robot Apr 6, 2022
429cf50
Update controlplane example in book
killianmuldoon Apr 7, 2022
9f166c9
Merge pull request #6427 from k8s-infra-cherrypick-robot/cherry-pick-…
k8s-ci-robot Apr 20, 2022
b7306f9
Add IBM Cloud
Amulyam24 Apr 20, 2022
8ac7e2d
Merge pull request #6428 from k8s-infra-cherrypick-robot/cherry-pick-…
k8s-ci-robot Apr 20, 2022
3f4fd8f
update cert-manager to v1.7.2
Apr 15, 2022
c9feb08
Merge pull request #6432 from k8s-infra-cherrypick-robot/cherry-pick-…
k8s-ci-robot Apr 21, 2022
8ea1939
allow up to 20 tabs in book
apricote Apr 22, 2022
7181b0b
Merge pull request #6440 from k8s-infra-cherrypick-robot/cherry-pick-…
k8s-ci-robot Apr 25, 2022
b43f519
use WaitForMachinePools to configure machine pool test waits
jackfrancis Apr 26, 2022
7d05374
Merge pull request #6447 from k8s-infra-cherrypick-robot/cherry-pick-…
k8s-ci-robot Apr 27, 2022
1d232b4
clusterctl: retry github i/o operations
jackfrancis Apr 28, 2022
7c58a30
Merge pull request #6461 from jackfrancis/github-retries-1.1
k8s-ci-robot Apr 29, 2022
45f5b08
test: retry controller-runtime client instantiation
jackfrancis Apr 20, 2022
3e9b507
test: tolerate zero pods in WaitForPodListCondition
jackfrancis May 3, 2022
ad4b4dd
bug: Fix cluster reconcilation predicates
Unix4ever Apr 19, 2022
c4cf824
Merge pull request #6488 from k8s-infra-cherrypick-robot/cherry-pick-…
k8s-ci-robot May 6, 2022
c727d95
Merge pull request #6479 from k8s-infra-cherrypick-robot/cherry-pick-…
k8s-ci-robot May 8, 2022
6391758
Merge pull request #6433 from k8s-infra-cherrypick-robot/cherry-pick-…
k8s-ci-robot May 10, 2022
bf071fb
fix crs
tranthang2404 May 12, 2022
669b915
Merge pull request #6512 from k8s-infra-cherrypick-robot/cherry-pick-…
k8s-ci-robot May 13, 2022
844268d
Add IBM VPC environment variables
Amulyam24 May 25, 2022
4886050
Merge pull request #6544 from k8s-infra-cherrypick-robot/cherry-pick-…
k8s-ci-robot May 25, 2022
5def82e
Use Kubernetes 1.24 in quickstart and CAPD, bump to kind v0.14
chrischdi May 12, 2022
298356c
Merge pull request #6560 from sbueringer/pr-use-1.24-on-release-1.1
k8s-ci-robot May 28, 2022
1ca48ff
Update docker to v20.10.16
mkumatag May 29, 2022
a17624c
sync OWNERS_ALIAS file with main
sbueringer May 30, 2022
3ce426d
bump kubebuilder-release-tools GitHub action to v0.2.0
sbueringer May 30, 2022
b4065d1
Merge pull request #6566 from sbueringer/pr-sync-owners-alias
k8s-ci-robot May 31, 2022
d7bf75b
Merge pull request #6558 from mkumatag/update-docker-1.1
k8s-ci-robot May 31, 2022
ad12352
retryable errors in test/framework
jackfrancis May 31, 2022
2891f78
Merge pull request #6579 from jackfrancis/cherry-pick-6485
k8s-ci-robot Jun 1, 2022
d777df1
more retryable errors in test/framework
jackfrancis Jun 1, 2022
dffadb9
Merge pull request #6582 from jackfrancis/cherry-pick-6490
k8s-ci-robot Jun 1, 2022
ba8da95
book: add videos from KubeCon and Let's chat about sessions
sbueringer Jun 2, 2022
3ea9243
Merge pull request #6589 from sbueringer/pr-add-more-videos-1.1
k8s-ci-robot Jun 3, 2022
e6bca6a
book: update supported Kubernetes versions
sbueringer May 25, 2022
1c3a152
Merge pull request #6592 from k8s-infra-cherrypick-robot/cherry-pick-…
k8s-ci-robot Jun 3, 2022
60349d8
Merge pull request #6575 from sbueringer/pr-cherry-pick-verify
k8s-ci-robot Jun 6, 2022
735e6ad
hack/release-notes: trim [release-*] in PR titles
sbueringer May 30, 2022
212083a
Merge pull request #6606 from k8s-infra-cherrypick-robot/cherry-pick-…
k8s-ci-robot Jun 7, 2022
3d0ba85
fix: no nodeRefs when empty providerIDList is ok
mweibel Mar 18, 2022
3823957
Merge pull request #6609 from k8s-infra-cherrypick-robot/cherry-pick-…
k8s-ci-robot Jun 8, 2022
deaee4c
added kubevirt infrastructure provider
May 17, 2022
4801471
Merge pull request #6610 from k8s-infra-cherrypick-robot/cherry-pick-…
k8s-ci-robot Jun 8, 2022
88fd1a8
added vcluster infrastructure provider
FabianKramm May 26, 2022
c8bdf13
Merge pull request #6611 from k8s-infra-cherrypick-robot/cherry-pick-…
k8s-ci-robot Jun 8, 2022
abad574
Adding support for CAPC
davidjumani Jun 6, 2022
dadc5b6
Merge pull request #6612 from k8s-infra-cherrypick-robot/cherry-pick-…
k8s-ci-robot Jun 8, 2022
92e9ad9
Update docker distribution
mkumatag Jun 10, 2022
c8c668e
Merge pull request #6622 from mkumatag/update-docker-distribution
k8s-ci-robot Jun 10, 2022
8ea1e0f
🌱 Refresh BootstrapToken until Nodes join
lentzi90 Apr 8, 2022
66fb36b
Merge pull request #6654 from k8s-infra-cherrypick-robot/cherry-pick-…
k8s-ci-robot Jun 15, 2022
7ed906a
add OCI to infra provider list
joekr Jun 23, 2022
b829b6d
Merge pull request #6712 from joekr/update-provider-list
k8s-ci-robot Jun 23, 2022
5aaf97b
Update CoreDNS migration library to v1.0.17
killianmuldoon Jun 24, 2022
80dd9fd
Merge pull request #6726 from killianmuldoon/release-1.1
k8s-ci-robot Jun 24, 2022
c4b7f94
Ensure controlplane coredns update deploys the ClusterRole if CoreDNS…
chrischdi Jun 22, 2022
2eb2188
Merge pull request #6760 from chrischdi/pr-cherry-pick-1.1-fix-coredn…
k8s-ci-robot Jun 28, 2022
a39f8c9
clusterctl: migrate CRDs during upgrade
sbueringer Jun 29, 2022
d488bdb
Merge pull request #6792 from k8s-infra-cherrypick-robot/cherry-pick-…
k8s-ci-robot Jun 30, 2022
16f8411
Remove upstream GHA workflows
dlipovetsky Aug 21, 2022
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
43 changes: 0 additions & 43 deletions .github/workflows/dependabot.yml

This file was deleted.

21 changes: 0 additions & 21 deletions .github/workflows/golangci-lint.yml

This file was deleted.

17 changes: 0 additions & 17 deletions .github/workflows/lint-docs.yaml

This file was deleted.

35 changes: 0 additions & 35 deletions .github/workflows/release.yml

This file was deleted.

17 changes: 0 additions & 17 deletions .github/workflows/update-homebrew-formula-on-release.yml

This file was deleted.

14 changes: 0 additions & 14 deletions .github/workflows/verify.yml

This file was deleted.

13 changes: 9 additions & 4 deletions .markdownlinkcheck.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
{
"ignorePatterns": [
{
"ignorePatterns": [{
"pattern": "^http://localhost"
}],
"httpHeaders": [{
"comment": "Workaround as suggested here: https://github.com/tcort/markdown-link-check/issues/201",
"urls": ["https://docs.github.com/"],
"headers": {
"Accept-Encoding": "zstd, br, gzip, deflate"
}
],
"timeout": "5s",
}],
"timeout": "10s",
"retryOn429": true,
"retryCount": 5,
"fallbackRetryDelay": "30s",
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -757,4 +757,4 @@ $(KUSTOMIZE): # Download kustomize using hack script into tools folder.
$(GOLANGCI_LINT): .github/workflows/golangci-lint.yml # Download golanci-lint using hack script into tools folder.
hack/ensure-golangci-lint.sh \
-b $(TOOLS_DIR)/$(BIN_DIR) \
$(shell cat .github/workflows/golangci-lint.yml | grep version | sed 's/.*version: //')
$(shell cat .github/workflows/golangci-lint.yml | grep [[:space:]]version | sed 's/.*version: //')
5 changes: 4 additions & 1 deletion OWNERS_ALIASES
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ aliases:
- CecileRobertMichon
- enxebre
- fabriziopandini
- sbueringer
- vincepri

# folks who can review and LGTM any PRs in the repo
Expand All @@ -45,6 +46,7 @@ aliases:

cluster-api-bootstrap-provider-kubeadm-maintainers:
cluster-api-bootstrap-provider-kubeadm-reviewers:
- killianmuldoon

# -----------------------------------------------------------
# OWNER_ALIASES for bootstrap/kubeadm/internal/ignition
Expand All @@ -69,14 +71,14 @@ aliases:

cluster-api-clusterctl-maintainers:
cluster-api-clusterctl-reviewers:
- ykakarap

# -----------------------------------------------------------
# OWNER_ALIASES for test
# -----------------------------------------------------------

cluster-api-test-reviewers:
cluster-api-test-maintainers:
- sbueringer

# -----------------------------------------------------------
# OWNER_ALIASES for test/framework
Expand All @@ -97,4 +99,5 @@ aliases:
# -----------------------------------------------------------

cluster-api-docs-reviewers:
- killianmuldoon
cluster-api-docs-maintainers:
Original file line number Diff line number Diff line change
Expand Up @@ -246,9 +246,10 @@ func (r *KubeadmConfigReconciler) Reconcile(ctx context.Context, req ctrl.Reques
// Status is ready means a config has been generated.
case config.Status.Ready:
if config.Spec.JoinConfiguration != nil && config.Spec.JoinConfiguration.Discovery.BootstrapToken != nil {
if !configOwner.IsInfrastructureReady() {
// If the BootstrapToken has been generated for a join and the infrastructure is not ready.
// This indicates the token in the join config has not been consumed and it may need a refresh.
if !configOwner.HasNodeRefs() {
// If the BootstrapToken has been generated for a join but the config owner has no nodeRefs,
// this indicates that the node has not yet joined and the token in the join config has not
// been consumed and it may need a refresh.
return r.refreshBootstrapToken(ctx, config, cluster)
}
if configOwner.IsMachinePool() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -944,7 +944,7 @@ func TestBootstrapTokenTTLExtension(t *testing.T) {
tokenExpires[i] = item.Data[bootstrapapi.BootstrapTokenExpirationKey]
}

// ...until the infrastructure is marked "ready"
// ...the infrastructure is marked "ready", but token should still be refreshed...
patchHelper, err := patch.NewHelper(workerMachine, myclient)
g.Expect(err).ShouldNot(HaveOccurred())
workerMachine.Status.InfrastructureReady = true
Expand All @@ -957,6 +957,56 @@ func TestBootstrapTokenTTLExtension(t *testing.T) {

<-time.After(1 * time.Second)

for _, req := range []ctrl.Request{
{
NamespacedName: client.ObjectKey{
Namespace: metav1.NamespaceDefault,
Name: "worker-join-cfg",
},
},
{
NamespacedName: client.ObjectKey{
Namespace: metav1.NamespaceDefault,
Name: "control-plane-join-cfg",
},
},
} {
result, err := k.Reconcile(ctx, req)
g.Expect(err).NotTo(HaveOccurred())
g.Expect(result.RequeueAfter).NotTo(BeNumerically(">=", k.TokenTTL))
}

l = &corev1.SecretList{}
err = myclient.List(ctx, l, client.ListOption(client.InNamespace(metav1.NamespaceSystem)))
g.Expect(err).NotTo(HaveOccurred())
g.Expect(len(l.Items)).To(Equal(2))

for i, item := range l.Items {
g.Expect(bytes.Equal(tokenExpires[i], item.Data[bootstrapapi.BootstrapTokenExpirationKey])).To(BeFalse())
tokenExpires[i] = item.Data[bootstrapapi.BootstrapTokenExpirationKey]
}

// ...until the Nodes have actually joined the cluster and we get a nodeRef
patchHelper, err = patch.NewHelper(workerMachine, myclient)
g.Expect(err).ShouldNot(HaveOccurred())
workerMachine.Status.NodeRef = &corev1.ObjectReference{
APIVersion: "v1",
Kind: "Node",
Name: "worker-node",
}
g.Expect(patchHelper.Patch(ctx, workerMachine)).To(Succeed())

patchHelper, err = patch.NewHelper(controlPlaneJoinMachine, myclient)
g.Expect(err).ShouldNot(HaveOccurred())
controlPlaneJoinMachine.Status.NodeRef = &corev1.ObjectReference{
APIVersion: "v1",
Kind: "Node",
Name: "control-plane-node",
}
g.Expect(patchHelper.Patch(ctx, controlPlaneJoinMachine)).To(Succeed())

<-time.After(1 * time.Second)

for _, req := range []ctrl.Request{
{
NamespacedName: client.ObjectKey{
Expand Down Expand Up @@ -1068,14 +1118,46 @@ func TestBootstrapTokenRotationMachinePool(t *testing.T) {
tokenExpires[i] = item.Data[bootstrapapi.BootstrapTokenExpirationKey]
}

// ...until the infrastructure is marked "ready"
// ...the infrastructure is marked "ready", but token should still be refreshed...
patchHelper, err := patch.NewHelper(workerMachinePool, myclient)
g.Expect(err).ShouldNot(HaveOccurred())
workerMachinePool.Status.InfrastructureReady = true
g.Expect(patchHelper.Patch(ctx, workerMachinePool, patch.WithStatusObservedGeneration{})).To(Succeed())

<-time.After(1 * time.Second)

request = ctrl.Request{
NamespacedName: client.ObjectKey{
Namespace: metav1.NamespaceDefault,
Name: "workerpool-join-cfg",
},
}
result, err = k.Reconcile(ctx, request)
g.Expect(err).NotTo(HaveOccurred())
g.Expect(result.RequeueAfter).NotTo(BeNumerically(">=", k.TokenTTL))

l = &corev1.SecretList{}
err = myclient.List(ctx, l, client.ListOption(client.InNamespace(metav1.NamespaceSystem)))
g.Expect(err).NotTo(HaveOccurred())
g.Expect(len(l.Items)).To(Equal(1))

for i, item := range l.Items {
g.Expect(bytes.Equal(tokenExpires[i], item.Data[bootstrapapi.BootstrapTokenExpirationKey])).To(BeFalse())
tokenExpires[i] = item.Data[bootstrapapi.BootstrapTokenExpirationKey]
}

// ...until all nodes have joined
workerMachinePool.Status.NodeRefs = []corev1.ObjectReference{
{
Kind: "Node",
Namespace: metav1.NamespaceDefault,
Name: "node-0",
},
}
g.Expect(patchHelper.Patch(ctx, workerMachinePool, patch.WithStatusObservedGeneration{})).To(Succeed())

<-time.After(1 * time.Second)

request = ctrl.Request{
NamespacedName: client.ObjectKey{
Namespace: metav1.NamespaceDefault,
Expand Down
26 changes: 26 additions & 0 deletions bootstrap/util/configowner.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,32 @@ func (co ConfigOwner) IsInfrastructureReady() bool {
return infrastructureReady
}

// HasNodeRefs checks if the config owner has nodeRefs. For a Machine this means
// that it has a nodeRef. For a MachinePool it means that it has as many nodeRefs
// as there are replicas.
func (co ConfigOwner) HasNodeRefs() bool {
if co.IsMachinePool() {
numExpectedNodes, found, err := unstructured.NestedInt64(co.Object, "spec", "replicas")
if err != nil {
return false
}
// replicas default to 1 so this is what we should use if nothing is specified
if !found {
numExpectedNodes = 1
}
nodeRefs, _, err := unstructured.NestedSlice(co.Object, "status", "nodeRefs")
if err != nil {
return false
}
return len(nodeRefs) == int(numExpectedNodes)
}
nodeRef, _, err := unstructured.NestedMap(co.Object, "status", "nodeRef")
if err != nil {
return false
}
return len(nodeRef) > 0
}

// ClusterName extracts spec.clusterName from the config owner.
func (co ConfigOwner) ClusterName() string {
clusterName, _, err := unstructured.NestedString(co.Object, "spec", "clusterName")
Expand Down
Loading