diff --git a/content/en/internal_developer_portal/software_catalog/entity_model/_index.md b/content/en/internal_developer_portal/software_catalog/entity_model/_index.md index 328ae7bdb57..02193009edd 100644 --- a/content/en/internal_developer_portal/software_catalog/entity_model/_index.md +++ b/content/en/internal_developer_portal/software_catalog/entity_model/_index.md @@ -124,171 +124,171 @@ V3.0 contains the following changes from v2.2: ### Example YAML files {{% collapse-content title="Component of kind:system" level="h4" expanded=false id="id-for-anchoring" %}} - {{< code-block lang="yaml" filename="entity.datadog.yaml" collapsible="true" >}} - apiVersion: v3 - kind: system - metadata: - name: myapp - displayName: My App - tags: - - tag:value - links: - - name: shopping-cart runbook - type: runbook - url: https://runbook/shopping-cart - - name: shopping-cart architecture - provider: gdoc - url: https://google.drive/shopping-cart-architecture - type: doc - - name: shopping-cart Wiki - provider: wiki - url: https://wiki/shopping-cart - type: doc - - name: shopping-cart source code - provider: github - url: http://github/shopping-cart - type: repo - contacts: - - name: Support Email - type: email - contact: team@shopping.com - - name: Support Slack - type: slack - contact: https://www.slack.com/archives/shopping-cart - owner: myteam - additionalOwners: - - name: opsTeam - type: operator - integrations: - pagerduty: - serviceURL: https://www.pagerduty.com/service-directory/Pshopping-cart - opsgenie: - serviceURL: https://www.opsgenie.com/service/shopping-cart - region: US - spec: - components: - - service:myservice - - service:otherservice - extensions: - datadoghq.com/shopping-cart: - customField: customValue - datadog: - codeLocations: - - repositoryURL: https://github.com/myorganization/myrepo.git - paths: - - path/to/service/code/** - events: - - name: "deployment events" - query: "app:myapp AND type:github" - - name: "event type B" - query: "app:myapp AND type:github" - logs: - - name: "critical logs" - query: "app:myapp AND type:github" - - name: "ops logs" - query: "app:myapp AND type:github" - pipelines: - fingerprints: - - fp1 - - fp2 - {{< /code-block >}} +{{< code-block lang="yaml" filename="entity.datadog.yaml" collapsible="true" >}} +apiVersion: v3 +kind: system +metadata: + name: myapp + displayName: My App + tags: + - tag:value + links: + - name: shopping-cart runbook + type: runbook + url: https://runbook/shopping-cart + - name: shopping-cart architecture + provider: gdoc + url: https://google.drive/shopping-cart-architecture + type: doc + - name: shopping-cart Wiki + provider: wiki + url: https://wiki/shopping-cart + type: doc + - name: shopping-cart source code + provider: github + url: http://github/shopping-cart + type: repo + contacts: + - name: Support Email + type: email + contact: team@shopping.com + - name: Support Slack + type: slack + contact: https://www.slack.com/archives/shopping-cart + owner: myteam + additionalOwners: + - name: opsTeam + type: operator +integrations: + pagerduty: + serviceURL: https://www.pagerduty.com/service-directory/Pshopping-cart + opsgenie: + serviceURL: https://www.opsgenie.com/service/shopping-cart + region: US +spec: + components: + - service:myservice + - service:otherservice +extensions: + datadoghq.com/shopping-cart: + customField: customValue +datadog: + codeLocations: + - repositoryURL: https://github.com/myorganization/myrepo.git + paths: + - path/to/service/code/** + events: + - name: "deployment events" + query: "app:myapp AND type:github" + - name: "event type B" + query: "app:myapp AND type:github" + logs: + - name: "critical logs" + query: "app:myapp AND type:github" + - name: "ops logs" + query: "app:myapp AND type:github" + pipelines: + fingerprints: + - fp1 + - fp2 +{{< /code-block >}} {{% /collapse-content %}} {{% collapse-content title="Component of kind:library" level="h4" expanded=false id="id-for-anchoring" %}} - {{< code-block lang="yaml" filename="entity.datadog.yaml" collapsible="true" >}} - apiVersion: v3 - kind: library - metadata: - name: my-library - displayName: My Library - tags: - - tag:value - links: - - name: shopping-cart runbook - type: runbook - url: https://runbook/shopping-cart - - name: shopping-cart architecture - provider: gdoc - url: https://google.drive/shopping-cart-architecture - type: doc - - name: shopping-cart Wiki - provider: wiki - url: https://wiki/shopping-cart - type: doc - - name: shopping-cart source code - provider: github - url: http://github/shopping-cart - type: repo - contacts: - - name: Support Email - type: email - contact: team@shopping.com - - name: Support Slack - type: slack - contact: https://www.slack.com/archives/shopping-cart - owner: myteam - additionalOwners: - - name: opsTeam - type: operator - {{< /code-block >}} +{{< code-block lang="yaml" filename="entity.datadog.yaml" collapsible="true" >}} +apiVersion: v3 +kind: library +metadata: + name: my-library + displayName: My Library + tags: + - tag:value + links: + - name: shopping-cart runbook + type: runbook + url: https://runbook/shopping-cart + - name: shopping-cart architecture + provider: gdoc + url: https://google.drive/shopping-cart-architecture + type: doc + - name: shopping-cart Wiki + provider: wiki + url: https://wiki/shopping-cart + type: doc + - name: shopping-cart source code + provider: github + url: http://github/shopping-cart + type: repo + contacts: + - name: Support Email + type: email + contact: team@shopping.com + - name: Support Slack + type: slack + contact: https://www.slack.com/archives/shopping-cart + owner: myteam + additionalOwners: + - name: opsTeam + type: operator +{{< /code-block >}} {{% /collapse-content %}} {{% collapse-content title="Components that are part of multiple systems" level="h4" expanded=false id="id-for-anchoring" %}} - If a single component is part of multiple systems, you must specify that component in the YAML for each system. For example, if the datastore `orders-postgres` is a component of both a postgres fleet and a web application, specify two YAMLs: - - For the postgres fleet (`managed-postgres`), specify a definition for `kind:system`: - {{< code-block lang="yaml" filename="entity.datadog.yaml" collapsible="true" >}} - apiVersion: v3 - kind: system - spec: - components: - - datastore:orders-postgres - - datastore:foo-postgres - - datastore:bar-postgres - metadata: - name: managed-postgres - owner: db-team - {{< /code-block >}} - - For the web application (`shopping-cart`), declare a separate definition for `kind:system`: - {{< code-block lang="yaml" filename="entity.datadog.yaml" collapsible="true" >}} - - apiVersion: v3 - kind: system - spec: - lifecycle: production - tier: critical - components: - - service:shopping-cart-api - - service:shopping-cart-processor - - queue:orders-queue - - datastore:orders-postgres - metadata: - name: shopping-cart - owner: shopping-team - additionalOwners: - - name: sre-team - type: operator - --- - apiVersion: v3 - kind: datastore - metadata: - name: orders-postgres - additionalOwners: - - name: db-team - type: operator - --- - apiVersion: v3 - kind: service - metadata: - name: shopping-cart-api - --- - apiVersion: v3 - kind: service - metadata: - name: shopping-cart-processor - --- - {{< /code-block >}} +If a single component is part of multiple systems, you must specify that component in the YAML for each system. For example, if the datastore `orders-postgres` is a component of both a postgres fleet and a web application, specify two YAMLs: + +For the postgres fleet (`managed-postgres`), specify a definition for `kind:system`: +{{< code-block lang="yaml" filename="entity.datadog.yaml" collapsible="true" >}} +apiVersion: v3 +kind: system +spec: + components: + - datastore:orders-postgres + - datastore:foo-postgres + - datastore:bar-postgres +metadata: + name: managed-postgres + owner: db-team +{{< /code-block >}} + +For the web application (`shopping-cart`), declare a separate definition for `kind:system`: +{{< code-block lang="yaml" filename="entity.datadog.yaml" collapsible="true" >}} + +apiVersion: v3 +kind: system +spec: + lifecycle: production + tier: critical + components: + - service:shopping-cart-api + - service:shopping-cart-processor + - queue:orders-queue + - datastore:orders-postgres +metadata: + name: shopping-cart + owner: shopping-team + additionalOwners: + - name: sre-team + type: operator +--- +apiVersion: v3 +kind: datastore +metadata: + name: orders-postgres + additionalOwners: + - name: db-team + type: operator +--- +apiVersion: v3 +kind: service +metadata: + name: shopping-cart-api +--- +apiVersion: v3 +kind: service +metadata: + name: shopping-cart-processor +--- +{{< /code-block >}} {{% /collapse-content %}} ### Explicit and implicit metadata inheritance