Skip to content

Latest commit

 

History

History
94 lines (61 loc) · 4.66 KB

File metadata and controls

94 lines (61 loc) · 4.66 KB
sidebar_position
4

import Tabs from "@theme/Tabs" import TabItem from "@theme/TabItem" import DeleteDependents from '../../../../generalTemplates/_delete_dependents_git_explanation_template.md'

Advanced

The GitHub integration supports additional flags to provide additional configuration, making it easier to configure its behavior to your liking.

To use the advanced configuration and additional flags, add them as a root key to your port-app-config.yml file, for example to add the createMissingRelatedEntities flag:

# highlight-next-line
createMissingRelatedEntities: false
resources:
  - kind: pull-request
    selector:
      query: "true"
    port:
      entity:
        mappings:
        ... mappings configuration

Using advanced configurations

The following advanced configuration parameters are available and can be added to the port-app-config.yml file:

The specPath parameter specifies a list of globPatterns that Port's GitHub app will search for port.yml files in.

  • Default value: **/port.yml
  • Use case:
    • If you want the app to scan a different file than port.yml (for example, change configure the app to scan files named my-port-config.yml using the pattern **/my-port-config.yml);
    • If you want the app to ignore port.yml files in certain paths.
  • Default: false (disabled)
  • Use case: Deletion of dependent Port entities. Must be enabled, if you want to delete a target entity (and its source entities) in a required relation.

The enableMergeEntity parameter specifies whether to use the create/update or create/override strategy when creating entities listed in a port.yml file.

  • Default value: true (use create/update)
  • Use case: use false if you want GitHub to be the source-of-truth for catalog entities. Use true if you want to use GitHub as the source for some properties of entities in the catalog, and use other sources to for properties which are subject to change automatically.

The createMissingRelatedEntities parameter is used to enable the creation of missing related Port entities automatically in cases where the target related entity does not exist in the software catalog yet.

  • Default value: true to allow the GitHub app to create barebones related entities, in case those related entities do not exist in the software catalog.
  • Use case: use false if you do not want this default behavior (do not create missing related entities).

The enrichEntitiesWithGitopsMetadata parameter is used to enable the enrichment of Port entities that are managed by GitOps with additional metadata.

When the parameter is active, ingesting entities listed in a port.yml file to Port will include additional information such as the spec file path (for example: port.yml, /path/to/port.yml, etc.), the latest commit information and more.

The additional information is reported as a JSON object property in your GitOps managed entities. In order to view the information, your respective blueprint needs to include an object property to store the metadata. The default identifier this parameter sends data to is gitopsMetadata.

  • Default value: true (enrich entities with GitOps metadata)
  • Use case: use true if you want the GitHub app to enrich the Port entities managed by GitOps with additional JSON metadata.
    • Use the gitopsMetadataProperty to change the identifier of the object property, according to your blueprint schema definition (default property identifier: gitopsMetadata).

Configuration example

enrichEntitiesWithGitopsMetadata: true
gitopsMetadataProperty: myGitopsMetadata # the GitOps metadata will be sent to the "myGitopsMetadata" property of the blueprint's entities