This repository has been archived by the owner on Oct 12, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add Virtual Machine, VMSS and NetworkInterfaces (#115)
* feat: add Virtual Machine, VMSS and NetworkInterfaces * feat: add ability to transform nested slices
- Loading branch information
Showing
63 changed files
with
11,927 additions
and
515 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
/* | ||
Copyright (c) Microsoft Corporation. | ||
Licensed under the MIT license. | ||
*/ | ||
|
||
package v1 | ||
|
||
func (*VirtualMachine) Hub() {} | ||
func (*VirtualMachineScaleSet) Hub() {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
/* | ||
Copyright (c) Microsoft Corporation. | ||
Licensed under the MIT license. | ||
*/ | ||
|
||
package v1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
/* | ||
Copyright (c) Microsoft Corporation. | ||
Licensed under the MIT license. | ||
*/ | ||
|
||
// Package v1 contains API Schema definitions for the microsoft.compute v1 API group | ||
// +kubebuilder:object:generate=true | ||
// +groupName=microsoft.compute.infra.azure.com | ||
package v1 | ||
|
||
import ( | ||
"k8s.io/apimachinery/pkg/runtime/schema" | ||
"sigs.k8s.io/controller-runtime/pkg/scheme" | ||
) | ||
|
||
var ( | ||
// GroupVersion is group version used to register these objects | ||
GroupVersion = schema.GroupVersion{Group: "microsoft.compute.infra.azure.com", Version: "v1"} | ||
|
||
// SchemeBuilder is used to add go types to the GroupVersionKind scheme | ||
SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion} | ||
|
||
// AddToScheme adds the types in this group-version to the given scheme. | ||
AddToScheme = SchemeBuilder.AddToScheme | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
/* | ||
Copyright (c) Microsoft Corporation. | ||
Licensed under the MIT license. | ||
*/ | ||
|
||
package v1 | ||
|
||
import ( | ||
azcorev1 "github.com/Azure/k8s-infra/apis/core/v1" | ||
) | ||
|
||
func (vm *VirtualMachine) GetResourceGroupObjectRef() *azcorev1.KnownTypeReference { | ||
return vm.Spec.ResourceGroupRef | ||
} | ||
|
||
func (vmss *VirtualMachineScaleSet) GetResourceGroupObjectRef() *azcorev1.KnownTypeReference { | ||
return vmss.Spec.ResourceGroupRef | ||
} | ||
|
||
func (*VirtualMachine) ResourceType() string { | ||
return "Microsoft.Compute/virtualMachines" | ||
} | ||
|
||
func (*VirtualMachineScaleSet) ResourceType() string { | ||
return "Microsoft.Compute/virtualMachineScaleSets" | ||
} |
Large diffs are not rendered by default.
Oops, something went wrong.
373 changes: 373 additions & 0 deletions
373
apis/microsoft.compute/v1/virtualmachinescaleset_types.go
Large diffs are not rendered by default.
Oops, something went wrong.
Oops, something went wrong.