Skip to content

Commit

Permalink
Merge branch 'kubernetes-sigs:main' into yamllint-enhancement
Browse files Browse the repository at this point in the history
  • Loading branch information
priyanshikhetwani authored Nov 26, 2024
2 parents 96fe8fe + eed3ac7 commit 33c5e87
Show file tree
Hide file tree
Showing 44 changed files with 14,023 additions and 862 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,6 @@ vendor/sigs.k8s.io/cluster-api/docs/book/*.json
# release
_artifacts/
out/

#ide settings
.vscode/
11 changes: 6 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,9 @@ This provider's versions are compatible with the following versions of Cluster A
If you have questions or want to get the latest project news, you can connect with us in the following ways:

- Chat with us on the Kubernetes [Slack](http://slack.k8s.io/) in the [#cluster-api-ibmcloud][slack] channel
- Subscribe to the [SIG Cluster Lifecycle](https://groups.google.com/forum/#!forum/kubernetes-sig-cluster-lifecycle) Google Group for access to documents and calendars
- Join our Weekly meeting sessions where we share the latest project news, demos, answer questions, and triage issues
- Biweekly on Friday @ 09:00 IST on [Zoom][zoomMeeting]
- Subscribe to the [SIG Cluster Lifecycle](https://groups.google.com/a/kubernetes.io/g/sig-cluster-lifecycle) Google Group for access to documents and calendars
- Join our Bi-Weekly meeting sessions where we share the latest project news, demos, answer questions, and triage issues
- Biweekly on Tuesday @ 10:00 IST on [Zoom][zoomMeeting]. ([Convert to your timezone][convert-time-zone])
- Previous meetings: \[ [notes][notes] \]

Pull Requests and feedback on issues are very welcome!
Expand All @@ -73,13 +73,14 @@ also feel free to reach out to discuss.
See also our [contributor guide](CONTRIBUTING.md) and the Kubernetes [community page] for more details on how to get involved.

[slack]: https://kubernetes.slack.com/messages/C02F4CX3ALF
[zoomMeeting]: https://zoom.us/j/9392903494
[notes]: https://docs.google.com/document/d/1oWnqXy1VFv0E3kovQoZfS6IlVP0L4eaQsN-2HYC_6_A/edit
[zoomMeeting]: https://zoom.us/j/508079177
[notes]: https://cluster-api-ibmcloud.sigs.k8s.io/agenda
[issue tracker]: https://github.com/kubernetes-sigs/cluster-api-provider-ibmcloud/issues
[Good first issue]: https://github.com/kubernetes-sigs/cluster-api-provider-ibmcloud/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22
[Help wanted]: https://github.com/kubernetes-sigs/cluster-api-provider-ibmcloud/issues?utf8=%E2%9C%93&q=is%3Aopen+is%3Aissue+label%3A%22help+wanted%22+
[community page]: https://kubernetes.io/community
[cluster-api-supported-v]: https://cluster-api.sigs.k8s.io/reference/versions.html
[convert-time-zone]: http://www.thetimezoneconverter.com/?t=10%3A00&tz=IST

### Code of conduct

Expand Down
4 changes: 2 additions & 2 deletions api/v1beta2/ibmpowervscluster_webhook.go
Original file line number Diff line number Diff line change
Expand Up @@ -198,11 +198,11 @@ func (r *IBMPowerVSCluster) validateIBMPowerVSClusterCreateInfraPrereq() (allErr
allErrs = append(allErrs, field.Invalid(field.NewPath("spec.vpc"), r.Spec.VPC, "value of VPC is empty"))
}

if r.Spec.VPC.Region == nil {
if r.Spec.VPC != nil && r.Spec.VPC.Region == nil {
allErrs = append(allErrs, field.Invalid(field.NewPath("spec.vpc.region"), r.Spec.VPC.Region, "value of VPC region is empty"))
}

if r.Spec.VPC.Region != nil && !regionUtil.ValidateVPCRegion(*r.Spec.VPC.Region) {
if r.Spec.VPC != nil && r.Spec.VPC.Region != nil && !regionUtil.ValidateVPCRegion(*r.Spec.VPC.Region) {
allErrs = append(allErrs, field.Invalid(field.NewPath("spec.vpc.region"), r.Spec.VPC.Region, fmt.Sprintf("vpc region '%s' is not supported", *r.Spec.VPC.Region)))
}

Expand Down
10 changes: 10 additions & 0 deletions api/v1beta2/ibmvpcmachine_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,16 @@ type IBMVPCMachine struct {
Status IBMVPCMachineStatus `json:"status,omitempty"`
}

// GetConditions returns the observations of the operational state of the IBMVPCMachine resource.
func (r *IBMVPCMachine) GetConditions() capiv1beta1.Conditions {
return r.Status.Conditions
}

// SetConditions sets the underlying service state of the IBMVPCMachine to the predescribed clusterv1.Conditions.
func (r *IBMVPCMachine) SetConditions(conditions capiv1beta1.Conditions) {
r.Status.Conditions = conditions
}

//+kubebuilder:object:root=true

// IBMVPCMachineList contains a list of IBMVPCMachine.
Expand Down
2 changes: 2 additions & 0 deletions api/v1beta2/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,8 @@ var (
ResourceTypeDHCPServer = ResourceType("dhcpServer")
// ResourceTypeLoadBalancer VPC loadBalancer resource.
ResourceTypeLoadBalancer = ResourceType("loadBalancer")
// ResourceTypeLoadBalancerPool is a Load Balancer Pool resource.
ResourceTypeLoadBalancerPool = ResourceType("loadBalancerPool")
// ResourceTypeTransitGateway is transit gateway resource.
ResourceTypeTransitGateway = ResourceType("transitGateway")
// ResourceTypeVPC is Power VS network resource.
Expand Down
14 changes: 14 additions & 0 deletions cloud/scope/common_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,11 @@ limitations under the License.
package scope

import (
"github.com/IBM-Cloud/power-go-client/power/models"
"github.com/IBM/go-sdk-core/v5/core"
corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/utils/ptr"
capiv1beta1 "sigs.k8s.io/cluster-api/api/v1beta1"

infrav1beta2 "sigs.k8s.io/cluster-api-provider-ibmcloud/api/v1beta2"
Expand Down Expand Up @@ -88,3 +90,15 @@ func newBootstrapSecret(clusterName, machineName string) *corev1.Secret {
},
}
}

func newDHCPServerDetails(serverID, leaseIP, instanceMac string) *models.DHCPServerDetail {
return &models.DHCPServerDetail{
ID: ptr.To(serverID),
Leases: []*models.DHCPServerLeases{
{
InstanceIP: ptr.To(leaseIP),
InstanceMacAddress: ptr.To(instanceMac),
},
},
}
}
Loading

0 comments on commit 33c5e87

Please sign in to comment.