diff --git a/python/proto/gkehub/alpha/feature_membership.proto b/python/proto/gkehub/alpha/feature_membership.proto index 78d278920..f21718c74 100755 --- a/python/proto/gkehub/alpha/feature_membership.proto +++ b/python/proto/gkehub/alpha/feature_membership.proto @@ -42,6 +42,13 @@ enum GkehubAlphaFeatureMembershipConfigmanagementPolicyControllerMonitoringBacke GkehubAlphaFeatureMembershipConfigmanagementPolicyControllerMonitoringBackendsEnumCLOUD_MONITORING = 3; } +enum GkehubAlphaFeatureMembershipConfigmanagementManagementEnum { + GkehubAlphaFeatureMembershipConfigmanagementManagementEnumNO_VALUE_DO_NOT_USE = 0; + GkehubAlphaFeatureMembershipConfigmanagementManagementEnumMANAGEMENT_UNSPECIFIED = 1; + GkehubAlphaFeatureMembershipConfigmanagementManagementEnumMANAGEMENT_AUTOMATIC = 2; + GkehubAlphaFeatureMembershipConfigmanagementManagementEnumMANAGEMENT_MANUAL = 3; +} + enum GkehubAlphaFeatureMembershipPolicycontrollerPolicyControllerHubConfigInstallSpecEnum { GkehubAlphaFeatureMembershipPolicycontrollerPolicyControllerHubConfigInstallSpecEnumNO_VALUE_DO_NOT_USE = 0; GkehubAlphaFeatureMembershipPolicycontrollerPolicyControllerHubConfigInstallSpecEnumINSTALL_SPEC_UNSPECIFIED = 1; @@ -94,6 +101,7 @@ message GkehubAlphaFeatureMembershipConfigmanagement { GkehubAlphaFeatureMembershipConfigmanagementBinauthz binauthz = 3; GkehubAlphaFeatureMembershipConfigmanagementHierarchyController hierarchy_controller = 4; string version = 5; + GkehubAlphaFeatureMembershipConfigmanagementManagementEnum management = 6; } message GkehubAlphaFeatureMembershipConfigmanagementConfigSync { diff --git a/python/proto/gkehub/beta/feature_membership.proto b/python/proto/gkehub/beta/feature_membership.proto index d429ae6b6..f9b0775c3 100755 --- a/python/proto/gkehub/beta/feature_membership.proto +++ b/python/proto/gkehub/beta/feature_membership.proto @@ -42,6 +42,13 @@ enum GkehubBetaFeatureMembershipConfigmanagementPolicyControllerMonitoringBacken GkehubBetaFeatureMembershipConfigmanagementPolicyControllerMonitoringBackendsEnumCLOUD_MONITORING = 3; } +enum GkehubBetaFeatureMembershipConfigmanagementManagementEnum { + GkehubBetaFeatureMembershipConfigmanagementManagementEnumNO_VALUE_DO_NOT_USE = 0; + GkehubBetaFeatureMembershipConfigmanagementManagementEnumMANAGEMENT_UNSPECIFIED = 1; + GkehubBetaFeatureMembershipConfigmanagementManagementEnumMANAGEMENT_AUTOMATIC = 2; + GkehubBetaFeatureMembershipConfigmanagementManagementEnumMANAGEMENT_MANUAL = 3; +} + enum GkehubBetaFeatureMembershipPolicycontrollerPolicyControllerHubConfigInstallSpecEnum { GkehubBetaFeatureMembershipPolicycontrollerPolicyControllerHubConfigInstallSpecEnumNO_VALUE_DO_NOT_USE = 0; GkehubBetaFeatureMembershipPolicycontrollerPolicyControllerHubConfigInstallSpecEnumINSTALL_SPEC_UNSPECIFIED = 1; @@ -94,6 +101,7 @@ message GkehubBetaFeatureMembershipConfigmanagement { GkehubBetaFeatureMembershipConfigmanagementBinauthz binauthz = 3; GkehubBetaFeatureMembershipConfigmanagementHierarchyController hierarchy_controller = 4; string version = 5; + GkehubBetaFeatureMembershipConfigmanagementManagementEnum management = 6; } message GkehubBetaFeatureMembershipConfigmanagementConfigSync { diff --git a/python/proto/gkehub/feature_membership.proto b/python/proto/gkehub/feature_membership.proto index 7a1269102..3fc76d625 100755 --- a/python/proto/gkehub/feature_membership.proto +++ b/python/proto/gkehub/feature_membership.proto @@ -42,6 +42,13 @@ enum GkehubFeatureMembershipConfigmanagementPolicyControllerMonitoringBackendsEn GkehubFeatureMembershipConfigmanagementPolicyControllerMonitoringBackendsEnumCLOUD_MONITORING = 3; } +enum GkehubFeatureMembershipConfigmanagementManagementEnum { + GkehubFeatureMembershipConfigmanagementManagementEnumNO_VALUE_DO_NOT_USE = 0; + GkehubFeatureMembershipConfigmanagementManagementEnumMANAGEMENT_UNSPECIFIED = 1; + GkehubFeatureMembershipConfigmanagementManagementEnumMANAGEMENT_AUTOMATIC = 2; + GkehubFeatureMembershipConfigmanagementManagementEnumMANAGEMENT_MANUAL = 3; +} + enum GkehubFeatureMembershipPolicycontrollerPolicyControllerHubConfigInstallSpecEnum { GkehubFeatureMembershipPolicycontrollerPolicyControllerHubConfigInstallSpecEnumNO_VALUE_DO_NOT_USE = 0; GkehubFeatureMembershipPolicycontrollerPolicyControllerHubConfigInstallSpecEnumINSTALL_SPEC_UNSPECIFIED = 1; @@ -94,6 +101,7 @@ message GkehubFeatureMembershipConfigmanagement { GkehubFeatureMembershipConfigmanagementBinauthz binauthz = 3; GkehubFeatureMembershipConfigmanagementHierarchyController hierarchy_controller = 4; string version = 5; + GkehubFeatureMembershipConfigmanagementManagementEnum management = 6; } message GkehubFeatureMembershipConfigmanagementConfigSync { diff --git a/python/services/gkehub/alpha/feature_membership.py b/python/services/gkehub/alpha/feature_membership.py index 481f5ed63..73566515d 100755 --- a/python/services/gkehub/alpha/feature_membership.py +++ b/python/services/gkehub/alpha/feature_membership.py @@ -244,12 +244,14 @@ def __init__( binauthz: dict = None, hierarchy_controller: dict = None, version: str = None, + management: str = None, ): self.config_sync = config_sync self.policy_controller = policy_controller self.binauthz = binauthz self.hierarchy_controller = hierarchy_controller self.version = version + self.management = management @classmethod def to_proto(self, resource): @@ -293,6 +295,12 @@ def to_proto(self, resource): res.ClearField("hierarchy_controller") if Primitive.to_proto(resource.version): res.version = Primitive.to_proto(resource.version) + if FeatureMembershipConfigmanagementManagementEnum.to_proto( + resource.management + ): + res.management = FeatureMembershipConfigmanagementManagementEnum.to_proto( + resource.management + ) return res @classmethod @@ -314,6 +322,9 @@ def from_proto(self, resource): resource.hierarchy_controller ), version=Primitive.from_proto(resource.version), + management=FeatureMembershipConfigmanagementManagementEnum.from_proto( + resource.management + ), ) @@ -1682,6 +1693,26 @@ def from_proto(self, resource): ] +class FeatureMembershipConfigmanagementManagementEnum(object): + @classmethod + def to_proto(self, resource): + if not resource: + return resource + return feature_membership_pb2.GkehubAlphaFeatureMembershipConfigmanagementManagementEnum.Value( + "GkehubAlphaFeatureMembershipConfigmanagementManagementEnum%s" % resource + ) + + @classmethod + def from_proto(self, resource): + if not resource: + return resource + return feature_membership_pb2.GkehubAlphaFeatureMembershipConfigmanagementManagementEnum.Name( + resource + )[ + len("GkehubAlphaFeatureMembershipConfigmanagementManagementEnum") : + ] + + class FeatureMembershipPolicycontrollerPolicyControllerHubConfigInstallSpecEnum(object): @classmethod def to_proto(self, resource): diff --git a/python/services/gkehub/alpha/feature_membership_server.go b/python/services/gkehub/alpha/feature_membership_server.go index 95986004e..58887cd56 100755 --- a/python/services/gkehub/alpha/feature_membership_server.go +++ b/python/services/gkehub/alpha/feature_membership_server.go @@ -60,6 +60,18 @@ func ProtoToGkehubAlphaFeatureMembershipConfigmanagementPolicyControllerMonitori return nil } +// ProtoToFeatureMembershipConfigmanagementManagementEnum converts a FeatureMembershipConfigmanagementManagementEnum enum from its proto representation. +func ProtoToGkehubAlphaFeatureMembershipConfigmanagementManagementEnum(e alphapb.GkehubAlphaFeatureMembershipConfigmanagementManagementEnum) *alpha.FeatureMembershipConfigmanagementManagementEnum { + if e == 0 { + return nil + } + if n, ok := alphapb.GkehubAlphaFeatureMembershipConfigmanagementManagementEnum_name[int32(e)]; ok { + e := alpha.FeatureMembershipConfigmanagementManagementEnum(n[len("GkehubAlphaFeatureMembershipConfigmanagementManagementEnum"):]) + return &e + } + return nil +} + // ProtoToFeatureMembershipPolicycontrollerPolicyControllerHubConfigInstallSpecEnum converts a FeatureMembershipPolicycontrollerPolicyControllerHubConfigInstallSpecEnum enum from its proto representation. func ProtoToGkehubAlphaFeatureMembershipPolicycontrollerPolicyControllerHubConfigInstallSpecEnum(e alphapb.GkehubAlphaFeatureMembershipPolicycontrollerPolicyControllerHubConfigInstallSpecEnum) *alpha.FeatureMembershipPolicycontrollerPolicyControllerHubConfigInstallSpecEnum { if e == 0 { @@ -131,6 +143,7 @@ func ProtoToGkehubAlphaFeatureMembershipConfigmanagement(p *alphapb.GkehubAlphaF Binauthz: ProtoToGkehubAlphaFeatureMembershipConfigmanagementBinauthz(p.GetBinauthz()), HierarchyController: ProtoToGkehubAlphaFeatureMembershipConfigmanagementHierarchyController(p.GetHierarchyController()), Version: dcl.StringOrNil(p.GetVersion()), + Management: ProtoToGkehubAlphaFeatureMembershipConfigmanagementManagementEnum(p.GetManagement()), } return obj } @@ -433,6 +446,17 @@ func GkehubAlphaFeatureMembershipConfigmanagementPolicyControllerMonitoringBacke return alphapb.GkehubAlphaFeatureMembershipConfigmanagementPolicyControllerMonitoringBackendsEnum(0) } +// FeatureMembershipConfigmanagementManagementEnumToProto converts a FeatureMembershipConfigmanagementManagementEnum enum to its proto representation. +func GkehubAlphaFeatureMembershipConfigmanagementManagementEnumToProto(e *alpha.FeatureMembershipConfigmanagementManagementEnum) alphapb.GkehubAlphaFeatureMembershipConfigmanagementManagementEnum { + if e == nil { + return alphapb.GkehubAlphaFeatureMembershipConfigmanagementManagementEnum(0) + } + if v, ok := alphapb.GkehubAlphaFeatureMembershipConfigmanagementManagementEnum_value["FeatureMembershipConfigmanagementManagementEnum"+string(*e)]; ok { + return alphapb.GkehubAlphaFeatureMembershipConfigmanagementManagementEnum(v) + } + return alphapb.GkehubAlphaFeatureMembershipConfigmanagementManagementEnum(0) +} + // FeatureMembershipPolicycontrollerPolicyControllerHubConfigInstallSpecEnumToProto converts a FeatureMembershipPolicycontrollerPolicyControllerHubConfigInstallSpecEnum enum to its proto representation. func GkehubAlphaFeatureMembershipPolicycontrollerPolicyControllerHubConfigInstallSpecEnumToProto(e *alpha.FeatureMembershipPolicycontrollerPolicyControllerHubConfigInstallSpecEnum) alphapb.GkehubAlphaFeatureMembershipPolicycontrollerPolicyControllerHubConfigInstallSpecEnum { if e == nil { @@ -499,6 +523,7 @@ func GkehubAlphaFeatureMembershipConfigmanagementToProto(o *alpha.FeatureMembers p.SetBinauthz(GkehubAlphaFeatureMembershipConfigmanagementBinauthzToProto(o.Binauthz)) p.SetHierarchyController(GkehubAlphaFeatureMembershipConfigmanagementHierarchyControllerToProto(o.HierarchyController)) p.SetVersion(dcl.ValueOrEmptyString(o.Version)) + p.SetManagement(GkehubAlphaFeatureMembershipConfigmanagementManagementEnumToProto(o.Management)) return p } diff --git a/python/services/gkehub/beta/feature_membership.py b/python/services/gkehub/beta/feature_membership.py index e086057c2..3b57f3fb4 100755 --- a/python/services/gkehub/beta/feature_membership.py +++ b/python/services/gkehub/beta/feature_membership.py @@ -244,12 +244,14 @@ def __init__( binauthz: dict = None, hierarchy_controller: dict = None, version: str = None, + management: str = None, ): self.config_sync = config_sync self.policy_controller = policy_controller self.binauthz = binauthz self.hierarchy_controller = hierarchy_controller self.version = version + self.management = management @classmethod def to_proto(self, resource): @@ -293,6 +295,12 @@ def to_proto(self, resource): res.ClearField("hierarchy_controller") if Primitive.to_proto(resource.version): res.version = Primitive.to_proto(resource.version) + if FeatureMembershipConfigmanagementManagementEnum.to_proto( + resource.management + ): + res.management = FeatureMembershipConfigmanagementManagementEnum.to_proto( + resource.management + ) return res @classmethod @@ -314,6 +322,9 @@ def from_proto(self, resource): resource.hierarchy_controller ), version=Primitive.from_proto(resource.version), + management=FeatureMembershipConfigmanagementManagementEnum.from_proto( + resource.management + ), ) @@ -1682,6 +1693,26 @@ def from_proto(self, resource): ] +class FeatureMembershipConfigmanagementManagementEnum(object): + @classmethod + def to_proto(self, resource): + if not resource: + return resource + return feature_membership_pb2.GkehubBetaFeatureMembershipConfigmanagementManagementEnum.Value( + "GkehubBetaFeatureMembershipConfigmanagementManagementEnum%s" % resource + ) + + @classmethod + def from_proto(self, resource): + if not resource: + return resource + return feature_membership_pb2.GkehubBetaFeatureMembershipConfigmanagementManagementEnum.Name( + resource + )[ + len("GkehubBetaFeatureMembershipConfigmanagementManagementEnum") : + ] + + class FeatureMembershipPolicycontrollerPolicyControllerHubConfigInstallSpecEnum(object): @classmethod def to_proto(self, resource): diff --git a/python/services/gkehub/beta/feature_membership_server.go b/python/services/gkehub/beta/feature_membership_server.go index e58b3e11d..3869a5294 100755 --- a/python/services/gkehub/beta/feature_membership_server.go +++ b/python/services/gkehub/beta/feature_membership_server.go @@ -60,6 +60,18 @@ func ProtoToGkehubBetaFeatureMembershipConfigmanagementPolicyControllerMonitorin return nil } +// ProtoToFeatureMembershipConfigmanagementManagementEnum converts a FeatureMembershipConfigmanagementManagementEnum enum from its proto representation. +func ProtoToGkehubBetaFeatureMembershipConfigmanagementManagementEnum(e betapb.GkehubBetaFeatureMembershipConfigmanagementManagementEnum) *beta.FeatureMembershipConfigmanagementManagementEnum { + if e == 0 { + return nil + } + if n, ok := betapb.GkehubBetaFeatureMembershipConfigmanagementManagementEnum_name[int32(e)]; ok { + e := beta.FeatureMembershipConfigmanagementManagementEnum(n[len("GkehubBetaFeatureMembershipConfigmanagementManagementEnum"):]) + return &e + } + return nil +} + // ProtoToFeatureMembershipPolicycontrollerPolicyControllerHubConfigInstallSpecEnum converts a FeatureMembershipPolicycontrollerPolicyControllerHubConfigInstallSpecEnum enum from its proto representation. func ProtoToGkehubBetaFeatureMembershipPolicycontrollerPolicyControllerHubConfigInstallSpecEnum(e betapb.GkehubBetaFeatureMembershipPolicycontrollerPolicyControllerHubConfigInstallSpecEnum) *beta.FeatureMembershipPolicycontrollerPolicyControllerHubConfigInstallSpecEnum { if e == 0 { @@ -131,6 +143,7 @@ func ProtoToGkehubBetaFeatureMembershipConfigmanagement(p *betapb.GkehubBetaFeat Binauthz: ProtoToGkehubBetaFeatureMembershipConfigmanagementBinauthz(p.GetBinauthz()), HierarchyController: ProtoToGkehubBetaFeatureMembershipConfigmanagementHierarchyController(p.GetHierarchyController()), Version: dcl.StringOrNil(p.GetVersion()), + Management: ProtoToGkehubBetaFeatureMembershipConfigmanagementManagementEnum(p.GetManagement()), } return obj } @@ -433,6 +446,17 @@ func GkehubBetaFeatureMembershipConfigmanagementPolicyControllerMonitoringBacken return betapb.GkehubBetaFeatureMembershipConfigmanagementPolicyControllerMonitoringBackendsEnum(0) } +// FeatureMembershipConfigmanagementManagementEnumToProto converts a FeatureMembershipConfigmanagementManagementEnum enum to its proto representation. +func GkehubBetaFeatureMembershipConfigmanagementManagementEnumToProto(e *beta.FeatureMembershipConfigmanagementManagementEnum) betapb.GkehubBetaFeatureMembershipConfigmanagementManagementEnum { + if e == nil { + return betapb.GkehubBetaFeatureMembershipConfigmanagementManagementEnum(0) + } + if v, ok := betapb.GkehubBetaFeatureMembershipConfigmanagementManagementEnum_value["FeatureMembershipConfigmanagementManagementEnum"+string(*e)]; ok { + return betapb.GkehubBetaFeatureMembershipConfigmanagementManagementEnum(v) + } + return betapb.GkehubBetaFeatureMembershipConfigmanagementManagementEnum(0) +} + // FeatureMembershipPolicycontrollerPolicyControllerHubConfigInstallSpecEnumToProto converts a FeatureMembershipPolicycontrollerPolicyControllerHubConfigInstallSpecEnum enum to its proto representation. func GkehubBetaFeatureMembershipPolicycontrollerPolicyControllerHubConfigInstallSpecEnumToProto(e *beta.FeatureMembershipPolicycontrollerPolicyControllerHubConfigInstallSpecEnum) betapb.GkehubBetaFeatureMembershipPolicycontrollerPolicyControllerHubConfigInstallSpecEnum { if e == nil { @@ -499,6 +523,7 @@ func GkehubBetaFeatureMembershipConfigmanagementToProto(o *beta.FeatureMembershi p.SetBinauthz(GkehubBetaFeatureMembershipConfigmanagementBinauthzToProto(o.Binauthz)) p.SetHierarchyController(GkehubBetaFeatureMembershipConfigmanagementHierarchyControllerToProto(o.HierarchyController)) p.SetVersion(dcl.ValueOrEmptyString(o.Version)) + p.SetManagement(GkehubBetaFeatureMembershipConfigmanagementManagementEnumToProto(o.Management)) return p } diff --git a/python/services/gkehub/feature_membership.py b/python/services/gkehub/feature_membership.py index 1a9f7a804..90b9b94dc 100755 --- a/python/services/gkehub/feature_membership.py +++ b/python/services/gkehub/feature_membership.py @@ -244,12 +244,14 @@ def __init__( binauthz: dict = None, hierarchy_controller: dict = None, version: str = None, + management: str = None, ): self.config_sync = config_sync self.policy_controller = policy_controller self.binauthz = binauthz self.hierarchy_controller = hierarchy_controller self.version = version + self.management = management @classmethod def to_proto(self, resource): @@ -293,6 +295,12 @@ def to_proto(self, resource): res.ClearField("hierarchy_controller") if Primitive.to_proto(resource.version): res.version = Primitive.to_proto(resource.version) + if FeatureMembershipConfigmanagementManagementEnum.to_proto( + resource.management + ): + res.management = FeatureMembershipConfigmanagementManagementEnum.to_proto( + resource.management + ) return res @classmethod @@ -314,6 +322,9 @@ def from_proto(self, resource): resource.hierarchy_controller ), version=Primitive.from_proto(resource.version), + management=FeatureMembershipConfigmanagementManagementEnum.from_proto( + resource.management + ), ) @@ -1672,6 +1683,26 @@ def from_proto(self, resource): ] +class FeatureMembershipConfigmanagementManagementEnum(object): + @classmethod + def to_proto(self, resource): + if not resource: + return resource + return feature_membership_pb2.GkehubFeatureMembershipConfigmanagementManagementEnum.Value( + "GkehubFeatureMembershipConfigmanagementManagementEnum%s" % resource + ) + + @classmethod + def from_proto(self, resource): + if not resource: + return resource + return feature_membership_pb2.GkehubFeatureMembershipConfigmanagementManagementEnum.Name( + resource + )[ + len("GkehubFeatureMembershipConfigmanagementManagementEnum") : + ] + + class FeatureMembershipPolicycontrollerPolicyControllerHubConfigInstallSpecEnum(object): @classmethod def to_proto(self, resource): diff --git a/python/services/gkehub/feature_membership_server.go b/python/services/gkehub/feature_membership_server.go index 9d58b2b20..df9209295 100755 --- a/python/services/gkehub/feature_membership_server.go +++ b/python/services/gkehub/feature_membership_server.go @@ -60,6 +60,18 @@ func ProtoToGkehubFeatureMembershipConfigmanagementPolicyControllerMonitoringBac return nil } +// ProtoToFeatureMembershipConfigmanagementManagementEnum converts a FeatureMembershipConfigmanagementManagementEnum enum from its proto representation. +func ProtoToGkehubFeatureMembershipConfigmanagementManagementEnum(e gkehubpb.GkehubFeatureMembershipConfigmanagementManagementEnum) *gkehub.FeatureMembershipConfigmanagementManagementEnum { + if e == 0 { + return nil + } + if n, ok := gkehubpb.GkehubFeatureMembershipConfigmanagementManagementEnum_name[int32(e)]; ok { + e := gkehub.FeatureMembershipConfigmanagementManagementEnum(n[len("GkehubFeatureMembershipConfigmanagementManagementEnum"):]) + return &e + } + return nil +} + // ProtoToFeatureMembershipPolicycontrollerPolicyControllerHubConfigInstallSpecEnum converts a FeatureMembershipPolicycontrollerPolicyControllerHubConfigInstallSpecEnum enum from its proto representation. func ProtoToGkehubFeatureMembershipPolicycontrollerPolicyControllerHubConfigInstallSpecEnum(e gkehubpb.GkehubFeatureMembershipPolicycontrollerPolicyControllerHubConfigInstallSpecEnum) *gkehub.FeatureMembershipPolicycontrollerPolicyControllerHubConfigInstallSpecEnum { if e == 0 { @@ -131,6 +143,7 @@ func ProtoToGkehubFeatureMembershipConfigmanagement(p *gkehubpb.GkehubFeatureMem Binauthz: ProtoToGkehubFeatureMembershipConfigmanagementBinauthz(p.GetBinauthz()), HierarchyController: ProtoToGkehubFeatureMembershipConfigmanagementHierarchyController(p.GetHierarchyController()), Version: dcl.StringOrNil(p.GetVersion()), + Management: ProtoToGkehubFeatureMembershipConfigmanagementManagementEnum(p.GetManagement()), } return obj } @@ -433,6 +446,17 @@ func GkehubFeatureMembershipConfigmanagementPolicyControllerMonitoringBackendsEn return gkehubpb.GkehubFeatureMembershipConfigmanagementPolicyControllerMonitoringBackendsEnum(0) } +// FeatureMembershipConfigmanagementManagementEnumToProto converts a FeatureMembershipConfigmanagementManagementEnum enum to its proto representation. +func GkehubFeatureMembershipConfigmanagementManagementEnumToProto(e *gkehub.FeatureMembershipConfigmanagementManagementEnum) gkehubpb.GkehubFeatureMembershipConfigmanagementManagementEnum { + if e == nil { + return gkehubpb.GkehubFeatureMembershipConfigmanagementManagementEnum(0) + } + if v, ok := gkehubpb.GkehubFeatureMembershipConfigmanagementManagementEnum_value["FeatureMembershipConfigmanagementManagementEnum"+string(*e)]; ok { + return gkehubpb.GkehubFeatureMembershipConfigmanagementManagementEnum(v) + } + return gkehubpb.GkehubFeatureMembershipConfigmanagementManagementEnum(0) +} + // FeatureMembershipPolicycontrollerPolicyControllerHubConfigInstallSpecEnumToProto converts a FeatureMembershipPolicycontrollerPolicyControllerHubConfigInstallSpecEnum enum to its proto representation. func GkehubFeatureMembershipPolicycontrollerPolicyControllerHubConfigInstallSpecEnumToProto(e *gkehub.FeatureMembershipPolicycontrollerPolicyControllerHubConfigInstallSpecEnum) gkehubpb.GkehubFeatureMembershipPolicycontrollerPolicyControllerHubConfigInstallSpecEnum { if e == nil { @@ -499,6 +523,7 @@ func GkehubFeatureMembershipConfigmanagementToProto(o *gkehub.FeatureMembershipC p.SetBinauthz(GkehubFeatureMembershipConfigmanagementBinauthzToProto(o.Binauthz)) p.SetHierarchyController(GkehubFeatureMembershipConfigmanagementHierarchyControllerToProto(o.HierarchyController)) p.SetVersion(dcl.ValueOrEmptyString(o.Version)) + p.SetManagement(GkehubFeatureMembershipConfigmanagementManagementEnumToProto(o.Management)) return p } diff --git a/services/google/gkehub/alpha/feature_membership.go b/services/google/gkehub/alpha/feature_membership.go index f75c5c241..d6a977d52 100755 --- a/services/google/gkehub/alpha/feature_membership.go +++ b/services/google/gkehub/alpha/feature_membership.go @@ -119,6 +119,33 @@ func (v FeatureMembershipConfigmanagementPolicyControllerMonitoringBackendsEnum) } } +// The enum FeatureMembershipConfigmanagementManagementEnum. +type FeatureMembershipConfigmanagementManagementEnum string + +// FeatureMembershipConfigmanagementManagementEnumRef returns a *FeatureMembershipConfigmanagementManagementEnum with the value of string s +// If the empty string is provided, nil is returned. +func FeatureMembershipConfigmanagementManagementEnumRef(s string) *FeatureMembershipConfigmanagementManagementEnum { + v := FeatureMembershipConfigmanagementManagementEnum(s) + return &v +} + +func (v FeatureMembershipConfigmanagementManagementEnum) Validate() error { + if string(v) == "" { + // Empty enum is okay. + return nil + } + for _, s := range []string{"MANAGEMENT_UNSPECIFIED", "MANAGEMENT_AUTOMATIC", "MANAGEMENT_MANUAL"} { + if string(v) == s { + return nil + } + } + return &dcl.EnumInvalidError{ + Enum: "FeatureMembershipConfigmanagementManagementEnum", + Value: string(v), + Valid: []string{}, + } +} + // The enum FeatureMembershipPolicycontrollerPolicyControllerHubConfigInstallSpecEnum. type FeatureMembershipPolicycontrollerPolicyControllerHubConfigInstallSpecEnum string @@ -283,6 +310,7 @@ type FeatureMembershipConfigmanagement struct { Binauthz *FeatureMembershipConfigmanagementBinauthz `json:"binauthz"` HierarchyController *FeatureMembershipConfigmanagementHierarchyController `json:"hierarchyController"` Version *string `json:"version"` + Management *FeatureMembershipConfigmanagementManagementEnum `json:"management"` } type jsonFeatureMembershipConfigmanagement FeatureMembershipConfigmanagement @@ -310,6 +338,8 @@ func (r *FeatureMembershipConfigmanagement) UnmarshalJSON(data []byte) error { r.Version = res.Version + r.Management = res.Management + } return nil } diff --git a/services/google/gkehub/alpha/feature_membership.yaml b/services/google/gkehub/alpha/feature_membership.yaml index d305078c9..02d0c758f 100755 --- a/services/google/gkehub/alpha/feature_membership.yaml +++ b/services/google/gkehub/alpha/feature_membership.yaml @@ -249,6 +249,18 @@ components: x-dcl-go-name: Enabled description: Whether Hierarchy Controller is enabled in this cluster. x-dcl-send-empty: true + management: + type: string + x-dcl-go-name: Management + x-dcl-go-type: FeatureMembershipConfigmanagementManagementEnum + description: Set this field to MANAGEMENT_AUTOMATIC to enable Config + Sync auto-upgrades, and set this field to MANAGEMENT_MANUAL or MANAGEMENT_UNSPECIFIED + to disable Config Sync auto-upgrades. + x-dcl-server-default: true + enum: + - MANAGEMENT_UNSPECIFIED + - MANAGEMENT_AUTOMATIC + - MANAGEMENT_MANUAL policyController: type: object x-dcl-go-name: PolicyController diff --git a/services/google/gkehub/alpha/feature_membership_alpha_yaml_embed.go b/services/google/gkehub/alpha/feature_membership_alpha_yaml_embed.go index be7115899..12ea84490 100755 --- a/services/google/gkehub/alpha/feature_membership_alpha_yaml_embed.go +++ b/services/google/gkehub/alpha/feature_membership_alpha_yaml_embed.go @@ -17,7 +17,7 @@ package alpha // blaze-out/k8-fastbuild/genfiles/cloud/graphite/mmv2/services/google/gkehub/alpha/feature_membership.yaml -var YAML_feature_membership = []byte("info:\n title: GkeHub/FeatureMembership\n description: The GkeHub FeatureMembership resource\n x-dcl-struct-name: FeatureMembership\n x-dcl-has-iam: false\n x-dcl-mutex: '{{project}}/{{location}}/{{feature}}'\npaths:\n get:\n description: The function used to get information about a FeatureMembership\n parameters:\n - name: featureMembership\n required: true\n description: A full instance of a FeatureMembership\n apply:\n description: The function used to apply information about a FeatureMembership\n parameters:\n - name: featureMembership\n required: true\n description: A full instance of a FeatureMembership\n delete:\n description: The function used to delete a FeatureMembership\n parameters:\n - name: featureMembership\n required: true\n description: A full instance of a FeatureMembership\n deleteAll:\n description: The function used to delete all FeatureMembership\n parameters:\n - name: project\n required: true\n schema:\n type: string\n - name: location\n required: true\n schema:\n type: string\n - name: feature\n required: true\n schema:\n type: string\n list:\n description: The function used to list information about many FeatureMembership\n parameters:\n - name: project\n required: true\n schema:\n type: string\n - name: location\n required: true\n schema:\n type: string\n - name: feature\n required: true\n schema:\n type: string\ncomponents:\n schemas:\n FeatureMembership:\n title: FeatureMembership\n x-dcl-id: projects/{{project}}/locations/{{location}}/features/{{feature}}/memberships/{{membership}}\n x-dcl-parent-container: project\n x-dcl-has-create: true\n x-dcl-has-iam: false\n x-dcl-read-timeout: 0\n x-dcl-apply-timeout: 0\n x-dcl-delete-timeout: 0\n type: object\n required:\n - project\n - location\n - feature\n - membership\n properties:\n configmanagement:\n type: object\n x-dcl-go-name: Configmanagement\n x-dcl-go-type: FeatureMembershipConfigmanagement\n description: Config Management-specific spec.\n properties:\n binauthz:\n type: object\n x-dcl-go-name: Binauthz\n x-dcl-go-type: FeatureMembershipConfigmanagementBinauthz\n description: '**DEPRECATED** Binauthz configuration for the cluster.\n This field will be ignored and should not be set.'\n x-dcl-server-default: true\n properties:\n enabled:\n type: boolean\n x-dcl-go-name: Enabled\n description: Whether binauthz is enabled in this cluster.\n x-dcl-parameter: true\n configSync:\n type: object\n x-dcl-go-name: ConfigSync\n x-dcl-go-type: FeatureMembershipConfigmanagementConfigSync\n description: Config Sync configuration for the cluster.\n x-dcl-send-empty: true\n properties:\n enabled:\n type: boolean\n x-dcl-go-name: Enabled\n description: Enables the installation of ConfigSync. If set to true,\n ConfigSync resources will be created and the other ConfigSync\n fields will be applied if exist. If set to false, all other ConfigSync\n fields will be ignored, ConfigSync resources will be deleted.\n If omitted, ConfigSync resources will be managed depends on the\n presence of the git or oci field.\n git:\n type: object\n x-dcl-go-name: Git\n x-dcl-go-type: FeatureMembershipConfigmanagementConfigSyncGit\n properties:\n gcpServiceAccountEmail:\n type: string\n x-dcl-go-name: GcpServiceAccountEmail\n description: The GCP Service Account Email used for auth when\n secretType is gcpServiceAccount.\n x-dcl-references:\n - resource: Iam/ServiceAccount\n field: email\n httpsProxy:\n type: string\n x-dcl-go-name: HttpsProxy\n description: URL for the HTTPS proxy to be used when communicating\n with the Git repo.\n policyDir:\n type: string\n x-dcl-go-name: PolicyDir\n description: 'The path within the Git repository that represents\n the top level of the repo to sync. Default: the root directory\n of the repository.'\n secretType:\n type: string\n x-dcl-go-name: SecretType\n description: Type of secret configured for access to the Git\n repo. Must be one of ssh, cookiefile, gcenode, token, gcpserviceaccount\n or none. The validation of this is case-sensitive.\n syncBranch:\n type: string\n x-dcl-go-name: SyncBranch\n description: 'The branch of the repository to sync from. Default:\n master.'\n syncRepo:\n type: string\n x-dcl-go-name: SyncRepo\n description: The URL of the Git repository to use as the source\n of truth.\n syncRev:\n type: string\n x-dcl-go-name: SyncRev\n description: Git revision (tag or hash) to check out. Default\n HEAD.\n syncWaitSecs:\n type: string\n x-dcl-go-name: SyncWaitSecs\n description: 'Period in seconds between consecutive syncs. Default:\n 15.'\n metricsGcpServiceAccountEmail:\n type: string\n x-dcl-go-name: MetricsGcpServiceAccountEmail\n description: The Email of the Google Cloud Service Account (GSA)\n used for exporting Config Sync metrics to Cloud Monitoring. The\n GSA should have the Monitoring Metric Writer(roles/monitoring.metricWriter)\n IAM role. The Kubernetes ServiceAccount `default` in the namespace\n `config-management-monitoring` should be bound to the GSA.\n x-dcl-references:\n - resource: Iam/ServiceAccount\n field: email\n oci:\n type: object\n x-dcl-go-name: Oci\n x-dcl-go-type: FeatureMembershipConfigmanagementConfigSyncOci\n properties:\n gcpServiceAccountEmail:\n type: string\n x-dcl-go-name: GcpServiceAccountEmail\n description: 'The GCP Service Account Email used for auth when\n secret_type is gcpserviceaccount. '\n x-dcl-references:\n - resource: Iam/ServiceAccount\n field: email\n policyDir:\n type: string\n x-dcl-go-name: PolicyDir\n description: 'The absolute path of the directory that contains\n the local resources. Default: the root directory of the image.'\n secretType:\n type: string\n x-dcl-go-name: SecretType\n description: Type of secret configured for access to the OCI\n Image. Must be one of gcenode, gcpserviceaccount or none.\n The validation of this is case-sensitive.\n syncRepo:\n type: string\n x-dcl-go-name: SyncRepo\n description: The OCI image repository URL for the package to\n sync from. e.g. LOCATION-docker.pkg.dev/PROJECT_ID/REPOSITORY_NAME/PACKAGE_NAME.\n syncWaitSecs:\n type: string\n x-dcl-go-name: SyncWaitSecs\n description: 'Period in seconds(int64 format) between consecutive\n syncs. Default: 15.'\n preventDrift:\n type: boolean\n x-dcl-go-name: PreventDrift\n description: Set to true to enable the Config Sync admission webhook\n to prevent drifts. If set to `false`, disables the Config Sync\n admission webhook and does not prevent drifts.\n x-dcl-server-default: true\n sourceFormat:\n type: string\n x-dcl-go-name: SourceFormat\n description: Specifies whether the Config Sync Repo is in \"hierarchical\"\n or \"unstructured\" mode.\n hierarchyController:\n type: object\n x-dcl-go-name: HierarchyController\n x-dcl-go-type: FeatureMembershipConfigmanagementHierarchyController\n description: Hierarchy Controller configuration for the cluster.\n x-dcl-send-empty: true\n properties:\n enableHierarchicalResourceQuota:\n type: boolean\n x-dcl-go-name: EnableHierarchicalResourceQuota\n description: Whether hierarchical resource quota is enabled in this\n cluster.\n x-dcl-send-empty: true\n enablePodTreeLabels:\n type: boolean\n x-dcl-go-name: EnablePodTreeLabels\n description: Whether pod tree labels are enabled in this cluster.\n x-dcl-send-empty: true\n enabled:\n type: boolean\n x-dcl-go-name: Enabled\n description: Whether Hierarchy Controller is enabled in this cluster.\n x-dcl-send-empty: true\n policyController:\n type: object\n x-dcl-go-name: PolicyController\n x-dcl-go-type: FeatureMembershipConfigmanagementPolicyController\n description: Policy Controller configuration for the cluster.\n properties:\n auditIntervalSeconds:\n type: string\n x-dcl-go-name: AuditIntervalSeconds\n description: Sets the interval for Policy Controller Audit Scans\n (in seconds). When set to 0, this disables audit functionality\n altogether.\n enabled:\n type: boolean\n x-dcl-go-name: Enabled\n description: Enables the installation of Policy Controller. If false,\n the rest of PolicyController fields take no effect.\n exemptableNamespaces:\n type: array\n x-dcl-go-name: ExemptableNamespaces\n description: The set of namespaces that are excluded from Policy\n Controller checks. Namespaces do not need to currently exist on\n the cluster.\n x-dcl-send-empty: true\n x-dcl-list-type: list\n items:\n type: string\n x-dcl-go-type: string\n logDeniesEnabled:\n type: boolean\n x-dcl-go-name: LogDeniesEnabled\n description: Logs all denies and dry run failures.\n monitoring:\n type: object\n x-dcl-go-name: Monitoring\n x-dcl-go-type: FeatureMembershipConfigmanagementPolicyControllerMonitoring\n description: 'Specifies the backends Policy Controller should export\n metrics to. For example, to specify metrics should be exported\n to Cloud Monitoring and Prometheus, specify backends: [\"cloudmonitoring\",\n \"prometheus\"]. Default: [\"cloudmonitoring\", \"prometheus\"]'\n x-dcl-server-default: true\n properties:\n backends:\n type: array\n x-dcl-go-name: Backends\n description: ' Specifies the list of backends Policy Controller\n will export to. Specifying an empty value `[]` disables metrics\n export.'\n x-dcl-server-default: true\n x-dcl-send-empty: true\n x-dcl-list-type: list\n items:\n type: string\n x-dcl-go-type: FeatureMembershipConfigmanagementPolicyControllerMonitoringBackendsEnum\n enum:\n - MONITORING_BACKEND_UNSPECIFIED\n - PROMETHEUS\n - CLOUD_MONITORING\n mutationEnabled:\n type: boolean\n x-dcl-go-name: MutationEnabled\n description: Enable or disable mutation in policy controller. If\n true, mutation CRDs, webhook and controller deployment will be\n deployed to the cluster.\n referentialRulesEnabled:\n type: boolean\n x-dcl-go-name: ReferentialRulesEnabled\n description: Enables the ability to use Constraint Templates that\n reference to objects other than the object currently being evaluated.\n templateLibraryInstalled:\n type: boolean\n x-dcl-go-name: TemplateLibraryInstalled\n description: Installs the default template library along with Policy\n Controller.\n version:\n type: string\n x-dcl-go-name: Version\n description: Optional. Version of ACM to install. Defaults to the latest\n version.\n x-dcl-server-default: true\n feature:\n type: string\n x-dcl-go-name: Feature\n description: The name of the feature\n x-kubernetes-immutable: true\n x-dcl-references:\n - resource: Gkehub/Feature\n field: name\n parent: true\n x-dcl-parameter: true\n location:\n type: string\n x-dcl-go-name: Location\n description: The location of the feature\n x-kubernetes-immutable: true\n x-dcl-parameter: true\n membership:\n type: string\n x-dcl-go-name: Membership\n description: The name of the membership\n x-kubernetes-immutable: true\n x-dcl-references:\n - resource: Gkehub/Membership\n field: name\n x-dcl-parameter: true\n membershipLocation:\n type: string\n x-dcl-go-name: MembershipLocation\n description: The location of the membership\n x-kubernetes-immutable: true\n x-dcl-parameter: true\n mesh:\n type: object\n x-dcl-go-name: Mesh\n x-dcl-go-type: FeatureMembershipMesh\n description: Manage Mesh Features\n properties:\n controlPlane:\n type: string\n x-dcl-go-name: ControlPlane\n x-dcl-go-type: FeatureMembershipMeshControlPlaneEnum\n description: '**DEPRECATED** Whether to automatically manage Service\n Mesh control planes. Possible values: CONTROL_PLANE_MANAGEMENT_UNSPECIFIED,\n AUTOMATIC, MANUAL'\n enum:\n - CONTROL_PLANE_MANAGEMENT_UNSPECIFIED\n - AUTOMATIC\n - MANUAL\n management:\n type: string\n x-dcl-go-name: Management\n x-dcl-go-type: FeatureMembershipMeshManagementEnum\n description: 'Whether to automatically manage Service Mesh. Possible\n values: MANAGEMENT_UNSPECIFIED, MANAGEMENT_AUTOMATIC, MANAGEMENT_MANUAL'\n enum:\n - MANAGEMENT_UNSPECIFIED\n - MANAGEMENT_AUTOMATIC\n - MANAGEMENT_MANUAL\n policycontroller:\n type: object\n x-dcl-go-name: Policycontroller\n x-dcl-go-type: FeatureMembershipPolicycontroller\n description: Policy Controller-specific spec.\n required:\n - policyControllerHubConfig\n properties:\n policyControllerHubConfig:\n type: object\n x-dcl-go-name: PolicyControllerHubConfig\n x-dcl-go-type: FeatureMembershipPolicycontrollerPolicyControllerHubConfig\n description: Policy Controller configuration for the cluster.\n properties:\n auditIntervalSeconds:\n type: integer\n format: int64\n x-dcl-go-name: AuditIntervalSeconds\n description: Sets the interval for Policy Controller Audit Scans\n (in seconds). When set to 0, this disables audit functionality\n altogether.\n constraintViolationLimit:\n type: integer\n format: int64\n x-dcl-go-name: ConstraintViolationLimit\n description: The maximum number of audit violations to be stored\n in a constraint. If not set, the internal default of 20 will be\n used.\n deploymentConfigs:\n type: object\n additionalProperties:\n type: object\n x-dcl-go-type: FeatureMembershipPolicycontrollerPolicyControllerHubConfigDeploymentConfigs\n properties:\n containerResources:\n type: object\n x-dcl-go-name: ContainerResources\n x-dcl-go-type: FeatureMembershipPolicycontrollerPolicyControllerHubConfigDeploymentConfigsContainerResources\n description: Container resource requirements.\n x-dcl-conflicts:\n - replicaCount\n - podAffinity\n - podTolerations\n properties:\n limits:\n type: object\n x-dcl-go-name: Limits\n x-dcl-go-type: FeatureMembershipPolicycontrollerPolicyControllerHubConfigDeploymentConfigsContainerResourcesLimits\n description: Limits describes the maximum amount of compute\n resources allowed for use by the running container.\n properties:\n cpu:\n type: string\n x-dcl-go-name: Cpu\n description: CPU requirement expressed in Kubernetes\n resource units.\n memory:\n type: string\n x-dcl-go-name: Memory\n description: Memory requirement expressed in Kubernetes\n resource units.\n requests:\n type: object\n x-dcl-go-name: Requests\n x-dcl-go-type: FeatureMembershipPolicycontrollerPolicyControllerHubConfigDeploymentConfigsContainerResourcesRequests\n description: Requests describes the amount of compute\n resources reserved for the container by the kube-scheduler.\n properties:\n cpu:\n type: string\n x-dcl-go-name: Cpu\n description: CPU requirement expressed in Kubernetes\n resource units.\n memory:\n type: string\n x-dcl-go-name: Memory\n description: Memory requirement expressed in Kubernetes\n resource units.\n podAffinity:\n type: string\n x-dcl-go-name: PodAffinity\n x-dcl-go-type: FeatureMembershipPolicycontrollerPolicyControllerHubConfigDeploymentConfigsPodAffinityEnum\n description: 'Pod affinity configuration. Possible values:\n AFFINITY_UNSPECIFIED, NO_AFFINITY, ANTI_AFFINITY'\n x-dcl-conflicts:\n - replicaCount\n - containerResources\n - podTolerations\n enum:\n - AFFINITY_UNSPECIFIED\n - NO_AFFINITY\n - ANTI_AFFINITY\n podTolerations:\n type: array\n x-dcl-go-name: PodTolerations\n description: Pod tolerations of node taints.\n x-dcl-conflicts:\n - replicaCount\n - containerResources\n - podAffinity\n x-dcl-send-empty: true\n x-dcl-list-type: list\n items:\n type: object\n x-dcl-go-type: FeatureMembershipPolicycontrollerPolicyControllerHubConfigDeploymentConfigsPodTolerations\n properties:\n effect:\n type: string\n x-dcl-go-name: Effect\n description: Matches a taint effect.\n key:\n type: string\n x-dcl-go-name: Key\n description: Matches a taint key (not necessarily unique).\n operator:\n type: string\n x-dcl-go-name: Operator\n description: Matches a taint operator.\n value:\n type: string\n x-dcl-go-name: Value\n description: Matches a taint value.\n replicaCount:\n type: integer\n format: int64\n x-dcl-go-name: ReplicaCount\n description: Pod replica count.\n x-dcl-conflicts:\n - containerResources\n - podAffinity\n - podTolerations\n x-dcl-go-name: DeploymentConfigs\n description: Map of deployment configs to deployments (\"admission\",\n \"audit\", \"mutation\").\n x-dcl-server-default: true\n exemptableNamespaces:\n type: array\n x-dcl-go-name: ExemptableNamespaces\n description: The set of namespaces that are excluded from Policy\n Controller checks. Namespaces do not need to currently exist on\n the cluster.\n x-dcl-send-empty: true\n x-dcl-list-type: list\n items:\n type: string\n x-dcl-go-type: string\n installSpec:\n type: string\n x-dcl-go-name: InstallSpec\n x-dcl-go-type: FeatureMembershipPolicycontrollerPolicyControllerHubConfigInstallSpecEnum\n description: 'Configures the mode of the Policy Controller installation.\n Possible values: INSTALL_SPEC_UNSPECIFIED, INSTALL_SPEC_NOT_INSTALLED,\n INSTALL_SPEC_ENABLED, INSTALL_SPEC_SUSPENDED, INSTALL_SPEC_DETACHED'\n enum:\n - INSTALL_SPEC_UNSPECIFIED\n - INSTALL_SPEC_NOT_INSTALLED\n - INSTALL_SPEC_ENABLED\n - INSTALL_SPEC_SUSPENDED\n - INSTALL_SPEC_DETACHED\n logDeniesEnabled:\n type: boolean\n x-dcl-go-name: LogDeniesEnabled\n description: Logs all denies and dry run failures.\n monitoring:\n type: object\n x-dcl-go-name: Monitoring\n x-dcl-go-type: FeatureMembershipPolicycontrollerPolicyControllerHubConfigMonitoring\n description: 'Specifies the backends Policy Controller should export\n metrics to. For example, to specify metrics should be exported\n to Cloud Monitoring and Prometheus, specify backends: [\"cloudmonitoring\",\n \"prometheus\"]. Default: [\"cloudmonitoring\", \"prometheus\"]'\n x-dcl-server-default: true\n properties:\n backends:\n type: array\n x-dcl-go-name: Backends\n description: ' Specifies the list of backends Policy Controller\n will export to. Specifying an empty value `[]` disables metrics\n export.'\n x-dcl-server-default: true\n x-dcl-send-empty: true\n x-dcl-list-type: list\n items:\n type: string\n x-dcl-go-type: FeatureMembershipPolicycontrollerPolicyControllerHubConfigMonitoringBackendsEnum\n enum:\n - MONITORING_BACKEND_UNSPECIFIED\n - PROMETHEUS\n - CLOUD_MONITORING\n mutationEnabled:\n type: boolean\n x-dcl-go-name: MutationEnabled\n description: Enables the ability to mutate resources using Policy\n Controller.\n policyContent:\n type: object\n x-dcl-go-name: PolicyContent\n x-dcl-go-type: FeatureMembershipPolicycontrollerPolicyControllerHubConfigPolicyContent\n description: Specifies the desired policy content on the cluster.\n x-dcl-server-default: true\n properties:\n bundles:\n type: object\n additionalProperties:\n type: object\n x-dcl-go-type: FeatureMembershipPolicycontrollerPolicyControllerHubConfigPolicyContentBundles\n properties:\n exemptedNamespaces:\n type: array\n x-dcl-go-name: ExemptedNamespaces\n description: The set of namespaces to be exempted from\n the bundle.\n x-dcl-send-empty: true\n x-dcl-list-type: list\n items:\n type: string\n x-dcl-go-type: string\n x-dcl-go-name: Bundles\n description: map of bundle name to BundleInstallSpec. The bundle\n name maps to the `bundleName` key in the `policycontroller.gke.io/constraintData`\n annotation on a constraint.\n templateLibrary:\n type: object\n x-dcl-go-name: TemplateLibrary\n x-dcl-go-type: FeatureMembershipPolicycontrollerPolicyControllerHubConfigPolicyContentTemplateLibrary\n description: Configures the installation of the Template Library.\n x-dcl-server-default: true\n properties:\n installation:\n type: string\n x-dcl-go-name: Installation\n x-dcl-go-type: FeatureMembershipPolicycontrollerPolicyControllerHubConfigPolicyContentTemplateLibraryInstallationEnum\n description: 'Configures the manner in which the template\n library is installed on the cluster. Possible values:\n INSTALLATION_UNSPECIFIED, NOT_INSTALLED, ALL'\n enum:\n - INSTALLATION_UNSPECIFIED\n - NOT_INSTALLED\n - ALL\n referentialRulesEnabled:\n type: boolean\n x-dcl-go-name: ReferentialRulesEnabled\n description: Enables the ability to use Constraint Templates that\n reference to objects other than the object currently being evaluated.\n version:\n type: string\n x-dcl-go-name: Version\n description: Optional. Version of Policy Controller to install. Defaults\n to the latest version.\n x-dcl-server-default: true\n project:\n type: string\n x-dcl-go-name: Project\n description: The project of the feature\n x-kubernetes-immutable: true\n x-dcl-references:\n - resource: Cloudresourcemanager/Project\n field: name\n parent: true\n x-dcl-parameter: true\n") +var YAML_feature_membership = []byte("info:\n title: GkeHub/FeatureMembership\n description: The GkeHub FeatureMembership resource\n x-dcl-struct-name: FeatureMembership\n x-dcl-has-iam: false\n x-dcl-mutex: '{{project}}/{{location}}/{{feature}}'\npaths:\n get:\n description: The function used to get information about a FeatureMembership\n parameters:\n - name: featureMembership\n required: true\n description: A full instance of a FeatureMembership\n apply:\n description: The function used to apply information about a FeatureMembership\n parameters:\n - name: featureMembership\n required: true\n description: A full instance of a FeatureMembership\n delete:\n description: The function used to delete a FeatureMembership\n parameters:\n - name: featureMembership\n required: true\n description: A full instance of a FeatureMembership\n deleteAll:\n description: The function used to delete all FeatureMembership\n parameters:\n - name: project\n required: true\n schema:\n type: string\n - name: location\n required: true\n schema:\n type: string\n - name: feature\n required: true\n schema:\n type: string\n list:\n description: The function used to list information about many FeatureMembership\n parameters:\n - name: project\n required: true\n schema:\n type: string\n - name: location\n required: true\n schema:\n type: string\n - name: feature\n required: true\n schema:\n type: string\ncomponents:\n schemas:\n FeatureMembership:\n title: FeatureMembership\n x-dcl-id: projects/{{project}}/locations/{{location}}/features/{{feature}}/memberships/{{membership}}\n x-dcl-parent-container: project\n x-dcl-has-create: true\n x-dcl-has-iam: false\n x-dcl-read-timeout: 0\n x-dcl-apply-timeout: 0\n x-dcl-delete-timeout: 0\n type: object\n required:\n - project\n - location\n - feature\n - membership\n properties:\n configmanagement:\n type: object\n x-dcl-go-name: Configmanagement\n x-dcl-go-type: FeatureMembershipConfigmanagement\n description: Config Management-specific spec.\n properties:\n binauthz:\n type: object\n x-dcl-go-name: Binauthz\n x-dcl-go-type: FeatureMembershipConfigmanagementBinauthz\n description: '**DEPRECATED** Binauthz configuration for the cluster.\n This field will be ignored and should not be set.'\n x-dcl-server-default: true\n properties:\n enabled:\n type: boolean\n x-dcl-go-name: Enabled\n description: Whether binauthz is enabled in this cluster.\n x-dcl-parameter: true\n configSync:\n type: object\n x-dcl-go-name: ConfigSync\n x-dcl-go-type: FeatureMembershipConfigmanagementConfigSync\n description: Config Sync configuration for the cluster.\n x-dcl-send-empty: true\n properties:\n enabled:\n type: boolean\n x-dcl-go-name: Enabled\n description: Enables the installation of ConfigSync. If set to true,\n ConfigSync resources will be created and the other ConfigSync\n fields will be applied if exist. If set to false, all other ConfigSync\n fields will be ignored, ConfigSync resources will be deleted.\n If omitted, ConfigSync resources will be managed depends on the\n presence of the git or oci field.\n git:\n type: object\n x-dcl-go-name: Git\n x-dcl-go-type: FeatureMembershipConfigmanagementConfigSyncGit\n properties:\n gcpServiceAccountEmail:\n type: string\n x-dcl-go-name: GcpServiceAccountEmail\n description: The GCP Service Account Email used for auth when\n secretType is gcpServiceAccount.\n x-dcl-references:\n - resource: Iam/ServiceAccount\n field: email\n httpsProxy:\n type: string\n x-dcl-go-name: HttpsProxy\n description: URL for the HTTPS proxy to be used when communicating\n with the Git repo.\n policyDir:\n type: string\n x-dcl-go-name: PolicyDir\n description: 'The path within the Git repository that represents\n the top level of the repo to sync. Default: the root directory\n of the repository.'\n secretType:\n type: string\n x-dcl-go-name: SecretType\n description: Type of secret configured for access to the Git\n repo. Must be one of ssh, cookiefile, gcenode, token, gcpserviceaccount\n or none. The validation of this is case-sensitive.\n syncBranch:\n type: string\n x-dcl-go-name: SyncBranch\n description: 'The branch of the repository to sync from. Default:\n master.'\n syncRepo:\n type: string\n x-dcl-go-name: SyncRepo\n description: The URL of the Git repository to use as the source\n of truth.\n syncRev:\n type: string\n x-dcl-go-name: SyncRev\n description: Git revision (tag or hash) to check out. Default\n HEAD.\n syncWaitSecs:\n type: string\n x-dcl-go-name: SyncWaitSecs\n description: 'Period in seconds between consecutive syncs. Default:\n 15.'\n metricsGcpServiceAccountEmail:\n type: string\n x-dcl-go-name: MetricsGcpServiceAccountEmail\n description: The Email of the Google Cloud Service Account (GSA)\n used for exporting Config Sync metrics to Cloud Monitoring. The\n GSA should have the Monitoring Metric Writer(roles/monitoring.metricWriter)\n IAM role. The Kubernetes ServiceAccount `default` in the namespace\n `config-management-monitoring` should be bound to the GSA.\n x-dcl-references:\n - resource: Iam/ServiceAccount\n field: email\n oci:\n type: object\n x-dcl-go-name: Oci\n x-dcl-go-type: FeatureMembershipConfigmanagementConfigSyncOci\n properties:\n gcpServiceAccountEmail:\n type: string\n x-dcl-go-name: GcpServiceAccountEmail\n description: 'The GCP Service Account Email used for auth when\n secret_type is gcpserviceaccount. '\n x-dcl-references:\n - resource: Iam/ServiceAccount\n field: email\n policyDir:\n type: string\n x-dcl-go-name: PolicyDir\n description: 'The absolute path of the directory that contains\n the local resources. Default: the root directory of the image.'\n secretType:\n type: string\n x-dcl-go-name: SecretType\n description: Type of secret configured for access to the OCI\n Image. Must be one of gcenode, gcpserviceaccount or none.\n The validation of this is case-sensitive.\n syncRepo:\n type: string\n x-dcl-go-name: SyncRepo\n description: The OCI image repository URL for the package to\n sync from. e.g. LOCATION-docker.pkg.dev/PROJECT_ID/REPOSITORY_NAME/PACKAGE_NAME.\n syncWaitSecs:\n type: string\n x-dcl-go-name: SyncWaitSecs\n description: 'Period in seconds(int64 format) between consecutive\n syncs. Default: 15.'\n preventDrift:\n type: boolean\n x-dcl-go-name: PreventDrift\n description: Set to true to enable the Config Sync admission webhook\n to prevent drifts. If set to `false`, disables the Config Sync\n admission webhook and does not prevent drifts.\n x-dcl-server-default: true\n sourceFormat:\n type: string\n x-dcl-go-name: SourceFormat\n description: Specifies whether the Config Sync Repo is in \"hierarchical\"\n or \"unstructured\" mode.\n hierarchyController:\n type: object\n x-dcl-go-name: HierarchyController\n x-dcl-go-type: FeatureMembershipConfigmanagementHierarchyController\n description: Hierarchy Controller configuration for the cluster.\n x-dcl-send-empty: true\n properties:\n enableHierarchicalResourceQuota:\n type: boolean\n x-dcl-go-name: EnableHierarchicalResourceQuota\n description: Whether hierarchical resource quota is enabled in this\n cluster.\n x-dcl-send-empty: true\n enablePodTreeLabels:\n type: boolean\n x-dcl-go-name: EnablePodTreeLabels\n description: Whether pod tree labels are enabled in this cluster.\n x-dcl-send-empty: true\n enabled:\n type: boolean\n x-dcl-go-name: Enabled\n description: Whether Hierarchy Controller is enabled in this cluster.\n x-dcl-send-empty: true\n management:\n type: string\n x-dcl-go-name: Management\n x-dcl-go-type: FeatureMembershipConfigmanagementManagementEnum\n description: Set this field to MANAGEMENT_AUTOMATIC to enable Config\n Sync auto-upgrades, and set this field to MANAGEMENT_MANUAL or MANAGEMENT_UNSPECIFIED\n to disable Config Sync auto-upgrades.\n x-dcl-server-default: true\n enum:\n - MANAGEMENT_UNSPECIFIED\n - MANAGEMENT_AUTOMATIC\n - MANAGEMENT_MANUAL\n policyController:\n type: object\n x-dcl-go-name: PolicyController\n x-dcl-go-type: FeatureMembershipConfigmanagementPolicyController\n description: Policy Controller configuration for the cluster.\n properties:\n auditIntervalSeconds:\n type: string\n x-dcl-go-name: AuditIntervalSeconds\n description: Sets the interval for Policy Controller Audit Scans\n (in seconds). When set to 0, this disables audit functionality\n altogether.\n enabled:\n type: boolean\n x-dcl-go-name: Enabled\n description: Enables the installation of Policy Controller. If false,\n the rest of PolicyController fields take no effect.\n exemptableNamespaces:\n type: array\n x-dcl-go-name: ExemptableNamespaces\n description: The set of namespaces that are excluded from Policy\n Controller checks. Namespaces do not need to currently exist on\n the cluster.\n x-dcl-send-empty: true\n x-dcl-list-type: list\n items:\n type: string\n x-dcl-go-type: string\n logDeniesEnabled:\n type: boolean\n x-dcl-go-name: LogDeniesEnabled\n description: Logs all denies and dry run failures.\n monitoring:\n type: object\n x-dcl-go-name: Monitoring\n x-dcl-go-type: FeatureMembershipConfigmanagementPolicyControllerMonitoring\n description: 'Specifies the backends Policy Controller should export\n metrics to. For example, to specify metrics should be exported\n to Cloud Monitoring and Prometheus, specify backends: [\"cloudmonitoring\",\n \"prometheus\"]. Default: [\"cloudmonitoring\", \"prometheus\"]'\n x-dcl-server-default: true\n properties:\n backends:\n type: array\n x-dcl-go-name: Backends\n description: ' Specifies the list of backends Policy Controller\n will export to. Specifying an empty value `[]` disables metrics\n export.'\n x-dcl-server-default: true\n x-dcl-send-empty: true\n x-dcl-list-type: list\n items:\n type: string\n x-dcl-go-type: FeatureMembershipConfigmanagementPolicyControllerMonitoringBackendsEnum\n enum:\n - MONITORING_BACKEND_UNSPECIFIED\n - PROMETHEUS\n - CLOUD_MONITORING\n mutationEnabled:\n type: boolean\n x-dcl-go-name: MutationEnabled\n description: Enable or disable mutation in policy controller. If\n true, mutation CRDs, webhook and controller deployment will be\n deployed to the cluster.\n referentialRulesEnabled:\n type: boolean\n x-dcl-go-name: ReferentialRulesEnabled\n description: Enables the ability to use Constraint Templates that\n reference to objects other than the object currently being evaluated.\n templateLibraryInstalled:\n type: boolean\n x-dcl-go-name: TemplateLibraryInstalled\n description: Installs the default template library along with Policy\n Controller.\n version:\n type: string\n x-dcl-go-name: Version\n description: Optional. Version of ACM to install. Defaults to the latest\n version.\n x-dcl-server-default: true\n feature:\n type: string\n x-dcl-go-name: Feature\n description: The name of the feature\n x-kubernetes-immutable: true\n x-dcl-references:\n - resource: Gkehub/Feature\n field: name\n parent: true\n x-dcl-parameter: true\n location:\n type: string\n x-dcl-go-name: Location\n description: The location of the feature\n x-kubernetes-immutable: true\n x-dcl-parameter: true\n membership:\n type: string\n x-dcl-go-name: Membership\n description: The name of the membership\n x-kubernetes-immutable: true\n x-dcl-references:\n - resource: Gkehub/Membership\n field: name\n x-dcl-parameter: true\n membershipLocation:\n type: string\n x-dcl-go-name: MembershipLocation\n description: The location of the membership\n x-kubernetes-immutable: true\n x-dcl-parameter: true\n mesh:\n type: object\n x-dcl-go-name: Mesh\n x-dcl-go-type: FeatureMembershipMesh\n description: Manage Mesh Features\n properties:\n controlPlane:\n type: string\n x-dcl-go-name: ControlPlane\n x-dcl-go-type: FeatureMembershipMeshControlPlaneEnum\n description: '**DEPRECATED** Whether to automatically manage Service\n Mesh control planes. Possible values: CONTROL_PLANE_MANAGEMENT_UNSPECIFIED,\n AUTOMATIC, MANUAL'\n enum:\n - CONTROL_PLANE_MANAGEMENT_UNSPECIFIED\n - AUTOMATIC\n - MANUAL\n management:\n type: string\n x-dcl-go-name: Management\n x-dcl-go-type: FeatureMembershipMeshManagementEnum\n description: 'Whether to automatically manage Service Mesh. Possible\n values: MANAGEMENT_UNSPECIFIED, MANAGEMENT_AUTOMATIC, MANAGEMENT_MANUAL'\n enum:\n - MANAGEMENT_UNSPECIFIED\n - MANAGEMENT_AUTOMATIC\n - MANAGEMENT_MANUAL\n policycontroller:\n type: object\n x-dcl-go-name: Policycontroller\n x-dcl-go-type: FeatureMembershipPolicycontroller\n description: Policy Controller-specific spec.\n required:\n - policyControllerHubConfig\n properties:\n policyControllerHubConfig:\n type: object\n x-dcl-go-name: PolicyControllerHubConfig\n x-dcl-go-type: FeatureMembershipPolicycontrollerPolicyControllerHubConfig\n description: Policy Controller configuration for the cluster.\n properties:\n auditIntervalSeconds:\n type: integer\n format: int64\n x-dcl-go-name: AuditIntervalSeconds\n description: Sets the interval for Policy Controller Audit Scans\n (in seconds). When set to 0, this disables audit functionality\n altogether.\n constraintViolationLimit:\n type: integer\n format: int64\n x-dcl-go-name: ConstraintViolationLimit\n description: The maximum number of audit violations to be stored\n in a constraint. If not set, the internal default of 20 will be\n used.\n deploymentConfigs:\n type: object\n additionalProperties:\n type: object\n x-dcl-go-type: FeatureMembershipPolicycontrollerPolicyControllerHubConfigDeploymentConfigs\n properties:\n containerResources:\n type: object\n x-dcl-go-name: ContainerResources\n x-dcl-go-type: FeatureMembershipPolicycontrollerPolicyControllerHubConfigDeploymentConfigsContainerResources\n description: Container resource requirements.\n x-dcl-conflicts:\n - replicaCount\n - podAffinity\n - podTolerations\n properties:\n limits:\n type: object\n x-dcl-go-name: Limits\n x-dcl-go-type: FeatureMembershipPolicycontrollerPolicyControllerHubConfigDeploymentConfigsContainerResourcesLimits\n description: Limits describes the maximum amount of compute\n resources allowed for use by the running container.\n properties:\n cpu:\n type: string\n x-dcl-go-name: Cpu\n description: CPU requirement expressed in Kubernetes\n resource units.\n memory:\n type: string\n x-dcl-go-name: Memory\n description: Memory requirement expressed in Kubernetes\n resource units.\n requests:\n type: object\n x-dcl-go-name: Requests\n x-dcl-go-type: FeatureMembershipPolicycontrollerPolicyControllerHubConfigDeploymentConfigsContainerResourcesRequests\n description: Requests describes the amount of compute\n resources reserved for the container by the kube-scheduler.\n properties:\n cpu:\n type: string\n x-dcl-go-name: Cpu\n description: CPU requirement expressed in Kubernetes\n resource units.\n memory:\n type: string\n x-dcl-go-name: Memory\n description: Memory requirement expressed in Kubernetes\n resource units.\n podAffinity:\n type: string\n x-dcl-go-name: PodAffinity\n x-dcl-go-type: FeatureMembershipPolicycontrollerPolicyControllerHubConfigDeploymentConfigsPodAffinityEnum\n description: 'Pod affinity configuration. Possible values:\n AFFINITY_UNSPECIFIED, NO_AFFINITY, ANTI_AFFINITY'\n x-dcl-conflicts:\n - replicaCount\n - containerResources\n - podTolerations\n enum:\n - AFFINITY_UNSPECIFIED\n - NO_AFFINITY\n - ANTI_AFFINITY\n podTolerations:\n type: array\n x-dcl-go-name: PodTolerations\n description: Pod tolerations of node taints.\n x-dcl-conflicts:\n - replicaCount\n - containerResources\n - podAffinity\n x-dcl-send-empty: true\n x-dcl-list-type: list\n items:\n type: object\n x-dcl-go-type: FeatureMembershipPolicycontrollerPolicyControllerHubConfigDeploymentConfigsPodTolerations\n properties:\n effect:\n type: string\n x-dcl-go-name: Effect\n description: Matches a taint effect.\n key:\n type: string\n x-dcl-go-name: Key\n description: Matches a taint key (not necessarily unique).\n operator:\n type: string\n x-dcl-go-name: Operator\n description: Matches a taint operator.\n value:\n type: string\n x-dcl-go-name: Value\n description: Matches a taint value.\n replicaCount:\n type: integer\n format: int64\n x-dcl-go-name: ReplicaCount\n description: Pod replica count.\n x-dcl-conflicts:\n - containerResources\n - podAffinity\n - podTolerations\n x-dcl-go-name: DeploymentConfigs\n description: Map of deployment configs to deployments (\"admission\",\n \"audit\", \"mutation\").\n x-dcl-server-default: true\n exemptableNamespaces:\n type: array\n x-dcl-go-name: ExemptableNamespaces\n description: The set of namespaces that are excluded from Policy\n Controller checks. Namespaces do not need to currently exist on\n the cluster.\n x-dcl-send-empty: true\n x-dcl-list-type: list\n items:\n type: string\n x-dcl-go-type: string\n installSpec:\n type: string\n x-dcl-go-name: InstallSpec\n x-dcl-go-type: FeatureMembershipPolicycontrollerPolicyControllerHubConfigInstallSpecEnum\n description: 'Configures the mode of the Policy Controller installation.\n Possible values: INSTALL_SPEC_UNSPECIFIED, INSTALL_SPEC_NOT_INSTALLED,\n INSTALL_SPEC_ENABLED, INSTALL_SPEC_SUSPENDED, INSTALL_SPEC_DETACHED'\n enum:\n - INSTALL_SPEC_UNSPECIFIED\n - INSTALL_SPEC_NOT_INSTALLED\n - INSTALL_SPEC_ENABLED\n - INSTALL_SPEC_SUSPENDED\n - INSTALL_SPEC_DETACHED\n logDeniesEnabled:\n type: boolean\n x-dcl-go-name: LogDeniesEnabled\n description: Logs all denies and dry run failures.\n monitoring:\n type: object\n x-dcl-go-name: Monitoring\n x-dcl-go-type: FeatureMembershipPolicycontrollerPolicyControllerHubConfigMonitoring\n description: 'Specifies the backends Policy Controller should export\n metrics to. For example, to specify metrics should be exported\n to Cloud Monitoring and Prometheus, specify backends: [\"cloudmonitoring\",\n \"prometheus\"]. Default: [\"cloudmonitoring\", \"prometheus\"]'\n x-dcl-server-default: true\n properties:\n backends:\n type: array\n x-dcl-go-name: Backends\n description: ' Specifies the list of backends Policy Controller\n will export to. Specifying an empty value `[]` disables metrics\n export.'\n x-dcl-server-default: true\n x-dcl-send-empty: true\n x-dcl-list-type: list\n items:\n type: string\n x-dcl-go-type: FeatureMembershipPolicycontrollerPolicyControllerHubConfigMonitoringBackendsEnum\n enum:\n - MONITORING_BACKEND_UNSPECIFIED\n - PROMETHEUS\n - CLOUD_MONITORING\n mutationEnabled:\n type: boolean\n x-dcl-go-name: MutationEnabled\n description: Enables the ability to mutate resources using Policy\n Controller.\n policyContent:\n type: object\n x-dcl-go-name: PolicyContent\n x-dcl-go-type: FeatureMembershipPolicycontrollerPolicyControllerHubConfigPolicyContent\n description: Specifies the desired policy content on the cluster.\n x-dcl-server-default: true\n properties:\n bundles:\n type: object\n additionalProperties:\n type: object\n x-dcl-go-type: FeatureMembershipPolicycontrollerPolicyControllerHubConfigPolicyContentBundles\n properties:\n exemptedNamespaces:\n type: array\n x-dcl-go-name: ExemptedNamespaces\n description: The set of namespaces to be exempted from\n the bundle.\n x-dcl-send-empty: true\n x-dcl-list-type: list\n items:\n type: string\n x-dcl-go-type: string\n x-dcl-go-name: Bundles\n description: map of bundle name to BundleInstallSpec. The bundle\n name maps to the `bundleName` key in the `policycontroller.gke.io/constraintData`\n annotation on a constraint.\n templateLibrary:\n type: object\n x-dcl-go-name: TemplateLibrary\n x-dcl-go-type: FeatureMembershipPolicycontrollerPolicyControllerHubConfigPolicyContentTemplateLibrary\n description: Configures the installation of the Template Library.\n x-dcl-server-default: true\n properties:\n installation:\n type: string\n x-dcl-go-name: Installation\n x-dcl-go-type: FeatureMembershipPolicycontrollerPolicyControllerHubConfigPolicyContentTemplateLibraryInstallationEnum\n description: 'Configures the manner in which the template\n library is installed on the cluster. Possible values:\n INSTALLATION_UNSPECIFIED, NOT_INSTALLED, ALL'\n enum:\n - INSTALLATION_UNSPECIFIED\n - NOT_INSTALLED\n - ALL\n referentialRulesEnabled:\n type: boolean\n x-dcl-go-name: ReferentialRulesEnabled\n description: Enables the ability to use Constraint Templates that\n reference to objects other than the object currently being evaluated.\n version:\n type: string\n x-dcl-go-name: Version\n description: Optional. Version of Policy Controller to install. Defaults\n to the latest version.\n x-dcl-server-default: true\n project:\n type: string\n x-dcl-go-name: Project\n description: The project of the feature\n x-kubernetes-immutable: true\n x-dcl-references:\n - resource: Cloudresourcemanager/Project\n field: name\n parent: true\n x-dcl-parameter: true\n") -// 30146 bytes -// MD5: 83a10e0d3784ce78d058e07c927c7bd7 +// 30724 bytes +// MD5: 9e1c78f9c97b3d50f6a6a81a70874fc3 diff --git a/services/google/gkehub/alpha/feature_membership_internal.go b/services/google/gkehub/alpha/feature_membership_internal.go index 1eb90597c..c0b198d2e 100755 --- a/services/google/gkehub/alpha/feature_membership_internal.go +++ b/services/google/gkehub/alpha/feature_membership_internal.go @@ -604,6 +604,12 @@ func canonicalizeFeatureMembershipConfigmanagement(des, initial *FeatureMembersh } else { cDes.Version = des.Version } + if dcl.IsZeroValue(des.Management) || (dcl.IsEmptyValueIndirect(des.Management) && dcl.IsEmptyValueIndirect(initial.Management)) { + // Desired and initial values are equivalent, so set canonical desired value to initial value. + cDes.Management = initial.Management + } else { + cDes.Management = des.Management + } return cDes } @@ -3305,6 +3311,13 @@ func compareFeatureMembershipConfigmanagementNewStyle(d, a interface{}, fn dcl.F } diffs = append(diffs, ds...) } + + if ds, err := dcl.Diff(desired.Management, actual.Management, dcl.DiffInfo{ServerDefault: true, Type: "EnumType", OperationSelector: dcl.RequiresRecreate()}, fn.AddNest("Management")); len(ds) != 0 || err != nil { + if err != nil { + return nil, err + } + diffs = append(diffs, ds...) + } return diffs, nil } @@ -4506,6 +4519,9 @@ func expandFeatureMembershipConfigmanagement(c *Client, f *FeatureMembershipConf if v := f.Version; !dcl.IsEmptyValueIndirect(v) { m["version"] = v } + if v := f.Management; !dcl.IsEmptyValueIndirect(v) { + m["management"] = v + } return m, nil } @@ -4528,6 +4544,7 @@ func flattenFeatureMembershipConfigmanagement(c *Client, i interface{}, res *Fea r.Binauthz = flattenFeatureMembershipConfigmanagementBinauthz(c, m["binauthz"], res) r.HierarchyController = flattenHierarchyControllerConfig(c, m["hierarchyController"], res) r.Version = dcl.FlattenString(m["version"]) + r.Management = flattenFeatureMembershipConfigmanagementManagementEnum(m["management"]) return r } @@ -6943,6 +6960,57 @@ func flattenFeatureMembershipConfigmanagementPolicyControllerMonitoringBackendsE return FeatureMembershipConfigmanagementPolicyControllerMonitoringBackendsEnumRef(s) } +// flattenFeatureMembershipConfigmanagementManagementEnumMap flattens the contents of FeatureMembershipConfigmanagementManagementEnum from a JSON +// response object. +func flattenFeatureMembershipConfigmanagementManagementEnumMap(c *Client, i interface{}, res *FeatureMembership) map[string]FeatureMembershipConfigmanagementManagementEnum { + a, ok := i.(map[string]interface{}) + if !ok { + return map[string]FeatureMembershipConfigmanagementManagementEnum{} + } + + if len(a) == 0 { + return map[string]FeatureMembershipConfigmanagementManagementEnum{} + } + + items := make(map[string]FeatureMembershipConfigmanagementManagementEnum) + for k, item := range a { + items[k] = *flattenFeatureMembershipConfigmanagementManagementEnum(item.(interface{})) + } + + return items +} + +// flattenFeatureMembershipConfigmanagementManagementEnumSlice flattens the contents of FeatureMembershipConfigmanagementManagementEnum from a JSON +// response object. +func flattenFeatureMembershipConfigmanagementManagementEnumSlice(c *Client, i interface{}, res *FeatureMembership) []FeatureMembershipConfigmanagementManagementEnum { + a, ok := i.([]interface{}) + if !ok { + return []FeatureMembershipConfigmanagementManagementEnum{} + } + + if len(a) == 0 { + return []FeatureMembershipConfigmanagementManagementEnum{} + } + + items := make([]FeatureMembershipConfigmanagementManagementEnum, 0, len(a)) + for _, item := range a { + items = append(items, *flattenFeatureMembershipConfigmanagementManagementEnum(item.(interface{}))) + } + + return items +} + +// flattenFeatureMembershipConfigmanagementManagementEnum asserts that an interface is a string, and returns a +// pointer to a *FeatureMembershipConfigmanagementManagementEnum with the same value as that string. +func flattenFeatureMembershipConfigmanagementManagementEnum(i interface{}) *FeatureMembershipConfigmanagementManagementEnum { + s, ok := i.(string) + if !ok { + return nil + } + + return FeatureMembershipConfigmanagementManagementEnumRef(s) +} + // flattenFeatureMembershipPolicycontrollerPolicyControllerHubConfigInstallSpecEnumMap flattens the contents of FeatureMembershipPolicycontrollerPolicyControllerHubConfigInstallSpecEnum from a JSON // response object. func flattenFeatureMembershipPolicycontrollerPolicyControllerHubConfigInstallSpecEnumMap(c *Client, i interface{}, res *FeatureMembership) map[string]FeatureMembershipPolicycontrollerPolicyControllerHubConfigInstallSpecEnum { diff --git a/services/google/gkehub/alpha/feature_membership_schema.go b/services/google/gkehub/alpha/feature_membership_schema.go index fe8d0ab66..b78d2534a 100755 --- a/services/google/gkehub/alpha/feature_membership_schema.go +++ b/services/google/gkehub/alpha/feature_membership_schema.go @@ -300,6 +300,18 @@ func DCLFeatureMembershipSchema() *dcl.Schema { }, }, }, + "management": &dcl.Property{ + Type: "string", + GoName: "Management", + GoType: "FeatureMembershipConfigmanagementManagementEnum", + Description: "Set this field to MANAGEMENT_AUTOMATIC to enable Config Sync auto-upgrades, and set this field to MANAGEMENT_MANUAL or MANAGEMENT_UNSPECIFIED to disable Config Sync auto-upgrades.", + ServerDefault: true, + Enum: []string{ + "MANAGEMENT_UNSPECIFIED", + "MANAGEMENT_AUTOMATIC", + "MANAGEMENT_MANUAL", + }, + }, "policyController": &dcl.Property{ Type: "object", GoName: "PolicyController", diff --git a/services/google/gkehub/beta/feature_membership.go b/services/google/gkehub/beta/feature_membership.go index 8e035bc3e..9b63c011f 100755 --- a/services/google/gkehub/beta/feature_membership.go +++ b/services/google/gkehub/beta/feature_membership.go @@ -119,6 +119,33 @@ func (v FeatureMembershipConfigmanagementPolicyControllerMonitoringBackendsEnum) } } +// The enum FeatureMembershipConfigmanagementManagementEnum. +type FeatureMembershipConfigmanagementManagementEnum string + +// FeatureMembershipConfigmanagementManagementEnumRef returns a *FeatureMembershipConfigmanagementManagementEnum with the value of string s +// If the empty string is provided, nil is returned. +func FeatureMembershipConfigmanagementManagementEnumRef(s string) *FeatureMembershipConfigmanagementManagementEnum { + v := FeatureMembershipConfigmanagementManagementEnum(s) + return &v +} + +func (v FeatureMembershipConfigmanagementManagementEnum) Validate() error { + if string(v) == "" { + // Empty enum is okay. + return nil + } + for _, s := range []string{"MANAGEMENT_UNSPECIFIED", "MANAGEMENT_AUTOMATIC", "MANAGEMENT_MANUAL"} { + if string(v) == s { + return nil + } + } + return &dcl.EnumInvalidError{ + Enum: "FeatureMembershipConfigmanagementManagementEnum", + Value: string(v), + Valid: []string{}, + } +} + // The enum FeatureMembershipPolicycontrollerPolicyControllerHubConfigInstallSpecEnum. type FeatureMembershipPolicycontrollerPolicyControllerHubConfigInstallSpecEnum string @@ -283,6 +310,7 @@ type FeatureMembershipConfigmanagement struct { Binauthz *FeatureMembershipConfigmanagementBinauthz `json:"binauthz"` HierarchyController *FeatureMembershipConfigmanagementHierarchyController `json:"hierarchyController"` Version *string `json:"version"` + Management *FeatureMembershipConfigmanagementManagementEnum `json:"management"` } type jsonFeatureMembershipConfigmanagement FeatureMembershipConfigmanagement @@ -310,6 +338,8 @@ func (r *FeatureMembershipConfigmanagement) UnmarshalJSON(data []byte) error { r.Version = res.Version + r.Management = res.Management + } return nil } diff --git a/services/google/gkehub/beta/feature_membership.yaml b/services/google/gkehub/beta/feature_membership.yaml index d305078c9..02d0c758f 100755 --- a/services/google/gkehub/beta/feature_membership.yaml +++ b/services/google/gkehub/beta/feature_membership.yaml @@ -249,6 +249,18 @@ components: x-dcl-go-name: Enabled description: Whether Hierarchy Controller is enabled in this cluster. x-dcl-send-empty: true + management: + type: string + x-dcl-go-name: Management + x-dcl-go-type: FeatureMembershipConfigmanagementManagementEnum + description: Set this field to MANAGEMENT_AUTOMATIC to enable Config + Sync auto-upgrades, and set this field to MANAGEMENT_MANUAL or MANAGEMENT_UNSPECIFIED + to disable Config Sync auto-upgrades. + x-dcl-server-default: true + enum: + - MANAGEMENT_UNSPECIFIED + - MANAGEMENT_AUTOMATIC + - MANAGEMENT_MANUAL policyController: type: object x-dcl-go-name: PolicyController diff --git a/services/google/gkehub/beta/feature_membership_beta_yaml_embed.go b/services/google/gkehub/beta/feature_membership_beta_yaml_embed.go index a822b71b8..1d67a4e08 100755 --- a/services/google/gkehub/beta/feature_membership_beta_yaml_embed.go +++ b/services/google/gkehub/beta/feature_membership_beta_yaml_embed.go @@ -17,7 +17,7 @@ package beta // blaze-out/k8-fastbuild/genfiles/cloud/graphite/mmv2/services/google/gkehub/beta/feature_membership.yaml -var YAML_feature_membership = []byte("info:\n title: GkeHub/FeatureMembership\n description: The GkeHub FeatureMembership resource\n x-dcl-struct-name: FeatureMembership\n x-dcl-has-iam: false\n x-dcl-mutex: '{{project}}/{{location}}/{{feature}}'\npaths:\n get:\n description: The function used to get information about a FeatureMembership\n parameters:\n - name: featureMembership\n required: true\n description: A full instance of a FeatureMembership\n apply:\n description: The function used to apply information about a FeatureMembership\n parameters:\n - name: featureMembership\n required: true\n description: A full instance of a FeatureMembership\n delete:\n description: The function used to delete a FeatureMembership\n parameters:\n - name: featureMembership\n required: true\n description: A full instance of a FeatureMembership\n deleteAll:\n description: The function used to delete all FeatureMembership\n parameters:\n - name: project\n required: true\n schema:\n type: string\n - name: location\n required: true\n schema:\n type: string\n - name: feature\n required: true\n schema:\n type: string\n list:\n description: The function used to list information about many FeatureMembership\n parameters:\n - name: project\n required: true\n schema:\n type: string\n - name: location\n required: true\n schema:\n type: string\n - name: feature\n required: true\n schema:\n type: string\ncomponents:\n schemas:\n FeatureMembership:\n title: FeatureMembership\n x-dcl-id: projects/{{project}}/locations/{{location}}/features/{{feature}}/memberships/{{membership}}\n x-dcl-parent-container: project\n x-dcl-has-create: true\n x-dcl-has-iam: false\n x-dcl-read-timeout: 0\n x-dcl-apply-timeout: 0\n x-dcl-delete-timeout: 0\n type: object\n required:\n - project\n - location\n - feature\n - membership\n properties:\n configmanagement:\n type: object\n x-dcl-go-name: Configmanagement\n x-dcl-go-type: FeatureMembershipConfigmanagement\n description: Config Management-specific spec.\n properties:\n binauthz:\n type: object\n x-dcl-go-name: Binauthz\n x-dcl-go-type: FeatureMembershipConfigmanagementBinauthz\n description: '**DEPRECATED** Binauthz configuration for the cluster.\n This field will be ignored and should not be set.'\n x-dcl-server-default: true\n properties:\n enabled:\n type: boolean\n x-dcl-go-name: Enabled\n description: Whether binauthz is enabled in this cluster.\n x-dcl-parameter: true\n configSync:\n type: object\n x-dcl-go-name: ConfigSync\n x-dcl-go-type: FeatureMembershipConfigmanagementConfigSync\n description: Config Sync configuration for the cluster.\n x-dcl-send-empty: true\n properties:\n enabled:\n type: boolean\n x-dcl-go-name: Enabled\n description: Enables the installation of ConfigSync. If set to true,\n ConfigSync resources will be created and the other ConfigSync\n fields will be applied if exist. If set to false, all other ConfigSync\n fields will be ignored, ConfigSync resources will be deleted.\n If omitted, ConfigSync resources will be managed depends on the\n presence of the git or oci field.\n git:\n type: object\n x-dcl-go-name: Git\n x-dcl-go-type: FeatureMembershipConfigmanagementConfigSyncGit\n properties:\n gcpServiceAccountEmail:\n type: string\n x-dcl-go-name: GcpServiceAccountEmail\n description: The GCP Service Account Email used for auth when\n secretType is gcpServiceAccount.\n x-dcl-references:\n - resource: Iam/ServiceAccount\n field: email\n httpsProxy:\n type: string\n x-dcl-go-name: HttpsProxy\n description: URL for the HTTPS proxy to be used when communicating\n with the Git repo.\n policyDir:\n type: string\n x-dcl-go-name: PolicyDir\n description: 'The path within the Git repository that represents\n the top level of the repo to sync. Default: the root directory\n of the repository.'\n secretType:\n type: string\n x-dcl-go-name: SecretType\n description: Type of secret configured for access to the Git\n repo. Must be one of ssh, cookiefile, gcenode, token, gcpserviceaccount\n or none. The validation of this is case-sensitive.\n syncBranch:\n type: string\n x-dcl-go-name: SyncBranch\n description: 'The branch of the repository to sync from. Default:\n master.'\n syncRepo:\n type: string\n x-dcl-go-name: SyncRepo\n description: The URL of the Git repository to use as the source\n of truth.\n syncRev:\n type: string\n x-dcl-go-name: SyncRev\n description: Git revision (tag or hash) to check out. Default\n HEAD.\n syncWaitSecs:\n type: string\n x-dcl-go-name: SyncWaitSecs\n description: 'Period in seconds between consecutive syncs. Default:\n 15.'\n metricsGcpServiceAccountEmail:\n type: string\n x-dcl-go-name: MetricsGcpServiceAccountEmail\n description: The Email of the Google Cloud Service Account (GSA)\n used for exporting Config Sync metrics to Cloud Monitoring. The\n GSA should have the Monitoring Metric Writer(roles/monitoring.metricWriter)\n IAM role. The Kubernetes ServiceAccount `default` in the namespace\n `config-management-monitoring` should be bound to the GSA.\n x-dcl-references:\n - resource: Iam/ServiceAccount\n field: email\n oci:\n type: object\n x-dcl-go-name: Oci\n x-dcl-go-type: FeatureMembershipConfigmanagementConfigSyncOci\n properties:\n gcpServiceAccountEmail:\n type: string\n x-dcl-go-name: GcpServiceAccountEmail\n description: 'The GCP Service Account Email used for auth when\n secret_type is gcpserviceaccount. '\n x-dcl-references:\n - resource: Iam/ServiceAccount\n field: email\n policyDir:\n type: string\n x-dcl-go-name: PolicyDir\n description: 'The absolute path of the directory that contains\n the local resources. Default: the root directory of the image.'\n secretType:\n type: string\n x-dcl-go-name: SecretType\n description: Type of secret configured for access to the OCI\n Image. Must be one of gcenode, gcpserviceaccount or none.\n The validation of this is case-sensitive.\n syncRepo:\n type: string\n x-dcl-go-name: SyncRepo\n description: The OCI image repository URL for the package to\n sync from. e.g. LOCATION-docker.pkg.dev/PROJECT_ID/REPOSITORY_NAME/PACKAGE_NAME.\n syncWaitSecs:\n type: string\n x-dcl-go-name: SyncWaitSecs\n description: 'Period in seconds(int64 format) between consecutive\n syncs. Default: 15.'\n preventDrift:\n type: boolean\n x-dcl-go-name: PreventDrift\n description: Set to true to enable the Config Sync admission webhook\n to prevent drifts. If set to `false`, disables the Config Sync\n admission webhook and does not prevent drifts.\n x-dcl-server-default: true\n sourceFormat:\n type: string\n x-dcl-go-name: SourceFormat\n description: Specifies whether the Config Sync Repo is in \"hierarchical\"\n or \"unstructured\" mode.\n hierarchyController:\n type: object\n x-dcl-go-name: HierarchyController\n x-dcl-go-type: FeatureMembershipConfigmanagementHierarchyController\n description: Hierarchy Controller configuration for the cluster.\n x-dcl-send-empty: true\n properties:\n enableHierarchicalResourceQuota:\n type: boolean\n x-dcl-go-name: EnableHierarchicalResourceQuota\n description: Whether hierarchical resource quota is enabled in this\n cluster.\n x-dcl-send-empty: true\n enablePodTreeLabels:\n type: boolean\n x-dcl-go-name: EnablePodTreeLabels\n description: Whether pod tree labels are enabled in this cluster.\n x-dcl-send-empty: true\n enabled:\n type: boolean\n x-dcl-go-name: Enabled\n description: Whether Hierarchy Controller is enabled in this cluster.\n x-dcl-send-empty: true\n policyController:\n type: object\n x-dcl-go-name: PolicyController\n x-dcl-go-type: FeatureMembershipConfigmanagementPolicyController\n description: Policy Controller configuration for the cluster.\n properties:\n auditIntervalSeconds:\n type: string\n x-dcl-go-name: AuditIntervalSeconds\n description: Sets the interval for Policy Controller Audit Scans\n (in seconds). When set to 0, this disables audit functionality\n altogether.\n enabled:\n type: boolean\n x-dcl-go-name: Enabled\n description: Enables the installation of Policy Controller. If false,\n the rest of PolicyController fields take no effect.\n exemptableNamespaces:\n type: array\n x-dcl-go-name: ExemptableNamespaces\n description: The set of namespaces that are excluded from Policy\n Controller checks. Namespaces do not need to currently exist on\n the cluster.\n x-dcl-send-empty: true\n x-dcl-list-type: list\n items:\n type: string\n x-dcl-go-type: string\n logDeniesEnabled:\n type: boolean\n x-dcl-go-name: LogDeniesEnabled\n description: Logs all denies and dry run failures.\n monitoring:\n type: object\n x-dcl-go-name: Monitoring\n x-dcl-go-type: FeatureMembershipConfigmanagementPolicyControllerMonitoring\n description: 'Specifies the backends Policy Controller should export\n metrics to. For example, to specify metrics should be exported\n to Cloud Monitoring and Prometheus, specify backends: [\"cloudmonitoring\",\n \"prometheus\"]. Default: [\"cloudmonitoring\", \"prometheus\"]'\n x-dcl-server-default: true\n properties:\n backends:\n type: array\n x-dcl-go-name: Backends\n description: ' Specifies the list of backends Policy Controller\n will export to. Specifying an empty value `[]` disables metrics\n export.'\n x-dcl-server-default: true\n x-dcl-send-empty: true\n x-dcl-list-type: list\n items:\n type: string\n x-dcl-go-type: FeatureMembershipConfigmanagementPolicyControllerMonitoringBackendsEnum\n enum:\n - MONITORING_BACKEND_UNSPECIFIED\n - PROMETHEUS\n - CLOUD_MONITORING\n mutationEnabled:\n type: boolean\n x-dcl-go-name: MutationEnabled\n description: Enable or disable mutation in policy controller. If\n true, mutation CRDs, webhook and controller deployment will be\n deployed to the cluster.\n referentialRulesEnabled:\n type: boolean\n x-dcl-go-name: ReferentialRulesEnabled\n description: Enables the ability to use Constraint Templates that\n reference to objects other than the object currently being evaluated.\n templateLibraryInstalled:\n type: boolean\n x-dcl-go-name: TemplateLibraryInstalled\n description: Installs the default template library along with Policy\n Controller.\n version:\n type: string\n x-dcl-go-name: Version\n description: Optional. Version of ACM to install. Defaults to the latest\n version.\n x-dcl-server-default: true\n feature:\n type: string\n x-dcl-go-name: Feature\n description: The name of the feature\n x-kubernetes-immutable: true\n x-dcl-references:\n - resource: Gkehub/Feature\n field: name\n parent: true\n x-dcl-parameter: true\n location:\n type: string\n x-dcl-go-name: Location\n description: The location of the feature\n x-kubernetes-immutable: true\n x-dcl-parameter: true\n membership:\n type: string\n x-dcl-go-name: Membership\n description: The name of the membership\n x-kubernetes-immutable: true\n x-dcl-references:\n - resource: Gkehub/Membership\n field: name\n x-dcl-parameter: true\n membershipLocation:\n type: string\n x-dcl-go-name: MembershipLocation\n description: The location of the membership\n x-kubernetes-immutable: true\n x-dcl-parameter: true\n mesh:\n type: object\n x-dcl-go-name: Mesh\n x-dcl-go-type: FeatureMembershipMesh\n description: Manage Mesh Features\n properties:\n controlPlane:\n type: string\n x-dcl-go-name: ControlPlane\n x-dcl-go-type: FeatureMembershipMeshControlPlaneEnum\n description: '**DEPRECATED** Whether to automatically manage Service\n Mesh control planes. Possible values: CONTROL_PLANE_MANAGEMENT_UNSPECIFIED,\n AUTOMATIC, MANUAL'\n enum:\n - CONTROL_PLANE_MANAGEMENT_UNSPECIFIED\n - AUTOMATIC\n - MANUAL\n management:\n type: string\n x-dcl-go-name: Management\n x-dcl-go-type: FeatureMembershipMeshManagementEnum\n description: 'Whether to automatically manage Service Mesh. Possible\n values: MANAGEMENT_UNSPECIFIED, MANAGEMENT_AUTOMATIC, MANAGEMENT_MANUAL'\n enum:\n - MANAGEMENT_UNSPECIFIED\n - MANAGEMENT_AUTOMATIC\n - MANAGEMENT_MANUAL\n policycontroller:\n type: object\n x-dcl-go-name: Policycontroller\n x-dcl-go-type: FeatureMembershipPolicycontroller\n description: Policy Controller-specific spec.\n required:\n - policyControllerHubConfig\n properties:\n policyControllerHubConfig:\n type: object\n x-dcl-go-name: PolicyControllerHubConfig\n x-dcl-go-type: FeatureMembershipPolicycontrollerPolicyControllerHubConfig\n description: Policy Controller configuration for the cluster.\n properties:\n auditIntervalSeconds:\n type: integer\n format: int64\n x-dcl-go-name: AuditIntervalSeconds\n description: Sets the interval for Policy Controller Audit Scans\n (in seconds). When set to 0, this disables audit functionality\n altogether.\n constraintViolationLimit:\n type: integer\n format: int64\n x-dcl-go-name: ConstraintViolationLimit\n description: The maximum number of audit violations to be stored\n in a constraint. If not set, the internal default of 20 will be\n used.\n deploymentConfigs:\n type: object\n additionalProperties:\n type: object\n x-dcl-go-type: FeatureMembershipPolicycontrollerPolicyControllerHubConfigDeploymentConfigs\n properties:\n containerResources:\n type: object\n x-dcl-go-name: ContainerResources\n x-dcl-go-type: FeatureMembershipPolicycontrollerPolicyControllerHubConfigDeploymentConfigsContainerResources\n description: Container resource requirements.\n x-dcl-conflicts:\n - replicaCount\n - podAffinity\n - podTolerations\n properties:\n limits:\n type: object\n x-dcl-go-name: Limits\n x-dcl-go-type: FeatureMembershipPolicycontrollerPolicyControllerHubConfigDeploymentConfigsContainerResourcesLimits\n description: Limits describes the maximum amount of compute\n resources allowed for use by the running container.\n properties:\n cpu:\n type: string\n x-dcl-go-name: Cpu\n description: CPU requirement expressed in Kubernetes\n resource units.\n memory:\n type: string\n x-dcl-go-name: Memory\n description: Memory requirement expressed in Kubernetes\n resource units.\n requests:\n type: object\n x-dcl-go-name: Requests\n x-dcl-go-type: FeatureMembershipPolicycontrollerPolicyControllerHubConfigDeploymentConfigsContainerResourcesRequests\n description: Requests describes the amount of compute\n resources reserved for the container by the kube-scheduler.\n properties:\n cpu:\n type: string\n x-dcl-go-name: Cpu\n description: CPU requirement expressed in Kubernetes\n resource units.\n memory:\n type: string\n x-dcl-go-name: Memory\n description: Memory requirement expressed in Kubernetes\n resource units.\n podAffinity:\n type: string\n x-dcl-go-name: PodAffinity\n x-dcl-go-type: FeatureMembershipPolicycontrollerPolicyControllerHubConfigDeploymentConfigsPodAffinityEnum\n description: 'Pod affinity configuration. Possible values:\n AFFINITY_UNSPECIFIED, NO_AFFINITY, ANTI_AFFINITY'\n x-dcl-conflicts:\n - replicaCount\n - containerResources\n - podTolerations\n enum:\n - AFFINITY_UNSPECIFIED\n - NO_AFFINITY\n - ANTI_AFFINITY\n podTolerations:\n type: array\n x-dcl-go-name: PodTolerations\n description: Pod tolerations of node taints.\n x-dcl-conflicts:\n - replicaCount\n - containerResources\n - podAffinity\n x-dcl-send-empty: true\n x-dcl-list-type: list\n items:\n type: object\n x-dcl-go-type: FeatureMembershipPolicycontrollerPolicyControllerHubConfigDeploymentConfigsPodTolerations\n properties:\n effect:\n type: string\n x-dcl-go-name: Effect\n description: Matches a taint effect.\n key:\n type: string\n x-dcl-go-name: Key\n description: Matches a taint key (not necessarily unique).\n operator:\n type: string\n x-dcl-go-name: Operator\n description: Matches a taint operator.\n value:\n type: string\n x-dcl-go-name: Value\n description: Matches a taint value.\n replicaCount:\n type: integer\n format: int64\n x-dcl-go-name: ReplicaCount\n description: Pod replica count.\n x-dcl-conflicts:\n - containerResources\n - podAffinity\n - podTolerations\n x-dcl-go-name: DeploymentConfigs\n description: Map of deployment configs to deployments (\"admission\",\n \"audit\", \"mutation\").\n x-dcl-server-default: true\n exemptableNamespaces:\n type: array\n x-dcl-go-name: ExemptableNamespaces\n description: The set of namespaces that are excluded from Policy\n Controller checks. Namespaces do not need to currently exist on\n the cluster.\n x-dcl-send-empty: true\n x-dcl-list-type: list\n items:\n type: string\n x-dcl-go-type: string\n installSpec:\n type: string\n x-dcl-go-name: InstallSpec\n x-dcl-go-type: FeatureMembershipPolicycontrollerPolicyControllerHubConfigInstallSpecEnum\n description: 'Configures the mode of the Policy Controller installation.\n Possible values: INSTALL_SPEC_UNSPECIFIED, INSTALL_SPEC_NOT_INSTALLED,\n INSTALL_SPEC_ENABLED, INSTALL_SPEC_SUSPENDED, INSTALL_SPEC_DETACHED'\n enum:\n - INSTALL_SPEC_UNSPECIFIED\n - INSTALL_SPEC_NOT_INSTALLED\n - INSTALL_SPEC_ENABLED\n - INSTALL_SPEC_SUSPENDED\n - INSTALL_SPEC_DETACHED\n logDeniesEnabled:\n type: boolean\n x-dcl-go-name: LogDeniesEnabled\n description: Logs all denies and dry run failures.\n monitoring:\n type: object\n x-dcl-go-name: Monitoring\n x-dcl-go-type: FeatureMembershipPolicycontrollerPolicyControllerHubConfigMonitoring\n description: 'Specifies the backends Policy Controller should export\n metrics to. For example, to specify metrics should be exported\n to Cloud Monitoring and Prometheus, specify backends: [\"cloudmonitoring\",\n \"prometheus\"]. Default: [\"cloudmonitoring\", \"prometheus\"]'\n x-dcl-server-default: true\n properties:\n backends:\n type: array\n x-dcl-go-name: Backends\n description: ' Specifies the list of backends Policy Controller\n will export to. Specifying an empty value `[]` disables metrics\n export.'\n x-dcl-server-default: true\n x-dcl-send-empty: true\n x-dcl-list-type: list\n items:\n type: string\n x-dcl-go-type: FeatureMembershipPolicycontrollerPolicyControllerHubConfigMonitoringBackendsEnum\n enum:\n - MONITORING_BACKEND_UNSPECIFIED\n - PROMETHEUS\n - CLOUD_MONITORING\n mutationEnabled:\n type: boolean\n x-dcl-go-name: MutationEnabled\n description: Enables the ability to mutate resources using Policy\n Controller.\n policyContent:\n type: object\n x-dcl-go-name: PolicyContent\n x-dcl-go-type: FeatureMembershipPolicycontrollerPolicyControllerHubConfigPolicyContent\n description: Specifies the desired policy content on the cluster.\n x-dcl-server-default: true\n properties:\n bundles:\n type: object\n additionalProperties:\n type: object\n x-dcl-go-type: FeatureMembershipPolicycontrollerPolicyControllerHubConfigPolicyContentBundles\n properties:\n exemptedNamespaces:\n type: array\n x-dcl-go-name: ExemptedNamespaces\n description: The set of namespaces to be exempted from\n the bundle.\n x-dcl-send-empty: true\n x-dcl-list-type: list\n items:\n type: string\n x-dcl-go-type: string\n x-dcl-go-name: Bundles\n description: map of bundle name to BundleInstallSpec. The bundle\n name maps to the `bundleName` key in the `policycontroller.gke.io/constraintData`\n annotation on a constraint.\n templateLibrary:\n type: object\n x-dcl-go-name: TemplateLibrary\n x-dcl-go-type: FeatureMembershipPolicycontrollerPolicyControllerHubConfigPolicyContentTemplateLibrary\n description: Configures the installation of the Template Library.\n x-dcl-server-default: true\n properties:\n installation:\n type: string\n x-dcl-go-name: Installation\n x-dcl-go-type: FeatureMembershipPolicycontrollerPolicyControllerHubConfigPolicyContentTemplateLibraryInstallationEnum\n description: 'Configures the manner in which the template\n library is installed on the cluster. Possible values:\n INSTALLATION_UNSPECIFIED, NOT_INSTALLED, ALL'\n enum:\n - INSTALLATION_UNSPECIFIED\n - NOT_INSTALLED\n - ALL\n referentialRulesEnabled:\n type: boolean\n x-dcl-go-name: ReferentialRulesEnabled\n description: Enables the ability to use Constraint Templates that\n reference to objects other than the object currently being evaluated.\n version:\n type: string\n x-dcl-go-name: Version\n description: Optional. Version of Policy Controller to install. Defaults\n to the latest version.\n x-dcl-server-default: true\n project:\n type: string\n x-dcl-go-name: Project\n description: The project of the feature\n x-kubernetes-immutable: true\n x-dcl-references:\n - resource: Cloudresourcemanager/Project\n field: name\n parent: true\n x-dcl-parameter: true\n") +var YAML_feature_membership = []byte("info:\n title: GkeHub/FeatureMembership\n description: The GkeHub FeatureMembership resource\n x-dcl-struct-name: FeatureMembership\n x-dcl-has-iam: false\n x-dcl-mutex: '{{project}}/{{location}}/{{feature}}'\npaths:\n get:\n description: The function used to get information about a FeatureMembership\n parameters:\n - name: featureMembership\n required: true\n description: A full instance of a FeatureMembership\n apply:\n description: The function used to apply information about a FeatureMembership\n parameters:\n - name: featureMembership\n required: true\n description: A full instance of a FeatureMembership\n delete:\n description: The function used to delete a FeatureMembership\n parameters:\n - name: featureMembership\n required: true\n description: A full instance of a FeatureMembership\n deleteAll:\n description: The function used to delete all FeatureMembership\n parameters:\n - name: project\n required: true\n schema:\n type: string\n - name: location\n required: true\n schema:\n type: string\n - name: feature\n required: true\n schema:\n type: string\n list:\n description: The function used to list information about many FeatureMembership\n parameters:\n - name: project\n required: true\n schema:\n type: string\n - name: location\n required: true\n schema:\n type: string\n - name: feature\n required: true\n schema:\n type: string\ncomponents:\n schemas:\n FeatureMembership:\n title: FeatureMembership\n x-dcl-id: projects/{{project}}/locations/{{location}}/features/{{feature}}/memberships/{{membership}}\n x-dcl-parent-container: project\n x-dcl-has-create: true\n x-dcl-has-iam: false\n x-dcl-read-timeout: 0\n x-dcl-apply-timeout: 0\n x-dcl-delete-timeout: 0\n type: object\n required:\n - project\n - location\n - feature\n - membership\n properties:\n configmanagement:\n type: object\n x-dcl-go-name: Configmanagement\n x-dcl-go-type: FeatureMembershipConfigmanagement\n description: Config Management-specific spec.\n properties:\n binauthz:\n type: object\n x-dcl-go-name: Binauthz\n x-dcl-go-type: FeatureMembershipConfigmanagementBinauthz\n description: '**DEPRECATED** Binauthz configuration for the cluster.\n This field will be ignored and should not be set.'\n x-dcl-server-default: true\n properties:\n enabled:\n type: boolean\n x-dcl-go-name: Enabled\n description: Whether binauthz is enabled in this cluster.\n x-dcl-parameter: true\n configSync:\n type: object\n x-dcl-go-name: ConfigSync\n x-dcl-go-type: FeatureMembershipConfigmanagementConfigSync\n description: Config Sync configuration for the cluster.\n x-dcl-send-empty: true\n properties:\n enabled:\n type: boolean\n x-dcl-go-name: Enabled\n description: Enables the installation of ConfigSync. If set to true,\n ConfigSync resources will be created and the other ConfigSync\n fields will be applied if exist. If set to false, all other ConfigSync\n fields will be ignored, ConfigSync resources will be deleted.\n If omitted, ConfigSync resources will be managed depends on the\n presence of the git or oci field.\n git:\n type: object\n x-dcl-go-name: Git\n x-dcl-go-type: FeatureMembershipConfigmanagementConfigSyncGit\n properties:\n gcpServiceAccountEmail:\n type: string\n x-dcl-go-name: GcpServiceAccountEmail\n description: The GCP Service Account Email used for auth when\n secretType is gcpServiceAccount.\n x-dcl-references:\n - resource: Iam/ServiceAccount\n field: email\n httpsProxy:\n type: string\n x-dcl-go-name: HttpsProxy\n description: URL for the HTTPS proxy to be used when communicating\n with the Git repo.\n policyDir:\n type: string\n x-dcl-go-name: PolicyDir\n description: 'The path within the Git repository that represents\n the top level of the repo to sync. Default: the root directory\n of the repository.'\n secretType:\n type: string\n x-dcl-go-name: SecretType\n description: Type of secret configured for access to the Git\n repo. Must be one of ssh, cookiefile, gcenode, token, gcpserviceaccount\n or none. The validation of this is case-sensitive.\n syncBranch:\n type: string\n x-dcl-go-name: SyncBranch\n description: 'The branch of the repository to sync from. Default:\n master.'\n syncRepo:\n type: string\n x-dcl-go-name: SyncRepo\n description: The URL of the Git repository to use as the source\n of truth.\n syncRev:\n type: string\n x-dcl-go-name: SyncRev\n description: Git revision (tag or hash) to check out. Default\n HEAD.\n syncWaitSecs:\n type: string\n x-dcl-go-name: SyncWaitSecs\n description: 'Period in seconds between consecutive syncs. Default:\n 15.'\n metricsGcpServiceAccountEmail:\n type: string\n x-dcl-go-name: MetricsGcpServiceAccountEmail\n description: The Email of the Google Cloud Service Account (GSA)\n used for exporting Config Sync metrics to Cloud Monitoring. The\n GSA should have the Monitoring Metric Writer(roles/monitoring.metricWriter)\n IAM role. The Kubernetes ServiceAccount `default` in the namespace\n `config-management-monitoring` should be bound to the GSA.\n x-dcl-references:\n - resource: Iam/ServiceAccount\n field: email\n oci:\n type: object\n x-dcl-go-name: Oci\n x-dcl-go-type: FeatureMembershipConfigmanagementConfigSyncOci\n properties:\n gcpServiceAccountEmail:\n type: string\n x-dcl-go-name: GcpServiceAccountEmail\n description: 'The GCP Service Account Email used for auth when\n secret_type is gcpserviceaccount. '\n x-dcl-references:\n - resource: Iam/ServiceAccount\n field: email\n policyDir:\n type: string\n x-dcl-go-name: PolicyDir\n description: 'The absolute path of the directory that contains\n the local resources. Default: the root directory of the image.'\n secretType:\n type: string\n x-dcl-go-name: SecretType\n description: Type of secret configured for access to the OCI\n Image. Must be one of gcenode, gcpserviceaccount or none.\n The validation of this is case-sensitive.\n syncRepo:\n type: string\n x-dcl-go-name: SyncRepo\n description: The OCI image repository URL for the package to\n sync from. e.g. LOCATION-docker.pkg.dev/PROJECT_ID/REPOSITORY_NAME/PACKAGE_NAME.\n syncWaitSecs:\n type: string\n x-dcl-go-name: SyncWaitSecs\n description: 'Period in seconds(int64 format) between consecutive\n syncs. Default: 15.'\n preventDrift:\n type: boolean\n x-dcl-go-name: PreventDrift\n description: Set to true to enable the Config Sync admission webhook\n to prevent drifts. If set to `false`, disables the Config Sync\n admission webhook and does not prevent drifts.\n x-dcl-server-default: true\n sourceFormat:\n type: string\n x-dcl-go-name: SourceFormat\n description: Specifies whether the Config Sync Repo is in \"hierarchical\"\n or \"unstructured\" mode.\n hierarchyController:\n type: object\n x-dcl-go-name: HierarchyController\n x-dcl-go-type: FeatureMembershipConfigmanagementHierarchyController\n description: Hierarchy Controller configuration for the cluster.\n x-dcl-send-empty: true\n properties:\n enableHierarchicalResourceQuota:\n type: boolean\n x-dcl-go-name: EnableHierarchicalResourceQuota\n description: Whether hierarchical resource quota is enabled in this\n cluster.\n x-dcl-send-empty: true\n enablePodTreeLabels:\n type: boolean\n x-dcl-go-name: EnablePodTreeLabels\n description: Whether pod tree labels are enabled in this cluster.\n x-dcl-send-empty: true\n enabled:\n type: boolean\n x-dcl-go-name: Enabled\n description: Whether Hierarchy Controller is enabled in this cluster.\n x-dcl-send-empty: true\n management:\n type: string\n x-dcl-go-name: Management\n x-dcl-go-type: FeatureMembershipConfigmanagementManagementEnum\n description: Set this field to MANAGEMENT_AUTOMATIC to enable Config\n Sync auto-upgrades, and set this field to MANAGEMENT_MANUAL or MANAGEMENT_UNSPECIFIED\n to disable Config Sync auto-upgrades.\n x-dcl-server-default: true\n enum:\n - MANAGEMENT_UNSPECIFIED\n - MANAGEMENT_AUTOMATIC\n - MANAGEMENT_MANUAL\n policyController:\n type: object\n x-dcl-go-name: PolicyController\n x-dcl-go-type: FeatureMembershipConfigmanagementPolicyController\n description: Policy Controller configuration for the cluster.\n properties:\n auditIntervalSeconds:\n type: string\n x-dcl-go-name: AuditIntervalSeconds\n description: Sets the interval for Policy Controller Audit Scans\n (in seconds). When set to 0, this disables audit functionality\n altogether.\n enabled:\n type: boolean\n x-dcl-go-name: Enabled\n description: Enables the installation of Policy Controller. If false,\n the rest of PolicyController fields take no effect.\n exemptableNamespaces:\n type: array\n x-dcl-go-name: ExemptableNamespaces\n description: The set of namespaces that are excluded from Policy\n Controller checks. Namespaces do not need to currently exist on\n the cluster.\n x-dcl-send-empty: true\n x-dcl-list-type: list\n items:\n type: string\n x-dcl-go-type: string\n logDeniesEnabled:\n type: boolean\n x-dcl-go-name: LogDeniesEnabled\n description: Logs all denies and dry run failures.\n monitoring:\n type: object\n x-dcl-go-name: Monitoring\n x-dcl-go-type: FeatureMembershipConfigmanagementPolicyControllerMonitoring\n description: 'Specifies the backends Policy Controller should export\n metrics to. For example, to specify metrics should be exported\n to Cloud Monitoring and Prometheus, specify backends: [\"cloudmonitoring\",\n \"prometheus\"]. Default: [\"cloudmonitoring\", \"prometheus\"]'\n x-dcl-server-default: true\n properties:\n backends:\n type: array\n x-dcl-go-name: Backends\n description: ' Specifies the list of backends Policy Controller\n will export to. Specifying an empty value `[]` disables metrics\n export.'\n x-dcl-server-default: true\n x-dcl-send-empty: true\n x-dcl-list-type: list\n items:\n type: string\n x-dcl-go-type: FeatureMembershipConfigmanagementPolicyControllerMonitoringBackendsEnum\n enum:\n - MONITORING_BACKEND_UNSPECIFIED\n - PROMETHEUS\n - CLOUD_MONITORING\n mutationEnabled:\n type: boolean\n x-dcl-go-name: MutationEnabled\n description: Enable or disable mutation in policy controller. If\n true, mutation CRDs, webhook and controller deployment will be\n deployed to the cluster.\n referentialRulesEnabled:\n type: boolean\n x-dcl-go-name: ReferentialRulesEnabled\n description: Enables the ability to use Constraint Templates that\n reference to objects other than the object currently being evaluated.\n templateLibraryInstalled:\n type: boolean\n x-dcl-go-name: TemplateLibraryInstalled\n description: Installs the default template library along with Policy\n Controller.\n version:\n type: string\n x-dcl-go-name: Version\n description: Optional. Version of ACM to install. Defaults to the latest\n version.\n x-dcl-server-default: true\n feature:\n type: string\n x-dcl-go-name: Feature\n description: The name of the feature\n x-kubernetes-immutable: true\n x-dcl-references:\n - resource: Gkehub/Feature\n field: name\n parent: true\n x-dcl-parameter: true\n location:\n type: string\n x-dcl-go-name: Location\n description: The location of the feature\n x-kubernetes-immutable: true\n x-dcl-parameter: true\n membership:\n type: string\n x-dcl-go-name: Membership\n description: The name of the membership\n x-kubernetes-immutable: true\n x-dcl-references:\n - resource: Gkehub/Membership\n field: name\n x-dcl-parameter: true\n membershipLocation:\n type: string\n x-dcl-go-name: MembershipLocation\n description: The location of the membership\n x-kubernetes-immutable: true\n x-dcl-parameter: true\n mesh:\n type: object\n x-dcl-go-name: Mesh\n x-dcl-go-type: FeatureMembershipMesh\n description: Manage Mesh Features\n properties:\n controlPlane:\n type: string\n x-dcl-go-name: ControlPlane\n x-dcl-go-type: FeatureMembershipMeshControlPlaneEnum\n description: '**DEPRECATED** Whether to automatically manage Service\n Mesh control planes. Possible values: CONTROL_PLANE_MANAGEMENT_UNSPECIFIED,\n AUTOMATIC, MANUAL'\n enum:\n - CONTROL_PLANE_MANAGEMENT_UNSPECIFIED\n - AUTOMATIC\n - MANUAL\n management:\n type: string\n x-dcl-go-name: Management\n x-dcl-go-type: FeatureMembershipMeshManagementEnum\n description: 'Whether to automatically manage Service Mesh. Possible\n values: MANAGEMENT_UNSPECIFIED, MANAGEMENT_AUTOMATIC, MANAGEMENT_MANUAL'\n enum:\n - MANAGEMENT_UNSPECIFIED\n - MANAGEMENT_AUTOMATIC\n - MANAGEMENT_MANUAL\n policycontroller:\n type: object\n x-dcl-go-name: Policycontroller\n x-dcl-go-type: FeatureMembershipPolicycontroller\n description: Policy Controller-specific spec.\n required:\n - policyControllerHubConfig\n properties:\n policyControllerHubConfig:\n type: object\n x-dcl-go-name: PolicyControllerHubConfig\n x-dcl-go-type: FeatureMembershipPolicycontrollerPolicyControllerHubConfig\n description: Policy Controller configuration for the cluster.\n properties:\n auditIntervalSeconds:\n type: integer\n format: int64\n x-dcl-go-name: AuditIntervalSeconds\n description: Sets the interval for Policy Controller Audit Scans\n (in seconds). When set to 0, this disables audit functionality\n altogether.\n constraintViolationLimit:\n type: integer\n format: int64\n x-dcl-go-name: ConstraintViolationLimit\n description: The maximum number of audit violations to be stored\n in a constraint. If not set, the internal default of 20 will be\n used.\n deploymentConfigs:\n type: object\n additionalProperties:\n type: object\n x-dcl-go-type: FeatureMembershipPolicycontrollerPolicyControllerHubConfigDeploymentConfigs\n properties:\n containerResources:\n type: object\n x-dcl-go-name: ContainerResources\n x-dcl-go-type: FeatureMembershipPolicycontrollerPolicyControllerHubConfigDeploymentConfigsContainerResources\n description: Container resource requirements.\n x-dcl-conflicts:\n - replicaCount\n - podAffinity\n - podTolerations\n properties:\n limits:\n type: object\n x-dcl-go-name: Limits\n x-dcl-go-type: FeatureMembershipPolicycontrollerPolicyControllerHubConfigDeploymentConfigsContainerResourcesLimits\n description: Limits describes the maximum amount of compute\n resources allowed for use by the running container.\n properties:\n cpu:\n type: string\n x-dcl-go-name: Cpu\n description: CPU requirement expressed in Kubernetes\n resource units.\n memory:\n type: string\n x-dcl-go-name: Memory\n description: Memory requirement expressed in Kubernetes\n resource units.\n requests:\n type: object\n x-dcl-go-name: Requests\n x-dcl-go-type: FeatureMembershipPolicycontrollerPolicyControllerHubConfigDeploymentConfigsContainerResourcesRequests\n description: Requests describes the amount of compute\n resources reserved for the container by the kube-scheduler.\n properties:\n cpu:\n type: string\n x-dcl-go-name: Cpu\n description: CPU requirement expressed in Kubernetes\n resource units.\n memory:\n type: string\n x-dcl-go-name: Memory\n description: Memory requirement expressed in Kubernetes\n resource units.\n podAffinity:\n type: string\n x-dcl-go-name: PodAffinity\n x-dcl-go-type: FeatureMembershipPolicycontrollerPolicyControllerHubConfigDeploymentConfigsPodAffinityEnum\n description: 'Pod affinity configuration. Possible values:\n AFFINITY_UNSPECIFIED, NO_AFFINITY, ANTI_AFFINITY'\n x-dcl-conflicts:\n - replicaCount\n - containerResources\n - podTolerations\n enum:\n - AFFINITY_UNSPECIFIED\n - NO_AFFINITY\n - ANTI_AFFINITY\n podTolerations:\n type: array\n x-dcl-go-name: PodTolerations\n description: Pod tolerations of node taints.\n x-dcl-conflicts:\n - replicaCount\n - containerResources\n - podAffinity\n x-dcl-send-empty: true\n x-dcl-list-type: list\n items:\n type: object\n x-dcl-go-type: FeatureMembershipPolicycontrollerPolicyControllerHubConfigDeploymentConfigsPodTolerations\n properties:\n effect:\n type: string\n x-dcl-go-name: Effect\n description: Matches a taint effect.\n key:\n type: string\n x-dcl-go-name: Key\n description: Matches a taint key (not necessarily unique).\n operator:\n type: string\n x-dcl-go-name: Operator\n description: Matches a taint operator.\n value:\n type: string\n x-dcl-go-name: Value\n description: Matches a taint value.\n replicaCount:\n type: integer\n format: int64\n x-dcl-go-name: ReplicaCount\n description: Pod replica count.\n x-dcl-conflicts:\n - containerResources\n - podAffinity\n - podTolerations\n x-dcl-go-name: DeploymentConfigs\n description: Map of deployment configs to deployments (\"admission\",\n \"audit\", \"mutation\").\n x-dcl-server-default: true\n exemptableNamespaces:\n type: array\n x-dcl-go-name: ExemptableNamespaces\n description: The set of namespaces that are excluded from Policy\n Controller checks. Namespaces do not need to currently exist on\n the cluster.\n x-dcl-send-empty: true\n x-dcl-list-type: list\n items:\n type: string\n x-dcl-go-type: string\n installSpec:\n type: string\n x-dcl-go-name: InstallSpec\n x-dcl-go-type: FeatureMembershipPolicycontrollerPolicyControllerHubConfigInstallSpecEnum\n description: 'Configures the mode of the Policy Controller installation.\n Possible values: INSTALL_SPEC_UNSPECIFIED, INSTALL_SPEC_NOT_INSTALLED,\n INSTALL_SPEC_ENABLED, INSTALL_SPEC_SUSPENDED, INSTALL_SPEC_DETACHED'\n enum:\n - INSTALL_SPEC_UNSPECIFIED\n - INSTALL_SPEC_NOT_INSTALLED\n - INSTALL_SPEC_ENABLED\n - INSTALL_SPEC_SUSPENDED\n - INSTALL_SPEC_DETACHED\n logDeniesEnabled:\n type: boolean\n x-dcl-go-name: LogDeniesEnabled\n description: Logs all denies and dry run failures.\n monitoring:\n type: object\n x-dcl-go-name: Monitoring\n x-dcl-go-type: FeatureMembershipPolicycontrollerPolicyControllerHubConfigMonitoring\n description: 'Specifies the backends Policy Controller should export\n metrics to. For example, to specify metrics should be exported\n to Cloud Monitoring and Prometheus, specify backends: [\"cloudmonitoring\",\n \"prometheus\"]. Default: [\"cloudmonitoring\", \"prometheus\"]'\n x-dcl-server-default: true\n properties:\n backends:\n type: array\n x-dcl-go-name: Backends\n description: ' Specifies the list of backends Policy Controller\n will export to. Specifying an empty value `[]` disables metrics\n export.'\n x-dcl-server-default: true\n x-dcl-send-empty: true\n x-dcl-list-type: list\n items:\n type: string\n x-dcl-go-type: FeatureMembershipPolicycontrollerPolicyControllerHubConfigMonitoringBackendsEnum\n enum:\n - MONITORING_BACKEND_UNSPECIFIED\n - PROMETHEUS\n - CLOUD_MONITORING\n mutationEnabled:\n type: boolean\n x-dcl-go-name: MutationEnabled\n description: Enables the ability to mutate resources using Policy\n Controller.\n policyContent:\n type: object\n x-dcl-go-name: PolicyContent\n x-dcl-go-type: FeatureMembershipPolicycontrollerPolicyControllerHubConfigPolicyContent\n description: Specifies the desired policy content on the cluster.\n x-dcl-server-default: true\n properties:\n bundles:\n type: object\n additionalProperties:\n type: object\n x-dcl-go-type: FeatureMembershipPolicycontrollerPolicyControllerHubConfigPolicyContentBundles\n properties:\n exemptedNamespaces:\n type: array\n x-dcl-go-name: ExemptedNamespaces\n description: The set of namespaces to be exempted from\n the bundle.\n x-dcl-send-empty: true\n x-dcl-list-type: list\n items:\n type: string\n x-dcl-go-type: string\n x-dcl-go-name: Bundles\n description: map of bundle name to BundleInstallSpec. The bundle\n name maps to the `bundleName` key in the `policycontroller.gke.io/constraintData`\n annotation on a constraint.\n templateLibrary:\n type: object\n x-dcl-go-name: TemplateLibrary\n x-dcl-go-type: FeatureMembershipPolicycontrollerPolicyControllerHubConfigPolicyContentTemplateLibrary\n description: Configures the installation of the Template Library.\n x-dcl-server-default: true\n properties:\n installation:\n type: string\n x-dcl-go-name: Installation\n x-dcl-go-type: FeatureMembershipPolicycontrollerPolicyControllerHubConfigPolicyContentTemplateLibraryInstallationEnum\n description: 'Configures the manner in which the template\n library is installed on the cluster. Possible values:\n INSTALLATION_UNSPECIFIED, NOT_INSTALLED, ALL'\n enum:\n - INSTALLATION_UNSPECIFIED\n - NOT_INSTALLED\n - ALL\n referentialRulesEnabled:\n type: boolean\n x-dcl-go-name: ReferentialRulesEnabled\n description: Enables the ability to use Constraint Templates that\n reference to objects other than the object currently being evaluated.\n version:\n type: string\n x-dcl-go-name: Version\n description: Optional. Version of Policy Controller to install. Defaults\n to the latest version.\n x-dcl-server-default: true\n project:\n type: string\n x-dcl-go-name: Project\n description: The project of the feature\n x-kubernetes-immutable: true\n x-dcl-references:\n - resource: Cloudresourcemanager/Project\n field: name\n parent: true\n x-dcl-parameter: true\n") -// 30146 bytes -// MD5: 83a10e0d3784ce78d058e07c927c7bd7 +// 30724 bytes +// MD5: 9e1c78f9c97b3d50f6a6a81a70874fc3 diff --git a/services/google/gkehub/beta/feature_membership_internal.go b/services/google/gkehub/beta/feature_membership_internal.go index cfd43cdc1..c46352c55 100755 --- a/services/google/gkehub/beta/feature_membership_internal.go +++ b/services/google/gkehub/beta/feature_membership_internal.go @@ -604,6 +604,12 @@ func canonicalizeFeatureMembershipConfigmanagement(des, initial *FeatureMembersh } else { cDes.Version = des.Version } + if dcl.IsZeroValue(des.Management) || (dcl.IsEmptyValueIndirect(des.Management) && dcl.IsEmptyValueIndirect(initial.Management)) { + // Desired and initial values are equivalent, so set canonical desired value to initial value. + cDes.Management = initial.Management + } else { + cDes.Management = des.Management + } return cDes } @@ -3305,6 +3311,13 @@ func compareFeatureMembershipConfigmanagementNewStyle(d, a interface{}, fn dcl.F } diffs = append(diffs, ds...) } + + if ds, err := dcl.Diff(desired.Management, actual.Management, dcl.DiffInfo{ServerDefault: true, Type: "EnumType", OperationSelector: dcl.RequiresRecreate()}, fn.AddNest("Management")); len(ds) != 0 || err != nil { + if err != nil { + return nil, err + } + diffs = append(diffs, ds...) + } return diffs, nil } @@ -4506,6 +4519,9 @@ func expandFeatureMembershipConfigmanagement(c *Client, f *FeatureMembershipConf if v := f.Version; !dcl.IsEmptyValueIndirect(v) { m["version"] = v } + if v := f.Management; !dcl.IsEmptyValueIndirect(v) { + m["management"] = v + } return m, nil } @@ -4528,6 +4544,7 @@ func flattenFeatureMembershipConfigmanagement(c *Client, i interface{}, res *Fea r.Binauthz = flattenFeatureMembershipConfigmanagementBinauthz(c, m["binauthz"], res) r.HierarchyController = flattenHierarchyControllerConfig(c, m["hierarchyController"], res) r.Version = dcl.FlattenString(m["version"]) + r.Management = flattenFeatureMembershipConfigmanagementManagementEnum(m["management"]) return r } @@ -6943,6 +6960,57 @@ func flattenFeatureMembershipConfigmanagementPolicyControllerMonitoringBackendsE return FeatureMembershipConfigmanagementPolicyControllerMonitoringBackendsEnumRef(s) } +// flattenFeatureMembershipConfigmanagementManagementEnumMap flattens the contents of FeatureMembershipConfigmanagementManagementEnum from a JSON +// response object. +func flattenFeatureMembershipConfigmanagementManagementEnumMap(c *Client, i interface{}, res *FeatureMembership) map[string]FeatureMembershipConfigmanagementManagementEnum { + a, ok := i.(map[string]interface{}) + if !ok { + return map[string]FeatureMembershipConfigmanagementManagementEnum{} + } + + if len(a) == 0 { + return map[string]FeatureMembershipConfigmanagementManagementEnum{} + } + + items := make(map[string]FeatureMembershipConfigmanagementManagementEnum) + for k, item := range a { + items[k] = *flattenFeatureMembershipConfigmanagementManagementEnum(item.(interface{})) + } + + return items +} + +// flattenFeatureMembershipConfigmanagementManagementEnumSlice flattens the contents of FeatureMembershipConfigmanagementManagementEnum from a JSON +// response object. +func flattenFeatureMembershipConfigmanagementManagementEnumSlice(c *Client, i interface{}, res *FeatureMembership) []FeatureMembershipConfigmanagementManagementEnum { + a, ok := i.([]interface{}) + if !ok { + return []FeatureMembershipConfigmanagementManagementEnum{} + } + + if len(a) == 0 { + return []FeatureMembershipConfigmanagementManagementEnum{} + } + + items := make([]FeatureMembershipConfigmanagementManagementEnum, 0, len(a)) + for _, item := range a { + items = append(items, *flattenFeatureMembershipConfigmanagementManagementEnum(item.(interface{}))) + } + + return items +} + +// flattenFeatureMembershipConfigmanagementManagementEnum asserts that an interface is a string, and returns a +// pointer to a *FeatureMembershipConfigmanagementManagementEnum with the same value as that string. +func flattenFeatureMembershipConfigmanagementManagementEnum(i interface{}) *FeatureMembershipConfigmanagementManagementEnum { + s, ok := i.(string) + if !ok { + return nil + } + + return FeatureMembershipConfigmanagementManagementEnumRef(s) +} + // flattenFeatureMembershipPolicycontrollerPolicyControllerHubConfigInstallSpecEnumMap flattens the contents of FeatureMembershipPolicycontrollerPolicyControllerHubConfigInstallSpecEnum from a JSON // response object. func flattenFeatureMembershipPolicycontrollerPolicyControllerHubConfigInstallSpecEnumMap(c *Client, i interface{}, res *FeatureMembership) map[string]FeatureMembershipPolicycontrollerPolicyControllerHubConfigInstallSpecEnum { diff --git a/services/google/gkehub/beta/feature_membership_schema.go b/services/google/gkehub/beta/feature_membership_schema.go index 119cd7a70..c35b23a44 100755 --- a/services/google/gkehub/beta/feature_membership_schema.go +++ b/services/google/gkehub/beta/feature_membership_schema.go @@ -300,6 +300,18 @@ func DCLFeatureMembershipSchema() *dcl.Schema { }, }, }, + "management": &dcl.Property{ + Type: "string", + GoName: "Management", + GoType: "FeatureMembershipConfigmanagementManagementEnum", + Description: "Set this field to MANAGEMENT_AUTOMATIC to enable Config Sync auto-upgrades, and set this field to MANAGEMENT_MANUAL or MANAGEMENT_UNSPECIFIED to disable Config Sync auto-upgrades.", + ServerDefault: true, + Enum: []string{ + "MANAGEMENT_UNSPECIFIED", + "MANAGEMENT_AUTOMATIC", + "MANAGEMENT_MANUAL", + }, + }, "policyController": &dcl.Property{ Type: "object", GoName: "PolicyController", diff --git a/services/google/gkehub/feature_membership.go b/services/google/gkehub/feature_membership.go index 577df0cb6..f6bd091b0 100755 --- a/services/google/gkehub/feature_membership.go +++ b/services/google/gkehub/feature_membership.go @@ -119,6 +119,33 @@ func (v FeatureMembershipConfigmanagementPolicyControllerMonitoringBackendsEnum) } } +// The enum FeatureMembershipConfigmanagementManagementEnum. +type FeatureMembershipConfigmanagementManagementEnum string + +// FeatureMembershipConfigmanagementManagementEnumRef returns a *FeatureMembershipConfigmanagementManagementEnum with the value of string s +// If the empty string is provided, nil is returned. +func FeatureMembershipConfigmanagementManagementEnumRef(s string) *FeatureMembershipConfigmanagementManagementEnum { + v := FeatureMembershipConfigmanagementManagementEnum(s) + return &v +} + +func (v FeatureMembershipConfigmanagementManagementEnum) Validate() error { + if string(v) == "" { + // Empty enum is okay. + return nil + } + for _, s := range []string{"MANAGEMENT_UNSPECIFIED", "MANAGEMENT_AUTOMATIC", "MANAGEMENT_MANUAL"} { + if string(v) == s { + return nil + } + } + return &dcl.EnumInvalidError{ + Enum: "FeatureMembershipConfigmanagementManagementEnum", + Value: string(v), + Valid: []string{}, + } +} + // The enum FeatureMembershipPolicycontrollerPolicyControllerHubConfigInstallSpecEnum. type FeatureMembershipPolicycontrollerPolicyControllerHubConfigInstallSpecEnum string @@ -283,6 +310,7 @@ type FeatureMembershipConfigmanagement struct { Binauthz *FeatureMembershipConfigmanagementBinauthz `json:"binauthz"` HierarchyController *FeatureMembershipConfigmanagementHierarchyController `json:"hierarchyController"` Version *string `json:"version"` + Management *FeatureMembershipConfigmanagementManagementEnum `json:"management"` } type jsonFeatureMembershipConfigmanagement FeatureMembershipConfigmanagement @@ -310,6 +338,8 @@ func (r *FeatureMembershipConfigmanagement) UnmarshalJSON(data []byte) error { r.Version = res.Version + r.Management = res.Management + } return nil } diff --git a/services/google/gkehub/feature_membership.yaml b/services/google/gkehub/feature_membership.yaml index d305078c9..02d0c758f 100755 --- a/services/google/gkehub/feature_membership.yaml +++ b/services/google/gkehub/feature_membership.yaml @@ -249,6 +249,18 @@ components: x-dcl-go-name: Enabled description: Whether Hierarchy Controller is enabled in this cluster. x-dcl-send-empty: true + management: + type: string + x-dcl-go-name: Management + x-dcl-go-type: FeatureMembershipConfigmanagementManagementEnum + description: Set this field to MANAGEMENT_AUTOMATIC to enable Config + Sync auto-upgrades, and set this field to MANAGEMENT_MANUAL or MANAGEMENT_UNSPECIFIED + to disable Config Sync auto-upgrades. + x-dcl-server-default: true + enum: + - MANAGEMENT_UNSPECIFIED + - MANAGEMENT_AUTOMATIC + - MANAGEMENT_MANUAL policyController: type: object x-dcl-go-name: PolicyController diff --git a/services/google/gkehub/feature_membership_internal.go b/services/google/gkehub/feature_membership_internal.go index fc43718ec..bb4c98986 100755 --- a/services/google/gkehub/feature_membership_internal.go +++ b/services/google/gkehub/feature_membership_internal.go @@ -604,6 +604,12 @@ func canonicalizeFeatureMembershipConfigmanagement(des, initial *FeatureMembersh } else { cDes.Version = des.Version } + if dcl.IsZeroValue(des.Management) || (dcl.IsEmptyValueIndirect(des.Management) && dcl.IsEmptyValueIndirect(initial.Management)) { + // Desired and initial values are equivalent, so set canonical desired value to initial value. + cDes.Management = initial.Management + } else { + cDes.Management = des.Management + } return cDes } @@ -3305,6 +3311,13 @@ func compareFeatureMembershipConfigmanagementNewStyle(d, a interface{}, fn dcl.F } diffs = append(diffs, ds...) } + + if ds, err := dcl.Diff(desired.Management, actual.Management, dcl.DiffInfo{ServerDefault: true, Type: "EnumType", OperationSelector: dcl.RequiresRecreate()}, fn.AddNest("Management")); len(ds) != 0 || err != nil { + if err != nil { + return nil, err + } + diffs = append(diffs, ds...) + } return diffs, nil } @@ -4506,6 +4519,9 @@ func expandFeatureMembershipConfigmanagement(c *Client, f *FeatureMembershipConf if v := f.Version; !dcl.IsEmptyValueIndirect(v) { m["version"] = v } + if v := f.Management; !dcl.IsEmptyValueIndirect(v) { + m["management"] = v + } return m, nil } @@ -4528,6 +4544,7 @@ func flattenFeatureMembershipConfigmanagement(c *Client, i interface{}, res *Fea r.Binauthz = flattenFeatureMembershipConfigmanagementBinauthz(c, m["binauthz"], res) r.HierarchyController = flattenHierarchyControllerConfig(c, m["hierarchyController"], res) r.Version = dcl.FlattenString(m["version"]) + r.Management = flattenFeatureMembershipConfigmanagementManagementEnum(m["management"]) return r } @@ -6943,6 +6960,57 @@ func flattenFeatureMembershipConfigmanagementPolicyControllerMonitoringBackendsE return FeatureMembershipConfigmanagementPolicyControllerMonitoringBackendsEnumRef(s) } +// flattenFeatureMembershipConfigmanagementManagementEnumMap flattens the contents of FeatureMembershipConfigmanagementManagementEnum from a JSON +// response object. +func flattenFeatureMembershipConfigmanagementManagementEnumMap(c *Client, i interface{}, res *FeatureMembership) map[string]FeatureMembershipConfigmanagementManagementEnum { + a, ok := i.(map[string]interface{}) + if !ok { + return map[string]FeatureMembershipConfigmanagementManagementEnum{} + } + + if len(a) == 0 { + return map[string]FeatureMembershipConfigmanagementManagementEnum{} + } + + items := make(map[string]FeatureMembershipConfigmanagementManagementEnum) + for k, item := range a { + items[k] = *flattenFeatureMembershipConfigmanagementManagementEnum(item.(interface{})) + } + + return items +} + +// flattenFeatureMembershipConfigmanagementManagementEnumSlice flattens the contents of FeatureMembershipConfigmanagementManagementEnum from a JSON +// response object. +func flattenFeatureMembershipConfigmanagementManagementEnumSlice(c *Client, i interface{}, res *FeatureMembership) []FeatureMembershipConfigmanagementManagementEnum { + a, ok := i.([]interface{}) + if !ok { + return []FeatureMembershipConfigmanagementManagementEnum{} + } + + if len(a) == 0 { + return []FeatureMembershipConfigmanagementManagementEnum{} + } + + items := make([]FeatureMembershipConfigmanagementManagementEnum, 0, len(a)) + for _, item := range a { + items = append(items, *flattenFeatureMembershipConfigmanagementManagementEnum(item.(interface{}))) + } + + return items +} + +// flattenFeatureMembershipConfigmanagementManagementEnum asserts that an interface is a string, and returns a +// pointer to a *FeatureMembershipConfigmanagementManagementEnum with the same value as that string. +func flattenFeatureMembershipConfigmanagementManagementEnum(i interface{}) *FeatureMembershipConfigmanagementManagementEnum { + s, ok := i.(string) + if !ok { + return nil + } + + return FeatureMembershipConfigmanagementManagementEnumRef(s) +} + // flattenFeatureMembershipPolicycontrollerPolicyControllerHubConfigInstallSpecEnumMap flattens the contents of FeatureMembershipPolicycontrollerPolicyControllerHubConfigInstallSpecEnum from a JSON // response object. func flattenFeatureMembershipPolicycontrollerPolicyControllerHubConfigInstallSpecEnumMap(c *Client, i interface{}, res *FeatureMembership) map[string]FeatureMembershipPolicycontrollerPolicyControllerHubConfigInstallSpecEnum { diff --git a/services/google/gkehub/feature_membership_schema.go b/services/google/gkehub/feature_membership_schema.go index f1791c113..fd2a2443a 100755 --- a/services/google/gkehub/feature_membership_schema.go +++ b/services/google/gkehub/feature_membership_schema.go @@ -300,6 +300,18 @@ func DCLFeatureMembershipSchema() *dcl.Schema { }, }, }, + "management": &dcl.Property{ + Type: "string", + GoName: "Management", + GoType: "FeatureMembershipConfigmanagementManagementEnum", + Description: "Set this field to MANAGEMENT_AUTOMATIC to enable Config Sync auto-upgrades, and set this field to MANAGEMENT_MANUAL or MANAGEMENT_UNSPECIFIED to disable Config Sync auto-upgrades.", + ServerDefault: true, + Enum: []string{ + "MANAGEMENT_UNSPECIFIED", + "MANAGEMENT_AUTOMATIC", + "MANAGEMENT_MANUAL", + }, + }, "policyController": &dcl.Property{ Type: "object", GoName: "PolicyController", diff --git a/services/google/gkehub/feature_membership_yaml_embed.go b/services/google/gkehub/feature_membership_yaml_embed.go index 48b733e71..5187c497f 100755 --- a/services/google/gkehub/feature_membership_yaml_embed.go +++ b/services/google/gkehub/feature_membership_yaml_embed.go @@ -17,7 +17,7 @@ package gkehub // blaze-out/k8-fastbuild/genfiles/cloud/graphite/mmv2/services/google/gkehub/feature_membership.yaml -var YAML_feature_membership = []byte("info:\n title: GkeHub/FeatureMembership\n description: The GkeHub FeatureMembership resource\n x-dcl-struct-name: FeatureMembership\n x-dcl-has-iam: false\n x-dcl-mutex: '{{project}}/{{location}}/{{feature}}'\npaths:\n get:\n description: The function used to get information about a FeatureMembership\n parameters:\n - name: featureMembership\n required: true\n description: A full instance of a FeatureMembership\n apply:\n description: The function used to apply information about a FeatureMembership\n parameters:\n - name: featureMembership\n required: true\n description: A full instance of a FeatureMembership\n delete:\n description: The function used to delete a FeatureMembership\n parameters:\n - name: featureMembership\n required: true\n description: A full instance of a FeatureMembership\n deleteAll:\n description: The function used to delete all FeatureMembership\n parameters:\n - name: project\n required: true\n schema:\n type: string\n - name: location\n required: true\n schema:\n type: string\n - name: feature\n required: true\n schema:\n type: string\n list:\n description: The function used to list information about many FeatureMembership\n parameters:\n - name: project\n required: true\n schema:\n type: string\n - name: location\n required: true\n schema:\n type: string\n - name: feature\n required: true\n schema:\n type: string\ncomponents:\n schemas:\n FeatureMembership:\n title: FeatureMembership\n x-dcl-id: projects/{{project}}/locations/{{location}}/features/{{feature}}/memberships/{{membership}}\n x-dcl-parent-container: project\n x-dcl-has-create: true\n x-dcl-has-iam: false\n x-dcl-read-timeout: 0\n x-dcl-apply-timeout: 0\n x-dcl-delete-timeout: 0\n type: object\n required:\n - project\n - location\n - feature\n - membership\n properties:\n configmanagement:\n type: object\n x-dcl-go-name: Configmanagement\n x-dcl-go-type: FeatureMembershipConfigmanagement\n description: Config Management-specific spec.\n properties:\n binauthz:\n type: object\n x-dcl-go-name: Binauthz\n x-dcl-go-type: FeatureMembershipConfigmanagementBinauthz\n description: '**DEPRECATED** Binauthz configuration for the cluster.\n This field will be ignored and should not be set.'\n x-dcl-server-default: true\n properties:\n enabled:\n type: boolean\n x-dcl-go-name: Enabled\n description: Whether binauthz is enabled in this cluster.\n x-dcl-parameter: true\n configSync:\n type: object\n x-dcl-go-name: ConfigSync\n x-dcl-go-type: FeatureMembershipConfigmanagementConfigSync\n description: Config Sync configuration for the cluster.\n x-dcl-send-empty: true\n properties:\n enabled:\n type: boolean\n x-dcl-go-name: Enabled\n description: Enables the installation of ConfigSync. If set to true,\n ConfigSync resources will be created and the other ConfigSync\n fields will be applied if exist. If set to false, all other ConfigSync\n fields will be ignored, ConfigSync resources will be deleted.\n If omitted, ConfigSync resources will be managed depends on the\n presence of the git or oci field.\n git:\n type: object\n x-dcl-go-name: Git\n x-dcl-go-type: FeatureMembershipConfigmanagementConfigSyncGit\n properties:\n gcpServiceAccountEmail:\n type: string\n x-dcl-go-name: GcpServiceAccountEmail\n description: The GCP Service Account Email used for auth when\n secretType is gcpServiceAccount.\n x-dcl-references:\n - resource: Iam/ServiceAccount\n field: email\n httpsProxy:\n type: string\n x-dcl-go-name: HttpsProxy\n description: URL for the HTTPS proxy to be used when communicating\n with the Git repo.\n policyDir:\n type: string\n x-dcl-go-name: PolicyDir\n description: 'The path within the Git repository that represents\n the top level of the repo to sync. Default: the root directory\n of the repository.'\n secretType:\n type: string\n x-dcl-go-name: SecretType\n description: Type of secret configured for access to the Git\n repo. Must be one of ssh, cookiefile, gcenode, token, gcpserviceaccount\n or none. The validation of this is case-sensitive.\n syncBranch:\n type: string\n x-dcl-go-name: SyncBranch\n description: 'The branch of the repository to sync from. Default:\n master.'\n syncRepo:\n type: string\n x-dcl-go-name: SyncRepo\n description: The URL of the Git repository to use as the source\n of truth.\n syncRev:\n type: string\n x-dcl-go-name: SyncRev\n description: Git revision (tag or hash) to check out. Default\n HEAD.\n syncWaitSecs:\n type: string\n x-dcl-go-name: SyncWaitSecs\n description: 'Period in seconds between consecutive syncs. Default:\n 15.'\n metricsGcpServiceAccountEmail:\n type: string\n x-dcl-go-name: MetricsGcpServiceAccountEmail\n description: The Email of the Google Cloud Service Account (GSA)\n used for exporting Config Sync metrics to Cloud Monitoring. The\n GSA should have the Monitoring Metric Writer(roles/monitoring.metricWriter)\n IAM role. The Kubernetes ServiceAccount `default` in the namespace\n `config-management-monitoring` should be bound to the GSA.\n x-dcl-references:\n - resource: Iam/ServiceAccount\n field: email\n oci:\n type: object\n x-dcl-go-name: Oci\n x-dcl-go-type: FeatureMembershipConfigmanagementConfigSyncOci\n properties:\n gcpServiceAccountEmail:\n type: string\n x-dcl-go-name: GcpServiceAccountEmail\n description: 'The GCP Service Account Email used for auth when\n secret_type is gcpserviceaccount. '\n x-dcl-references:\n - resource: Iam/ServiceAccount\n field: email\n policyDir:\n type: string\n x-dcl-go-name: PolicyDir\n description: 'The absolute path of the directory that contains\n the local resources. Default: the root directory of the image.'\n secretType:\n type: string\n x-dcl-go-name: SecretType\n description: Type of secret configured for access to the OCI\n Image. Must be one of gcenode, gcpserviceaccount or none.\n The validation of this is case-sensitive.\n syncRepo:\n type: string\n x-dcl-go-name: SyncRepo\n description: The OCI image repository URL for the package to\n sync from. e.g. LOCATION-docker.pkg.dev/PROJECT_ID/REPOSITORY_NAME/PACKAGE_NAME.\n syncWaitSecs:\n type: string\n x-dcl-go-name: SyncWaitSecs\n description: 'Period in seconds(int64 format) between consecutive\n syncs. Default: 15.'\n preventDrift:\n type: boolean\n x-dcl-go-name: PreventDrift\n description: Set to true to enable the Config Sync admission webhook\n to prevent drifts. If set to `false`, disables the Config Sync\n admission webhook and does not prevent drifts.\n x-dcl-server-default: true\n sourceFormat:\n type: string\n x-dcl-go-name: SourceFormat\n description: Specifies whether the Config Sync Repo is in \"hierarchical\"\n or \"unstructured\" mode.\n hierarchyController:\n type: object\n x-dcl-go-name: HierarchyController\n x-dcl-go-type: FeatureMembershipConfigmanagementHierarchyController\n description: Hierarchy Controller configuration for the cluster.\n x-dcl-send-empty: true\n properties:\n enableHierarchicalResourceQuota:\n type: boolean\n x-dcl-go-name: EnableHierarchicalResourceQuota\n description: Whether hierarchical resource quota is enabled in this\n cluster.\n x-dcl-send-empty: true\n enablePodTreeLabels:\n type: boolean\n x-dcl-go-name: EnablePodTreeLabels\n description: Whether pod tree labels are enabled in this cluster.\n x-dcl-send-empty: true\n enabled:\n type: boolean\n x-dcl-go-name: Enabled\n description: Whether Hierarchy Controller is enabled in this cluster.\n x-dcl-send-empty: true\n policyController:\n type: object\n x-dcl-go-name: PolicyController\n x-dcl-go-type: FeatureMembershipConfigmanagementPolicyController\n description: Policy Controller configuration for the cluster.\n properties:\n auditIntervalSeconds:\n type: string\n x-dcl-go-name: AuditIntervalSeconds\n description: Sets the interval for Policy Controller Audit Scans\n (in seconds). When set to 0, this disables audit functionality\n altogether.\n enabled:\n type: boolean\n x-dcl-go-name: Enabled\n description: Enables the installation of Policy Controller. If false,\n the rest of PolicyController fields take no effect.\n exemptableNamespaces:\n type: array\n x-dcl-go-name: ExemptableNamespaces\n description: The set of namespaces that are excluded from Policy\n Controller checks. Namespaces do not need to currently exist on\n the cluster.\n x-dcl-send-empty: true\n x-dcl-list-type: list\n items:\n type: string\n x-dcl-go-type: string\n logDeniesEnabled:\n type: boolean\n x-dcl-go-name: LogDeniesEnabled\n description: Logs all denies and dry run failures.\n monitoring:\n type: object\n x-dcl-go-name: Monitoring\n x-dcl-go-type: FeatureMembershipConfigmanagementPolicyControllerMonitoring\n description: 'Specifies the backends Policy Controller should export\n metrics to. For example, to specify metrics should be exported\n to Cloud Monitoring and Prometheus, specify backends: [\"cloudmonitoring\",\n \"prometheus\"]. Default: [\"cloudmonitoring\", \"prometheus\"]'\n x-dcl-server-default: true\n properties:\n backends:\n type: array\n x-dcl-go-name: Backends\n description: ' Specifies the list of backends Policy Controller\n will export to. Specifying an empty value `[]` disables metrics\n export.'\n x-dcl-server-default: true\n x-dcl-send-empty: true\n x-dcl-list-type: list\n items:\n type: string\n x-dcl-go-type: FeatureMembershipConfigmanagementPolicyControllerMonitoringBackendsEnum\n enum:\n - MONITORING_BACKEND_UNSPECIFIED\n - PROMETHEUS\n - CLOUD_MONITORING\n mutationEnabled:\n type: boolean\n x-dcl-go-name: MutationEnabled\n description: Enable or disable mutation in policy controller. If\n true, mutation CRDs, webhook and controller deployment will be\n deployed to the cluster.\n referentialRulesEnabled:\n type: boolean\n x-dcl-go-name: ReferentialRulesEnabled\n description: Enables the ability to use Constraint Templates that\n reference to objects other than the object currently being evaluated.\n templateLibraryInstalled:\n type: boolean\n x-dcl-go-name: TemplateLibraryInstalled\n description: Installs the default template library along with Policy\n Controller.\n version:\n type: string\n x-dcl-go-name: Version\n description: Optional. Version of ACM to install. Defaults to the latest\n version.\n x-dcl-server-default: true\n feature:\n type: string\n x-dcl-go-name: Feature\n description: The name of the feature\n x-kubernetes-immutable: true\n x-dcl-references:\n - resource: Gkehub/Feature\n field: name\n parent: true\n x-dcl-parameter: true\n location:\n type: string\n x-dcl-go-name: Location\n description: The location of the feature\n x-kubernetes-immutable: true\n x-dcl-parameter: true\n membership:\n type: string\n x-dcl-go-name: Membership\n description: The name of the membership\n x-kubernetes-immutable: true\n x-dcl-references:\n - resource: Gkehub/Membership\n field: name\n x-dcl-parameter: true\n membershipLocation:\n type: string\n x-dcl-go-name: MembershipLocation\n description: The location of the membership\n x-kubernetes-immutable: true\n x-dcl-parameter: true\n mesh:\n type: object\n x-dcl-go-name: Mesh\n x-dcl-go-type: FeatureMembershipMesh\n description: Manage Mesh Features\n properties:\n controlPlane:\n type: string\n x-dcl-go-name: ControlPlane\n x-dcl-go-type: FeatureMembershipMeshControlPlaneEnum\n description: '**DEPRECATED** Whether to automatically manage Service\n Mesh control planes. Possible values: CONTROL_PLANE_MANAGEMENT_UNSPECIFIED,\n AUTOMATIC, MANUAL'\n enum:\n - CONTROL_PLANE_MANAGEMENT_UNSPECIFIED\n - AUTOMATIC\n - MANUAL\n management:\n type: string\n x-dcl-go-name: Management\n x-dcl-go-type: FeatureMembershipMeshManagementEnum\n description: 'Whether to automatically manage Service Mesh. Possible\n values: MANAGEMENT_UNSPECIFIED, MANAGEMENT_AUTOMATIC, MANAGEMENT_MANUAL'\n enum:\n - MANAGEMENT_UNSPECIFIED\n - MANAGEMENT_AUTOMATIC\n - MANAGEMENT_MANUAL\n policycontroller:\n type: object\n x-dcl-go-name: Policycontroller\n x-dcl-go-type: FeatureMembershipPolicycontroller\n description: Policy Controller-specific spec.\n required:\n - policyControllerHubConfig\n properties:\n policyControllerHubConfig:\n type: object\n x-dcl-go-name: PolicyControllerHubConfig\n x-dcl-go-type: FeatureMembershipPolicycontrollerPolicyControllerHubConfig\n description: Policy Controller configuration for the cluster.\n properties:\n auditIntervalSeconds:\n type: integer\n format: int64\n x-dcl-go-name: AuditIntervalSeconds\n description: Sets the interval for Policy Controller Audit Scans\n (in seconds). When set to 0, this disables audit functionality\n altogether.\n constraintViolationLimit:\n type: integer\n format: int64\n x-dcl-go-name: ConstraintViolationLimit\n description: The maximum number of audit violations to be stored\n in a constraint. If not set, the internal default of 20 will be\n used.\n deploymentConfigs:\n type: object\n additionalProperties:\n type: object\n x-dcl-go-type: FeatureMembershipPolicycontrollerPolicyControllerHubConfigDeploymentConfigs\n properties:\n containerResources:\n type: object\n x-dcl-go-name: ContainerResources\n x-dcl-go-type: FeatureMembershipPolicycontrollerPolicyControllerHubConfigDeploymentConfigsContainerResources\n description: Container resource requirements.\n x-dcl-conflicts:\n - replicaCount\n - podAffinity\n - podTolerations\n properties:\n limits:\n type: object\n x-dcl-go-name: Limits\n x-dcl-go-type: FeatureMembershipPolicycontrollerPolicyControllerHubConfigDeploymentConfigsContainerResourcesLimits\n description: Limits describes the maximum amount of compute\n resources allowed for use by the running container.\n properties:\n cpu:\n type: string\n x-dcl-go-name: Cpu\n description: CPU requirement expressed in Kubernetes\n resource units.\n memory:\n type: string\n x-dcl-go-name: Memory\n description: Memory requirement expressed in Kubernetes\n resource units.\n requests:\n type: object\n x-dcl-go-name: Requests\n x-dcl-go-type: FeatureMembershipPolicycontrollerPolicyControllerHubConfigDeploymentConfigsContainerResourcesRequests\n description: Requests describes the amount of compute\n resources reserved for the container by the kube-scheduler.\n properties:\n cpu:\n type: string\n x-dcl-go-name: Cpu\n description: CPU requirement expressed in Kubernetes\n resource units.\n memory:\n type: string\n x-dcl-go-name: Memory\n description: Memory requirement expressed in Kubernetes\n resource units.\n podAffinity:\n type: string\n x-dcl-go-name: PodAffinity\n x-dcl-go-type: FeatureMembershipPolicycontrollerPolicyControllerHubConfigDeploymentConfigsPodAffinityEnum\n description: 'Pod affinity configuration. Possible values:\n AFFINITY_UNSPECIFIED, NO_AFFINITY, ANTI_AFFINITY'\n x-dcl-conflicts:\n - replicaCount\n - containerResources\n - podTolerations\n enum:\n - AFFINITY_UNSPECIFIED\n - NO_AFFINITY\n - ANTI_AFFINITY\n podTolerations:\n type: array\n x-dcl-go-name: PodTolerations\n description: Pod tolerations of node taints.\n x-dcl-conflicts:\n - replicaCount\n - containerResources\n - podAffinity\n x-dcl-send-empty: true\n x-dcl-list-type: list\n items:\n type: object\n x-dcl-go-type: FeatureMembershipPolicycontrollerPolicyControllerHubConfigDeploymentConfigsPodTolerations\n properties:\n effect:\n type: string\n x-dcl-go-name: Effect\n description: Matches a taint effect.\n key:\n type: string\n x-dcl-go-name: Key\n description: Matches a taint key (not necessarily unique).\n operator:\n type: string\n x-dcl-go-name: Operator\n description: Matches a taint operator.\n value:\n type: string\n x-dcl-go-name: Value\n description: Matches a taint value.\n replicaCount:\n type: integer\n format: int64\n x-dcl-go-name: ReplicaCount\n description: Pod replica count.\n x-dcl-conflicts:\n - containerResources\n - podAffinity\n - podTolerations\n x-dcl-go-name: DeploymentConfigs\n description: Map of deployment configs to deployments (\"admission\",\n \"audit\", \"mutation\").\n x-dcl-server-default: true\n exemptableNamespaces:\n type: array\n x-dcl-go-name: ExemptableNamespaces\n description: The set of namespaces that are excluded from Policy\n Controller checks. Namespaces do not need to currently exist on\n the cluster.\n x-dcl-send-empty: true\n x-dcl-list-type: list\n items:\n type: string\n x-dcl-go-type: string\n installSpec:\n type: string\n x-dcl-go-name: InstallSpec\n x-dcl-go-type: FeatureMembershipPolicycontrollerPolicyControllerHubConfigInstallSpecEnum\n description: 'Configures the mode of the Policy Controller installation.\n Possible values: INSTALL_SPEC_UNSPECIFIED, INSTALL_SPEC_NOT_INSTALLED,\n INSTALL_SPEC_ENABLED, INSTALL_SPEC_SUSPENDED, INSTALL_SPEC_DETACHED'\n enum:\n - INSTALL_SPEC_UNSPECIFIED\n - INSTALL_SPEC_NOT_INSTALLED\n - INSTALL_SPEC_ENABLED\n - INSTALL_SPEC_SUSPENDED\n - INSTALL_SPEC_DETACHED\n logDeniesEnabled:\n type: boolean\n x-dcl-go-name: LogDeniesEnabled\n description: Logs all denies and dry run failures.\n monitoring:\n type: object\n x-dcl-go-name: Monitoring\n x-dcl-go-type: FeatureMembershipPolicycontrollerPolicyControllerHubConfigMonitoring\n description: 'Specifies the backends Policy Controller should export\n metrics to. For example, to specify metrics should be exported\n to Cloud Monitoring and Prometheus, specify backends: [\"cloudmonitoring\",\n \"prometheus\"]. Default: [\"cloudmonitoring\", \"prometheus\"]'\n x-dcl-server-default: true\n properties:\n backends:\n type: array\n x-dcl-go-name: Backends\n description: ' Specifies the list of backends Policy Controller\n will export to. Specifying an empty value `[]` disables metrics\n export.'\n x-dcl-server-default: true\n x-dcl-send-empty: true\n x-dcl-list-type: list\n items:\n type: string\n x-dcl-go-type: FeatureMembershipPolicycontrollerPolicyControllerHubConfigMonitoringBackendsEnum\n enum:\n - MONITORING_BACKEND_UNSPECIFIED\n - PROMETHEUS\n - CLOUD_MONITORING\n mutationEnabled:\n type: boolean\n x-dcl-go-name: MutationEnabled\n description: Enables the ability to mutate resources using Policy\n Controller.\n policyContent:\n type: object\n x-dcl-go-name: PolicyContent\n x-dcl-go-type: FeatureMembershipPolicycontrollerPolicyControllerHubConfigPolicyContent\n description: Specifies the desired policy content on the cluster.\n x-dcl-server-default: true\n properties:\n bundles:\n type: object\n additionalProperties:\n type: object\n x-dcl-go-type: FeatureMembershipPolicycontrollerPolicyControllerHubConfigPolicyContentBundles\n properties:\n exemptedNamespaces:\n type: array\n x-dcl-go-name: ExemptedNamespaces\n description: The set of namespaces to be exempted from\n the bundle.\n x-dcl-send-empty: true\n x-dcl-list-type: list\n items:\n type: string\n x-dcl-go-type: string\n x-dcl-go-name: Bundles\n description: map of bundle name to BundleInstallSpec. The bundle\n name maps to the `bundleName` key in the `policycontroller.gke.io/constraintData`\n annotation on a constraint.\n templateLibrary:\n type: object\n x-dcl-go-name: TemplateLibrary\n x-dcl-go-type: FeatureMembershipPolicycontrollerPolicyControllerHubConfigPolicyContentTemplateLibrary\n description: Configures the installation of the Template Library.\n x-dcl-server-default: true\n properties:\n installation:\n type: string\n x-dcl-go-name: Installation\n x-dcl-go-type: FeatureMembershipPolicycontrollerPolicyControllerHubConfigPolicyContentTemplateLibraryInstallationEnum\n description: 'Configures the manner in which the template\n library is installed on the cluster. Possible values:\n INSTALLATION_UNSPECIFIED, NOT_INSTALLED, ALL'\n enum:\n - INSTALLATION_UNSPECIFIED\n - NOT_INSTALLED\n - ALL\n referentialRulesEnabled:\n type: boolean\n x-dcl-go-name: ReferentialRulesEnabled\n description: Enables the ability to use Constraint Templates that\n reference to objects other than the object currently being evaluated.\n version:\n type: string\n x-dcl-go-name: Version\n description: Optional. Version of Policy Controller to install. Defaults\n to the latest version.\n x-dcl-server-default: true\n project:\n type: string\n x-dcl-go-name: Project\n description: The project of the feature\n x-kubernetes-immutable: true\n x-dcl-references:\n - resource: Cloudresourcemanager/Project\n field: name\n parent: true\n x-dcl-parameter: true\n") +var YAML_feature_membership = []byte("info:\n title: GkeHub/FeatureMembership\n description: The GkeHub FeatureMembership resource\n x-dcl-struct-name: FeatureMembership\n x-dcl-has-iam: false\n x-dcl-mutex: '{{project}}/{{location}}/{{feature}}'\npaths:\n get:\n description: The function used to get information about a FeatureMembership\n parameters:\n - name: featureMembership\n required: true\n description: A full instance of a FeatureMembership\n apply:\n description: The function used to apply information about a FeatureMembership\n parameters:\n - name: featureMembership\n required: true\n description: A full instance of a FeatureMembership\n delete:\n description: The function used to delete a FeatureMembership\n parameters:\n - name: featureMembership\n required: true\n description: A full instance of a FeatureMembership\n deleteAll:\n description: The function used to delete all FeatureMembership\n parameters:\n - name: project\n required: true\n schema:\n type: string\n - name: location\n required: true\n schema:\n type: string\n - name: feature\n required: true\n schema:\n type: string\n list:\n description: The function used to list information about many FeatureMembership\n parameters:\n - name: project\n required: true\n schema:\n type: string\n - name: location\n required: true\n schema:\n type: string\n - name: feature\n required: true\n schema:\n type: string\ncomponents:\n schemas:\n FeatureMembership:\n title: FeatureMembership\n x-dcl-id: projects/{{project}}/locations/{{location}}/features/{{feature}}/memberships/{{membership}}\n x-dcl-parent-container: project\n x-dcl-has-create: true\n x-dcl-has-iam: false\n x-dcl-read-timeout: 0\n x-dcl-apply-timeout: 0\n x-dcl-delete-timeout: 0\n type: object\n required:\n - project\n - location\n - feature\n - membership\n properties:\n configmanagement:\n type: object\n x-dcl-go-name: Configmanagement\n x-dcl-go-type: FeatureMembershipConfigmanagement\n description: Config Management-specific spec.\n properties:\n binauthz:\n type: object\n x-dcl-go-name: Binauthz\n x-dcl-go-type: FeatureMembershipConfigmanagementBinauthz\n description: '**DEPRECATED** Binauthz configuration for the cluster.\n This field will be ignored and should not be set.'\n x-dcl-server-default: true\n properties:\n enabled:\n type: boolean\n x-dcl-go-name: Enabled\n description: Whether binauthz is enabled in this cluster.\n x-dcl-parameter: true\n configSync:\n type: object\n x-dcl-go-name: ConfigSync\n x-dcl-go-type: FeatureMembershipConfigmanagementConfigSync\n description: Config Sync configuration for the cluster.\n x-dcl-send-empty: true\n properties:\n enabled:\n type: boolean\n x-dcl-go-name: Enabled\n description: Enables the installation of ConfigSync. If set to true,\n ConfigSync resources will be created and the other ConfigSync\n fields will be applied if exist. If set to false, all other ConfigSync\n fields will be ignored, ConfigSync resources will be deleted.\n If omitted, ConfigSync resources will be managed depends on the\n presence of the git or oci field.\n git:\n type: object\n x-dcl-go-name: Git\n x-dcl-go-type: FeatureMembershipConfigmanagementConfigSyncGit\n properties:\n gcpServiceAccountEmail:\n type: string\n x-dcl-go-name: GcpServiceAccountEmail\n description: The GCP Service Account Email used for auth when\n secretType is gcpServiceAccount.\n x-dcl-references:\n - resource: Iam/ServiceAccount\n field: email\n httpsProxy:\n type: string\n x-dcl-go-name: HttpsProxy\n description: URL for the HTTPS proxy to be used when communicating\n with the Git repo.\n policyDir:\n type: string\n x-dcl-go-name: PolicyDir\n description: 'The path within the Git repository that represents\n the top level of the repo to sync. Default: the root directory\n of the repository.'\n secretType:\n type: string\n x-dcl-go-name: SecretType\n description: Type of secret configured for access to the Git\n repo. Must be one of ssh, cookiefile, gcenode, token, gcpserviceaccount\n or none. The validation of this is case-sensitive.\n syncBranch:\n type: string\n x-dcl-go-name: SyncBranch\n description: 'The branch of the repository to sync from. Default:\n master.'\n syncRepo:\n type: string\n x-dcl-go-name: SyncRepo\n description: The URL of the Git repository to use as the source\n of truth.\n syncRev:\n type: string\n x-dcl-go-name: SyncRev\n description: Git revision (tag or hash) to check out. Default\n HEAD.\n syncWaitSecs:\n type: string\n x-dcl-go-name: SyncWaitSecs\n description: 'Period in seconds between consecutive syncs. Default:\n 15.'\n metricsGcpServiceAccountEmail:\n type: string\n x-dcl-go-name: MetricsGcpServiceAccountEmail\n description: The Email of the Google Cloud Service Account (GSA)\n used for exporting Config Sync metrics to Cloud Monitoring. The\n GSA should have the Monitoring Metric Writer(roles/monitoring.metricWriter)\n IAM role. The Kubernetes ServiceAccount `default` in the namespace\n `config-management-monitoring` should be bound to the GSA.\n x-dcl-references:\n - resource: Iam/ServiceAccount\n field: email\n oci:\n type: object\n x-dcl-go-name: Oci\n x-dcl-go-type: FeatureMembershipConfigmanagementConfigSyncOci\n properties:\n gcpServiceAccountEmail:\n type: string\n x-dcl-go-name: GcpServiceAccountEmail\n description: 'The GCP Service Account Email used for auth when\n secret_type is gcpserviceaccount. '\n x-dcl-references:\n - resource: Iam/ServiceAccount\n field: email\n policyDir:\n type: string\n x-dcl-go-name: PolicyDir\n description: 'The absolute path of the directory that contains\n the local resources. Default: the root directory of the image.'\n secretType:\n type: string\n x-dcl-go-name: SecretType\n description: Type of secret configured for access to the OCI\n Image. Must be one of gcenode, gcpserviceaccount or none.\n The validation of this is case-sensitive.\n syncRepo:\n type: string\n x-dcl-go-name: SyncRepo\n description: The OCI image repository URL for the package to\n sync from. e.g. LOCATION-docker.pkg.dev/PROJECT_ID/REPOSITORY_NAME/PACKAGE_NAME.\n syncWaitSecs:\n type: string\n x-dcl-go-name: SyncWaitSecs\n description: 'Period in seconds(int64 format) between consecutive\n syncs. Default: 15.'\n preventDrift:\n type: boolean\n x-dcl-go-name: PreventDrift\n description: Set to true to enable the Config Sync admission webhook\n to prevent drifts. If set to `false`, disables the Config Sync\n admission webhook and does not prevent drifts.\n x-dcl-server-default: true\n sourceFormat:\n type: string\n x-dcl-go-name: SourceFormat\n description: Specifies whether the Config Sync Repo is in \"hierarchical\"\n or \"unstructured\" mode.\n hierarchyController:\n type: object\n x-dcl-go-name: HierarchyController\n x-dcl-go-type: FeatureMembershipConfigmanagementHierarchyController\n description: Hierarchy Controller configuration for the cluster.\n x-dcl-send-empty: true\n properties:\n enableHierarchicalResourceQuota:\n type: boolean\n x-dcl-go-name: EnableHierarchicalResourceQuota\n description: Whether hierarchical resource quota is enabled in this\n cluster.\n x-dcl-send-empty: true\n enablePodTreeLabels:\n type: boolean\n x-dcl-go-name: EnablePodTreeLabels\n description: Whether pod tree labels are enabled in this cluster.\n x-dcl-send-empty: true\n enabled:\n type: boolean\n x-dcl-go-name: Enabled\n description: Whether Hierarchy Controller is enabled in this cluster.\n x-dcl-send-empty: true\n management:\n type: string\n x-dcl-go-name: Management\n x-dcl-go-type: FeatureMembershipConfigmanagementManagementEnum\n description: Set this field to MANAGEMENT_AUTOMATIC to enable Config\n Sync auto-upgrades, and set this field to MANAGEMENT_MANUAL or MANAGEMENT_UNSPECIFIED\n to disable Config Sync auto-upgrades.\n x-dcl-server-default: true\n enum:\n - MANAGEMENT_UNSPECIFIED\n - MANAGEMENT_AUTOMATIC\n - MANAGEMENT_MANUAL\n policyController:\n type: object\n x-dcl-go-name: PolicyController\n x-dcl-go-type: FeatureMembershipConfigmanagementPolicyController\n description: Policy Controller configuration for the cluster.\n properties:\n auditIntervalSeconds:\n type: string\n x-dcl-go-name: AuditIntervalSeconds\n description: Sets the interval for Policy Controller Audit Scans\n (in seconds). When set to 0, this disables audit functionality\n altogether.\n enabled:\n type: boolean\n x-dcl-go-name: Enabled\n description: Enables the installation of Policy Controller. If false,\n the rest of PolicyController fields take no effect.\n exemptableNamespaces:\n type: array\n x-dcl-go-name: ExemptableNamespaces\n description: The set of namespaces that are excluded from Policy\n Controller checks. Namespaces do not need to currently exist on\n the cluster.\n x-dcl-send-empty: true\n x-dcl-list-type: list\n items:\n type: string\n x-dcl-go-type: string\n logDeniesEnabled:\n type: boolean\n x-dcl-go-name: LogDeniesEnabled\n description: Logs all denies and dry run failures.\n monitoring:\n type: object\n x-dcl-go-name: Monitoring\n x-dcl-go-type: FeatureMembershipConfigmanagementPolicyControllerMonitoring\n description: 'Specifies the backends Policy Controller should export\n metrics to. For example, to specify metrics should be exported\n to Cloud Monitoring and Prometheus, specify backends: [\"cloudmonitoring\",\n \"prometheus\"]. Default: [\"cloudmonitoring\", \"prometheus\"]'\n x-dcl-server-default: true\n properties:\n backends:\n type: array\n x-dcl-go-name: Backends\n description: ' Specifies the list of backends Policy Controller\n will export to. Specifying an empty value `[]` disables metrics\n export.'\n x-dcl-server-default: true\n x-dcl-send-empty: true\n x-dcl-list-type: list\n items:\n type: string\n x-dcl-go-type: FeatureMembershipConfigmanagementPolicyControllerMonitoringBackendsEnum\n enum:\n - MONITORING_BACKEND_UNSPECIFIED\n - PROMETHEUS\n - CLOUD_MONITORING\n mutationEnabled:\n type: boolean\n x-dcl-go-name: MutationEnabled\n description: Enable or disable mutation in policy controller. If\n true, mutation CRDs, webhook and controller deployment will be\n deployed to the cluster.\n referentialRulesEnabled:\n type: boolean\n x-dcl-go-name: ReferentialRulesEnabled\n description: Enables the ability to use Constraint Templates that\n reference to objects other than the object currently being evaluated.\n templateLibraryInstalled:\n type: boolean\n x-dcl-go-name: TemplateLibraryInstalled\n description: Installs the default template library along with Policy\n Controller.\n version:\n type: string\n x-dcl-go-name: Version\n description: Optional. Version of ACM to install. Defaults to the latest\n version.\n x-dcl-server-default: true\n feature:\n type: string\n x-dcl-go-name: Feature\n description: The name of the feature\n x-kubernetes-immutable: true\n x-dcl-references:\n - resource: Gkehub/Feature\n field: name\n parent: true\n x-dcl-parameter: true\n location:\n type: string\n x-dcl-go-name: Location\n description: The location of the feature\n x-kubernetes-immutable: true\n x-dcl-parameter: true\n membership:\n type: string\n x-dcl-go-name: Membership\n description: The name of the membership\n x-kubernetes-immutable: true\n x-dcl-references:\n - resource: Gkehub/Membership\n field: name\n x-dcl-parameter: true\n membershipLocation:\n type: string\n x-dcl-go-name: MembershipLocation\n description: The location of the membership\n x-kubernetes-immutable: true\n x-dcl-parameter: true\n mesh:\n type: object\n x-dcl-go-name: Mesh\n x-dcl-go-type: FeatureMembershipMesh\n description: Manage Mesh Features\n properties:\n controlPlane:\n type: string\n x-dcl-go-name: ControlPlane\n x-dcl-go-type: FeatureMembershipMeshControlPlaneEnum\n description: '**DEPRECATED** Whether to automatically manage Service\n Mesh control planes. Possible values: CONTROL_PLANE_MANAGEMENT_UNSPECIFIED,\n AUTOMATIC, MANUAL'\n enum:\n - CONTROL_PLANE_MANAGEMENT_UNSPECIFIED\n - AUTOMATIC\n - MANUAL\n management:\n type: string\n x-dcl-go-name: Management\n x-dcl-go-type: FeatureMembershipMeshManagementEnum\n description: 'Whether to automatically manage Service Mesh. Possible\n values: MANAGEMENT_UNSPECIFIED, MANAGEMENT_AUTOMATIC, MANAGEMENT_MANUAL'\n enum:\n - MANAGEMENT_UNSPECIFIED\n - MANAGEMENT_AUTOMATIC\n - MANAGEMENT_MANUAL\n policycontroller:\n type: object\n x-dcl-go-name: Policycontroller\n x-dcl-go-type: FeatureMembershipPolicycontroller\n description: Policy Controller-specific spec.\n required:\n - policyControllerHubConfig\n properties:\n policyControllerHubConfig:\n type: object\n x-dcl-go-name: PolicyControllerHubConfig\n x-dcl-go-type: FeatureMembershipPolicycontrollerPolicyControllerHubConfig\n description: Policy Controller configuration for the cluster.\n properties:\n auditIntervalSeconds:\n type: integer\n format: int64\n x-dcl-go-name: AuditIntervalSeconds\n description: Sets the interval for Policy Controller Audit Scans\n (in seconds). When set to 0, this disables audit functionality\n altogether.\n constraintViolationLimit:\n type: integer\n format: int64\n x-dcl-go-name: ConstraintViolationLimit\n description: The maximum number of audit violations to be stored\n in a constraint. If not set, the internal default of 20 will be\n used.\n deploymentConfigs:\n type: object\n additionalProperties:\n type: object\n x-dcl-go-type: FeatureMembershipPolicycontrollerPolicyControllerHubConfigDeploymentConfigs\n properties:\n containerResources:\n type: object\n x-dcl-go-name: ContainerResources\n x-dcl-go-type: FeatureMembershipPolicycontrollerPolicyControllerHubConfigDeploymentConfigsContainerResources\n description: Container resource requirements.\n x-dcl-conflicts:\n - replicaCount\n - podAffinity\n - podTolerations\n properties:\n limits:\n type: object\n x-dcl-go-name: Limits\n x-dcl-go-type: FeatureMembershipPolicycontrollerPolicyControllerHubConfigDeploymentConfigsContainerResourcesLimits\n description: Limits describes the maximum amount of compute\n resources allowed for use by the running container.\n properties:\n cpu:\n type: string\n x-dcl-go-name: Cpu\n description: CPU requirement expressed in Kubernetes\n resource units.\n memory:\n type: string\n x-dcl-go-name: Memory\n description: Memory requirement expressed in Kubernetes\n resource units.\n requests:\n type: object\n x-dcl-go-name: Requests\n x-dcl-go-type: FeatureMembershipPolicycontrollerPolicyControllerHubConfigDeploymentConfigsContainerResourcesRequests\n description: Requests describes the amount of compute\n resources reserved for the container by the kube-scheduler.\n properties:\n cpu:\n type: string\n x-dcl-go-name: Cpu\n description: CPU requirement expressed in Kubernetes\n resource units.\n memory:\n type: string\n x-dcl-go-name: Memory\n description: Memory requirement expressed in Kubernetes\n resource units.\n podAffinity:\n type: string\n x-dcl-go-name: PodAffinity\n x-dcl-go-type: FeatureMembershipPolicycontrollerPolicyControllerHubConfigDeploymentConfigsPodAffinityEnum\n description: 'Pod affinity configuration. Possible values:\n AFFINITY_UNSPECIFIED, NO_AFFINITY, ANTI_AFFINITY'\n x-dcl-conflicts:\n - replicaCount\n - containerResources\n - podTolerations\n enum:\n - AFFINITY_UNSPECIFIED\n - NO_AFFINITY\n - ANTI_AFFINITY\n podTolerations:\n type: array\n x-dcl-go-name: PodTolerations\n description: Pod tolerations of node taints.\n x-dcl-conflicts:\n - replicaCount\n - containerResources\n - podAffinity\n x-dcl-send-empty: true\n x-dcl-list-type: list\n items:\n type: object\n x-dcl-go-type: FeatureMembershipPolicycontrollerPolicyControllerHubConfigDeploymentConfigsPodTolerations\n properties:\n effect:\n type: string\n x-dcl-go-name: Effect\n description: Matches a taint effect.\n key:\n type: string\n x-dcl-go-name: Key\n description: Matches a taint key (not necessarily unique).\n operator:\n type: string\n x-dcl-go-name: Operator\n description: Matches a taint operator.\n value:\n type: string\n x-dcl-go-name: Value\n description: Matches a taint value.\n replicaCount:\n type: integer\n format: int64\n x-dcl-go-name: ReplicaCount\n description: Pod replica count.\n x-dcl-conflicts:\n - containerResources\n - podAffinity\n - podTolerations\n x-dcl-go-name: DeploymentConfigs\n description: Map of deployment configs to deployments (\"admission\",\n \"audit\", \"mutation\").\n x-dcl-server-default: true\n exemptableNamespaces:\n type: array\n x-dcl-go-name: ExemptableNamespaces\n description: The set of namespaces that are excluded from Policy\n Controller checks. Namespaces do not need to currently exist on\n the cluster.\n x-dcl-send-empty: true\n x-dcl-list-type: list\n items:\n type: string\n x-dcl-go-type: string\n installSpec:\n type: string\n x-dcl-go-name: InstallSpec\n x-dcl-go-type: FeatureMembershipPolicycontrollerPolicyControllerHubConfigInstallSpecEnum\n description: 'Configures the mode of the Policy Controller installation.\n Possible values: INSTALL_SPEC_UNSPECIFIED, INSTALL_SPEC_NOT_INSTALLED,\n INSTALL_SPEC_ENABLED, INSTALL_SPEC_SUSPENDED, INSTALL_SPEC_DETACHED'\n enum:\n - INSTALL_SPEC_UNSPECIFIED\n - INSTALL_SPEC_NOT_INSTALLED\n - INSTALL_SPEC_ENABLED\n - INSTALL_SPEC_SUSPENDED\n - INSTALL_SPEC_DETACHED\n logDeniesEnabled:\n type: boolean\n x-dcl-go-name: LogDeniesEnabled\n description: Logs all denies and dry run failures.\n monitoring:\n type: object\n x-dcl-go-name: Monitoring\n x-dcl-go-type: FeatureMembershipPolicycontrollerPolicyControllerHubConfigMonitoring\n description: 'Specifies the backends Policy Controller should export\n metrics to. For example, to specify metrics should be exported\n to Cloud Monitoring and Prometheus, specify backends: [\"cloudmonitoring\",\n \"prometheus\"]. Default: [\"cloudmonitoring\", \"prometheus\"]'\n x-dcl-server-default: true\n properties:\n backends:\n type: array\n x-dcl-go-name: Backends\n description: ' Specifies the list of backends Policy Controller\n will export to. Specifying an empty value `[]` disables metrics\n export.'\n x-dcl-server-default: true\n x-dcl-send-empty: true\n x-dcl-list-type: list\n items:\n type: string\n x-dcl-go-type: FeatureMembershipPolicycontrollerPolicyControllerHubConfigMonitoringBackendsEnum\n enum:\n - MONITORING_BACKEND_UNSPECIFIED\n - PROMETHEUS\n - CLOUD_MONITORING\n mutationEnabled:\n type: boolean\n x-dcl-go-name: MutationEnabled\n description: Enables the ability to mutate resources using Policy\n Controller.\n policyContent:\n type: object\n x-dcl-go-name: PolicyContent\n x-dcl-go-type: FeatureMembershipPolicycontrollerPolicyControllerHubConfigPolicyContent\n description: Specifies the desired policy content on the cluster.\n x-dcl-server-default: true\n properties:\n bundles:\n type: object\n additionalProperties:\n type: object\n x-dcl-go-type: FeatureMembershipPolicycontrollerPolicyControllerHubConfigPolicyContentBundles\n properties:\n exemptedNamespaces:\n type: array\n x-dcl-go-name: ExemptedNamespaces\n description: The set of namespaces to be exempted from\n the bundle.\n x-dcl-send-empty: true\n x-dcl-list-type: list\n items:\n type: string\n x-dcl-go-type: string\n x-dcl-go-name: Bundles\n description: map of bundle name to BundleInstallSpec. The bundle\n name maps to the `bundleName` key in the `policycontroller.gke.io/constraintData`\n annotation on a constraint.\n templateLibrary:\n type: object\n x-dcl-go-name: TemplateLibrary\n x-dcl-go-type: FeatureMembershipPolicycontrollerPolicyControllerHubConfigPolicyContentTemplateLibrary\n description: Configures the installation of the Template Library.\n x-dcl-server-default: true\n properties:\n installation:\n type: string\n x-dcl-go-name: Installation\n x-dcl-go-type: FeatureMembershipPolicycontrollerPolicyControllerHubConfigPolicyContentTemplateLibraryInstallationEnum\n description: 'Configures the manner in which the template\n library is installed on the cluster. Possible values:\n INSTALLATION_UNSPECIFIED, NOT_INSTALLED, ALL'\n enum:\n - INSTALLATION_UNSPECIFIED\n - NOT_INSTALLED\n - ALL\n referentialRulesEnabled:\n type: boolean\n x-dcl-go-name: ReferentialRulesEnabled\n description: Enables the ability to use Constraint Templates that\n reference to objects other than the object currently being evaluated.\n version:\n type: string\n x-dcl-go-name: Version\n description: Optional. Version of Policy Controller to install. Defaults\n to the latest version.\n x-dcl-server-default: true\n project:\n type: string\n x-dcl-go-name: Project\n description: The project of the feature\n x-kubernetes-immutable: true\n x-dcl-references:\n - resource: Cloudresourcemanager/Project\n field: name\n parent: true\n x-dcl-parameter: true\n") -// 30146 bytes -// MD5: 83a10e0d3784ce78d058e07c927c7bd7 +// 30724 bytes +// MD5: 9e1c78f9c97b3d50f6a6a81a70874fc3 diff --git a/services/google/gkehub/samples/acm_auto_upgrade.feature_membership.json b/services/google/gkehub/samples/acm_auto_upgrade.feature_membership.json new file mode 100755 index 000000000..50ceae397 --- /dev/null +++ b/services/google/gkehub/samples/acm_auto_upgrade.feature_membership.json @@ -0,0 +1,23 @@ +{ + "project": "{{ref:gkehub.serviceusage.service.json:project}}", + "location": "global", + "feature": "projects/{{ref:acm.feature.json:project}}/locations/{{ref:acm.feature.json:location}}/features/{{ref:acm.feature.json:name}}", + "membership": "{{ref:first.membership.json:name}}", + "membershipLocation": "global", + "configmanagement": { + "configSync": { + "git": { + "syncRepo": "https://github.com/GoogleCloudPlatform/cloud-foundation-toolkit", + "syncBranch": "master", + "policyDir": "config-connector", + "syncWaitSecs": "20", + "syncRev": "HEAD", + "secretType": "gcpserviceaccount", + "httpsProxy": "https://sample-proxy.com", + "gcpServiceAccountEmail": "{{ref:first.iam.service_account.json:email}}" + }, + "preventDrift": true + }, + "management": "MANAGEMENT_AUTOMATIC" + } +} diff --git a/services/google/gkehub/samples/acm_auto_upgrade_feature_membership.yaml b/services/google/gkehub/samples/acm_auto_upgrade_feature_membership.yaml new file mode 100755 index 000000000..262f2f80b --- /dev/null +++ b/services/google/gkehub/samples/acm_auto_upgrade_feature_membership.yaml @@ -0,0 +1,78 @@ +# Copyright 2024 Google LLC. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +name: acm_auto_upgrade_feature_membership +description: A example for a GKEHub acm feature membership - auto upgrade +type: feature_membership +versions: +- beta +resource: samples/acm_auto_upgrade.feature_membership.json +dependencies: +- samples/acm.feature.json +- samples/first.membership.json +- samples/first.container.cluster.json +- samples/first.iam.service_account.json +- samples/second.iam.service_account.json +- samples/anthosconfigmanagement.serviceusage.service.json +- samples/gkehub.serviceusage.service.json +- samples/container.serviceusage.service.json +- samples/basic.cloudbilling.project_billing_info.json +- samples/basic.cloudresourcemanager.project.json +- samples/anthos.serviceusage.service.json +updates: +- resource: samples/update_1_acm_auto_upgrade.feature_membership.json + dependencies: + - samples/update_acm.feature.json +- resource: samples/update_2_acm.feature_membership.json + dependencies: + - samples/acm.feature.json + - samples/first.membership.json + - samples/first.container.cluster.json + - samples/first.iam.service_account.json + - samples/second.iam.service_account.json + - samples/anthosconfigmanagement.serviceusage.service.json + - samples/gkehub.serviceusage.service.json + - samples/container.serviceusage.service.json + - samples/basic.cloudbilling.project_billing_info.json + - samples/basic.cloudresourcemanager.project.json + - samples/anthos.serviceusage.service.json +- resource: samples/update_3_acm.feature_membership.json + dependencies: + - samples/acm.feature.json + - samples/first.membership.json + - samples/first.container.cluster.json + - samples/first.iam.service_account.json + - samples/second.iam.service_account.json + - samples/anthosconfigmanagement.serviceusage.service.json + - samples/gkehub.serviceusage.service.json + - samples/container.serviceusage.service.json + - samples/basic.cloudbilling.project_billing_info.json + - samples/basic.cloudresourcemanager.project.json + - samples/anthos.serviceusage.service.json +variables: +- name: billing_account + type: billing_account +- name: cluster1 + type: resource_name +- name: id + type: resource_name +- name: id1 + type: resource_name +- name: id2 + type: resource_name +- name: membership1 + type: resource_name +- name: org_id + type: org_id +- name: zone + type: zone diff --git a/services/google/gkehub/samples/acm_auto_upgrade_feature_membership_ga.yaml b/services/google/gkehub/samples/acm_auto_upgrade_feature_membership_ga.yaml new file mode 100755 index 000000000..3b40fb8fa --- /dev/null +++ b/services/google/gkehub/samples/acm_auto_upgrade_feature_membership_ga.yaml @@ -0,0 +1,78 @@ +# Copyright 2024 Google LLC. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +name: acm_auto_upgrade_feature_membership_ga +description: A example for a GKEHub acm feature membership - auto upgrade +type: feature_membership +versions: +- ga +resource: samples/acm_auto_upgrade.feature_membership.json +dependencies: +- samples/acm.feature.json +- samples/first.membership.json +- samples/first.container.cluster.json +- samples/first.iam.service_account.json +- samples/second.iam.service_account.json +- samples/anthosconfigmanagement.serviceusage.service.json +- samples/gkehub.serviceusage.service.json +- samples/container.serviceusage.service.json +- samples/basic.cloudbilling.project_billing_info.json +- samples/basic.cloudresourcemanager.project.json +- samples/anthos.serviceusage.service.json +updates: +- resource: samples/update_1_acm_auto_upgrade.feature_membership.json + dependencies: + - samples/update_acm.feature.json +- resource: samples/update_2_acm.feature_membership.json + dependencies: + - samples/acm.feature.json + - samples/first.membership.json + - samples/first.container.cluster.json + - samples/first.iam.service_account.json + - samples/second.iam.service_account.json + - samples/anthosconfigmanagement.serviceusage.service.json + - samples/gkehub.serviceusage.service.json + - samples/container.serviceusage.service.json + - samples/basic.cloudbilling.project_billing_info.json + - samples/basic.cloudresourcemanager.project.json + - samples/anthos.serviceusage.service.json +- resource: samples/update_3_acm.feature_membership.json + dependencies: + - samples/acm.feature.json + - samples/first.membership.json + - samples/first.container.cluster.json + - samples/first.iam.service_account.json + - samples/second.iam.service_account.json + - samples/anthosconfigmanagement.serviceusage.service.json + - samples/gkehub.serviceusage.service.json + - samples/container.serviceusage.service.json + - samples/basic.cloudbilling.project_billing_info.json + - samples/basic.cloudresourcemanager.project.json + - samples/anthos.serviceusage.service.json +variables: +- name: billing_account + type: billing_account +- name: cluster1 + type: resource_name +- name: id + type: resource_name +- name: id1 + type: resource_name +- name: id2 + type: resource_name +- name: membership1 + type: resource_name +- name: org_id + type: org_id +- name: zone + type: zone diff --git a/services/google/gkehub/samples/update_1_acm_auto_upgrade.feature_membership.json b/services/google/gkehub/samples/update_1_acm_auto_upgrade.feature_membership.json new file mode 100755 index 000000000..7492f81f0 --- /dev/null +++ b/services/google/gkehub/samples/update_1_acm_auto_upgrade.feature_membership.json @@ -0,0 +1,13 @@ +{ + "project": "{{ref:gkehub.serviceusage.service.json:project}}", + "location": "global", + "feature": "projects/{{ref:acm.feature.json:project}}/locations/{{ref:acm.feature.json:location}}/features/{{ref:acm.feature.json:name}}", + "membership": "{{ref:first.membership.json:name}}", + "membershipLocation": "global", + "configmanagement": { + "configSync": { + "preventDrift": true + }, + "management": "MANAGEMENT_MANUAL" + } +} diff --git a/services/google/gkehub/samples/update_2_acm_auto_upgrade.feature_membership.json b/services/google/gkehub/samples/update_2_acm_auto_upgrade.feature_membership.json new file mode 100755 index 000000000..5662d47f9 --- /dev/null +++ b/services/google/gkehub/samples/update_2_acm_auto_upgrade.feature_membership.json @@ -0,0 +1,13 @@ +{ + "project": "{{ref:gkehub.serviceusage.service.json:project}}", + "location": "global", + "feature": "projects/{{ref:acm.feature.json:project}}/locations/{{ref:acm.feature.json:location}}/features/{{ref:acm.feature.json:name}}", + "membership": "{{ref:first.membership.json:name}}", + "membershipLocation": "global", + "configmanagement": { + "configSync": { + "preventDrift": true + }, + "management": "MANAGEMENT_AUTOMATIC" + } +} diff --git a/services/google/gkehub/samples/update_3_acm_auto_upgrade.feature_membership.json b/services/google/gkehub/samples/update_3_acm_auto_upgrade.feature_membership.json new file mode 100755 index 000000000..0357a7aa1 --- /dev/null +++ b/services/google/gkehub/samples/update_3_acm_auto_upgrade.feature_membership.json @@ -0,0 +1,13 @@ +{ + "project": "{{ref:gkehub.serviceusage.service.json:project}}", + "location": "global", + "feature": "projects/{{ref:acm.feature.json:project}}/locations/{{ref:acm.feature.json:location}}/features/{{ref:acm.feature.json:name}}", + "membership": "{{ref:first.membership.json:name}}", + "membershipLocation": "global", + "configmanagement": { + "configSync": { + "preventDrift": true + }, + "management": "MANAGEMENT_UNSPECIFIED" + } +} diff --git a/unstructured/google/gkehub/alpha/feature_membership.go b/unstructured/google/gkehub/alpha/feature_membership.go index 8ee998216..1d3360a2a 100755 --- a/unstructured/google/gkehub/alpha/feature_membership.go +++ b/unstructured/google/gkehub/alpha/feature_membership.go @@ -117,6 +117,9 @@ func FeatureMembershipToUnstructured(r *dclService.FeatureMembership) *unstructu } rConfigmanagement["hierarchyController"] = rConfigmanagementHierarchyController } + if r.Configmanagement.Management != nil { + rConfigmanagement["management"] = string(*r.Configmanagement.Management) + } if r.Configmanagement.PolicyController != nil && r.Configmanagement.PolicyController != dclService.EmptyFeatureMembershipConfigmanagementPolicyController { rConfigmanagementPolicyController := make(map[string]interface{}) if r.Configmanagement.PolicyController.AuditIntervalSeconds != nil { @@ -496,6 +499,13 @@ func UnstructuredToFeatureMembership(u *unstructured.Resource) (*dclService.Feat return nil, fmt.Errorf("r.Configmanagement.HierarchyController: expected map[string]interface{}") } } + if _, ok := rConfigmanagement["management"]; ok { + if s, ok := rConfigmanagement["management"].(string); ok { + r.Configmanagement.Management = dclService.FeatureMembershipConfigmanagementManagementEnumRef(s) + } else { + return nil, fmt.Errorf("r.Configmanagement.Management: expected string") + } + } if _, ok := rConfigmanagement["policyController"]; ok { if rConfigmanagementPolicyController, ok := rConfigmanagement["policyController"].(map[string]interface{}); ok { r.Configmanagement.PolicyController = &dclService.FeatureMembershipConfigmanagementPolicyController{} diff --git a/unstructured/google/gkehub/beta/feature_membership.go b/unstructured/google/gkehub/beta/feature_membership.go index 8696a5f8f..c7c26e48a 100755 --- a/unstructured/google/gkehub/beta/feature_membership.go +++ b/unstructured/google/gkehub/beta/feature_membership.go @@ -117,6 +117,9 @@ func FeatureMembershipToUnstructured(r *dclService.FeatureMembership) *unstructu } rConfigmanagement["hierarchyController"] = rConfigmanagementHierarchyController } + if r.Configmanagement.Management != nil { + rConfigmanagement["management"] = string(*r.Configmanagement.Management) + } if r.Configmanagement.PolicyController != nil && r.Configmanagement.PolicyController != dclService.EmptyFeatureMembershipConfigmanagementPolicyController { rConfigmanagementPolicyController := make(map[string]interface{}) if r.Configmanagement.PolicyController.AuditIntervalSeconds != nil { @@ -496,6 +499,13 @@ func UnstructuredToFeatureMembership(u *unstructured.Resource) (*dclService.Feat return nil, fmt.Errorf("r.Configmanagement.HierarchyController: expected map[string]interface{}") } } + if _, ok := rConfigmanagement["management"]; ok { + if s, ok := rConfigmanagement["management"].(string); ok { + r.Configmanagement.Management = dclService.FeatureMembershipConfigmanagementManagementEnumRef(s) + } else { + return nil, fmt.Errorf("r.Configmanagement.Management: expected string") + } + } if _, ok := rConfigmanagement["policyController"]; ok { if rConfigmanagementPolicyController, ok := rConfigmanagement["policyController"].(map[string]interface{}); ok { r.Configmanagement.PolicyController = &dclService.FeatureMembershipConfigmanagementPolicyController{} diff --git a/unstructured/google/gkehub/feature_membership.go b/unstructured/google/gkehub/feature_membership.go index 69d913c0b..7438c5d1c 100755 --- a/unstructured/google/gkehub/feature_membership.go +++ b/unstructured/google/gkehub/feature_membership.go @@ -117,6 +117,9 @@ func FeatureMembershipToUnstructured(r *dclService.FeatureMembership) *unstructu } rConfigmanagement["hierarchyController"] = rConfigmanagementHierarchyController } + if r.Configmanagement.Management != nil { + rConfigmanagement["management"] = string(*r.Configmanagement.Management) + } if r.Configmanagement.PolicyController != nil && r.Configmanagement.PolicyController != dclService.EmptyFeatureMembershipConfigmanagementPolicyController { rConfigmanagementPolicyController := make(map[string]interface{}) if r.Configmanagement.PolicyController.AuditIntervalSeconds != nil { @@ -496,6 +499,13 @@ func UnstructuredToFeatureMembership(u *unstructured.Resource) (*dclService.Feat return nil, fmt.Errorf("r.Configmanagement.HierarchyController: expected map[string]interface{}") } } + if _, ok := rConfigmanagement["management"]; ok { + if s, ok := rConfigmanagement["management"].(string); ok { + r.Configmanagement.Management = dclService.FeatureMembershipConfigmanagementManagementEnumRef(s) + } else { + return nil, fmt.Errorf("r.Configmanagement.Management: expected string") + } + } if _, ok := rConfigmanagement["policyController"]; ok { if rConfigmanagementPolicyController, ok := rConfigmanagement["policyController"].(map[string]interface{}); ok { r.Configmanagement.PolicyController = &dclService.FeatureMembershipConfigmanagementPolicyController{}