From f638a18f03210c54cb578aac4c5f1f3703d0cc1f Mon Sep 17 00:00:00 2001 From: Arnaud Farbos Date: Tue, 12 Nov 2024 10:53:26 -0800 Subject: [PATCH 1/3] feat: add support for identity service in GCPManagedControlPlane --- cloud/services/container/clusters/reconcile.go | 3 +++ ...nfrastructure.cluster.x-k8s.io_gcpmanagedcontrolplanes.yaml | 3 +++ exp/api/v1beta1/gcpmanagedcontrolplane_types.go | 3 +++ 3 files changed, 9 insertions(+) diff --git a/cloud/services/container/clusters/reconcile.go b/cloud/services/container/clusters/reconcile.go index cb0074d98..22a14dd8d 100644 --- a/cloud/services/container/clusters/reconcile.go +++ b/cloud/services/container/clusters/reconcile.go @@ -259,6 +259,9 @@ func (s *Service) createCluster(ctx context.Context, log *logr.Logger) error { Autopilot: &containerpb.Autopilot{ Enabled: s.scope.GCPManagedControlPlane.Spec.EnableAutopilot, }, + IdentityServiceConfig: &containerpb.IdentityServiceConfig{ + Enabled: s.scope.GCPManagedControlPlane.Spec.EnableIdentityService, + }, ReleaseChannel: &containerpb.ReleaseChannel{ Channel: convertToSdkReleaseChannel(s.scope.GCPManagedControlPlane.Spec.ReleaseChannel), }, diff --git a/config/crd/bases/infrastructure.cluster.x-k8s.io_gcpmanagedcontrolplanes.yaml b/config/crd/bases/infrastructure.cluster.x-k8s.io_gcpmanagedcontrolplanes.yaml index 0fce7f960..886776a7f 100644 --- a/config/crd/bases/infrastructure.cluster.x-k8s.io_gcpmanagedcontrolplanes.yaml +++ b/config/crd/bases/infrastructure.cluster.x-k8s.io_gcpmanagedcontrolplanes.yaml @@ -141,6 +141,9 @@ spec: description: EnableAutopilot indicates whether to enable autopilot for this GKE cluster. type: boolean + enableIdentityService: + description: EnableIdentityService indicates whether to enable Identity Service component for this GKE cluster. + type: boolean endpoint: description: Endpoint represents the endpoint used to communicate with the control plane. diff --git a/exp/api/v1beta1/gcpmanagedcontrolplane_types.go b/exp/api/v1beta1/gcpmanagedcontrolplane_types.go index b7b1699cf..0d2e68cfe 100644 --- a/exp/api/v1beta1/gcpmanagedcontrolplane_types.go +++ b/exp/api/v1beta1/gcpmanagedcontrolplane_types.go @@ -133,6 +133,9 @@ type GCPManagedControlPlaneSpec struct { // EnableAutopilot indicates whether to enable autopilot for this GKE cluster. // +optional EnableAutopilot bool `json:"enableAutopilot"` + // EnableIdentityService indicates whether to enable Identity Service component for this GKE cluster. + // +optional + EnableIdentityService bool `json:"enableIdentityService"` // ReleaseChannel represents the release channel of the GKE cluster. // +optional ReleaseChannel *ReleaseChannel `json:"releaseChannel,omitempty"` From 56e828342c79e0e62917b35eaf2d812cead0dc11 Mon Sep 17 00:00:00 2001 From: Arnaud Farbos Date: Tue, 12 Nov 2024 13:52:12 -0800 Subject: [PATCH 2/3] make generate --- ...nfrastructure.cluster.x-k8s.io_gcpmanagedcontrolplanes.yaml | 3 ++- exp/api/v1beta1/gcpmanagedcontrolplane_types.go | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/config/crd/bases/infrastructure.cluster.x-k8s.io_gcpmanagedcontrolplanes.yaml b/config/crd/bases/infrastructure.cluster.x-k8s.io_gcpmanagedcontrolplanes.yaml index 886776a7f..2c00db076 100644 --- a/config/crd/bases/infrastructure.cluster.x-k8s.io_gcpmanagedcontrolplanes.yaml +++ b/config/crd/bases/infrastructure.cluster.x-k8s.io_gcpmanagedcontrolplanes.yaml @@ -142,7 +142,8 @@ spec: for this GKE cluster. type: boolean enableIdentityService: - description: EnableIdentityService indicates whether to enable Identity Service component for this GKE cluster. + description: EnableIdentityService indicates whether to enable Identity + Service component for this GKE cluster. type: boolean endpoint: description: Endpoint represents the endpoint used to communicate diff --git a/exp/api/v1beta1/gcpmanagedcontrolplane_types.go b/exp/api/v1beta1/gcpmanagedcontrolplane_types.go index 0d2e68cfe..bee64dc28 100644 --- a/exp/api/v1beta1/gcpmanagedcontrolplane_types.go +++ b/exp/api/v1beta1/gcpmanagedcontrolplane_types.go @@ -1,5 +1,5 @@ /* -Copyright 2022 The Kubernetes Authors. +Copyright, 2022 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. From 6ef3edf097c6b2dbd4f2a0d414feae3e7d9c0be7 Mon Sep 17 00:00:00 2001 From: afarbos Date: Wed, 13 Nov 2024 08:22:50 -0800 Subject: [PATCH 3/3] Update exp/api/v1beta1/gcpmanagedcontrolplane_types.go --- exp/api/v1beta1/gcpmanagedcontrolplane_types.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exp/api/v1beta1/gcpmanagedcontrolplane_types.go b/exp/api/v1beta1/gcpmanagedcontrolplane_types.go index bee64dc28..0d2e68cfe 100644 --- a/exp/api/v1beta1/gcpmanagedcontrolplane_types.go +++ b/exp/api/v1beta1/gcpmanagedcontrolplane_types.go @@ -1,5 +1,5 @@ /* -Copyright, 2022 The Kubernetes Authors. +Copyright 2022 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.