# GKEHubFeature

# GKEHubFeature

> [!NOTE]
> **Note:** GKE Hub REST documentation is under construction.

| **Property** | **Value** |
|---|---|
| Google Cloud Service Name | GKE Hub |
| Google Cloud Service Documentation | <https://docs.cloud.google.com/anthos/multicluster-management/connect/overview> |
| Google Cloud REST Resource Name | v1beta1.projects.locations.features |
| Google Cloud REST Resource Documentation | [https://gkehub.googleapis.com/$discovery/rest?version=v1beta](https://gkehub.googleapis.com/$discovery/rest?version=v1beta1) |
| Config Connector Resource Short Names | gcpgkehubfeature gcpgkehubfeatures gkehubfeature |
| Config Connector Service Name | gkehub.googleapis.com |
| Config Connector Resource Fully Qualified Name | gkehubfeatures.gkehub.cnrm.cloud.google.com |
| Can Be Referenced by IAMPolicy/IAMPolicyMember | No |
| Config Connector Default Average Reconcile Interval In Seconds | 600 |

## Custom Resource Definition Properties

### Spec

#### Schema

    location: string
    projectRef:
      external: string
      name: string
      namespace: string
    resourceID: string
    spec:
      fleetobservability:
        loggingConfig:
          defaultConfig:
            mode: string
          fleetScopeLogsConfig:
            mode: string
      multiclusteringress:
        configMembershipRef:
          external: string
          name: string
          namespace: string

| Fields ||
|---|---|
| `location` *Required* | `string` Immutable. The location for the resource |
| `projectRef` *Required* | `object` Immutable. The Project that this resource belongs to. |
| `projectRef.external` *Optional* | `string` The project for the resource Allowed value: The Google Cloud resource name of a \`Project\` resource (format: \`projects/{{name}}\`). |
| `projectRef.name` *Optional* | `string` Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names |
| `projectRef.namespace` *Optional* | `string` Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ |
| `resourceID` *Optional* | `string` Immutable. Optional. The name of the resource. Used for creation and acquisition. When unset, the value of \`metadata.name\` is used as the default. |
| `spec` *Optional* | `object` Optional. Hub-wide Feature configuration. If this Feature does not support any Hub-wide configuration, this field may be unused. |
| `spec.fleetobservability` *Optional* | `object` Fleet Observability spec. |
| `spec.fleetobservability.loggingConfig` *Optional* | `object` Fleet Observability Logging-specific spec. |
| `spec.fleetobservability.loggingConfig.defaultConfig` *Optional* | `object` Specified if applying the default routing config to logs not specified in other configs. |
| `spec.fleetobservability.loggingConfig.defaultConfig.mode` *Optional* | `string` The logs routing mode Possible values: MODE_UNSPECIFIED, COPY, MOVE |
| `spec.fleetobservability.loggingConfig.fleetScopeLogsConfig` *Optional* | `object` Specified if applying the routing config to all logs for all fleet scopes. |
| `spec.fleetobservability.loggingConfig.fleetScopeLogsConfig.mode` *Optional* | `string` The logs routing mode Possible values: MODE_UNSPECIFIED, COPY, MOVE |
| `spec.multiclusteringress` *Optional* | `object` Multicluster Ingress-specific spec. |
| `spec.multiclusteringress.configMembershipRef` *Required\** | `object` <br /> |
| `spec.multiclusteringress.configMembershipRef.external` *Optional* | `string` Fully-qualified Membership name which hosts the MultiClusterIngress CRD. Example: \`projects/foo-proj/locations/global/memberships/bar\` Allowed value: The Google Cloud resource name of a \`GKEHubMembership\` resource (format: \`projects/{{project}}/locations/{{location}}/memberships/{{name}}\`). |
| `spec.multiclusteringress.configMembershipRef.name` *Optional* | `string` Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names |
| `spec.multiclusteringress.configMembershipRef.namespace` *Optional* | `string` Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ |

\* Field is required when parent field is specified

### Status

#### Schema

    conditions:
    - lastTransitionTime: string
      message: string
      reason: string
      status: string
      type: string
    createTime: string
    deleteTime: string
    observedGeneration: integer
    resourceState:
      hasResources: boolean
      state: string
    state:
      state:
        code: string
        description: string
        updateTime: string
    updateTime: string

| Fields ||
|---|---|
| `conditions` | `list (object)` Conditions represent the latest available observation of the resource's current state. |
| `conditions[]` | `object` <br /> |
| `conditions[].lastTransitionTime` | `string` Last time the condition transitioned from one status to another. |
| `conditions[].message` | `string` Human-readable message indicating details about last transition. |
| `conditions[].reason` | `string` Unique, one-word, CamelCase reason for the condition's last transition. |
| `conditions[].status` | `string` Status is the status of the condition. Can be True, False, Unknown. |
| `conditions[].type` | `string` Type is the type of the condition. |
| `createTime` | `string` Output only. When the Feature resource was created. |
| `deleteTime` | `string` Output only. When the Feature resource was deleted. |
| `observedGeneration` | `integer` ObservedGeneration is the generation of the resource that was most recently observed by the Config Connector controller. If this is equal to metadata.generation, then that means that the current reported status reflects the most recent desired state of the resource. |
| `resourceState` | `object` State of the Feature resource itself. |
| `resourceState.hasResources` | `boolean` Whether this Feature has outstanding resources that need to be cleaned up before it can be disabled. |
| `resourceState.state` | `string` The current state of the Feature resource in the Hub API. Possible values: STATE_UNSPECIFIED, ENABLING, ACTIVE, DISABLING, UPDATING, SERVICE_UPDATING |
| `state` | `object` Output only. The Hub-wide Feature state |
| `state.state` | `object` Output only. The "running state" of the Feature in this Hub. |
| `state.state.code` | `string` The high-level, machine-readable status of this Feature. Possible values: CODE_UNSPECIFIED, OK, WARNING, ERROR |
| `state.state.description` | `string` A human-readable description of the current status. |
| `state.state.updateTime` | `string` The time this status and any related Feature-specific details were updated. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z" |
| `updateTime` | `string` Output only. When the Feature resource was last updated. |

## Sample YAML(s)

### Anthos Config Management Feature

    # Copyright 2021 Google LLC
    #
    # 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.

    apiVersion: gkehub.cnrm.cloud.google.com/v1beta1
    kind: GKEHubFeature
    metadata:
      name: gkehubfeature-sample-acmfeature
      labels:
        label-one: value-one
    spec:
      projectRef:
        name: gkehubfeature-dep-acmfeature
      location: global
      # The resourceID must be "configmanagement" if you want to use Anthos config
      # management feature.
      resourceID: configmanagement
    ---
    apiVersion: resourcemanager.cnrm.cloud.google.com/v1beta1
    kind: Project
    metadata:
      annotations:
        cnrm.cloud.google.com/auto-create-network: "false"
      name: gkehubfeature-dep-acmfeature
    spec:
      name: Config Connector Sample
      folderRef:
        # Replace "${FOLDER_ID?}" with the numeric ID for your folder
        external: "${FOLDER_ID?}"
      billingAccountRef:
        # Replace "${BILLING_ACCOUNT_ID?}" with the numeric ID for your billing account
        external: "${BILLING_ACCOUNT_ID?}"
    ---
    apiVersion: serviceusage.cnrm.cloud.google.com/v1beta1
    kind: Service
    metadata:
      annotations:
        cnrm.cloud.google.com/disable-dependent-services: "false"
      name: gkehubfeature-dep-acmfeature-1
    spec:
      resourceID: gkehub.googleapis.com
      projectRef:
        name: gkehubfeature-dep-acmfeature
    ---
    apiVersion: serviceusage.cnrm.cloud.google.com/v1beta1
    kind: Service
    metadata:
      annotations:
        cnrm.cloud.google.com/disable-dependent-services: "false"
      name: gkehubfeature-dep-acmfeature-2
    spec:
      resourceID: anthosconfigmanagement.googleapis.com
      projectRef:
        name: gkehubfeature-dep-acmfeature

### Anthos Service Mesh Feature

    # Copyright 2021 Google LLC
    #
    # 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.

    apiVersion: gkehub.cnrm.cloud.google.com/v1beta1
    kind: GKEHubFeature
    metadata:
      name: gkehubfeature-sample-asm
    spec:
      projectRef:
        name: gkehubfeature-dep-asm
      location: global
      # The resourceID must be "servicemesh" if you want to use Anthos Service Mesh feature.
      resourceID: servicemesh
    ---
    apiVersion: resourcemanager.cnrm.cloud.google.com/v1beta1
    kind: Project
    metadata:
      name: gkehubfeature-dep-asm
    spec:
      name: Config Connector Sample
      organizationRef:
        # Replace "${ORG_ID?}" with the numeric ID for your organization
        external: "${ORG_ID?}"
      billingAccountRef:
        # Replace "${BILLING_ACCOUNT_ID?}" with the numeric ID for your billing account
        external: "${BILLING_ACCOUNT_ID?}"
    ---
    apiVersion: serviceusage.cnrm.cloud.google.com/v1beta1
    kind: Service
    metadata:
      annotations:
        cnrm.cloud.google.com/disable-dependent-services: "false"
      name: gkehubfeature-dep-asm
    spec:
      resourceID: mesh.googleapis.com
      projectRef:
        name: gkehubfeature-dep-asm

### Multi Cluster Ingress Feature

    # Copyright 2021 Google LLC
    #
    # 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.

    apiVersion: gkehub.cnrm.cloud.google.com/v1beta1
    kind: GKEHubFeature
    metadata:
      name: gkehubfeature-sample-mcifeature
      labels:
        label-one: value-one
    spec:
      projectRef:
        name: gkehubfeature-dep-mcifeature
      location: global
      # The resourceID must be "multiclusteringress" if you want to use multi-cluster
      # ingress feature.
      resourceID: multiclusteringress
      spec:
        multiclusteringress:
          configMembershipRef:
            name: gkehubfeature-dep-mcifeature
    ---
    apiVersion: container.cnrm.cloud.google.com/v1beta1
    kind: ContainerCluster
    metadata:
      annotations:
        cnrm.cloud.google.com/project-id: gkehubfeature-dep-mcifeature
      name: gkehubfeature-dep-mcifeature
    spec:
      location: us-central1-a
      initialNodeCount: 1
      workloadIdentityConfig:
        # Workload Identity supports only a single namespace based on your project name.
        workloadPool: gkehubfeature-dep-mcifeature.svc.id.goog
    ---
    apiVersion: gkehub.cnrm.cloud.google.com/v1beta1
    kind: GKEHubMembership
    metadata:
      annotations:
        cnrm.cloud.google.com/project-id: gkehubfeature-dep-mcifeature
      name: gkehubfeature-dep-mcifeature
    spec:
      location: global
      authority:
        # Issuer must contain a link to a valid JWT issuer. Your ContainerCluster is one.
        issuer: https://container.googleapis.com/v1/projects/gkehubfeature-dep-mcifeature/locations/us-central1-a/clusters/gkehubfeature-dep-mcifeature
      description: A sample GKE Hub membership
      endpoint:
        gkeCluster:
          resourceRef:
            name: gkehubfeature-dep-mcifeature
    ---
    apiVersion: resourcemanager.cnrm.cloud.google.com/v1beta1
    kind: Project
    metadata:
      name: gkehubfeature-dep-mcifeature
    spec:
      name: Config Connector Sample
      organizationRef:
        # Replace "${ORG_ID?}" with the numeric ID for your organization
        external: "${ORG_ID?}"
      billingAccountRef:
        # Replace "${BILLING_ACCOUNT_ID?}" with the numeric ID for your billing account
        external: "${BILLING_ACCOUNT_ID?}"
    ---
    apiVersion: serviceusage.cnrm.cloud.google.com/v1beta1
    kind: Service
    metadata:
      annotations:
        cnrm.cloud.google.com/deletion-policy: abandon
      name: gkehubfeature-dep-mcifeature-1
    spec:
      resourceID: container.googleapis.com
      projectRef:
        name: gkehubfeature-dep-mcifeature
    ---
    apiVersion: serviceusage.cnrm.cloud.google.com/v1beta1
    kind: Service
    metadata:
      annotations:
        cnrm.cloud.google.com/disable-dependent-services: "false"
      name: gkehubfeature-dep-mcifeature-2
    spec:
      resourceID: gkehub.googleapis.com
      projectRef:
        name: gkehubfeature-dep-mcifeature
    ---
    apiVersion: serviceusage.cnrm.cloud.google.com/v1beta1
    kind: Service
    metadata:
      annotations:
        cnrm.cloud.google.com/disable-dependent-services: "false"
      name: gkehubfeature-dep-mcifeature-3
    spec:
      resourceID: multiclusteringress.googleapis.com
      projectRef:
        name: gkehubfeature-dep-mcifeature
    ---
    apiVersion: serviceusage.cnrm.cloud.google.com/v1beta1
    kind: Service
    metadata:
      annotations:
        cnrm.cloud.google.com/disable-dependent-services: "false"
      name: gkehubfeature-dep-mcifeature-4
    spec:
      resourceID: multiclusterservicediscovery.googleapis.com
      projectRef:
        name: gkehubfeature-dep-mcifeature

### Multi Cluster Service Discovery Feature

    # Copyright 2021 Google LLC
    #
    # 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.

    apiVersion: gkehub.cnrm.cloud.google.com/v1beta1
    kind: GKEHubFeature
    metadata:
      name: gkehubfeature-sample-mcsdfeature
    spec:
      projectRef:
        name: gkehubfeature-dep-mcsdfeature
      location: global
      # The resourceID must be "multiclusterservicediscovery" if you want to use
      # multi-cluster service discovery feature.
      resourceID: multiclusterservicediscovery
    ---
    apiVersion: resourcemanager.cnrm.cloud.google.com/v1beta1
    kind: Project
    metadata:
      annotations:
        cnrm.cloud.google.com/auto-create-network: "false"
      name: gkehubfeature-dep-mcsdfeature
    spec:
      name: Config Connector Sample
      folderRef:
        # Replace "${FOLDER_ID?}" with the numeric ID for your folder
        external: "${FOLDER_ID?}"
      billingAccountRef:
        # Replace "${BILLING_ACCOUNT_ID?}" with the numeric ID for your billing account
        external: "${BILLING_ACCOUNT_ID?}"
    ---
    apiVersion: serviceusage.cnrm.cloud.google.com/v1beta1
    kind: Service
    metadata:
      annotations:
        cnrm.cloud.google.com/disable-dependent-services: "false"
      name: gkehubfeature-dep-mcsdfeature-1
    spec:
      resourceID: gkehub.googleapis.com
      projectRef:
        name: gkehubfeature-dep-mcsdfeature
    ---
    apiVersion: serviceusage.cnrm.cloud.google.com/v1beta1
    kind: Service
    metadata:
      annotations:
        cnrm.cloud.google.com/disable-dependent-services: "false"
      name: gkehubfeature-dep-mcsdfeature-2
    spec:
      resourceID: multiclusterservicediscovery.googleapis.com
      projectRef:
        name: gkehubfeature-dep-mcsdfeature

> [!NOTE]
> **Note:** If you have any trouble with instantiating the resource, refer to [Troubleshoot Config Connector](https://docs.cloud.google.com/config-connector/docs/troubleshooting).