Skip to content
This repository has been archived by the owner on Mar 24, 2020. It is now read-only.

✨ Add default, validation and conversion webhooks #250

Merged
merged 6 commits into from Feb 18, 2020

Conversation

maelk
Copy link
Member

@maelk maelk commented Feb 14, 2020

This PR adds for BareMetalCluster, BareMetalMachine and BareMetalMachineTemplate:

  • the version conversion functions
  • conversion webhooks
  • default webhooks
  • validation webhooks

It also upgrade the CRD version to v1, and controller-gen to v0.2.5

@metal3-io-bot metal3-io-bot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Feb 14, 2020
@maelk
Copy link
Member Author

maelk commented Feb 14, 2020

/cc @kashifest
/cc @Jaakko-Os
/cc @fmuyassarov
/cc @jan-est

@maelk
Copy link
Member Author

maelk commented Feb 14, 2020

/test-v1a3-integration

Copy link
Member

@jan-est jan-est left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@metal3-io-bot metal3-io-bot added the lgtm Indicates that a PR is ready to be merged. label Feb 17, 2020
@metal3-io-bot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jan-est, maelk

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

- add conversion-gen output for v1alpha2
- add conversion functions for v1alpha2
- add webhooks for v1alpha2
adds the webhooks deployment
@metal3-io-bot metal3-io-bot removed the lgtm Indicates that a PR is ready to be merged. label Feb 17, 2020
Now runs a controller for webhooks and a controller for
reconciliation

Use Go 1.13
and update kustomize and kubebuilder install scripts
Copy link
Member

@fmuyassarov fmuyassarov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@metal3-io-bot metal3-io-bot added the lgtm Indicates that a PR is ready to be merged. label Feb 18, 2020
@metal3-io-bot metal3-io-bot merged commit 5ced5c4 into metal3-io:master Feb 18, 2020
@@ -36,10 +36,10 @@ import (
"k8s.io/utils/pointer"

bmh "github.com/metal3-io/baremetal-operator/pkg/apis/metal3/v1alpha1"
capbm "github.com/metal3-io/cluster-api-provider-baremetal/api/v1alpha3"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should use infrav1 in all places to be more consistent.

c.Default()
}

func TestBareMetalMachineTemplateValidation(t *testing.T) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we only check Image for validation? No other fields to check?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants