...

Text file src/github.com/GoogleCloudPlatform/k8s-config-connector/config/servicemappings/servicedirectory.yaml

Documentation: github.com/GoogleCloudPlatform/k8s-config-connector/config/servicemappings

     1# Copyright 2022 Google LLC
     2#
     3# Licensed under the Apache License, Version 2.0 (the "License");
     4# you may not use this file except in compliance with the License.
     5# You may obtain a copy of the License at
     6#
     7#      http://www.apache.org/licenses/LICENSE-2.0
     8#
     9# Unless required by applicable law or agreed to in writing, software
    10# distributed under the License is distributed on an "AS IS" BASIS,
    11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    12# See the License for the specific language governing permissions and
    13# limitations under the License.
    14
    15apiVersion: core.cnrm.cloud.google.com/v1alpha1
    16kind: ServiceMapping
    17metadata:
    18  name: servicedirectory.cnrm.cloud.google.com
    19  namespace: cnrm-system
    20spec:
    21  name: ServiceDirectory
    22  version: v1beta1
    23  serviceHostName: "servicedirectory.googleapis.com"
    24  resources:
    25    - name: google_service_directory_endpoint
    26      kind: ServiceDirectoryEndpoint
    27      idTemplate: "{{service}}/endpoints/{{endpoint_id}}"
    28      idTemplateCanBeUsedToMatchResourceName: true
    29      resourceAvailableInAssetInventory: false
    30      metadataMapping:
    31        name: endpoint_id
    32        labels: metadata
    33      resourceID:
    34        targetField: endpoint_id
    35      resourceReferences:
    36        - tfField: service
    37          description: |-
    38            The ServiceDirectoryService that this endpoint belongs to.
    39          key: serviceRef
    40          gvk:
    41            kind: ServiceDirectoryService
    42            version: v1beta1
    43            group: servicedirectory.cnrm.cloud.google.com
    44          targetField: name
    45          parent: true
    46        - tfField: network
    47          key: networkRef
    48          gvk:
    49            kind: ComputeNetwork
    50            version: v1beta1
    51            group: compute.cnrm.cloud.google.com
    52          targetField: self_link
    53          # TODO(b/235854488): remove external-only field description once project id is allowed for networkRef
    54          description: |-
    55            Only the `external` field is supported to configure the reference.
    56
    57            Immutable. The Google Compute Engine network (VPC) of the endpoint in the format
    58            projects/<project number>/locations/global/networks/*.
    59
    60            The project must be specified by project number (project id is rejected). Incorrectly formatted networks are
    61            rejected, but no other validation is performed on this field (ex. network or project existence,
    62            reachability, or permissions).
    63        - tfField: address
    64          key: addressRef
    65          gvk:
    66            kind: ComputeAddress
    67            version: v1beta1
    68            group: compute.cnrm.cloud.google.com
    69          targetField: address
    70    - name: google_service_directory_namespace
    71      kind: ServiceDirectoryNamespace
    72      idTemplate: "projects/{{project}}/locations/{{location}}/namespaces/{{namespace_id}}"
    73      idTemplateCanBeUsedToMatchResourceName: true
    74      resourceAvailableInAssetInventory: true
    75      metadataMapping:
    76        name: namespace_id
    77        labels: labels
    78      resourceID:
    79        targetField: namespace_id
    80      iamConfig:
    81        policyName: google_service_directory_namespace_iam_policy
    82        policyMemberName: google_service_directory_namespace_iam_member
    83        referenceField:
    84          name: name
    85          type: name
    86        supportsConditions: false
    87      hierarchicalReferences:
    88        - type: project
    89          key: projectRef
    90      resourceReferences:
    91        - key: projectRef
    92          tfField: project
    93          description: |-
    94            The project that this resource belongs to.
    95          gvk:
    96            kind: Project
    97            version: v1beta1
    98            group: resourcemanager.cnrm.cloud.google.com
    99    - name: google_service_directory_service
   100      kind: ServiceDirectoryService
   101      idTemplate: "{{namespace}}/services/{{service_id}}"
   102      idTemplateCanBeUsedToMatchResourceName: true
   103      resourceAvailableInAssetInventory: false
   104      metadataMapping:
   105        name: service_id
   106        labels: metadata
   107      resourceID:
   108        targetField: service_id
   109      resourceReferences:
   110        - tfField: namespace
   111          description: |-
   112            The ServiceDirectoryNamespace that this service belongs to.
   113          key: namespaceRef
   114          gvk:
   115            kind: ServiceDirectoryNamespace
   116            version: v1beta1
   117            group: servicedirectory.cnrm.cloud.google.com
   118          targetField: name
   119          parent: true
   120      iamConfig:
   121        policyName: google_service_directory_service_iam_policy
   122        policyMemberName: google_service_directory_service_iam_member
   123        referenceField:
   124          name: name
   125          type: name
   126        supportsConditions: false

View as plain text