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:
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:
- Spec path
- Delete dependent entities
- Enable merge entity
- Create missing related entities
- Enrich entities
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 namedmy-port-config.yml
using the pattern**/my-port-config.yml
); - If you want the app to ignore
port.yml
files in certain paths.
- If you want the app to scan a different file than
The deleteDependentEntities
parameter is used to enable deletion of dependent Port entities. This is useful when you have two blueprints with a required relation, and the target entity in the relation should be deleted. In this scenario, the delete operation will fail if this flag is set to false
if the flag is set to true
, the source entity will be deleted as well.
- 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. Usetrue
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 theobject
property, according to your blueprint schema definition (default property identifier:gitopsMetadata
).
- Use the
Configuration example
enrichEntitiesWithGitopsMetadata: true
gitopsMetadataProperty: myGitopsMetadata # the GitOps metadata will be sent to the "myGitopsMetadata" property of the blueprint's entities