-
Notifications
You must be signed in to change notification settings - Fork 7
build: Add AWS clusterclass example #162
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
Merged
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
56d967d
build: Add AWS clusterclass example
jimmidyson 49bd5dc
build: Enable CAPA provider in KinD deployment
jimmidyson 671fef2
fixup! build: Fix name references
jimmidyson 0be640c
fixup! build: Add AWS clusterclass example
dkoshkin 1a94980
build: read AWS envs and pass to clusterctl
dkoshkin e3cc7d3
Revert "build: read AWS envs and pass to clusterctl"
dkoshkin 553add4
build: add AWSClusterStaticIdentity in example file
dkoshkin eb30385
fixup! build: Add AWS clusterclass example
dkoshkin 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,7 @@ | |
"actionlint@latest", | ||
"[email protected]", | ||
"clusterctl@latest", | ||
"coreutils@latest", | ||
"crane@latest", | ||
"envsubst@latest", | ||
"findutils@latest", | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,155 @@ | ||
apiVersion: cluster.x-k8s.io/v1beta1 | ||
kind: ClusterClass | ||
metadata: | ||
labels: | ||
cluster.x-k8s.io/provider: aws | ||
name: aws-quick-start | ||
spec: | ||
controlPlane: | ||
machineInfrastructure: | ||
ref: | ||
apiVersion: infrastructure.cluster.x-k8s.io/v1beta2 | ||
kind: AWSMachineTemplate | ||
name: aws-quick-start-control-plane | ||
ref: | ||
apiVersion: controlplane.cluster.x-k8s.io/v1beta1 | ||
kind: KubeadmControlPlaneTemplate | ||
name: aws-quick-start-control-plane | ||
infrastructure: | ||
ref: | ||
apiVersion: infrastructure.cluster.x-k8s.io/v1beta2 | ||
kind: AWSClusterTemplate | ||
name: aws-quick-start | ||
patches: | ||
- external: | ||
discoverVariablesExtension: clusterconfigvars.capi-runtime-extensions | ||
generateExtension: clusterconfigpatch.capi-runtime-extensions | ||
name: cluster-config | ||
- definitions: | ||
- jsonPatches: | ||
- op: add | ||
path: /spec/template/spec/region | ||
valueFrom: | ||
template: | | ||
{{ if .region }}{{ .region }}{{ else }}us-west-2{{ end }} | ||
selector: | ||
apiVersion: infrastructure.cluster.x-k8s.io/v1beta2 | ||
kind: AWSClusterTemplate | ||
matchResources: | ||
infrastructureCluster: true | ||
description: aws region to target for cluster creation | ||
name: region | ||
- definitions: | ||
- jsonPatches: | ||
- op: add | ||
path: /spec/template/spec/identityRef | ||
valueFrom: | ||
template: | | ||
kind: AWSClusterStaticIdentity | ||
name: {{ .builtin.cluster.name }} | ||
selector: | ||
apiVersion: infrastructure.cluster.x-k8s.io/v1beta2 | ||
kind: AWSClusterTemplate | ||
matchResources: | ||
infrastructureCluster: true | ||
description: AWSClusterStaticIdentity identityRef to use when creating the cluster | ||
name: identityRef | ||
variables: | ||
- name: region | ||
schema: | ||
openAPIV3Schema: | ||
default: us-west-2 | ||
description: aws region to target for cluster creation | ||
example: us-west-2 | ||
type: string | ||
workers: | ||
machineDeployments: | ||
- class: default-worker | ||
template: | ||
bootstrap: | ||
ref: | ||
apiVersion: bootstrap.cluster.x-k8s.io/v1beta1 | ||
kind: KubeadmConfigTemplate | ||
name: aws-quick-start-worker-bootstraptemplate | ||
infrastructure: | ||
ref: | ||
apiVersion: infrastructure.cluster.x-k8s.io/v1beta2 | ||
kind: AWSMachineTemplate | ||
name: aws-quick-start-worker-machinetemplate | ||
--- | ||
apiVersion: infrastructure.cluster.x-k8s.io/v1beta2 | ||
kind: AWSClusterTemplate | ||
metadata: | ||
labels: | ||
cluster.x-k8s.io/provider: aws | ||
name: aws-quick-start | ||
spec: | ||
template: | ||
spec: {} | ||
--- | ||
apiVersion: controlplane.cluster.x-k8s.io/v1beta1 | ||
kind: KubeadmControlPlaneTemplate | ||
metadata: | ||
labels: | ||
cluster.x-k8s.io/provider: aws | ||
name: aws-quick-start-control-plane | ||
spec: | ||
template: | ||
spec: | ||
kubeadmConfigSpec: | ||
clusterConfiguration: | ||
apiServer: | ||
extraArgs: | ||
cloud-provider: aws | ||
controllerManager: | ||
extraArgs: | ||
cloud-provider: aws | ||
initConfiguration: | ||
nodeRegistration: | ||
kubeletExtraArgs: | ||
cloud-provider: aws | ||
name: '{{ ds.meta_data.local_hostname }}' | ||
joinConfiguration: | ||
nodeRegistration: | ||
kubeletExtraArgs: | ||
cloud-provider: aws | ||
name: '{{ ds.meta_data.local_hostname }}' | ||
--- | ||
apiVersion: infrastructure.cluster.x-k8s.io/v1beta2 | ||
kind: AWSMachineTemplate | ||
metadata: | ||
labels: | ||
cluster.x-k8s.io/provider: aws | ||
name: aws-quick-start-control-plane | ||
spec: | ||
template: | ||
spec: | ||
iamInstanceProfile: control-plane.cluster-api-provider-aws.sigs.k8s.io | ||
instanceType: m5.xlarge | ||
--- | ||
apiVersion: infrastructure.cluster.x-k8s.io/v1beta2 | ||
kind: AWSMachineTemplate | ||
metadata: | ||
labels: | ||
cluster.x-k8s.io/provider: aws | ||
name: aws-quick-start-worker-machinetemplate | ||
spec: | ||
template: | ||
spec: | ||
iamInstanceProfile: nodes.cluster-api-provider-aws.sigs.k8s.io | ||
instanceType: m5.2xlarge | ||
--- | ||
apiVersion: bootstrap.cluster.x-k8s.io/v1beta1 | ||
kind: KubeadmConfigTemplate | ||
metadata: | ||
labels: | ||
cluster.x-k8s.io/provider: aws | ||
name: aws-quick-start-worker-bootstraptemplate | ||
spec: | ||
template: | ||
spec: | ||
joinConfiguration: | ||
nodeRegistration: | ||
kubeletExtraArgs: | ||
cloud-provider: aws | ||
name: '{{ ds.meta_data.local_hostname }}' |
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 |
---|---|---|
@@ -0,0 +1,44 @@ | ||
apiVersion: cluster.x-k8s.io/v1beta1 | ||
kind: Cluster | ||
metadata: | ||
labels: | ||
cluster.x-k8s.io/provider: aws | ||
name: aws-quick-start | ||
spec: | ||
clusterNetwork: | ||
pods: | ||
cidrBlocks: | ||
- 192.168.0.0/16 | ||
serviceDomain: cluster.local | ||
services: | ||
cidrBlocks: | ||
- 10.128.0.0/12 | ||
topology: | ||
class: aws-quick-start | ||
controlPlane: | ||
replicas: 1 | ||
variables: | ||
- name: clusterConfig | ||
value: | ||
addons: | ||
cni: | ||
provider: calico | ||
nfd: {} | ||
version: v1.27.5 | ||
workers: | ||
machineDeployments: | ||
- class: default-worker | ||
name: md-0 | ||
replicas: 1 | ||
--- | ||
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 | ||
kind: AWSClusterStaticIdentity | ||
metadata: | ||
labels: | ||
cluster.x-k8s.io/provider: aws | ||
name: aws-quick-start | ||
spec: | ||
allowedNamespaces: | ||
list: | ||
- default | ||
secretRef: aws-quick-start-creds |
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.