This repository was archived by the owner on Apr 11, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
feat: set default instance type for aws cp and worker nodes #51
Open
supershal
wants to merge
96
commits into
main
Choose a base branch
from
shalin/default_instance_type
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 1 commit
Commits
Show all changes
96 commits
Select commit
Hold shift + click to select a range
6c53bb1
build: Remove unused example kustomizations
jimmidyson ae3e809
Merge pull request #1 from d2iq-labs/jimmi/remove-unused-kustomizations
jimmidyson 9f56b56
feat: Add user configuration for all providers
dlipovetsky 08457eb
[WIP] added nutanix support
deepakm-ntnx e00083a
added nutanix examples for clusterclass and cluster
deepakm-ntnx 1d13297
removed extra $ sign from all the variables
deepakm-ntnx e20cf32
Update hack/examples/sync.sh
deepakm-ntnx 601c6a8
added new line to fix precommit lint
deepakm-ntnx db87f18
fix: removed trailing whitespaces
deepakm-ntnx 7e2b6e6
reverted devbox.lock changes
deepakm-ntnx c1695ce
fix: updated patches to use existing variable
deepakm-ntnx d6f54fb
test(e2e): Rename config for CAREN rather than CRE
jimmidyson 0cd416f
Merge pull request #8 from d2iq-labs/jimmi/more-caren-renames
jimmidyson 650c3cf
fixup! feat: Add user configuration for all providers
dlipovetsky 27072c6
fixup! feat: Add user configuration for all providers
dlipovetsky 5656042
test: Ensure defaults from JSON schema are respected
jimmidyson b17718a
Merge pull request #9 from d2iq-labs/jimmi/variable-defaulting-in-tests
jimmidyson 9748994
fixup! feat: Add user configuration for all providers
dlipovetsky 554dacd
Merge pull request #5 from d2iq-labs/nutanix-examples
faiq 1205a59
fixup! feat: Add user configuration for all providers
dlipovetsky a0cdd4b
fixup! feat: Add user configuration for all providers
dlipovetsky 64b7afc
fixup! feat: Add user configuration for all providers
dlipovetsky 37ec7c9
fixup! feat: Add user configuration for all providers
dlipovetsky 0968ea6
fixup! feat: Add user configuration for all providers
dlipovetsky f09a28f
fixup! feat: Add user configuration for all providers
dlipovetsky 5a73b71
fixup! feat: Add user configuration for all providers
dlipovetsky b8bcb0e
fixup! feat: Add user configuration for all providers
dlipovetsky dfd5cbe
fixup! fixup! feat: Add user configuration for all providers
dlipovetsky b0761a7
build: add Nutanix infra provider (#12)
dkoshkin 47e578a
fix: rename cpi to ccm (#11)
dkoshkin 83dbb72
test: Check for data races in go tests
dlipovetsky 5dba101
test: Fix data race
dlipovetsky 5081f42
Merge pull request #15 from dlipovetsky/test-data-race
dkoshkin 63bca57
test: Fix false negative in httpproxy test (#17)
dlipovetsky cffe77c
test: Fix false negative in auditpolicy test (#16)
dlipovetsky 7092a4c
fix: set a new name for the tigera cm for that cluster (#14)
faiq 7662213
feat: adds nutanix csi to api
faiq e32da13
feat: minor API tweaks and adds tooling for chart
faiq d9f9e3e
feat: more api changes
faiq 39cf44f
fix: adds proper permissions and api fixes
faiq c6733ba
fix: adds configuration for new storage to examples/
faiq d5c5ec2
fix: don't use deepcopy
faiq 80a80db
fix: rename files to put the configmaps in the right place
faiq 2280da1
refactor: apply suggestion from review
faiq efdeab1
fix: linting errors
faiq e4c3aa5
feat: adds nutanix driver create storage class
faiq e58e2f8
fix: pre-commit errors
faiq 79defde
fix: pass in provisioner name
faiq 7d0c094
refactor: deploy storage class as a cluster resource set
faiq a54e97c
refactor: change name of example sc
faiq dda31d8
fix: typo for default storage class key
faiq 832cc64
fix: addon defaults for csi
faiq 868022f
fix: sets the Items correctly
faiq 25b05fc
fix: examples
faiq 59bf818
fix: actually apply cm
faiq 3eee6ce
fix: storage class crs
faiq f0397e5
fix: use a unique storage class cm per cluster
faiq c57e709
refactor: rename CSIProviders to CSI
faiq 8ceebef
fix: more unit tests
faiq 3269c5b
fix: gomod
faiq f963e97
test: adds a unit test for no params
faiq 9ec05d1
feat: create crs from provider credentials
faiq 13aa430
feat: set a default storage class if 1 provider and 1 storage class c…
faiq 6845f96
refactor: use default storage config obj
faiq 5ab09f8
feat: allow volume expansion
faiq 05faebb
feat: deploy snapshot chart with nutanix
faiq 92b06d4
fix: Nutanix examples (#19)
dkoshkin 9cad889
Merge pull request #4 from dlipovetsky/users
faiq 7665a94
fix: apply suggestions from reviews
faiq 2ec54be
Merge pull request #7 from d2iq-labs/faiq/add-nutanix-csi
faiq ced51e3
docs: use a KUBERNETES_VERSION env variable (#22)
dkoshkin aa6feca
feat: Add support for CAPX (#6)
deepakm-ntnx d4768a4
refactor: CCM code to support both CRS and CAAPH provider (#25)
dkoshkin 583014f
refactor: use a string type for Nutanix's AdditionalTrustBundle (#28)
dkoshkin c4bed7a
build: update devbox.lock (#29)
faiq f8c47e2
test: unit test for individual patch generator (#21)
supershal 184e7d6
test: move all patch generator unit tests to their own packages (#23)
supershal 8141a4c
feat: Make containerd restart its own patch (#18)
dlipovetsky 2b1e7ec
build(deps): Bump golang.org/x/net to v0.24.0 (#42)
jimmidyson e78e6f9
build: add CSI configuration to Nutanix examples (#33)
dkoshkin cb8fadb
fix: use a LocalObjectReference for credentials Secret (#37)
dkoshkin 0e91d4d
fix: the handlers should be changing user provided input (#35)
dkoshkin f819811
refactor: combine PC host and port into a single url var (#36)
dkoshkin 92184b0
ci: Always use latest go for govulncheck (#41)
jimmidyson 5a384e3
ci: Disable fail-fast for matrix jobs (#43)
jimmidyson 21f4055
fix: Nutanix CSI credentials Secret creation (#34)
dkoshkin 9b92854
feat: get helm config from a well known configmap (#27)
faiq c59f46a
feat: Add patch to configure containerd metrics (#44)
dlipovetsky a137bb5
fix: Nutanix CSI HelmChartProxy name and namespace (#45)
dkoshkin bf3a644
build: Specify CAPI provider versions from go module versions (#47)
jimmidyson 3a83bd3
ci: Switch to jetify-com/devbox-install-action (#48)
jimmidyson 1137f86
ci: Update govulncheck task to use same version of go as project (#49)
jimmidyson 05b8c1a
feat: deploy Nutanix CCM as an Addon (#38)
dkoshkin cdf1979
fix: set 'PLACEHOLDER' as default for instance type
supershal 3f673f9
feat: set default instance type for aws cp and workers
supershal c5067a4
fix: set defaults for AWS CP and Worker instanceType
supershal File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 | ||||
---|---|---|---|---|---|---|
|
@@ -4,10 +4,17 @@ | |||||
package v1alpha1 | ||||||
|
||||||
import ( | ||||||
"github.com/d2iq-labs/cluster-api-runtime-extensions-nutanix/api/variables" | ||||||
v1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" | ||||||
"k8s.io/utils/ptr" | ||||||
clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" | ||||||
) | ||||||
|
||||||
const ( | ||||||
AWSControlPlaneInstanceType InstanceType = "m5.xlarge" | ||||||
AWSWorkerInstanceType InstanceType = "m5.xlarge" | ||||||
) | ||||||
|
||||||
type AWSNodeSpec struct { | ||||||
// +optional | ||||||
IAMInstanceProfile *IAMInstanceProfile `json:"iamInstanceProfile,omitempty"` | ||||||
|
@@ -49,21 +56,38 @@ func (AdditionalSecurityGroup) VariableSchema() clusterv1.VariableSchema { | |||||
} | ||||||
} | ||||||
|
||||||
func (AWSNodeSpec) VariableSchema() clusterv1.VariableSchema { | ||||||
func (a AWSNodeSpec) VariableSchema() clusterv1.VariableSchema { | ||||||
instanceType := InstanceType("") | ||||||
if a.InstanceType != nil { | ||||||
instanceType = *a.InstanceType | ||||||
} | ||||||
|
||||||
return clusterv1.VariableSchema{ | ||||||
OpenAPIV3Schema: clusterv1.JSONSchemaProps{ | ||||||
Description: "AWS Node configuration", | ||||||
Type: "object", | ||||||
Properties: map[string]clusterv1.JSONSchemaProps{ | ||||||
"iamInstanceProfile": IAMInstanceProfile("").VariableSchema().OpenAPIV3Schema, | ||||||
"instanceType": InstanceType("").VariableSchema().OpenAPIV3Schema, | ||||||
"instanceType": instanceType.VariableSchema().OpenAPIV3Schema, | ||||||
"ami": AMISpec{}.VariableSchema().OpenAPIV3Schema, | ||||||
"additionalSecurityGroups": AdditionalSecurityGroup{}.VariableSchema().OpenAPIV3Schema, | ||||||
}, | ||||||
}, | ||||||
} | ||||||
} | ||||||
|
||||||
func AWSControlPlaneNodeSpec() *AWSNodeSpec { | ||||||
return &AWSNodeSpec{ | ||||||
InstanceType: ptr.To(AWSControlPlaneInstanceType), | ||||||
} | ||||||
} | ||||||
|
||||||
func AWSWorkerNodeSpec() *AWSNodeSpec { | ||||||
return &AWSNodeSpec{ | ||||||
InstanceType: ptr.To(AWSWorkerInstanceType), | ||||||
} | ||||||
} | ||||||
|
||||||
type IAMInstanceProfile string | ||||||
|
||||||
func (IAMInstanceProfile) VariableSchema() clusterv1.VariableSchema { | ||||||
|
@@ -77,11 +101,24 @@ func (IAMInstanceProfile) VariableSchema() clusterv1.VariableSchema { | |||||
|
||||||
type InstanceType string | ||||||
|
||||||
func (InstanceType) VariableSchema() clusterv1.VariableSchema { | ||||||
func (i InstanceType) VariableSchema() clusterv1.VariableSchema { | ||||||
return clusterv1.VariableSchema{ | ||||||
OpenAPIV3Schema: clusterv1.JSONSchemaProps{ | ||||||
Type: "string", | ||||||
Description: "The AWS instance type to use for the cluster Machines", | ||||||
Default: variables.MustMarshal(string(i)), | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
}, | ||||||
} | ||||||
} | ||||||
|
||||||
type ControlPlaneInstanceType string | ||||||
|
||||||
func (ControlPlaneInstanceType) VariableSchema() clusterv1.VariableSchema { | ||||||
return clusterv1.VariableSchema{ | ||||||
OpenAPIV3Schema: clusterv1.JSONSchemaProps{ | ||||||
Type: "string", | ||||||
Description: "The AWS instance type to use for the cluster Machines", | ||||||
Default: variables.MustMarshal("m5.xlarge"), | ||||||
}, | ||||||
} | ||||||
} | ||||||
|
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.