From 5675747bfa5566bd14d3051516aa66dc27a7437c Mon Sep 17 00:00:00 2001 From: eromanova Date: Wed, 19 Jun 2024 12:26:51 +0400 Subject: [PATCH 1/3] Properly set parameters type for subnets --- templates/aws-hosted-cp/values.yaml | 4 +++- templates/aws-standalone-cp/values.yaml | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/templates/aws-hosted-cp/values.yaml b/templates/aws-hosted-cp/values.yaml index 560f373b0..c841d06cc 100644 --- a/templates/aws-hosted-cp/values.yaml +++ b/templates/aws-hosted-cp/values.yaml @@ -13,7 +13,9 @@ clusterNetwork: vpcID: "" region: "" sshKeyName: "" -subnets: [] +subnets: + - id: "" + availabilityZone: "" # AWS machines parameters amiID: "" diff --git a/templates/aws-standalone-cp/values.yaml b/templates/aws-standalone-cp/values.yaml index d46591cf9..099e48354 100644 --- a/templates/aws-standalone-cp/values.yaml +++ b/templates/aws-standalone-cp/values.yaml @@ -14,7 +14,9 @@ clusterNetwork: vpcID: "" region: "" sshKeyName: "" -subnets: [] +subnets: + - id: "" + availabilityZone: "" controlPlaneLoadBalancer: additionalSecurityGroups: [] From 275dc000f5cec8f009c6ea1bd9d6744b1eafbcee Mon Sep 17 00:00:00 2001 From: eromanova Date: Wed, 19 Jun 2024 12:33:12 +0400 Subject: [PATCH 2/3] Support to configure public IP for AWS machines --- templates/aws-hosted-cp/templates/awsmachinetemplate.yaml | 1 + templates/aws-hosted-cp/values.yaml | 1 + .../templates/awsmachinetemplate-controlplane.yaml | 1 + .../aws-standalone-cp/templates/awsmachinetemplate-worker.yaml | 1 + templates/aws-standalone-cp/values.yaml | 1 + 5 files changed, 5 insertions(+) diff --git a/templates/aws-hosted-cp/templates/awsmachinetemplate.yaml b/templates/aws-hosted-cp/templates/awsmachinetemplate.yaml index 608eda2ad..4776b7d80 100644 --- a/templates/aws-hosted-cp/templates/awsmachinetemplate.yaml +++ b/templates/aws-hosted-cp/templates/awsmachinetemplate.yaml @@ -19,3 +19,4 @@ spec: {{- if .Values.sshKeyName }} sshKeyName: {{ .Values.sshKeyName }} {{- end }} + publicIP: {{ .Values.publicIP }} diff --git a/templates/aws-hosted-cp/values.yaml b/templates/aws-hosted-cp/values.yaml index c841d06cc..dd6af6853 100644 --- a/templates/aws-hosted-cp/values.yaml +++ b/templates/aws-hosted-cp/values.yaml @@ -13,6 +13,7 @@ clusterNetwork: vpcID: "" region: "" sshKeyName: "" +publicIP: false subnets: - id: "" availabilityZone: "" diff --git a/templates/aws-standalone-cp/templates/awsmachinetemplate-controlplane.yaml b/templates/aws-standalone-cp/templates/awsmachinetemplate-controlplane.yaml index cf209b3df..ede061f4f 100644 --- a/templates/aws-standalone-cp/templates/awsmachinetemplate-controlplane.yaml +++ b/templates/aws-standalone-cp/templates/awsmachinetemplate-controlplane.yaml @@ -21,3 +21,4 @@ spec: {{- if .Values.sshKeyName }} sshKeyName: {{ .Values.sshKeyName }} {{- end }} + publicIP: {{ .Values.publicIP }} diff --git a/templates/aws-standalone-cp/templates/awsmachinetemplate-worker.yaml b/templates/aws-standalone-cp/templates/awsmachinetemplate-worker.yaml index 9944993a9..9f1d961f5 100644 --- a/templates/aws-standalone-cp/templates/awsmachinetemplate-worker.yaml +++ b/templates/aws-standalone-cp/templates/awsmachinetemplate-worker.yaml @@ -21,3 +21,4 @@ spec: {{- if .Values.sshKeyName }} sshKeyName: {{ .Values.sshKeyName }} {{- end }} + publicIP: {{ .Values.publicIP }} diff --git a/templates/aws-standalone-cp/values.yaml b/templates/aws-standalone-cp/values.yaml index 099e48354..a08121392 100644 --- a/templates/aws-standalone-cp/values.yaml +++ b/templates/aws-standalone-cp/values.yaml @@ -14,6 +14,7 @@ clusterNetwork: vpcID: "" region: "" sshKeyName: "" +publicIP: false subnets: - id: "" availabilityZone: "" From eb7cafd7f014dea8b1bf02437c66ea6671e1fda4 Mon Sep 17 00:00:00 2001 From: eromanova Date: Wed, 19 Jun 2024 14:04:38 +0400 Subject: [PATCH 3/3] Fix CRDs inject-ca-from annotation in cluster-api --- templates/cluster-api/templates/crds/clusterclasses.yaml | 2 +- .../cluster-api/templates/crds/clusterresourcesetbindings.yaml | 2 +- templates/cluster-api/templates/crds/clusterresourcesets.yaml | 2 +- templates/cluster-api/templates/crds/clusters.yaml | 2 +- templates/cluster-api/templates/crds/machinedeployments.yaml | 2 +- templates/cluster-api/templates/crds/machinehealthchecks.yaml | 2 +- templates/cluster-api/templates/crds/machinepools.yaml | 2 +- templates/cluster-api/templates/crds/machines.yaml | 2 +- templates/cluster-api/templates/crds/machinesets.yaml | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/templates/cluster-api/templates/crds/clusterclasses.yaml b/templates/cluster-api/templates/crds/clusterclasses.yaml index 389ccc24a..8e3b0fae7 100644 --- a/templates/cluster-api/templates/crds/clusterclasses.yaml +++ b/templates/cluster-api/templates/crds/clusterclasses.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - cert-manager.io/inject-ca-from: capi-system/capi-serving-cert + cert-manager.io/inject-ca-from: {{ .Release.Namespace }}/{{ include "cluster-api.fullname" . }}-serving-cert controller-gen.kubebuilder.io/version: v0.14.0 creationTimestamp: null labels: diff --git a/templates/cluster-api/templates/crds/clusterresourcesetbindings.yaml b/templates/cluster-api/templates/crds/clusterresourcesetbindings.yaml index 794f02904..1b6acc217 100644 --- a/templates/cluster-api/templates/crds/clusterresourcesetbindings.yaml +++ b/templates/cluster-api/templates/crds/clusterresourcesetbindings.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - cert-manager.io/inject-ca-from: capi-system/capi-serving-cert + cert-manager.io/inject-ca-from: {{ .Release.Namespace }}/{{ include "cluster-api.fullname" . }}-serving-cert controller-gen.kubebuilder.io/version: v0.14.0 creationTimestamp: null labels: diff --git a/templates/cluster-api/templates/crds/clusterresourcesets.yaml b/templates/cluster-api/templates/crds/clusterresourcesets.yaml index 1a740b502..3404469b7 100644 --- a/templates/cluster-api/templates/crds/clusterresourcesets.yaml +++ b/templates/cluster-api/templates/crds/clusterresourcesets.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - cert-manager.io/inject-ca-from: capi-system/capi-serving-cert + cert-manager.io/inject-ca-from: {{ .Release.Namespace }}/{{ include "cluster-api.fullname" . }}-serving-cert controller-gen.kubebuilder.io/version: v0.14.0 creationTimestamp: null labels: diff --git a/templates/cluster-api/templates/crds/clusters.yaml b/templates/cluster-api/templates/crds/clusters.yaml index 5df112bca..fe511aa00 100644 --- a/templates/cluster-api/templates/crds/clusters.yaml +++ b/templates/cluster-api/templates/crds/clusters.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - cert-manager.io/inject-ca-from: capi-system/capi-serving-cert + cert-manager.io/inject-ca-from: {{ .Release.Namespace }}/{{ include "cluster-api.fullname" . }}-serving-cert controller-gen.kubebuilder.io/version: v0.14.0 creationTimestamp: null labels: diff --git a/templates/cluster-api/templates/crds/machinedeployments.yaml b/templates/cluster-api/templates/crds/machinedeployments.yaml index 1760a64ff..43c2c4981 100644 --- a/templates/cluster-api/templates/crds/machinedeployments.yaml +++ b/templates/cluster-api/templates/crds/machinedeployments.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - cert-manager.io/inject-ca-from: capi-system/capi-serving-cert + cert-manager.io/inject-ca-from: {{ .Release.Namespace }}/{{ include "cluster-api.fullname" . }}-serving-cert controller-gen.kubebuilder.io/version: v0.14.0 creationTimestamp: null labels: diff --git a/templates/cluster-api/templates/crds/machinehealthchecks.yaml b/templates/cluster-api/templates/crds/machinehealthchecks.yaml index a1309b998..fe7a57610 100644 --- a/templates/cluster-api/templates/crds/machinehealthchecks.yaml +++ b/templates/cluster-api/templates/crds/machinehealthchecks.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - cert-manager.io/inject-ca-from: capi-system/capi-serving-cert + cert-manager.io/inject-ca-from: {{ .Release.Namespace }}/{{ include "cluster-api.fullname" . }}-serving-cert controller-gen.kubebuilder.io/version: v0.14.0 creationTimestamp: null labels: diff --git a/templates/cluster-api/templates/crds/machinepools.yaml b/templates/cluster-api/templates/crds/machinepools.yaml index 817f3d9f7..408c4e401 100644 --- a/templates/cluster-api/templates/crds/machinepools.yaml +++ b/templates/cluster-api/templates/crds/machinepools.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - cert-manager.io/inject-ca-from: capi-system/capi-serving-cert + cert-manager.io/inject-ca-from: {{ .Release.Namespace }}/{{ include "cluster-api.fullname" . }}-serving-cert controller-gen.kubebuilder.io/version: v0.14.0 creationTimestamp: null labels: diff --git a/templates/cluster-api/templates/crds/machines.yaml b/templates/cluster-api/templates/crds/machines.yaml index 7b36a698e..f525d59f2 100644 --- a/templates/cluster-api/templates/crds/machines.yaml +++ b/templates/cluster-api/templates/crds/machines.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - cert-manager.io/inject-ca-from: capi-system/capi-serving-cert + cert-manager.io/inject-ca-from: {{ .Release.Namespace }}/{{ include "cluster-api.fullname" . }}-serving-cert controller-gen.kubebuilder.io/version: v0.14.0 creationTimestamp: null labels: diff --git a/templates/cluster-api/templates/crds/machinesets.yaml b/templates/cluster-api/templates/crds/machinesets.yaml index f8cc40fce..c35fefa74 100644 --- a/templates/cluster-api/templates/crds/machinesets.yaml +++ b/templates/cluster-api/templates/crds/machinesets.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - cert-manager.io/inject-ca-from: capi-system/capi-serving-cert + cert-manager.io/inject-ca-from: {{ .Release.Namespace }}/{{ include "cluster-api.fullname" . }}-serving-cert controller-gen.kubebuilder.io/version: v0.14.0 creationTimestamp: null labels: