Skip to content

Commit

Permalink
add nodetags
Browse files Browse the repository at this point in the history
  • Loading branch information
paurosello committed Nov 8, 2024
1 parent 3b81038 commit 1c39ebe
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 0 deletions.
2 changes: 2 additions & 0 deletions helm/cluster-aws/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ Properties within the `.global.providerSpecific` object

| **Property** | **Description** | **More Details** |
| :----------- | :-------------- | :--------------- |
| `global.providerSpecific.additionalNodeTags` | **Additional node tags** - Additional tags to add to AWS nodes created by the cluster.|**Type:** `object`<br/>|
| `global.providerSpecific.additionalNodeTags.*` | **Tag value**|**Type:** `string`<br/>**Value pattern:** `^[ a-zA-Z0-9\._:/=+-@]+$`<br/>|
| `global.providerSpecific.additionalResourceTags` | **Additional resource tags** - Additional tags to add to AWS resources created by the cluster.|**Type:** `object`<br/>|
| `global.providerSpecific.additionalResourceTags.*` | **Tag value**|**Type:** `string`<br/>**Value pattern:** `^[ a-zA-Z0-9\._:/=+-@]+$`<br/>|
| `global.providerSpecific.ami` | **Amazon machine image (AMI)** - If specified, this image will be used to provision EC2 instances.|**Type:** `string`<br/>|
Expand Down
2 changes: 2 additions & 0 deletions helm/cluster-aws/templates/_control_plane.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ Any changes to this will trigger the resource to be recreated rather than attemp
*/}}
{{- define "controlplane-awsmachinetemplate-spec" -}}
{{- include "ami" $ }}
additionalTags:
{{- if .Values.global.providerSpecific.additionalNodeTags -}}{{- toYaml .Values.global.providerSpecific.additionalNodeTags | nindent 2 }}{{- end}}
cloudInit: {}
instanceType: {{ .Values.global.controlPlane.instanceType }}
nonRootVolumes:
Expand Down
1 change: 1 addition & 0 deletions helm/cluster-aws/templates/_machine_pools.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ spec:
additionalTags:
k8s.io/cluster-autoscaler/enabled: "true"
giantswarm.io/machinepool: {{ $name }}
{{- if .Values.global.providerSpecific.additionalNodeTags -}}{{- toYaml .Values.global.providerSpecific.additionalNodeTags | nindent 4 }}{{- end}}
availabilityZones: {{ include "aws-availability-zones" (dict "mp" $value "Values" $.Values "Files" $.Files) | nindent 2 }}
subnets:
- filters:
Expand Down
8 changes: 8 additions & 0 deletions helm/cluster-aws/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -1626,6 +1626,14 @@
"$ref": "#/$defs/awsResourceTagValue"
}
},
"additionalNodeTags": {
"type": "object",
"title": "Additional node tags",
"description": "Additional tags to add to AWS nodes created by the cluster.",
"additionalProperties": {
"$ref": "#/$defs/awsResourceTagValue"
}
},
"ami": {
"type": "string",
"title": "Amazon machine image (AMI)",
Expand Down

0 comments on commit 1c39ebe

Please sign in to comment.