mirror of https://github.com/kubernetes/kops.git
Merge pull request #15515 from justinsb/strict_node_label_checking
node labeling: don't ignore unknown roles
This commit is contained in:
commit
0546addf29
|
|
@ -111,7 +111,10 @@ func (r *LegacyNodeReconciler) Reconcile(ctx context.Context, req ctrl.Request)
|
||||||
return ctrl.Result{}, fmt.Errorf("unable to load instance group object for node %s: %v", node.Name, err)
|
return ctrl.Result{}, fmt.Errorf("unable to load instance group object for node %s: %v", node.Name, err)
|
||||||
}
|
}
|
||||||
|
|
||||||
labels := nodelabels.BuildNodeLabels(cluster, ig)
|
labels, err := nodelabels.BuildNodeLabels(cluster, ig)
|
||||||
|
if err != nil {
|
||||||
|
return ctrl.Result{}, fmt.Errorf("error building node labels for node %q: %w", node.Name, err)
|
||||||
|
}
|
||||||
|
|
||||||
lifecycle, err := r.getInstanceLifecycle(ctx, node)
|
lifecycle, err := r.getInstanceLifecycle(ctx, node)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
|
||||||
|
|
@ -157,7 +157,11 @@ func (b *KopsModelContext) CloudTagsForInstanceGroup(ig *kops.InstanceGroup) (ma
|
||||||
}
|
}
|
||||||
|
|
||||||
// Apply labels for cluster autoscaler node labels
|
// Apply labels for cluster autoscaler node labels
|
||||||
for k, v := range nodelabels.BuildNodeLabels(b.Cluster, ig) {
|
nodeLabels, err := nodelabels.BuildNodeLabels(b.Cluster, ig)
|
||||||
|
if err != nil {
|
||||||
|
return nil, fmt.Errorf("error building node labels: %w", err)
|
||||||
|
}
|
||||||
|
for k, v := range nodeLabels {
|
||||||
labels[nodeidentityaws.ClusterAutoscalerNodeTemplateLabel+k] = v
|
labels[nodeidentityaws.ClusterAutoscalerNodeTemplateLabel+k] = v
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,6 @@ Metadata:
|
||||||
cluster_generation: "0"
|
cluster_generation: "0"
|
||||||
ig_generation: "0"
|
ig_generation: "0"
|
||||||
k8s: cluster
|
k8s: cluster
|
||||||
k8s.io_cluster-autoscaler_node-template_label_node-role.kubernetes.io_node: ""
|
|
||||||
k8s.io_role_bastion: "1"
|
k8s.io_role_bastion: "1"
|
||||||
kops.k8s.io_instancegroup: bastion
|
kops.k8s.io_instancegroup: bastion
|
||||||
Name: bastion-1-cluster
|
Name: bastion-1-cluster
|
||||||
|
|
|
||||||
|
|
@ -37,7 +37,6 @@ Metadata:
|
||||||
cluster_generation: "0"
|
cluster_generation: "0"
|
||||||
ig_generation: "0"
|
ig_generation: "0"
|
||||||
k8s: cluster
|
k8s: cluster
|
||||||
k8s.io_cluster-autoscaler_node-template_label_node-role.kubernetes.io_node: ""
|
|
||||||
k8s.io_role_bastion: "1"
|
k8s.io_role_bastion: "1"
|
||||||
kops.k8s.io_instancegroup: bastion
|
kops.k8s.io_instancegroup: bastion
|
||||||
Name: bastion-1-cluster
|
Name: bastion-1-cluster
|
||||||
|
|
|
||||||
|
|
@ -17,6 +17,8 @@ limitations under the License.
|
||||||
package nodelabels
|
package nodelabels
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"fmt"
|
||||||
|
|
||||||
"k8s.io/kops/pkg/apis/kops"
|
"k8s.io/kops/pkg/apis/kops"
|
||||||
"k8s.io/kops/pkg/featureflag"
|
"k8s.io/kops/pkg/featureflag"
|
||||||
"k8s.io/kops/util/pkg/reflectutils"
|
"k8s.io/kops/util/pkg/reflectutils"
|
||||||
|
|
@ -37,10 +39,22 @@ const (
|
||||||
|
|
||||||
// BuildNodeLabels returns the node labels for the specified instance group
|
// BuildNodeLabels returns the node labels for the specified instance group
|
||||||
// This moved from the kubelet to a central controller in kubernetes 1.16
|
// This moved from the kubelet to a central controller in kubernetes 1.16
|
||||||
func BuildNodeLabels(cluster *kops.Cluster, instanceGroup *kops.InstanceGroup) map[string]string {
|
func BuildNodeLabels(cluster *kops.Cluster, instanceGroup *kops.InstanceGroup) (map[string]string, error) {
|
||||||
isControlPlane := instanceGroup.Spec.Role == kops.InstanceGroupRoleControlPlane
|
isControlPlane := false
|
||||||
|
isAPIServer := false
|
||||||
isAPIServer := instanceGroup.Spec.Role == kops.InstanceGroupRoleAPIServer
|
isNode := false
|
||||||
|
switch instanceGroup.Spec.Role {
|
||||||
|
case kops.InstanceGroupRoleControlPlane:
|
||||||
|
isControlPlane = true
|
||||||
|
case kops.InstanceGroupRoleAPIServer:
|
||||||
|
isAPIServer = true
|
||||||
|
case kops.InstanceGroupRoleNode:
|
||||||
|
isNode = true
|
||||||
|
case kops.InstanceGroupRoleBastion:
|
||||||
|
// no labels to add
|
||||||
|
default:
|
||||||
|
return nil, fmt.Errorf("unhandled instanceGroup role %q", instanceGroup.Spec.Role)
|
||||||
|
}
|
||||||
|
|
||||||
// Merge KubeletConfig for NodeLabels
|
// Merge KubeletConfig for NodeLabels
|
||||||
c := &kops.KubeletConfigSpec{}
|
c := &kops.KubeletConfigSpec{}
|
||||||
|
|
@ -70,7 +84,9 @@ func BuildNodeLabels(cluster *kops.Cluster, instanceGroup *kops.InstanceGroup) m
|
||||||
if cluster.IsKubernetesLT("1.24") {
|
if cluster.IsKubernetesLT("1.24") {
|
||||||
nodeLabels[RoleLabelName15] = RoleAPIServerLabelValue15
|
nodeLabels[RoleLabelName15] = RoleAPIServerLabelValue15
|
||||||
}
|
}
|
||||||
} else {
|
}
|
||||||
|
|
||||||
|
if isNode {
|
||||||
if nodeLabels == nil {
|
if nodeLabels == nil {
|
||||||
nodeLabels = make(map[string]string)
|
nodeLabels = make(map[string]string)
|
||||||
}
|
}
|
||||||
|
|
@ -104,7 +120,7 @@ func BuildNodeLabels(cluster *kops.Cluster, instanceGroup *kops.InstanceGroup) m
|
||||||
nodeLabels["karpenter.sh/provisioner-name"] = instanceGroup.ObjectMeta.Name
|
nodeLabels["karpenter.sh/provisioner-name"] = instanceGroup.ObjectMeta.Name
|
||||||
}
|
}
|
||||||
|
|
||||||
return nodeLabels
|
return nodeLabels, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// BuildMandatoryControlPlaneLabels returns the list of labels all CP nodes must have
|
// BuildMandatoryControlPlaneLabels returns the list of labels all CP nodes must have
|
||||||
|
|
|
||||||
|
|
@ -115,7 +115,10 @@ func TestBuildNodeLabels(t *testing.T) {
|
||||||
|
|
||||||
for _, test := range tests {
|
for _, test := range tests {
|
||||||
t.Run(test.name, func(t *testing.T) {
|
t.Run(test.name, func(t *testing.T) {
|
||||||
out := BuildNodeLabels(test.cluster, test.ig)
|
out, err := BuildNodeLabels(test.cluster, test.ig)
|
||||||
|
if err != nil {
|
||||||
|
t.Fatalf("unexpected error from BuildNodeLabels: %v", err)
|
||||||
|
}
|
||||||
if !reflect.DeepEqual(out, test.expected) {
|
if !reflect.DeepEqual(out, test.expected) {
|
||||||
t.Fatalf("Actual result:\n%v\nExpect:\n%v", out, test.expected)
|
t.Fatalf("Actual result:\n%v\nExpect:\n%v", out, test.expected)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -37,8 +37,6 @@ KubeletConfig:
|
||||||
InTreePluginAWSUnregister: "true"
|
InTreePluginAWSUnregister: "true"
|
||||||
kubeconfigPath: /var/lib/kubelet/kubeconfig
|
kubeconfigPath: /var/lib/kubelet/kubeconfig
|
||||||
logLevel: 2
|
logLevel: 2
|
||||||
nodeLabels:
|
|
||||||
node-role.kubernetes.io/node: ""
|
|
||||||
podInfraContainerImage: registry.k8s.io/pause:3.9
|
podInfraContainerImage: registry.k8s.io/pause:3.9
|
||||||
podManifestPath: /etc/kubernetes/manifests
|
podManifestPath: /etc/kubernetes/manifests
|
||||||
protectKernelDefaults: true
|
protectKernelDefaults: true
|
||||||
|
|
|
||||||
|
|
@ -147,11 +147,6 @@ resource "aws_autoscaling_group" "bastion-bastionuserdata-example-com" {
|
||||||
propagate_at_launch = true
|
propagate_at_launch = true
|
||||||
value = "bastion.bastionuserdata.example.com"
|
value = "bastion.bastionuserdata.example.com"
|
||||||
}
|
}
|
||||||
tag {
|
|
||||||
key = "k8s.io/cluster-autoscaler/node-template/label/node-role.kubernetes.io/node"
|
|
||||||
propagate_at_launch = true
|
|
||||||
value = ""
|
|
||||||
}
|
|
||||||
tag {
|
tag {
|
||||||
key = "k8s.io/role/bastion"
|
key = "k8s.io/role/bastion"
|
||||||
propagate_at_launch = true
|
propagate_at_launch = true
|
||||||
|
|
@ -485,32 +480,29 @@ resource "aws_launch_template" "bastion-bastionuserdata-example-com" {
|
||||||
tag_specifications {
|
tag_specifications {
|
||||||
resource_type = "instance"
|
resource_type = "instance"
|
||||||
tags = {
|
tags = {
|
||||||
"KubernetesCluster" = "bastionuserdata.example.com"
|
"KubernetesCluster" = "bastionuserdata.example.com"
|
||||||
"Name" = "bastion.bastionuserdata.example.com"
|
"Name" = "bastion.bastionuserdata.example.com"
|
||||||
"k8s.io/cluster-autoscaler/node-template/label/node-role.kubernetes.io/node" = ""
|
"k8s.io/role/bastion" = "1"
|
||||||
"k8s.io/role/bastion" = "1"
|
"kops.k8s.io/instancegroup" = "bastion"
|
||||||
"kops.k8s.io/instancegroup" = "bastion"
|
"kubernetes.io/cluster/bastionuserdata.example.com" = "owned"
|
||||||
"kubernetes.io/cluster/bastionuserdata.example.com" = "owned"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
tag_specifications {
|
tag_specifications {
|
||||||
resource_type = "volume"
|
resource_type = "volume"
|
||||||
tags = {
|
tags = {
|
||||||
"KubernetesCluster" = "bastionuserdata.example.com"
|
"KubernetesCluster" = "bastionuserdata.example.com"
|
||||||
"Name" = "bastion.bastionuserdata.example.com"
|
"Name" = "bastion.bastionuserdata.example.com"
|
||||||
"k8s.io/cluster-autoscaler/node-template/label/node-role.kubernetes.io/node" = ""
|
"k8s.io/role/bastion" = "1"
|
||||||
"k8s.io/role/bastion" = "1"
|
"kops.k8s.io/instancegroup" = "bastion"
|
||||||
"kops.k8s.io/instancegroup" = "bastion"
|
"kubernetes.io/cluster/bastionuserdata.example.com" = "owned"
|
||||||
"kubernetes.io/cluster/bastionuserdata.example.com" = "owned"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
tags = {
|
tags = {
|
||||||
"KubernetesCluster" = "bastionuserdata.example.com"
|
"KubernetesCluster" = "bastionuserdata.example.com"
|
||||||
"Name" = "bastion.bastionuserdata.example.com"
|
"Name" = "bastion.bastionuserdata.example.com"
|
||||||
"k8s.io/cluster-autoscaler/node-template/label/node-role.kubernetes.io/node" = ""
|
"k8s.io/role/bastion" = "1"
|
||||||
"k8s.io/role/bastion" = "1"
|
"kops.k8s.io/instancegroup" = "bastion"
|
||||||
"kops.k8s.io/instancegroup" = "bastion"
|
"kubernetes.io/cluster/bastionuserdata.example.com" = "owned"
|
||||||
"kubernetes.io/cluster/bastionuserdata.example.com" = "owned"
|
|
||||||
}
|
}
|
||||||
user_data = filebase64("${path.module}/data/aws_launch_template_bastion.bastionuserdata.example.com_user_data")
|
user_data = filebase64("${path.module}/data/aws_launch_template_bastion.bastionuserdata.example.com_user_data")
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -147,11 +147,6 @@ resource "aws_autoscaling_group" "bastion-private-shared-ip-example-com" {
|
||||||
propagate_at_launch = true
|
propagate_at_launch = true
|
||||||
value = "bastion.private-shared-ip.example.com"
|
value = "bastion.private-shared-ip.example.com"
|
||||||
}
|
}
|
||||||
tag {
|
|
||||||
key = "k8s.io/cluster-autoscaler/node-template/label/node-role.kubernetes.io/node"
|
|
||||||
propagate_at_launch = true
|
|
||||||
value = ""
|
|
||||||
}
|
|
||||||
tag {
|
tag {
|
||||||
key = "k8s.io/role/bastion"
|
key = "k8s.io/role/bastion"
|
||||||
propagate_at_launch = true
|
propagate_at_launch = true
|
||||||
|
|
@ -467,32 +462,29 @@ resource "aws_launch_template" "bastion-private-shared-ip-example-com" {
|
||||||
tag_specifications {
|
tag_specifications {
|
||||||
resource_type = "instance"
|
resource_type = "instance"
|
||||||
tags = {
|
tags = {
|
||||||
"KubernetesCluster" = "private-shared-ip.example.com"
|
"KubernetesCluster" = "private-shared-ip.example.com"
|
||||||
"Name" = "bastion.private-shared-ip.example.com"
|
"Name" = "bastion.private-shared-ip.example.com"
|
||||||
"k8s.io/cluster-autoscaler/node-template/label/node-role.kubernetes.io/node" = ""
|
"k8s.io/role/bastion" = "1"
|
||||||
"k8s.io/role/bastion" = "1"
|
"kops.k8s.io/instancegroup" = "bastion"
|
||||||
"kops.k8s.io/instancegroup" = "bastion"
|
"kubernetes.io/cluster/private-shared-ip.example.com" = "owned"
|
||||||
"kubernetes.io/cluster/private-shared-ip.example.com" = "owned"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
tag_specifications {
|
tag_specifications {
|
||||||
resource_type = "volume"
|
resource_type = "volume"
|
||||||
tags = {
|
tags = {
|
||||||
"KubernetesCluster" = "private-shared-ip.example.com"
|
"KubernetesCluster" = "private-shared-ip.example.com"
|
||||||
"Name" = "bastion.private-shared-ip.example.com"
|
"Name" = "bastion.private-shared-ip.example.com"
|
||||||
"k8s.io/cluster-autoscaler/node-template/label/node-role.kubernetes.io/node" = ""
|
"k8s.io/role/bastion" = "1"
|
||||||
"k8s.io/role/bastion" = "1"
|
"kops.k8s.io/instancegroup" = "bastion"
|
||||||
"kops.k8s.io/instancegroup" = "bastion"
|
"kubernetes.io/cluster/private-shared-ip.example.com" = "owned"
|
||||||
"kubernetes.io/cluster/private-shared-ip.example.com" = "owned"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
tags = {
|
tags = {
|
||||||
"KubernetesCluster" = "private-shared-ip.example.com"
|
"KubernetesCluster" = "private-shared-ip.example.com"
|
||||||
"Name" = "bastion.private-shared-ip.example.com"
|
"Name" = "bastion.private-shared-ip.example.com"
|
||||||
"k8s.io/cluster-autoscaler/node-template/label/node-role.kubernetes.io/node" = ""
|
"k8s.io/role/bastion" = "1"
|
||||||
"k8s.io/role/bastion" = "1"
|
"kops.k8s.io/instancegroup" = "bastion"
|
||||||
"kops.k8s.io/instancegroup" = "bastion"
|
"kubernetes.io/cluster/private-shared-ip.example.com" = "owned"
|
||||||
"kubernetes.io/cluster/private-shared-ip.example.com" = "owned"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -142,11 +142,6 @@ resource "aws_autoscaling_group" "bastion-private-shared-subnet-example-com" {
|
||||||
propagate_at_launch = true
|
propagate_at_launch = true
|
||||||
value = "bastion.private-shared-subnet.example.com"
|
value = "bastion.private-shared-subnet.example.com"
|
||||||
}
|
}
|
||||||
tag {
|
|
||||||
key = "k8s.io/cluster-autoscaler/node-template/label/node-role.kubernetes.io/node"
|
|
||||||
propagate_at_launch = true
|
|
||||||
value = ""
|
|
||||||
}
|
|
||||||
tag {
|
tag {
|
||||||
key = "k8s.io/role/bastion"
|
key = "k8s.io/role/bastion"
|
||||||
propagate_at_launch = true
|
propagate_at_launch = true
|
||||||
|
|
@ -462,32 +457,29 @@ resource "aws_launch_template" "bastion-private-shared-subnet-example-com" {
|
||||||
tag_specifications {
|
tag_specifications {
|
||||||
resource_type = "instance"
|
resource_type = "instance"
|
||||||
tags = {
|
tags = {
|
||||||
"KubernetesCluster" = "private-shared-subnet.example.com"
|
"KubernetesCluster" = "private-shared-subnet.example.com"
|
||||||
"Name" = "bastion.private-shared-subnet.example.com"
|
"Name" = "bastion.private-shared-subnet.example.com"
|
||||||
"k8s.io/cluster-autoscaler/node-template/label/node-role.kubernetes.io/node" = ""
|
"k8s.io/role/bastion" = "1"
|
||||||
"k8s.io/role/bastion" = "1"
|
"kops.k8s.io/instancegroup" = "bastion"
|
||||||
"kops.k8s.io/instancegroup" = "bastion"
|
"kubernetes.io/cluster/private-shared-subnet.example.com" = "owned"
|
||||||
"kubernetes.io/cluster/private-shared-subnet.example.com" = "owned"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
tag_specifications {
|
tag_specifications {
|
||||||
resource_type = "volume"
|
resource_type = "volume"
|
||||||
tags = {
|
tags = {
|
||||||
"KubernetesCluster" = "private-shared-subnet.example.com"
|
"KubernetesCluster" = "private-shared-subnet.example.com"
|
||||||
"Name" = "bastion.private-shared-subnet.example.com"
|
"Name" = "bastion.private-shared-subnet.example.com"
|
||||||
"k8s.io/cluster-autoscaler/node-template/label/node-role.kubernetes.io/node" = ""
|
"k8s.io/role/bastion" = "1"
|
||||||
"k8s.io/role/bastion" = "1"
|
"kops.k8s.io/instancegroup" = "bastion"
|
||||||
"kops.k8s.io/instancegroup" = "bastion"
|
"kubernetes.io/cluster/private-shared-subnet.example.com" = "owned"
|
||||||
"kubernetes.io/cluster/private-shared-subnet.example.com" = "owned"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
tags = {
|
tags = {
|
||||||
"KubernetesCluster" = "private-shared-subnet.example.com"
|
"KubernetesCluster" = "private-shared-subnet.example.com"
|
||||||
"Name" = "bastion.private-shared-subnet.example.com"
|
"Name" = "bastion.private-shared-subnet.example.com"
|
||||||
"k8s.io/cluster-autoscaler/node-template/label/node-role.kubernetes.io/node" = ""
|
"k8s.io/role/bastion" = "1"
|
||||||
"k8s.io/role/bastion" = "1"
|
"kops.k8s.io/instancegroup" = "bastion"
|
||||||
"kops.k8s.io/instancegroup" = "bastion"
|
"kubernetes.io/cluster/private-shared-subnet.example.com" = "owned"
|
||||||
"kubernetes.io/cluster/private-shared-subnet.example.com" = "owned"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -147,11 +147,6 @@ resource "aws_autoscaling_group" "bastion-privatecalico-example-com" {
|
||||||
propagate_at_launch = true
|
propagate_at_launch = true
|
||||||
value = "bastion.privatecalico.example.com"
|
value = "bastion.privatecalico.example.com"
|
||||||
}
|
}
|
||||||
tag {
|
|
||||||
key = "k8s.io/cluster-autoscaler/node-template/label/node-role.kubernetes.io/node"
|
|
||||||
propagate_at_launch = true
|
|
||||||
value = ""
|
|
||||||
}
|
|
||||||
tag {
|
tag {
|
||||||
key = "k8s.io/role/bastion"
|
key = "k8s.io/role/bastion"
|
||||||
propagate_at_launch = true
|
propagate_at_launch = true
|
||||||
|
|
@ -485,32 +480,29 @@ resource "aws_launch_template" "bastion-privatecalico-example-com" {
|
||||||
tag_specifications {
|
tag_specifications {
|
||||||
resource_type = "instance"
|
resource_type = "instance"
|
||||||
tags = {
|
tags = {
|
||||||
"KubernetesCluster" = "privatecalico.example.com"
|
"KubernetesCluster" = "privatecalico.example.com"
|
||||||
"Name" = "bastion.privatecalico.example.com"
|
"Name" = "bastion.privatecalico.example.com"
|
||||||
"k8s.io/cluster-autoscaler/node-template/label/node-role.kubernetes.io/node" = ""
|
"k8s.io/role/bastion" = "1"
|
||||||
"k8s.io/role/bastion" = "1"
|
"kops.k8s.io/instancegroup" = "bastion"
|
||||||
"kops.k8s.io/instancegroup" = "bastion"
|
"kubernetes.io/cluster/privatecalico.example.com" = "owned"
|
||||||
"kubernetes.io/cluster/privatecalico.example.com" = "owned"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
tag_specifications {
|
tag_specifications {
|
||||||
resource_type = "volume"
|
resource_type = "volume"
|
||||||
tags = {
|
tags = {
|
||||||
"KubernetesCluster" = "privatecalico.example.com"
|
"KubernetesCluster" = "privatecalico.example.com"
|
||||||
"Name" = "bastion.privatecalico.example.com"
|
"Name" = "bastion.privatecalico.example.com"
|
||||||
"k8s.io/cluster-autoscaler/node-template/label/node-role.kubernetes.io/node" = ""
|
"k8s.io/role/bastion" = "1"
|
||||||
"k8s.io/role/bastion" = "1"
|
"kops.k8s.io/instancegroup" = "bastion"
|
||||||
"kops.k8s.io/instancegroup" = "bastion"
|
"kubernetes.io/cluster/privatecalico.example.com" = "owned"
|
||||||
"kubernetes.io/cluster/privatecalico.example.com" = "owned"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
tags = {
|
tags = {
|
||||||
"KubernetesCluster" = "privatecalico.example.com"
|
"KubernetesCluster" = "privatecalico.example.com"
|
||||||
"Name" = "bastion.privatecalico.example.com"
|
"Name" = "bastion.privatecalico.example.com"
|
||||||
"k8s.io/cluster-autoscaler/node-template/label/node-role.kubernetes.io/node" = ""
|
"k8s.io/role/bastion" = "1"
|
||||||
"k8s.io/role/bastion" = "1"
|
"kops.k8s.io/instancegroup" = "bastion"
|
||||||
"kops.k8s.io/instancegroup" = "bastion"
|
"kubernetes.io/cluster/privatecalico.example.com" = "owned"
|
||||||
"kubernetes.io/cluster/privatecalico.example.com" = "owned"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -147,11 +147,6 @@ resource "aws_autoscaling_group" "bastion-privatecanal-example-com" {
|
||||||
propagate_at_launch = true
|
propagate_at_launch = true
|
||||||
value = "bastion.privatecanal.example.com"
|
value = "bastion.privatecanal.example.com"
|
||||||
}
|
}
|
||||||
tag {
|
|
||||||
key = "k8s.io/cluster-autoscaler/node-template/label/node-role.kubernetes.io/node"
|
|
||||||
propagate_at_launch = true
|
|
||||||
value = ""
|
|
||||||
}
|
|
||||||
tag {
|
tag {
|
||||||
key = "k8s.io/role/bastion"
|
key = "k8s.io/role/bastion"
|
||||||
propagate_at_launch = true
|
propagate_at_launch = true
|
||||||
|
|
@ -485,32 +480,29 @@ resource "aws_launch_template" "bastion-privatecanal-example-com" {
|
||||||
tag_specifications {
|
tag_specifications {
|
||||||
resource_type = "instance"
|
resource_type = "instance"
|
||||||
tags = {
|
tags = {
|
||||||
"KubernetesCluster" = "privatecanal.example.com"
|
"KubernetesCluster" = "privatecanal.example.com"
|
||||||
"Name" = "bastion.privatecanal.example.com"
|
"Name" = "bastion.privatecanal.example.com"
|
||||||
"k8s.io/cluster-autoscaler/node-template/label/node-role.kubernetes.io/node" = ""
|
"k8s.io/role/bastion" = "1"
|
||||||
"k8s.io/role/bastion" = "1"
|
"kops.k8s.io/instancegroup" = "bastion"
|
||||||
"kops.k8s.io/instancegroup" = "bastion"
|
"kubernetes.io/cluster/privatecanal.example.com" = "owned"
|
||||||
"kubernetes.io/cluster/privatecanal.example.com" = "owned"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
tag_specifications {
|
tag_specifications {
|
||||||
resource_type = "volume"
|
resource_type = "volume"
|
||||||
tags = {
|
tags = {
|
||||||
"KubernetesCluster" = "privatecanal.example.com"
|
"KubernetesCluster" = "privatecanal.example.com"
|
||||||
"Name" = "bastion.privatecanal.example.com"
|
"Name" = "bastion.privatecanal.example.com"
|
||||||
"k8s.io/cluster-autoscaler/node-template/label/node-role.kubernetes.io/node" = ""
|
"k8s.io/role/bastion" = "1"
|
||||||
"k8s.io/role/bastion" = "1"
|
"kops.k8s.io/instancegroup" = "bastion"
|
||||||
"kops.k8s.io/instancegroup" = "bastion"
|
"kubernetes.io/cluster/privatecanal.example.com" = "owned"
|
||||||
"kubernetes.io/cluster/privatecanal.example.com" = "owned"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
tags = {
|
tags = {
|
||||||
"KubernetesCluster" = "privatecanal.example.com"
|
"KubernetesCluster" = "privatecanal.example.com"
|
||||||
"Name" = "bastion.privatecanal.example.com"
|
"Name" = "bastion.privatecanal.example.com"
|
||||||
"k8s.io/cluster-autoscaler/node-template/label/node-role.kubernetes.io/node" = ""
|
"k8s.io/role/bastion" = "1"
|
||||||
"k8s.io/role/bastion" = "1"
|
"kops.k8s.io/instancegroup" = "bastion"
|
||||||
"kops.k8s.io/instancegroup" = "bastion"
|
"kubernetes.io/cluster/privatecanal.example.com" = "owned"
|
||||||
"kubernetes.io/cluster/privatecanal.example.com" = "owned"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -147,11 +147,6 @@ resource "aws_autoscaling_group" "bastion-privatecilium-example-com" {
|
||||||
propagate_at_launch = true
|
propagate_at_launch = true
|
||||||
value = "bastion.privatecilium.example.com"
|
value = "bastion.privatecilium.example.com"
|
||||||
}
|
}
|
||||||
tag {
|
|
||||||
key = "k8s.io/cluster-autoscaler/node-template/label/node-role.kubernetes.io/node"
|
|
||||||
propagate_at_launch = true
|
|
||||||
value = ""
|
|
||||||
}
|
|
||||||
tag {
|
tag {
|
||||||
key = "k8s.io/role/bastion"
|
key = "k8s.io/role/bastion"
|
||||||
propagate_at_launch = true
|
propagate_at_launch = true
|
||||||
|
|
@ -485,32 +480,29 @@ resource "aws_launch_template" "bastion-privatecilium-example-com" {
|
||||||
tag_specifications {
|
tag_specifications {
|
||||||
resource_type = "instance"
|
resource_type = "instance"
|
||||||
tags = {
|
tags = {
|
||||||
"KubernetesCluster" = "privatecilium.example.com"
|
"KubernetesCluster" = "privatecilium.example.com"
|
||||||
"Name" = "bastion.privatecilium.example.com"
|
"Name" = "bastion.privatecilium.example.com"
|
||||||
"k8s.io/cluster-autoscaler/node-template/label/node-role.kubernetes.io/node" = ""
|
"k8s.io/role/bastion" = "1"
|
||||||
"k8s.io/role/bastion" = "1"
|
"kops.k8s.io/instancegroup" = "bastion"
|
||||||
"kops.k8s.io/instancegroup" = "bastion"
|
"kubernetes.io/cluster/privatecilium.example.com" = "owned"
|
||||||
"kubernetes.io/cluster/privatecilium.example.com" = "owned"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
tag_specifications {
|
tag_specifications {
|
||||||
resource_type = "volume"
|
resource_type = "volume"
|
||||||
tags = {
|
tags = {
|
||||||
"KubernetesCluster" = "privatecilium.example.com"
|
"KubernetesCluster" = "privatecilium.example.com"
|
||||||
"Name" = "bastion.privatecilium.example.com"
|
"Name" = "bastion.privatecilium.example.com"
|
||||||
"k8s.io/cluster-autoscaler/node-template/label/node-role.kubernetes.io/node" = ""
|
"k8s.io/role/bastion" = "1"
|
||||||
"k8s.io/role/bastion" = "1"
|
"kops.k8s.io/instancegroup" = "bastion"
|
||||||
"kops.k8s.io/instancegroup" = "bastion"
|
"kubernetes.io/cluster/privatecilium.example.com" = "owned"
|
||||||
"kubernetes.io/cluster/privatecilium.example.com" = "owned"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
tags = {
|
tags = {
|
||||||
"KubernetesCluster" = "privatecilium.example.com"
|
"KubernetesCluster" = "privatecilium.example.com"
|
||||||
"Name" = "bastion.privatecilium.example.com"
|
"Name" = "bastion.privatecilium.example.com"
|
||||||
"k8s.io/cluster-autoscaler/node-template/label/node-role.kubernetes.io/node" = ""
|
"k8s.io/role/bastion" = "1"
|
||||||
"k8s.io/role/bastion" = "1"
|
"kops.k8s.io/instancegroup" = "bastion"
|
||||||
"kops.k8s.io/instancegroup" = "bastion"
|
"kubernetes.io/cluster/privatecilium.example.com" = "owned"
|
||||||
"kubernetes.io/cluster/privatecilium.example.com" = "owned"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -147,11 +147,6 @@ resource "aws_autoscaling_group" "bastion-privatecilium-example-com" {
|
||||||
propagate_at_launch = true
|
propagate_at_launch = true
|
||||||
value = "bastion.privatecilium.example.com"
|
value = "bastion.privatecilium.example.com"
|
||||||
}
|
}
|
||||||
tag {
|
|
||||||
key = "k8s.io/cluster-autoscaler/node-template/label/node-role.kubernetes.io/node"
|
|
||||||
propagate_at_launch = true
|
|
||||||
value = ""
|
|
||||||
}
|
|
||||||
tag {
|
tag {
|
||||||
key = "k8s.io/role/bastion"
|
key = "k8s.io/role/bastion"
|
||||||
propagate_at_launch = true
|
propagate_at_launch = true
|
||||||
|
|
@ -485,32 +480,29 @@ resource "aws_launch_template" "bastion-privatecilium-example-com" {
|
||||||
tag_specifications {
|
tag_specifications {
|
||||||
resource_type = "instance"
|
resource_type = "instance"
|
||||||
tags = {
|
tags = {
|
||||||
"KubernetesCluster" = "privatecilium.example.com"
|
"KubernetesCluster" = "privatecilium.example.com"
|
||||||
"Name" = "bastion.privatecilium.example.com"
|
"Name" = "bastion.privatecilium.example.com"
|
||||||
"k8s.io/cluster-autoscaler/node-template/label/node-role.kubernetes.io/node" = ""
|
"k8s.io/role/bastion" = "1"
|
||||||
"k8s.io/role/bastion" = "1"
|
"kops.k8s.io/instancegroup" = "bastion"
|
||||||
"kops.k8s.io/instancegroup" = "bastion"
|
"kubernetes.io/cluster/privatecilium.example.com" = "owned"
|
||||||
"kubernetes.io/cluster/privatecilium.example.com" = "owned"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
tag_specifications {
|
tag_specifications {
|
||||||
resource_type = "volume"
|
resource_type = "volume"
|
||||||
tags = {
|
tags = {
|
||||||
"KubernetesCluster" = "privatecilium.example.com"
|
"KubernetesCluster" = "privatecilium.example.com"
|
||||||
"Name" = "bastion.privatecilium.example.com"
|
"Name" = "bastion.privatecilium.example.com"
|
||||||
"k8s.io/cluster-autoscaler/node-template/label/node-role.kubernetes.io/node" = ""
|
"k8s.io/role/bastion" = "1"
|
||||||
"k8s.io/role/bastion" = "1"
|
"kops.k8s.io/instancegroup" = "bastion"
|
||||||
"kops.k8s.io/instancegroup" = "bastion"
|
"kubernetes.io/cluster/privatecilium.example.com" = "owned"
|
||||||
"kubernetes.io/cluster/privatecilium.example.com" = "owned"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
tags = {
|
tags = {
|
||||||
"KubernetesCluster" = "privatecilium.example.com"
|
"KubernetesCluster" = "privatecilium.example.com"
|
||||||
"Name" = "bastion.privatecilium.example.com"
|
"Name" = "bastion.privatecilium.example.com"
|
||||||
"k8s.io/cluster-autoscaler/node-template/label/node-role.kubernetes.io/node" = ""
|
"k8s.io/role/bastion" = "1"
|
||||||
"k8s.io/role/bastion" = "1"
|
"kops.k8s.io/instancegroup" = "bastion"
|
||||||
"kops.k8s.io/instancegroup" = "bastion"
|
"kubernetes.io/cluster/privatecilium.example.com" = "owned"
|
||||||
"kubernetes.io/cluster/privatecilium.example.com" = "owned"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -147,11 +147,6 @@ resource "aws_autoscaling_group" "bastion-privatecilium-example-com" {
|
||||||
propagate_at_launch = true
|
propagate_at_launch = true
|
||||||
value = "bastion.privatecilium.example.com"
|
value = "bastion.privatecilium.example.com"
|
||||||
}
|
}
|
||||||
tag {
|
|
||||||
key = "k8s.io/cluster-autoscaler/node-template/label/node-role.kubernetes.io/node"
|
|
||||||
propagate_at_launch = true
|
|
||||||
value = ""
|
|
||||||
}
|
|
||||||
tag {
|
tag {
|
||||||
key = "k8s.io/role/bastion"
|
key = "k8s.io/role/bastion"
|
||||||
propagate_at_launch = true
|
propagate_at_launch = true
|
||||||
|
|
@ -485,32 +480,29 @@ resource "aws_launch_template" "bastion-privatecilium-example-com" {
|
||||||
tag_specifications {
|
tag_specifications {
|
||||||
resource_type = "instance"
|
resource_type = "instance"
|
||||||
tags = {
|
tags = {
|
||||||
"KubernetesCluster" = "privatecilium.example.com"
|
"KubernetesCluster" = "privatecilium.example.com"
|
||||||
"Name" = "bastion.privatecilium.example.com"
|
"Name" = "bastion.privatecilium.example.com"
|
||||||
"k8s.io/cluster-autoscaler/node-template/label/node-role.kubernetes.io/node" = ""
|
"k8s.io/role/bastion" = "1"
|
||||||
"k8s.io/role/bastion" = "1"
|
"kops.k8s.io/instancegroup" = "bastion"
|
||||||
"kops.k8s.io/instancegroup" = "bastion"
|
"kubernetes.io/cluster/privatecilium.example.com" = "owned"
|
||||||
"kubernetes.io/cluster/privatecilium.example.com" = "owned"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
tag_specifications {
|
tag_specifications {
|
||||||
resource_type = "volume"
|
resource_type = "volume"
|
||||||
tags = {
|
tags = {
|
||||||
"KubernetesCluster" = "privatecilium.example.com"
|
"KubernetesCluster" = "privatecilium.example.com"
|
||||||
"Name" = "bastion.privatecilium.example.com"
|
"Name" = "bastion.privatecilium.example.com"
|
||||||
"k8s.io/cluster-autoscaler/node-template/label/node-role.kubernetes.io/node" = ""
|
"k8s.io/role/bastion" = "1"
|
||||||
"k8s.io/role/bastion" = "1"
|
"kops.k8s.io/instancegroup" = "bastion"
|
||||||
"kops.k8s.io/instancegroup" = "bastion"
|
"kubernetes.io/cluster/privatecilium.example.com" = "owned"
|
||||||
"kubernetes.io/cluster/privatecilium.example.com" = "owned"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
tags = {
|
tags = {
|
||||||
"KubernetesCluster" = "privatecilium.example.com"
|
"KubernetesCluster" = "privatecilium.example.com"
|
||||||
"Name" = "bastion.privatecilium.example.com"
|
"Name" = "bastion.privatecilium.example.com"
|
||||||
"k8s.io/cluster-autoscaler/node-template/label/node-role.kubernetes.io/node" = ""
|
"k8s.io/role/bastion" = "1"
|
||||||
"k8s.io/role/bastion" = "1"
|
"kops.k8s.io/instancegroup" = "bastion"
|
||||||
"kops.k8s.io/instancegroup" = "bastion"
|
"kubernetes.io/cluster/privatecilium.example.com" = "owned"
|
||||||
"kubernetes.io/cluster/privatecilium.example.com" = "owned"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -147,11 +147,6 @@ resource "aws_autoscaling_group" "bastion-privateciliumadvanced-example-com" {
|
||||||
propagate_at_launch = true
|
propagate_at_launch = true
|
||||||
value = "bastion.privateciliumadvanced.example.com"
|
value = "bastion.privateciliumadvanced.example.com"
|
||||||
}
|
}
|
||||||
tag {
|
|
||||||
key = "k8s.io/cluster-autoscaler/node-template/label/node-role.kubernetes.io/node"
|
|
||||||
propagate_at_launch = true
|
|
||||||
value = ""
|
|
||||||
}
|
|
||||||
tag {
|
tag {
|
||||||
key = "k8s.io/role/bastion"
|
key = "k8s.io/role/bastion"
|
||||||
propagate_at_launch = true
|
propagate_at_launch = true
|
||||||
|
|
@ -502,32 +497,29 @@ resource "aws_launch_template" "bastion-privateciliumadvanced-example-com" {
|
||||||
tag_specifications {
|
tag_specifications {
|
||||||
resource_type = "instance"
|
resource_type = "instance"
|
||||||
tags = {
|
tags = {
|
||||||
"KubernetesCluster" = "privateciliumadvanced.example.com"
|
"KubernetesCluster" = "privateciliumadvanced.example.com"
|
||||||
"Name" = "bastion.privateciliumadvanced.example.com"
|
"Name" = "bastion.privateciliumadvanced.example.com"
|
||||||
"k8s.io/cluster-autoscaler/node-template/label/node-role.kubernetes.io/node" = ""
|
"k8s.io/role/bastion" = "1"
|
||||||
"k8s.io/role/bastion" = "1"
|
"kops.k8s.io/instancegroup" = "bastion"
|
||||||
"kops.k8s.io/instancegroup" = "bastion"
|
"kubernetes.io/cluster/privateciliumadvanced.example.com" = "owned"
|
||||||
"kubernetes.io/cluster/privateciliumadvanced.example.com" = "owned"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
tag_specifications {
|
tag_specifications {
|
||||||
resource_type = "volume"
|
resource_type = "volume"
|
||||||
tags = {
|
tags = {
|
||||||
"KubernetesCluster" = "privateciliumadvanced.example.com"
|
"KubernetesCluster" = "privateciliumadvanced.example.com"
|
||||||
"Name" = "bastion.privateciliumadvanced.example.com"
|
"Name" = "bastion.privateciliumadvanced.example.com"
|
||||||
"k8s.io/cluster-autoscaler/node-template/label/node-role.kubernetes.io/node" = ""
|
"k8s.io/role/bastion" = "1"
|
||||||
"k8s.io/role/bastion" = "1"
|
"kops.k8s.io/instancegroup" = "bastion"
|
||||||
"kops.k8s.io/instancegroup" = "bastion"
|
"kubernetes.io/cluster/privateciliumadvanced.example.com" = "owned"
|
||||||
"kubernetes.io/cluster/privateciliumadvanced.example.com" = "owned"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
tags = {
|
tags = {
|
||||||
"KubernetesCluster" = "privateciliumadvanced.example.com"
|
"KubernetesCluster" = "privateciliumadvanced.example.com"
|
||||||
"Name" = "bastion.privateciliumadvanced.example.com"
|
"Name" = "bastion.privateciliumadvanced.example.com"
|
||||||
"k8s.io/cluster-autoscaler/node-template/label/node-role.kubernetes.io/node" = ""
|
"k8s.io/role/bastion" = "1"
|
||||||
"k8s.io/role/bastion" = "1"
|
"kops.k8s.io/instancegroup" = "bastion"
|
||||||
"kops.k8s.io/instancegroup" = "bastion"
|
"kubernetes.io/cluster/privateciliumadvanced.example.com" = "owned"
|
||||||
"kubernetes.io/cluster/privateciliumadvanced.example.com" = "owned"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -157,16 +157,6 @@ resource "aws_autoscaling_group" "bastion-privatedns1-example-com" {
|
||||||
propagate_at_launch = true
|
propagate_at_launch = true
|
||||||
value = "fib+baz"
|
value = "fib+baz"
|
||||||
}
|
}
|
||||||
tag {
|
|
||||||
key = "k8s.io/cluster-autoscaler/node-template/label/kubernetes.io/role"
|
|
||||||
propagate_at_launch = true
|
|
||||||
value = "node"
|
|
||||||
}
|
|
||||||
tag {
|
|
||||||
key = "k8s.io/cluster-autoscaler/node-template/label/node-role.kubernetes.io/node"
|
|
||||||
propagate_at_launch = true
|
|
||||||
value = ""
|
|
||||||
}
|
|
||||||
tag {
|
tag {
|
||||||
key = "k8s.io/role/bastion"
|
key = "k8s.io/role/bastion"
|
||||||
propagate_at_launch = true
|
propagate_at_launch = true
|
||||||
|
|
@ -559,41 +549,35 @@ resource "aws_launch_template" "bastion-privatedns1-example-com" {
|
||||||
tag_specifications {
|
tag_specifications {
|
||||||
resource_type = "instance"
|
resource_type = "instance"
|
||||||
tags = {
|
tags = {
|
||||||
"KubernetesCluster" = "privatedns1.example.com"
|
"KubernetesCluster" = "privatedns1.example.com"
|
||||||
"Name" = "bastion.privatedns1.example.com"
|
"Name" = "bastion.privatedns1.example.com"
|
||||||
"Owner" = "John Doe"
|
"Owner" = "John Doe"
|
||||||
"foo/bar" = "fib+baz"
|
"foo/bar" = "fib+baz"
|
||||||
"k8s.io/cluster-autoscaler/node-template/label/kubernetes.io/role" = "node"
|
"k8s.io/role/bastion" = "1"
|
||||||
"k8s.io/cluster-autoscaler/node-template/label/node-role.kubernetes.io/node" = ""
|
"kops.k8s.io/instancegroup" = "bastion"
|
||||||
"k8s.io/role/bastion" = "1"
|
"kubernetes.io/cluster/privatedns1.example.com" = "owned"
|
||||||
"kops.k8s.io/instancegroup" = "bastion"
|
|
||||||
"kubernetes.io/cluster/privatedns1.example.com" = "owned"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
tag_specifications {
|
tag_specifications {
|
||||||
resource_type = "volume"
|
resource_type = "volume"
|
||||||
tags = {
|
tags = {
|
||||||
"KubernetesCluster" = "privatedns1.example.com"
|
"KubernetesCluster" = "privatedns1.example.com"
|
||||||
"Name" = "bastion.privatedns1.example.com"
|
"Name" = "bastion.privatedns1.example.com"
|
||||||
"Owner" = "John Doe"
|
"Owner" = "John Doe"
|
||||||
"foo/bar" = "fib+baz"
|
"foo/bar" = "fib+baz"
|
||||||
"k8s.io/cluster-autoscaler/node-template/label/kubernetes.io/role" = "node"
|
"k8s.io/role/bastion" = "1"
|
||||||
"k8s.io/cluster-autoscaler/node-template/label/node-role.kubernetes.io/node" = ""
|
"kops.k8s.io/instancegroup" = "bastion"
|
||||||
"k8s.io/role/bastion" = "1"
|
"kubernetes.io/cluster/privatedns1.example.com" = "owned"
|
||||||
"kops.k8s.io/instancegroup" = "bastion"
|
|
||||||
"kubernetes.io/cluster/privatedns1.example.com" = "owned"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
tags = {
|
tags = {
|
||||||
"KubernetesCluster" = "privatedns1.example.com"
|
"KubernetesCluster" = "privatedns1.example.com"
|
||||||
"Name" = "bastion.privatedns1.example.com"
|
"Name" = "bastion.privatedns1.example.com"
|
||||||
"Owner" = "John Doe"
|
"Owner" = "John Doe"
|
||||||
"foo/bar" = "fib+baz"
|
"foo/bar" = "fib+baz"
|
||||||
"k8s.io/cluster-autoscaler/node-template/label/kubernetes.io/role" = "node"
|
"k8s.io/role/bastion" = "1"
|
||||||
"k8s.io/cluster-autoscaler/node-template/label/node-role.kubernetes.io/node" = ""
|
"kops.k8s.io/instancegroup" = "bastion"
|
||||||
"k8s.io/role/bastion" = "1"
|
"kubernetes.io/cluster/privatedns1.example.com" = "owned"
|
||||||
"kops.k8s.io/instancegroup" = "bastion"
|
|
||||||
"kubernetes.io/cluster/privatedns1.example.com" = "owned"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -147,11 +147,6 @@ resource "aws_autoscaling_group" "bastion-privatedns2-example-com" {
|
||||||
propagate_at_launch = true
|
propagate_at_launch = true
|
||||||
value = "bastion.privatedns2.example.com"
|
value = "bastion.privatedns2.example.com"
|
||||||
}
|
}
|
||||||
tag {
|
|
||||||
key = "k8s.io/cluster-autoscaler/node-template/label/node-role.kubernetes.io/node"
|
|
||||||
propagate_at_launch = true
|
|
||||||
value = ""
|
|
||||||
}
|
|
||||||
tag {
|
tag {
|
||||||
key = "k8s.io/role/bastion"
|
key = "k8s.io/role/bastion"
|
||||||
propagate_at_launch = true
|
propagate_at_launch = true
|
||||||
|
|
@ -476,32 +471,29 @@ resource "aws_launch_template" "bastion-privatedns2-example-com" {
|
||||||
tag_specifications {
|
tag_specifications {
|
||||||
resource_type = "instance"
|
resource_type = "instance"
|
||||||
tags = {
|
tags = {
|
||||||
"KubernetesCluster" = "privatedns2.example.com"
|
"KubernetesCluster" = "privatedns2.example.com"
|
||||||
"Name" = "bastion.privatedns2.example.com"
|
"Name" = "bastion.privatedns2.example.com"
|
||||||
"k8s.io/cluster-autoscaler/node-template/label/node-role.kubernetes.io/node" = ""
|
"k8s.io/role/bastion" = "1"
|
||||||
"k8s.io/role/bastion" = "1"
|
"kops.k8s.io/instancegroup" = "bastion"
|
||||||
"kops.k8s.io/instancegroup" = "bastion"
|
"kubernetes.io/cluster/privatedns2.example.com" = "owned"
|
||||||
"kubernetes.io/cluster/privatedns2.example.com" = "owned"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
tag_specifications {
|
tag_specifications {
|
||||||
resource_type = "volume"
|
resource_type = "volume"
|
||||||
tags = {
|
tags = {
|
||||||
"KubernetesCluster" = "privatedns2.example.com"
|
"KubernetesCluster" = "privatedns2.example.com"
|
||||||
"Name" = "bastion.privatedns2.example.com"
|
"Name" = "bastion.privatedns2.example.com"
|
||||||
"k8s.io/cluster-autoscaler/node-template/label/node-role.kubernetes.io/node" = ""
|
"k8s.io/role/bastion" = "1"
|
||||||
"k8s.io/role/bastion" = "1"
|
"kops.k8s.io/instancegroup" = "bastion"
|
||||||
"kops.k8s.io/instancegroup" = "bastion"
|
"kubernetes.io/cluster/privatedns2.example.com" = "owned"
|
||||||
"kubernetes.io/cluster/privatedns2.example.com" = "owned"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
tags = {
|
tags = {
|
||||||
"KubernetesCluster" = "privatedns2.example.com"
|
"KubernetesCluster" = "privatedns2.example.com"
|
||||||
"Name" = "bastion.privatedns2.example.com"
|
"Name" = "bastion.privatedns2.example.com"
|
||||||
"k8s.io/cluster-autoscaler/node-template/label/node-role.kubernetes.io/node" = ""
|
"k8s.io/role/bastion" = "1"
|
||||||
"k8s.io/role/bastion" = "1"
|
"kops.k8s.io/instancegroup" = "bastion"
|
||||||
"kops.k8s.io/instancegroup" = "bastion"
|
"kubernetes.io/cluster/privatedns2.example.com" = "owned"
|
||||||
"kubernetes.io/cluster/privatedns2.example.com" = "owned"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -147,11 +147,6 @@ resource "aws_autoscaling_group" "bastion-privateflannel-example-com" {
|
||||||
propagate_at_launch = true
|
propagate_at_launch = true
|
||||||
value = "bastion.privateflannel.example.com"
|
value = "bastion.privateflannel.example.com"
|
||||||
}
|
}
|
||||||
tag {
|
|
||||||
key = "k8s.io/cluster-autoscaler/node-template/label/node-role.kubernetes.io/node"
|
|
||||||
propagate_at_launch = true
|
|
||||||
value = ""
|
|
||||||
}
|
|
||||||
tag {
|
tag {
|
||||||
key = "k8s.io/role/bastion"
|
key = "k8s.io/role/bastion"
|
||||||
propagate_at_launch = true
|
propagate_at_launch = true
|
||||||
|
|
@ -485,32 +480,29 @@ resource "aws_launch_template" "bastion-privateflannel-example-com" {
|
||||||
tag_specifications {
|
tag_specifications {
|
||||||
resource_type = "instance"
|
resource_type = "instance"
|
||||||
tags = {
|
tags = {
|
||||||
"KubernetesCluster" = "privateflannel.example.com"
|
"KubernetesCluster" = "privateflannel.example.com"
|
||||||
"Name" = "bastion.privateflannel.example.com"
|
"Name" = "bastion.privateflannel.example.com"
|
||||||
"k8s.io/cluster-autoscaler/node-template/label/node-role.kubernetes.io/node" = ""
|
"k8s.io/role/bastion" = "1"
|
||||||
"k8s.io/role/bastion" = "1"
|
"kops.k8s.io/instancegroup" = "bastion"
|
||||||
"kops.k8s.io/instancegroup" = "bastion"
|
"kubernetes.io/cluster/privateflannel.example.com" = "owned"
|
||||||
"kubernetes.io/cluster/privateflannel.example.com" = "owned"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
tag_specifications {
|
tag_specifications {
|
||||||
resource_type = "volume"
|
resource_type = "volume"
|
||||||
tags = {
|
tags = {
|
||||||
"KubernetesCluster" = "privateflannel.example.com"
|
"KubernetesCluster" = "privateflannel.example.com"
|
||||||
"Name" = "bastion.privateflannel.example.com"
|
"Name" = "bastion.privateflannel.example.com"
|
||||||
"k8s.io/cluster-autoscaler/node-template/label/node-role.kubernetes.io/node" = ""
|
"k8s.io/role/bastion" = "1"
|
||||||
"k8s.io/role/bastion" = "1"
|
"kops.k8s.io/instancegroup" = "bastion"
|
||||||
"kops.k8s.io/instancegroup" = "bastion"
|
"kubernetes.io/cluster/privateflannel.example.com" = "owned"
|
||||||
"kubernetes.io/cluster/privateflannel.example.com" = "owned"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
tags = {
|
tags = {
|
||||||
"KubernetesCluster" = "privateflannel.example.com"
|
"KubernetesCluster" = "privateflannel.example.com"
|
||||||
"Name" = "bastion.privateflannel.example.com"
|
"Name" = "bastion.privateflannel.example.com"
|
||||||
"k8s.io/cluster-autoscaler/node-template/label/node-role.kubernetes.io/node" = ""
|
"k8s.io/role/bastion" = "1"
|
||||||
"k8s.io/role/bastion" = "1"
|
"kops.k8s.io/instancegroup" = "bastion"
|
||||||
"kops.k8s.io/instancegroup" = "bastion"
|
"kubernetes.io/cluster/privateflannel.example.com" = "owned"
|
||||||
"kubernetes.io/cluster/privateflannel.example.com" = "owned"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -162,11 +162,6 @@ resource "aws_autoscaling_group" "bastion-privatekopeio-example-com" {
|
||||||
propagate_at_launch = true
|
propagate_at_launch = true
|
||||||
value = "bastion.privatekopeio.example.com"
|
value = "bastion.privatekopeio.example.com"
|
||||||
}
|
}
|
||||||
tag {
|
|
||||||
key = "k8s.io/cluster-autoscaler/node-template/label/node-role.kubernetes.io/node"
|
|
||||||
propagate_at_launch = true
|
|
||||||
value = ""
|
|
||||||
}
|
|
||||||
tag {
|
tag {
|
||||||
key = "k8s.io/role/bastion"
|
key = "k8s.io/role/bastion"
|
||||||
propagate_at_launch = true
|
propagate_at_launch = true
|
||||||
|
|
@ -491,32 +486,29 @@ resource "aws_launch_template" "bastion-privatekopeio-example-com" {
|
||||||
tag_specifications {
|
tag_specifications {
|
||||||
resource_type = "instance"
|
resource_type = "instance"
|
||||||
tags = {
|
tags = {
|
||||||
"KubernetesCluster" = "privatekopeio.example.com"
|
"KubernetesCluster" = "privatekopeio.example.com"
|
||||||
"Name" = "bastion.privatekopeio.example.com"
|
"Name" = "bastion.privatekopeio.example.com"
|
||||||
"k8s.io/cluster-autoscaler/node-template/label/node-role.kubernetes.io/node" = ""
|
"k8s.io/role/bastion" = "1"
|
||||||
"k8s.io/role/bastion" = "1"
|
"kops.k8s.io/instancegroup" = "bastion"
|
||||||
"kops.k8s.io/instancegroup" = "bastion"
|
"kubernetes.io/cluster/privatekopeio.example.com" = "owned"
|
||||||
"kubernetes.io/cluster/privatekopeio.example.com" = "owned"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
tag_specifications {
|
tag_specifications {
|
||||||
resource_type = "volume"
|
resource_type = "volume"
|
||||||
tags = {
|
tags = {
|
||||||
"KubernetesCluster" = "privatekopeio.example.com"
|
"KubernetesCluster" = "privatekopeio.example.com"
|
||||||
"Name" = "bastion.privatekopeio.example.com"
|
"Name" = "bastion.privatekopeio.example.com"
|
||||||
"k8s.io/cluster-autoscaler/node-template/label/node-role.kubernetes.io/node" = ""
|
"k8s.io/role/bastion" = "1"
|
||||||
"k8s.io/role/bastion" = "1"
|
"kops.k8s.io/instancegroup" = "bastion"
|
||||||
"kops.k8s.io/instancegroup" = "bastion"
|
"kubernetes.io/cluster/privatekopeio.example.com" = "owned"
|
||||||
"kubernetes.io/cluster/privatekopeio.example.com" = "owned"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
tags = {
|
tags = {
|
||||||
"KubernetesCluster" = "privatekopeio.example.com"
|
"KubernetesCluster" = "privatekopeio.example.com"
|
||||||
"Name" = "bastion.privatekopeio.example.com"
|
"Name" = "bastion.privatekopeio.example.com"
|
||||||
"k8s.io/cluster-autoscaler/node-template/label/node-role.kubernetes.io/node" = ""
|
"k8s.io/role/bastion" = "1"
|
||||||
"k8s.io/role/bastion" = "1"
|
"kops.k8s.io/instancegroup" = "bastion"
|
||||||
"kops.k8s.io/instancegroup" = "bastion"
|
"kubernetes.io/cluster/privatekopeio.example.com" = "owned"
|
||||||
"kubernetes.io/cluster/privatekopeio.example.com" = "owned"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -147,16 +147,6 @@ resource "aws_autoscaling_group" "bastion-privateweave-example-com" {
|
||||||
propagate_at_launch = true
|
propagate_at_launch = true
|
||||||
value = "bastion.privateweave.example.com"
|
value = "bastion.privateweave.example.com"
|
||||||
}
|
}
|
||||||
tag {
|
|
||||||
key = "k8s.io/cluster-autoscaler/node-template/label/kubernetes.io/role"
|
|
||||||
propagate_at_launch = true
|
|
||||||
value = "node"
|
|
||||||
}
|
|
||||||
tag {
|
|
||||||
key = "k8s.io/cluster-autoscaler/node-template/label/node-role.kubernetes.io/node"
|
|
||||||
propagate_at_launch = true
|
|
||||||
value = ""
|
|
||||||
}
|
|
||||||
tag {
|
tag {
|
||||||
key = "k8s.io/role/bastion"
|
key = "k8s.io/role/bastion"
|
||||||
propagate_at_launch = true
|
propagate_at_launch = true
|
||||||
|
|
@ -505,35 +495,29 @@ resource "aws_launch_template" "bastion-privateweave-example-com" {
|
||||||
tag_specifications {
|
tag_specifications {
|
||||||
resource_type = "instance"
|
resource_type = "instance"
|
||||||
tags = {
|
tags = {
|
||||||
"KubernetesCluster" = "privateweave.example.com"
|
"KubernetesCluster" = "privateweave.example.com"
|
||||||
"Name" = "bastion.privateweave.example.com"
|
"Name" = "bastion.privateweave.example.com"
|
||||||
"k8s.io/cluster-autoscaler/node-template/label/kubernetes.io/role" = "node"
|
"k8s.io/role/bastion" = "1"
|
||||||
"k8s.io/cluster-autoscaler/node-template/label/node-role.kubernetes.io/node" = ""
|
"kops.k8s.io/instancegroup" = "bastion"
|
||||||
"k8s.io/role/bastion" = "1"
|
"kubernetes.io/cluster/privateweave.example.com" = "owned"
|
||||||
"kops.k8s.io/instancegroup" = "bastion"
|
|
||||||
"kubernetes.io/cluster/privateweave.example.com" = "owned"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
tag_specifications {
|
tag_specifications {
|
||||||
resource_type = "volume"
|
resource_type = "volume"
|
||||||
tags = {
|
tags = {
|
||||||
"KubernetesCluster" = "privateweave.example.com"
|
"KubernetesCluster" = "privateweave.example.com"
|
||||||
"Name" = "bastion.privateweave.example.com"
|
"Name" = "bastion.privateweave.example.com"
|
||||||
"k8s.io/cluster-autoscaler/node-template/label/kubernetes.io/role" = "node"
|
"k8s.io/role/bastion" = "1"
|
||||||
"k8s.io/cluster-autoscaler/node-template/label/node-role.kubernetes.io/node" = ""
|
"kops.k8s.io/instancegroup" = "bastion"
|
||||||
"k8s.io/role/bastion" = "1"
|
"kubernetes.io/cluster/privateweave.example.com" = "owned"
|
||||||
"kops.k8s.io/instancegroup" = "bastion"
|
|
||||||
"kubernetes.io/cluster/privateweave.example.com" = "owned"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
tags = {
|
tags = {
|
||||||
"KubernetesCluster" = "privateweave.example.com"
|
"KubernetesCluster" = "privateweave.example.com"
|
||||||
"Name" = "bastion.privateweave.example.com"
|
"Name" = "bastion.privateweave.example.com"
|
||||||
"k8s.io/cluster-autoscaler/node-template/label/kubernetes.io/role" = "node"
|
"k8s.io/role/bastion" = "1"
|
||||||
"k8s.io/cluster-autoscaler/node-template/label/node-role.kubernetes.io/node" = ""
|
"kops.k8s.io/instancegroup" = "bastion"
|
||||||
"k8s.io/role/bastion" = "1"
|
"kubernetes.io/cluster/privateweave.example.com" = "owned"
|
||||||
"kops.k8s.io/instancegroup" = "bastion"
|
|
||||||
"kubernetes.io/cluster/privateweave.example.com" = "owned"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -147,11 +147,6 @@ resource "aws_autoscaling_group" "bastion-unmanaged-example-com" {
|
||||||
propagate_at_launch = true
|
propagate_at_launch = true
|
||||||
value = "bastion.unmanaged.example.com"
|
value = "bastion.unmanaged.example.com"
|
||||||
}
|
}
|
||||||
tag {
|
|
||||||
key = "k8s.io/cluster-autoscaler/node-template/label/node-role.kubernetes.io/node"
|
|
||||||
propagate_at_launch = true
|
|
||||||
value = ""
|
|
||||||
}
|
|
||||||
tag {
|
tag {
|
||||||
key = "k8s.io/role/bastion"
|
key = "k8s.io/role/bastion"
|
||||||
propagate_at_launch = true
|
propagate_at_launch = true
|
||||||
|
|
@ -467,32 +462,29 @@ resource "aws_launch_template" "bastion-unmanaged-example-com" {
|
||||||
tag_specifications {
|
tag_specifications {
|
||||||
resource_type = "instance"
|
resource_type = "instance"
|
||||||
tags = {
|
tags = {
|
||||||
"KubernetesCluster" = "unmanaged.example.com"
|
"KubernetesCluster" = "unmanaged.example.com"
|
||||||
"Name" = "bastion.unmanaged.example.com"
|
"Name" = "bastion.unmanaged.example.com"
|
||||||
"k8s.io/cluster-autoscaler/node-template/label/node-role.kubernetes.io/node" = ""
|
"k8s.io/role/bastion" = "1"
|
||||||
"k8s.io/role/bastion" = "1"
|
"kops.k8s.io/instancegroup" = "bastion"
|
||||||
"kops.k8s.io/instancegroup" = "bastion"
|
"kubernetes.io/cluster/unmanaged.example.com" = "owned"
|
||||||
"kubernetes.io/cluster/unmanaged.example.com" = "owned"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
tag_specifications {
|
tag_specifications {
|
||||||
resource_type = "volume"
|
resource_type = "volume"
|
||||||
tags = {
|
tags = {
|
||||||
"KubernetesCluster" = "unmanaged.example.com"
|
"KubernetesCluster" = "unmanaged.example.com"
|
||||||
"Name" = "bastion.unmanaged.example.com"
|
"Name" = "bastion.unmanaged.example.com"
|
||||||
"k8s.io/cluster-autoscaler/node-template/label/node-role.kubernetes.io/node" = ""
|
"k8s.io/role/bastion" = "1"
|
||||||
"k8s.io/role/bastion" = "1"
|
"kops.k8s.io/instancegroup" = "bastion"
|
||||||
"kops.k8s.io/instancegroup" = "bastion"
|
"kubernetes.io/cluster/unmanaged.example.com" = "owned"
|
||||||
"kubernetes.io/cluster/unmanaged.example.com" = "owned"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
tags = {
|
tags = {
|
||||||
"KubernetesCluster" = "unmanaged.example.com"
|
"KubernetesCluster" = "unmanaged.example.com"
|
||||||
"Name" = "bastion.unmanaged.example.com"
|
"Name" = "bastion.unmanaged.example.com"
|
||||||
"k8s.io/cluster-autoscaler/node-template/label/node-role.kubernetes.io/node" = ""
|
"k8s.io/role/bastion" = "1"
|
||||||
"k8s.io/role/bastion" = "1"
|
"kops.k8s.io/instancegroup" = "bastion"
|
||||||
"kops.k8s.io/instancegroup" = "bastion"
|
"kubernetes.io/cluster/unmanaged.example.com" = "owned"
|
||||||
"kubernetes.io/cluster/unmanaged.example.com" = "owned"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -258,7 +258,11 @@ func PopulateInstanceGroupSpec(cluster *kops.Cluster, input *kops.InstanceGroup,
|
||||||
|
|
||||||
// We include the NodeLabels in the userdata even for Kubernetes 1.16 and later so that
|
// We include the NodeLabels in the userdata even for Kubernetes 1.16 and later so that
|
||||||
// rolling update will still replace nodes when they change.
|
// rolling update will still replace nodes when they change.
|
||||||
igKubeletConfig.NodeLabels = nodelabels.BuildNodeLabels(cluster, ig)
|
nodeLabels, err := nodelabels.BuildNodeLabels(cluster, ig)
|
||||||
|
if err != nil {
|
||||||
|
return nil, fmt.Errorf("error building node labels: %w", err)
|
||||||
|
}
|
||||||
|
igKubeletConfig.NodeLabels = nodeLabels
|
||||||
|
|
||||||
useSecureKubelet := fi.ValueOf(igKubeletConfig.AnonymousAuth)
|
useSecureKubelet := fi.ValueOf(igKubeletConfig.AnonymousAuth)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue