general:
  resource:
    kind: Application
    group: applicationconnector.kyma-project.io
    version: v1alpha1
  urlPath: applications
  scope: cluster
  name: Applications
  category: Integration
  description: >-
    {{[Application](https://kyma-project.io/#/application-connector-manager/user/README)}}
    represents an external solution connected to Kyma.
details:
  header:
    - name: headers.description
      source: spec.description
    - name: headers.access-label
      source: spec.accessLabel
  body:
    - widget: Table
      source: spec.services
      name: headers.services-and-events
      children:
        - source: $count($item.entries[type='API'])
          name: headers.apis
        - source: $count($item.entries[type='Events'])
          name: headers.events
        - source: $item.providerDisplayName
          name: headers.provider
      collapsibleTitle: $item.displayName
      collapsible:
        - widget: Plain
          children:
            - source: $item.longDescription
        - widget: Table
          name: headers.apis
          source: $item.entries[type = 'API']
          children:
            - source: $item.name
              name: headers.name
            - source: $item.accessLabel
              name: headers.access-label
            - widget: ExternalLink
              source: $item.centralGatewayUrl
              name: headers.gateway-url
              copyable: true
        - widget: Table
          name: headers.events
          source: $item.entries[type = 'Events']
          children:
            - source: $item.name
              name: headers.name
            - source: $item.accessLabel
              name: headers.access-label
            - widget: ExternalLink
              source: $item.centralGatewayUrl
              name: headers.gateway-url
              copyable: true
form:
  - path: metadata.name
    extraPaths:
      - spec.accessLabel
      - metadata.labels['app.kubernetes.io/name']
  - path: spec.description
    placeholder: placeholders.description
  - path: spec.accessLabel
translations:
  en:
    headers:
      access-label: Access Label
      apis: APIs
      description: Description
      events: Events
      gateway-url: Central Gateway URL
      name: Name
      provider: Provider
      services-and-events: Provided Services and Events
    placeholders:
      description: Provide a description for your Application
---
dataSources:
  jksSecret:
    resource:
      kind: Secret
      version: v1
    filter: >-
      $item.metadata.name =
      $root.spec.keystores.jks.passwordSecretRef.secretName
  pkcs12Secret:
    resource:
      kind: Secret
      version: v1
    filter: >-
      $item.metadata.name =
      $root.spec.keystores.pkcs12.passwordSecretRef.secretName
details:
  status:
    header:
      - name: status
        source: 'status.state ? status.state : "UNKNOWN"'
        highlights:
          unknown:
            - UNKNOWN
        widget: Badge
        description: status.message
    body:
      - name: conditions
        source: status.conditions
        widget: ConditionList
      - name: status.expirationDate
        source: $readableTimestamp(status.expirationDate)
      - name: issuer
        source: status.issuerRef.name
      - name: Observed Generation
        source: status.observedGeneration
  body:
    - name: Specification
      widget: Panel
      children:
        - name: issuer
          source: spec.issuerRef.name
          widget: ResourceLink
          visibility: $exists(spec.issuerRef)
          resource:
            namespace: $root.spec.issuerRef.namespace
            kind: '''Issuer'''
            name: $root.spec.issuerRef.name
        - name: secret
          source: spec.secretRef.name
          widget: ResourceLink
          resource:
            namespace: $root.spec.secretRef.namespace
            kind: '''Secret'''
            name: $root.spec.secretRef.name
        - name: spec.secretName
          source: spec.secretName
          visibility: $exists(spec.secretName) and $not($exists(spec.secretRef))
        - name: spec.secretLabels
          source: spec.secretLabels
          visibility: $exists(spec.secretLabels)
        - name: commonName
          source: spec.commonName
        - name: dnsNames
          source: spec.dnsNames
          widget: Labels
        - name: spec.csr
          source: spec.csr
        - name: spec.followCNAME
          source: spec.followCNAME
          visibility: $exists(spec.followCNAME)
        - name: spec.renew
          source: spec.renew
        - name: spec.ensureRenewedAfter
          source: spec.ensureRenewedAfter
          visibility: $exists(spec.ensureRenewedAfter)
        - name: spec.preferredChain
          source: spec.preferredChain
          visibility: $exists(spec.preferredChain)
    - name: spec.keystores
      widget: Panel
      visibility: $exists(spec.keystores)
      children:
        - name: JKS
          widget: Panel
          visibility: $exists(spec.keystores.jks)
          children:
            - name: spec.keystores.create
              source: spec.keystores.jks.create
              visibility: $exists(spec.keystores.jks.create)
            - name: spec.keystores.passwordSecretRef
              widget: Panel
              visibility: $exists(spec.keystores.jks.passwordSecretRef)
              children:
                - name: Password Secret Ref
                  source: spec.keystores.jks.passwordSecretRef.secretName
                  widget: ResourceLink
                  visibility: >-
                    $exists(spec.keystores.jks.passwordSecretRef.secretName) and
                    $count($jksSecret().items)>0
                  resource:
                    namespace: $jksSecret().items.metadata.namespace
                    kind: '''Secret'''
                    name: $root.spec.keystores.jks.passwordSecretRef.secretName
                - name: spec.keystores.secretName
                  source: spec.keystores.jks.passwordSecretRef.secretName
                  visibility: >-
                    $exists(spec.keystores.jks.passwordSecretRef.secretName) and
                    $count($jksSecret().items)=0
                - name: spec.keystores.key
                  source: spec.keystores.jks.passwordSecretRef.key
                  visibility: $exists(spec.keystores.jks.passwordSecretRef.key)
        - name: PKCS12
          widget: Panel
          visibility: $exists(spec.keystores.pkcs12)
          children:
            - name: Create
              source: spec.keystores.pkcs12.create
              visibility: $exists(spec.keystores.pkcs12.create)
            - name: spec.keystores.passwordSecretRef
              widget: Panel
              visibility: $exists(spec.keystores.pkcs12.passwordSecretRef)
              children:
                - name: Password Secret Ref
                  source: spec.keystores.pkcs12.passwordSecretRef.secretName
                  widget: ResourceLink
                  visibility: >-
                    $exists(spec.keystores.pkcs12.passwordSecretRef.secretName)
                    and $count($pkcs12Secret().items)>0
                  resource:
                    namespace: $pkcs12Secret().items.metadata.namespace
                    kind: '''Secret'''
                    name: $root.spec.keystores.pkcs12.passwordSecretRef.secretName
                - name: spec.keystores.secretName
                  source: spec.keystores.pkcs12.passwordSecretRef.secretName
                  visibility: >-
                    $exists(spec.keystores.pkcs12.passwordSecretRef.secretName)
                    and $count($pkcs12Secret().items)=0
                - name: spec.keystores.key
                  source: spec.keystores.pkcs12.passwordSecretRef.key
                  visibility: $exists(spec.keystores.pkcs12.passwordSecretRef.key)
    - name: spec.privateKey
      widget: Panel
      visibility: $exists(spec.privateKey)
      children:
        - name: spec.privateKey.algorithm
          source: spec.privateKey.algorithm
          visibility: $exists(spec.privateKey.algorithm)
        - name: spec.privateKey.size
          source: spec.privateKey.size
          visibility: $exists(spec.privateKey.size)
    - widget: EventList
      name: Events
      filter: $matchEvents($$, $root.kind, $root.metadata.name)
      hideInvolvedObjects: true
form:
  - var: useCSR
    dynamicValue: $exists(spec.csr)
    simple: true
    type: boolean
    name: spec.useCSR
  - simple: true
    path: spec.commonName
    required: true
    placeholder: certificateCN
    visibility: $useCSR = false
  - simple: true
    path: spec.csr
    required: true
    placeholder: spec.certSignReq
    visibility: $useCSR
    decodable: true
    decodedPlaceholder: spec.certSignReqDecoded
  - path: spec.dnsNames
    widget: SimpleList
    children:
      - path: '[]'
    placeholder: spec.additionalDomains
  - name: issuer
    path: spec.issuerRef
    required: false
    widget: ResourceRef
    visibility: $canI("cert.gardener.cloud/v1alpha1", 'Issuer')
    overwrite: false
    resource:
      kind: Issuer
      group: cert.gardener.cloud
      version: v1alpha1
  - simple: true
    var: separator
    value: ''
  - simple: true
    path: spec.issuerRef
    required: false
    widget: FormGroup
    overwrite: false
    visibility: $not($canI('cert.gardener.cloud/v1alpha1', 'Issuer'))
    children:
      - path: namespace
      - path: name
  - path: spec.renew
  - var: useExistingSecret
    name: spec.useExisting
    dynamicValue: $exists(spec.secretRef)
    type: boolean
  - path: spec.secretName
    visibility: $useExistingSecret = false
  - path: spec.secretRef.name
    widget: Resource
    resource:
      kind: Secret
      version: v1
      scope: namespace
    filter: $item.type ='kubernetes.io/tls'
    defaultExpanded: true
    required: true
    visibility: $useExistingSecret
general:
  resource:
    kind: Certificate
    group: cert.gardener.cloud
    version: v1alpha1
  name: Certificates
  category: Configuration
  urlPath: certificates
  scope: namespace
  description: >-
    {{[Certificate](https://cert-manager.io/docs/concepts/certificate/)}}
    provides a definition of a certificate that is then processed by the
    indicated issuer.
list:
  - name: commonName
    source: status.commonName
  - name: issuer
    source: status.issuerRef.name
  - name: status.expirationDate
    source: $readableTimestamp(status.expirationDate)
  - name: status
    source: 'status.state ? status.state : "UNKNOWN"'
    highlights:
      unknown:
        - UNKNOWN
    widget: Badge
    description: status.message
translations:
  en:
    metadata.annotations: Annotations
    metadata.labels: Labels
    metadata.creationTimestamp: Created at
    status: Status
    status.expirationDate: Expiration Time
    conditions.conditions: Conditions
    issuer: Issuer
    commonName: Common Name
    spec.secretRef: Secret to use
    spec.useExisting: Use the existing Secret
    spec.additionalDomains: Additional domain names, one per line
    spec.dnsNames: DNS Names
    dnsNames: DNS Names
    spec.csr: CSR
    spec.useCSR: Use a CSR
    spec.certSignReq: Plain text Certificate Signing Request
    spec.certSignReqDecoded: Base64-encoded Certificate Signing Request
    spec.followCNAME: Follow CNAME
    spec.keystores: Keystores
    spec.keystores.create: Create
    spec.keystores.passwordSecretRef: Password Secret Ref
    spec.keystores.secretName: Secret Name
    spec.keystores.key: Key
    spec.privateKey: Private Key
    spec.privateKey.algorithm: Algorithm
    spec.privateKey.size: Size
    spec.renew: Renew
    spec.ensureRenewedAfter: Ensure Renewed After
    spec.preferredChain: Preferred Chain
    spec.secretLabels: Secret Labels
    spec.secretName: Secret Name
    certificateCN: Certificate CN (max 64 characters)
    secret: Secret
    conditions: Conditions
---
dataSources:
  targetServices:
    resource:
      kind: Service
      version: v1
    filter: $exists($item.status.loadBalancer.ingress)
  relatedService:
    resource:
      kind: Service
      version: v1
    filter: >-
      $filter($root.spec.targets, function ($v, $i, $a) {
      $contains($item.status.loadBalancer.ingress.ip, $v)})
details:
  resourceGraph:
    dataSources:
      - source: relatedService
  status:
    header:
      - source: 'status.state ? status.state : "UNKNOWN"'
        highlights:
          informative:
            - UNKNOWN
        type: string
        name: status
        widget: Badge
        description: status.message
    body:
      - name: Provider
        source: status.provider
        fullWidth: true
      - name: Observed Generation
        source: status.observedGeneration
  body:
    - name: Specification
      widget: Panel
      children:
        - name: spec.dnsName
          source: spec.dnsName
        - name: TTL
          source: spec.ttl
        - name: spec.targets
          widget: JoinedArray
          source: spec.targets
form:
  - simple: true
    path: spec.dnsName
    placeholder: dnsName.placeholder
    required: true
  - simple: true
    name: TTL
    placeholder: ttl.placeholder
    path: spec.ttl
    required: true
  - path: spec.targets
    widget: SimpleList
    simple: true
    defaultExpanded: true
    required: true
    name: spec.targets
    children:
      - simple: true
        enum: >-
          $map($targetServices().items, function($v, $i, $a) {
          {'key':$v.status.loadBalancer.ingress.ip ,
          'name':$v.status.loadBalancer.ingress.ip & ' (' & $v.metadata.name &
          ')'} })
        placeholder: target.placeholder
  - path: spec.text
    name: spec.text
    widget: SimpleList
    children:
      - path: '[]'
        simple: true
    placeholder: text.placeholder
    defaultExpanded: true
general:
  resource:
    kind: DNSEntry
    group: dns.gardener.cloud
    version: v1alpha1
  name: DNS Entries
  category: Configuration
  urlPath: dnsentries
  scope: namespace
  description: >-
    {{[DNSEntry](https://kyma-project.io/docs/kyma/latest/03-tutorials/00-api-exposure/apix-02-setup-custom-domain-for-workload/)}}
    is an object that represents the request to create an external DNS record.
list:
  - source: 'status.state ? status.state : "UNKNOWN"'
    highlights:
      informative:
        - UNKNOWN
    type: string
    name: status
    widget: Badge
    description: status.message
presets:
  - name: template
    default: true
    value:
      metadata:
        annotations:
          dns.gardener.cloud/class: garden
      spec:
        ttl: 600
        dnsName: ''
        targets: []
        text: []
        items: []
        name: ''
        bool: false
translations:
  en:
    metadata.annotations: Annotations
    metadata.labels: Labels
    metadata.creationTimestamp: Created at
    target.placeholder: Enter the A record target or CNAME record
    spec.targets: Targets
    spec.dnsName: DNSName
    ttl.placeholder: Enter the time to live
    spec.text: Text
    dnsName.placeholder: Select the DNSName
    text.placeholder: Text record must be a string. Provide either target or text.
    status: Status
---
dataSources:
  relatedSecret:
    resource:
      kind: Secret
      version: v1
    filter: $root.spec.secretRef.name = $item.metadata.name
details:
  resourceGraph:
    depth: 1
    dataSources:
      - source: relatedSecret
  status:
    header:
      - source: 'status.state ? status.state : "UNKNOWN"'
        highlights:
          informative:
            - UNKNOWN
        type: string
        name: status
        widget: Badge
        description: status.message
    body:
      - name: Default TTL
        source: status.defaultTTL
      - name: Observed Generation
        source: status.observedGeneration
  header:
    - name: Finalizers
      source: metadata.finalizers
      widget: Labels
  body:
    - name: Specification
      widget: Panel
      children:
        - source: spec.type
          name: Type
        - name: Secret
          source: spec.secretRef.name
          widget: ResourceLink
          resource:
            namespace: $root.spec.secretRef.namespace
            kind: '''Secret'''
            name: $root.spec.secretRef.name
        - name: Default TTL
          source: spec.defaultTTL
          visibility: $exists(spec.defaultTTL)
        - name: Rate Limit
          widget: Panel
          visibility: $exists(spec.rateLimit)
          children:
            - name: spec.rateLimit
              source: spec.userInfo.groups
              widget: Labels
            - name: UID
              source: spec.rateLimit.uid
            - name: Requests Per Day
              source: spec.rateLimit.requestsPerDay
    - widget: Columns
      children:
        - name: Included Domains
          widget: Table
          disablePadding: true
          showHeader: true
          source: spec.domains.include
          children:
            - source: $item
              name: Included Domains
              search: true
        - name: Excluded Domains
          widget: Table
          disablePadding: true
          showHeader: true
          source: spec.domains.exclude
          children:
            - source: $item
              name: Excluded Domains
              search: true
    - widget: Columns
      visibility: $exists(spec.zones)
      children:
        - name: Included Zones
          widget: Table
          disablePadding: true
          showHeader: true
          source: spec.zones.include
          children:
            - source: $item
              name: Included Zones
              search: true
        - name: Excluded Zones
          widget: Table
          disablePadding: true
          showHeader: true
          source: spec.zones.exclude
          children:
            - source: $item
              name: Excluded Zones
              search: true
form:
  - simple: true
    path: spec.type
    widget: Text
    placeholder: provider.choose
    enum:
      - alicloud-dns
      - aws-route53
      - azure-dns
      - google-clouddns
      - openstack-designate
      - cloudflare-dns
      - infoblox-dns
      - netlify-dns
    required: true
  - name: spec.secretRef
    simple: true
    path: spec.secretRef
    widget: ResourceRef
    provideVar: secret
    visibility: $canI('v1', 'Secret')
    overwrite: false
    resource:
      kind: Secret
      version: v1
    defaultExpanded: true
    required: true
  - simple: true
    var: separator
    value: ''
  - simple: true
    name: spec.secretRef
    path: spec.secretRef
    widget: FormGroup
    required: true
    overwrite: false
    visibility: $not($canI('v1', 'Secret'))
    children:
      - path: namespace
      - path: name
  - path: spec.domains.include
    simple: true
    widget: SimpleList
    children:
      - path: '[]'
        simple: true
    placeholder: domain.allowed
    defaultExpanded: true
    required: true
  - path: spec.domains.exclude
    widget: SimpleList
    children:
      - path: '[]'
    placeholder: domain.forbidden
general:
  resource:
    kind: DNSProvider
    group: dns.gardener.cloud
    version: v1alpha1
  name: DNS Providers
  category: Configuration
  urlPath: dnsproviders
  scope: namespace
  description: >-
    {{[DNSProvider](https://kyma-project.io/docs/kyma/latest/03-tutorials/00-api-exposure/apix-02-setup-custom-domain-for-workload/)}}
    is used to specify and manage the configuration for the external DNS
    services.
list:
  - name: spec.type
    source: spec.type
  - source: 'status.state ? status.state : "UNKNOWN"'
    highlights:
      informative:
        - UNKNOWN
    name: status
    widget: Badge
    description: status.message
presets:
  - name: template
    default: true
    value:
      metadata:
        annotations:
          dns.gardener.cloud/class: garden
translations:
  en:
    metadata.annotations: Annotations
    metadata.labels: Labels
    metadata.creationTimestamp: Created at
    provider.choose: Choose Provider type
    spec.type.alicloud-dns: Alicloud DNS provider
    spec.type.aws-route53: AWS Route 53 provider
    spec.type.azure-dns: Azure DNS provider
    spec.type.google-clouddns: Google CloudDNS provider
    spec.type.openstack-designate: Openstack Designate provider
    spec.type.cloudflare-dns: Cloudflare DNS provider
    spec.type.infoblox-dns: Infoblox DNS provider
    spec.type.netlify-dns: Netlify DNS provider
    spec.domains.include: Include Domains
    spec.domains.exclude: Exclude Domains
    domain.allowed: Domain that is allowed
    domain.forbidden: Domain that is forbidden
    spec.secretRef: Secret Reference
    status: Status
---
dataSources:
  relatedDeployments:
    resource:
      kind: Deployment
      version: v1
    filter: >-
      $root.spec.scaleTargetRef.kind = 'Deployment' and
      $root.spec.scaleTargetRef.name = $item.metadata.name
details:
  resourceGraph:
    depth: 2
    networkFlowLevel: -1
    dataSources:
      - source: relatedDeployments
  header:
    - name: Status
      source: >-
        $filter(status.conditions, function($v, $i, $a) {$v.status =
        'True'}).type
      widget: Labels
  status:
    - name: Conditions
      source: status.conditions
      widget: ConditionList
    - name: Last Scale Time
      source: status.lastScaleTime
      widget: TimeFromNow
    - name: Current Replicas
      source: status.currentReplicas
    - name: Desired Replicas
      source: status.desiredReplicas
    - name: Observed Generation
      source: status.observedGeneration
  body:
    - name: Specification
      widget: Panel
      children:
        - name: Min Replicas
          source: spec.minReplicas
        - name: Current Replicas
          source: status.currentReplicas
        - name: Max Replicas
          source: spec.maxReplicas
        - name: Scale Target Reference - Kind
          source: spec.scaleTargetRef.kind
        - name: Scale Target Reference - Name
          source: spec.scaleTargetRef.name
          widget: ResourceLink
          resource:
            name: spec.scaleTargetRef.name
            namespace: $root.metadata.namespace
            kind: spec.scaleTargetRef.kind
    - widget: Columns
      children:
        - name: Scale-down behavior
          source: spec.behavior.scaleDown
          widget: Panel
          visibility: $exists(spec.behavior.scaleDown)
          children:
            - name: Stabilization window (seconds)
              source: stabilizationWindowSeconds
            - name: Select policy
              source: selectPolicy
            - name: Policies
              source: policies
              widget: Table
              disablePadding: true
              showHeader: true
              children:
                - name: Type
                  source: type
                - name: Value
                  source: value
                - name: Period (seconds)
                  source: periodSeconds
        - name: Scale-up behavior
          source: spec.behavior.scaleUp
          visibility: $exists(spec.behavior.scaleUp)
          widget: Panel
          children:
            - name: Stabilization window (seconds)
              source: stabilizationWindowSeconds
            - name: Select policy
              source: selectPolicy
            - name: Policies
              source: policies
              widget: Table
              showHeader: true
              disablePadding: true
              children:
                - name: Type
                  source: type
                - name: Value
                  source: value
                - name: Period (seconds)
                  source: periodSeconds
    - name: Metrics
      source: spec.metrics
      widget: Table
      showHeader: true
      children:
        - name: Type
          search: true
          source: type
        - name: Name
          search: true
          source: >-
            $item.type = "Resource" ? $item.resource.name : $item.type = "Pods"
            ? $item.pods.metric.name :  $item.type = "Object" ?
            $item.object.metric.name : $item.external.metric.name
        - name: Target Type
          source: >-
            $item.type = "Resource" ? $item.resource.target.type : $item.type =
            "Pods" ? $item.pods.target.type :  $item.type = "Object" ?
            $item.object.target.type : $item.external.target.type
        - name: Current Metric
          source: >-
            $item.type = "Resource" ? ($item.resource.target.type =
            "Utilization" ?  $join([$string($not($root.status.currentMetrics =
            null) ?  ($single($root.status.currentMetrics, function($v, $i, $a)
            {$v.resource.name =
            $item.resource.name}).resource.current.averageUtilization & "%") :
            "-"), " / ",$string($item.resource.target.averageUtilization),"%"]):
            $join([$string($not($root.status.currentMetrics = null) ? 
            $single($root.status.currentMetrics, function($v, $i, $a)
            {$v.resource.name =
            $item.resource.name}).resource.current.averageValue : "-"), " /
            ",$string($item.resource.target.averageValue)])) : $item.type =
            "Pods" ?  $join([$string($not($root.status.currentMetrics = null) ? 
            $single($root.status.currentMetrics, function($v, $i, $a)
            {$v.pods.metric.name =
            $item.pods.metric.name}).pods.current.averageValue : "-"), " /
            ",$string($item.pods.target.averageValue)]) : $item.type = "Object"
            ?  ($item.object.target.type = "AverageValue" ? 
            $join([$string($not($root.status.currentMetrics = null) ? 
            $single($root.status.currentMetrics, function($v, $i, $a)
            {$v.object.metric.name =
            $item.object.metric.name}).object.current.averageValue : "-"), " /
            ",$string($item.object.target.averageValue)]):
            $join([$string($not($root.status.currentMetrics = null) ? 
            $single($root.status.currentMetrics, function($v, $i, $a)
            {$v.object.metric.name =
            $item.object.metric.name}).object.current.value : "-"), " /
            ",$string($item.object.target.value)])) :
            ($item.external.target.type = "AverageValue" ? 
            $join([$string($not($root.status.currentMetrics = null) ? 
            $single($root.status.currentMetrics, function($v, $i, $a)
            {$v.external.metric.name =
            $item.external.metric.name}).external.current.averageValue : "-"), "
            / ",$string($item.external.target.averageValue)]):
            $join([$string($not($root.status.currentMetrics = null) ? 
            $single($root.status.currentMetrics, function($v, $i, $a)
            {$v.external.metric.name =
            $item.external.metric.name}).external.current.value : "-"), " /
            ",$string($item.external.target.value)]))
    - widget: EventList
      name: Events
      filter: $matchEvents($$, $root.kind, $root.metadata.name)
      hideInvolvedObjects: true
form:
  - name: minReplicas
    simple: true
    path: spec.minReplicas
  - name: maxReplicas
    simple: true
    required: true
    path: spec.maxReplicas
  - path: spec.behavior
    widget: FormGroup
    children:
      - path: scaleDown
        widget: FormGroup
        defaultExpanded: true
        children:
          - path: selectPolicy
            enum:
              - Min
              - Max
              - Disabled
          - path: stabilizationWindowSeconds
          - path: policies
            defaultExpanded: true
            widget: GenericList
            children:
              - path: '[].type'
                enum:
                  - Pods
                  - Percent
              - path: '[].value'
              - path: '[].periodSeconds'
      - path: scaleUp
        widget: FormGroup
        defaultExpanded: true
        children:
          - path: selectPolicy
            enum:
              - Min
              - Max
              - Disabled
          - path: stabilizationWindowSeconds
          - path: policies
            defaultExpanded: true
            widget: GenericList
            children:
              - path: '[].type'
                enum:
                  - Pods
                  - Percent
              - path: '[].value'
              - path: '[].periodSeconds'
                defaultValue: 0
  - name: Scale Target Reference
    simple: true
    path: spec.scaleTargetRef
    widget: FormGroup
    required: true
    defaultExpanded: true
    children:
      - simple: true
        required: true
        path: kind
        enum:
          - Pod
          - Deployment
          - ReplicaSet
          - StatefulSet
      - simple: true
        required: true
        path: name
        widget: Resource
        resource:
          scope: namespace
          kind: Pod
          version: v1
        visibility: spec.scaleTargetRef.kind = "Pod"
        overwrite: false
      - simple: true
        var: separator
        value: ''
      - simple: true
        required: true
        path: name
        widget: Resource
        resource:
          scope: namespace
          kind: Deployment
          group: apps
          version: v1
        visibility: spec.scaleTargetRef.kind = "Deployment"
        overwrite: false
      - simple: true
        var: separator
        value: ''
      - simple: true
        required: true
        path: name
        widget: Resource
        resource:
          scope: namespace
          kind: ReplicaSet
          group: apps
          version: v1
        visibility: spec.scaleTargetRef.kind = "ReplicaSet"
        overwrite: false
      - simple: true
        var: separator
        value: ''
      - simple: true
        required: true
        path: name
        widget: Resource
        resource:
          scope: namespace
          kind: StatefulSet
          group: apps
          version: v1
        visibility: spec.scaleTargetRef.kind = "StatefulSet"
        overwrite: false
      - simple: true
        var: separator
        value: ''
      - simple: true
        required: true
        path: name
        visibility: >-
          $not(spec.scaleTargetRef.kind = "Pod") and
          $not(spec.scaleTargetRef.kind = "Deployment") and
          $not(spec.scaleTargetRef.kind = "ReplicaSet") and
          $not(spec.scaleTargetRef.kind = "StatefulSet")
        overwrite: false
      - name: API version
        simple: true
        path: apiVersion
  - path: spec.metrics
    simple: true
    widget: GenericList
    defaultExpanded: true
    children:
      - simple: true
        path: '[].type'
        required: true
        enum:
          - Resource
          - Pods
          - Object
          - External
      - path: '[].resource.name'
        simple: true
        enum:
          - cpu
          - memory
        visibility: $item.type = 'Resource'
      - path: '[].resource.target'
        widget: FormGroup
        simple: true
        visibility: $item.type = 'Resource'
        defaultExpanded: true
        children:
          - path: type
            simple: true
            enum:
              - Utilization
              - AverageValue
          - path: averageUtilization
            simple: true
            visibility: $item.resource.target.type = 'Utilization'
          - path: averageValue
            simple: true
            visibility: $item.resource.target.type = 'AverageValue'
      - path: '[].pods.metric.name'
        simple: true
        widget: Resource
        resource:
          scope: namespace
          kind: Pod
          version: v1
        visibility: $item.type = 'Pods'
      - path: '[].pods.metric.selector.matchLabels'
        simple: true
        visibility: $item.type = 'Pods'
        widget: KeyValuePair
      - path: '[].pods.target'
        widget: FormGroup
        simple: true
        visibility: $item.type = 'Pods'
        defaultExpanded: true
        children:
          - path: type
            simple: true
            enum:
              - AverageValue
          - path: averageValue
            simple: true
            visibility: $item.pods.target.type = 'AverageValue'
          - path: value
            simple: true
            visibility: $item.pods.target.type = 'Value'
      - path: '[].object.metric.name'
        simple: true
        visibility: $item.type = 'Object'
      - path: '[].object.metric.selector.matchLabels'
        simple: true
        visibility: $item.type = 'Object'
        widget: KeyValuePair
      - path: '[].object.describedObject'
        widget: FormGroup
        simple: true
        visibility: $item.type = 'Object'
        defaultExpanded: true
        children:
          - path: kind
            simple: true
            required: true
          - path: name
            simple: true
            required: true
          - name: API version
            path: apiVersion
            simple: true
      - path: '[].object.target'
        widget: FormGroup
        simple: true
        visibility: $item.type = 'Object'
        defaultExpanded: true
        children:
          - path: type
            simple: true
            enum:
              - AverageValue
              - Value
          - path: averageValue
            simple: true
            visibility: $item.object.target.type = 'AverageValue'
          - path: value
            simple: true
            visibility: $item.object.target.type = 'Value'
      - path: '[].external.metric.name'
        simple: true
        visibility: $item.type = 'External'
      - path: '[].external.metric.selector.matchLabels'
        simple: true
        visibility: $item.type = 'External'
        widget: KeyValuePair
      - path: '[].external.target'
        widget: FormGroup
        simple: true
        visibility: $item.type = 'External'
        defaultExpanded: true
        children:
          - path: type
            simple: true
            enum:
              - AverageValue
              - Value
          - path: averageValue
            simple: true
            visibility: $item.external.target.type = 'AverageValue'
          - path: value
            simple: true
            visibility: $item.external.target.type = 'Value'
general:
  resource:
    kind: HorizontalPodAutoscaler
    group: autoscaling
    version: v2
  name: Horizontal Pod Autoscalers
  category: Discovery and Network
  urlPath: horizontalpodautoscalers
  scope: namespace
  description: >-
    {{[Horizontal Pod
    Autoscalers](https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/horizontal-pod-autoscaler-v2/)}}
    automatically manages the number of Pod replicas to match the demand.
list:
  - name: Metrics
    source: $count(spec.metrics)
  - name: Min Replicas
    source: spec.minReplicas
  - name: Max Replicas
    source: spec.maxReplicas
  - name: Current Replicas
    source: status.currentReplicas
  - name: Status
    source: $filter(status.conditions, function($v, $i, $a) {$v.status = 'True'}).type
    widget: Labels
---
details:
  status:
    header:
      - name: status
        source: 'status.state ? status.state : "UNKNOWN"'
        highlights:
          informative:
            - UNKNOWN
        widget: Badge
        description: status.message
    body:
      - name: status.observedGeneration
        source: status.observedGeneration
      - name: status.requestsPerDayQuota
        source: status.requestsPerDayQuota
  body:
    - name: specification
      widget: Panel
      children:
        - name: issuertype
          source: '$exists(spec.acme) ? "ACME" : $exists(spec.ca) ? "CA" : ""'
        - name: spec.acme.server
          source: spec.acme.server
          visibility: $exists(spec.acme)
        - name: spec.acme.email
          source: spec.acme.email
          visibility: $exists(spec.acme)
        - name: spec.acme.skipDNSChallengeValidation
          source: spec.acme.skipDNSChallengeValidation
          visibility: $exists(spec.acme)
        - name: spec.acme.autoRegistration
          source: spec.acme.autoRegistration
          visibility: $exists(spec.acme)
        - name: spec.ca.privateKeySecretRef
          visibility: $exists(spec.acme)
          source: spec.acme.privateKeySecretRef.name
          widget: ResourceLink
          resource:
            namespace: $root.spec.acme.privateKeySecretRef.namespace
            kind: '''Secret'''
            name: $root.spec.acme.privateKeySecretRef.name
        - name: spec.ca.privateKeySecretRef
          visibility: $exists(spec.ca)
          source: spec.ca.privateKeySecretRef.name
          widget: ResourceLink
          resource:
            namespace: $root.spec.ca.privateKeySecretRef.namespace
            kind: '''Secret'''
            name: $root.spec.ca.privateKeySecretRef.name
        - name: spec.acme.externalAccountBinding.keyID
          source: spec.acme.externalAccountBinding.keyID
          visibility: $exists(spec.acme)
        - name: spec.acme.externalAccountBinding.keySecretRef
          visibility: $exists(spec.acme)
          source: spec.acme.externalAccountBinding.keySecretRef.name
          widget: ResourceLink
          resource:
            namespace: $root.spec.acme.externalAccountBinding.keySecretRef.namespace
            kind: '''Secret'''
            name: $root.spec.acme.externalAccountBinding.keySecretRef.name
    - widget: Columns
      visibility: $exists(spec.acme.precheckNameservers)
      children:
        - name: spec.acme.precheckNameservers
          widget: Table
          visibility: $exists(spec.acme.precheckNameservers)
          disablePadding: true
          showHeader: false
          source: spec.acme.precheckNameservers
          children:
            - source: $item
              search: true
    - widget: Columns
      visibility: $exists(spec.acme)
      children:
        - name: spec.acme.includeddomains
          widget: Table
          disablePadding: true
          showHeader: false
          source: spec.acme.domains.include
          children:
            - source: $item
              search: true
        - name: spec.acme.excludeddomains
          widget: Table
          disablePadding: true
          showHeader: false
          source: spec.acme.domains.exclude
          children:
            - source: $item
              search: true
    - widget: EventList
      name: events
      filter: $matchEvents($$, $root.kind, $root.metadata.name)
      hideInvolvedObjects: true
form:
  - var: IssuerType
    dynamicValue: |
      $exists(spec.acme) ? 'ACME' : $exists(spec.ca) ? 'CA' : ''
    name: issuertype
    simple: true
    widget: Text
    enum:
      - CA
      - ACME
    required: true
    placeholder: selectissuertype
  - path: spec.requestsPerDayQuota
    required: true
  - simple: true
    path: spec.acme
    visibility: $IssuerType = 'ACME'
    children:
      - path: server
        simple: true
        overwrite: false
        placeholder: spec.acme.serverurl
      - path: email
        simple: true
        placeholder: email.for.registration
      - path: skipDNSChallengeValidation
      - name: spec.acme.precheckNameservers
        path: precheckNameservers
        widget: SimpleList
        children:
          - path: '[]'
            simple: true
            placeholder: spec.acme.precheckNameservers.placeholder
      - path: privateKeySecretRef
        widget: ResourceRef
        provideVar: secret
        resource:
          kind: Secret
          version: v1
        defaultExpanded: true
      - path: autoRegistration
      - path: domains.include
        simple: true
        widget: SimpleList
        children:
          - path: '[]'
            simple: true
        placeholder: spec.acme.domainallowed
      - path: domains.exclude
        widget: SimpleList
        children:
          - path: '[]'
        placeholder: spec.acme.domainforbidden
      - path: externalAccountBinding
        widget: FormGroup
        children:
          - path: keyID
            required: false
            placeholder: spec.acme.externalAccountBinding.id
      - path: externalAccountBinding.keySecretRef
        widget: ResourceRef
        provideVar: secret
        resource:
          kind: Secret
          version: v1
        defaultExpanded: true
        visibility: $exists(spec.acme.externalAccountBinding.keyID)
  - simple: true
    path: spec.ca
    visibility: $IssuerType = 'CA'
    children:
      - simple: true
        path: privateKeySecretRef
        widget: ResourceRef
        provideVar: secret
        resource:
          kind: Secret
          version: v1
        defaultExpanded: true
        required: true
general:
  resource:
    kind: Issuer
    group: cert.gardener.cloud
    version: v1alpha1
  name: Issuers
  category: Configuration
  urlPath: issuers
  scope: namespace
  description: >-
    {{[Issuer](https://cert-manager.io/docs/concepts/issuer/)}} is a Namespace
    resource responsible for provisioning of certificates.
list:
  - name: issuertype
    source: '$exists(spec.acme) ? "ACME" : $exists(spec.ca) ? "CA" : ""'
  - name: spec.acme.email
    source: spec.acme.email
  - name: status
    source: 'status.state ? status.state : "UNKNOWN"'
    highlights:
      informative:
        - UNKNOWN
    widget: Badge
    description: status.message
presets:
  - name: Default
    default: true
    value:
      spec:
        requestsPerDayQuota: 0
  - name: Lets Encrypt stage
    value:
      metadata:
        name: lets-encrypt-stage
      spec:
        requestsPerDayQuota: 0
        acme:
          server: https://acme-staging-v02.api.letsencrypt.org/directory
          email: ''
          autoRegistration: true
  - name: Lets Encrypt Production
    value:
      metadata:
        name: lets-encrypt-prod
      spec:
        requestsPerDayQuota: 0
        acme:
          server: https://acme-v02.api.letsencrypt.org/directory
          email: ''
          autoRegistration: true
translations:
  en:
    metadata.annotations: Annotations
    metadata.labels: Labels
    metadata.creationTimestamp: Created at
    issuertype: Issuer Type
    selectissuertype: Select Issuer type
    specification: Specification
    spec.requestsPerDayQuota: Daily Requests Quota
    spec.acme.email: Email
    email.for.registration: Email address for user registration
    spec.acme.server: Server
    spec.acme.serverurl: ACME Server URL
    spec.acme.domains.include: Include Domains
    spec.acme.domains.exclude: Exclude Domains
    spec.acme.includeddomains: Included Domains
    spec.acme.excludeddomains: Excluded Domains
    spec.acme.domainallowed: Domain that is allowed
    spec.acme.domainforbidden: Domain that is forbidden
    spec.acme.skipDNSChallengeValidation: Skip DNS challenge validation
    spec.acme.privateKeySecretRef: Private key Secret
    spec.acme.autoRegistration: Auto registration
    spec.acme.externalAccountBinding: External account binding
    spec.acme.externalAccountBinding.keyID: CA key ID
    spec.acme.externalAccountBinding.id: ID of the CA that the external account is bound to
    spec.acme.externalAccountBinding.keySecretRef: Symmetric MAC Secret
    spec.acme.precheckNameservers: Precheck Nameservers
    spec.acme.precheckNameservers.placeholder: Format `host` or `host:port`, e.g. "8.8.8.8" or "8.8.8.8:53"
    spec.ca.privateKeySecretRef: Private key Secret
    status: Status
    status.observedGeneration: Observed Generation
    status.requestsPerDayQuota: Requests per day quota
    events: Events
---
dataSources:
  moduleTemplates:
    resource:
      kind: ModuleTemplate
      namespace: null
      group: operator.kyma-project.io
      version: v1beta2
details:
  header: []
  body:
    - name: Summary
      widget: Panel
      children:
        - name: channel
          source: spec.channel
        - name: State
          widget: Badge
          source: status.state
          description: 'status.state!="Ready" ? status.lastOperation.operation : ""'
        - name: Age
          source: metadata.creationTimestamp
    - widget: Alert
      severity: warning
      source: '"alert.beta"'
      visibility: >-
        ( $fullModuleTemplate := $filter($moduleTemplates().items, function($v)
        { $v.metadata.labels."operator.kyma-project.io/module-name" in
        $item.spec.modules.name and
        $v.metadata.labels."operator.kyma-project.io/beta" = "true" }); $isBeta
        := $count($fullModuleTemplate) > 0; )
    - widget: Table
      source: >-
        $sort(( $statusModules := $filter($root.status.modules, function($v) {
        $exists($v.name) }); $specModulesWithoutStatus :=
        $filter(spec.modules[], function($v) { $not($v.name in
        $statusModules.name) }); $allModules :=
        $append($specModulesWithoutStatus, $statusModules); $allModules; ),
        function($l, $r) {$l.name > $r.name})
      name: Modules
      visibility: $exists(*)
      children:
        - name: Name
          source: $
          widget: Plain
          children:
            - widget: ResourceLink
              visibility: $exists(resource.metadata.name)
              source: name
              resource:
                name: resource.metadata.name
                namespace: resource.metadata.namespace
                kind: resource.kind
            - widget: Text
              visibility: $not($exists(resource.metadata.name))
              source: name
        - name: ''
          source: >-
            $filter($moduleTemplates().items, function($v)
            {$v.metadata.labels."operator.kyma-project.io/module-name" in name
            and
            $v.spec.channel=channel}).metadata.labels."operator.kyma-project.io/beta"
            = "true" ? "beta" : "-"
        - name: Namespace
          source: $parent.metadata.namespace
        - name: Channel
          source: channel
          widget: Text
        - name: Version
          source: version
          widget: Text
        - name: State
          widget: Badge
          source: 'state ? state : "UNNKOWN"'
          description: 'message ? message : ""'
        - name: Documentation
          widget: ExternalLink
          copyable: false
          source: '"Documentation"'
          link: >-
            $filter($moduleTemplates().items, function($v)
            {$v.metadata.labels."operator.kyma-project.io/module-name" in name
            and
            $v.spec.channel=channel}).metadata.annotations."operator.kyma-project.io/doc-url"
          visibility: >-
            ( $docsLink := $filter($moduleTemplates().items, function($v)
            {$v.metadata.labels."operator.kyma-project.io/module-name" in name
            and
            $v.spec.channel=channel}).metadata.annotations."operator.kyma-project.io/doc-url";
            $hasDocs := $count($docsLink) > 0; )
form:
  - simple: true
    path: spec.channel
    name: Kyma Default Channel
    enum: $distinct($moduleTemplates().items.spec.channel)
    required: true
  - simple: true
    path: spec.modules
    widget: Modules
    name: Modules
    defaultExpanded: true
    options:
      name: >
        $distinct($moduleTemplates().items.metadata.labels."operator.kyma-project.io/module-name")
      moduleTemplates: $moduleTemplates().items
      betaAlert: '"alert.beta"'
general:
  resource:
    kind: Kyma
    group: operator.kyma-project.io
    version: v1beta2
  name: Kyma
  category: Kyma
  urlPath: kymas
  scope: namespace
  description: >-
    {{[Kyma custom
    resource](https://github.com/kyma-project/lifecycle-manager/blob/main/docs/technical-reference/api/kyma-cr.md)}}
    configures your Kyma modules.
list:
  - name: Channel
    widget: Badge
    source: spec.channel
  - name: State
    widget: Badge
    source: status.state
    tooltip: status.state
translations:
  en:
    alert.beta: >-
      CAUTION: The Service Level Agreements (SLAs) and Support obligations do
      not apply to Beta modules and functionalities. If Beta modules or
      functionalities directly or indirectly affect other modules, the Service
      Level Agreements and Support for these modules are limited to priority
      levels P3 (Medium) or P4 (Low). Thus, Beta releases are not intended for
      use in customer production environments.
injections:
  - title: Introducing Modules
    name: Modules
    description: >-
      Modules add functionalities to your cluster. Consume SAP BTP services,
      monitor your cluster, build serverless applications and more.
    widget: FeaturedCard
    source: $
    id: ModulesBanner
    order: 0
    illustration: Modules
    design: information-1
    children:
      - widget: ResourceButton
        source: '''Add Modules'''
        resource:
          customUrl: kymamodules
      - widget: ExternalLinkButton
        link: >-
          https://help.sap.com/docs/btp/sap-business-technology-platform/kyma-s-modular-approach
    targets:
      - slot: banner
        location: ClusterOverview
---
details:
  header:
    - source: >-
        $each(spec.output, function($v, $k) {$v.url.value or
        $v.url.valueFrom.secretKeyRef.name or $v.host.value or
        $v.host.valueFrom.secretKeyRef.name ? $k})
      placeholder: custom
      type: string
      name: Type
      isSelected: true
      widget: Text
    - name: Unsupported-Mode
      source: status.unsupportedMode
      widget: Badge
      highlights:
        positive:
          - 'false'
        critical:
          - 'true'
  body:
    - source: status.conditions
      widget: Table
      name: Reconciliation Conditions
      children:
        - source: type
          name: Type
        - source: status
          name: Status
          widget: Badge
          highlights:
            positive:
              - 'True'
            critical:
              - 'False'
        - source: reason
          name: Reason
        - source: message
          name: Message
        - source: $readableTimestamp(lastTransitionTime)
          name: Last transition
          sort: true
    - widget: Panel
      name: Applications
      children:
        - widget: Panel
          name: Namespaces
          children:
            - name: Include
              widget: JoinedArray
              source: spec.input.application.namespaces.include
              separator: ', '
            - name: Exclude
              widget: JoinedArray
              source: spec.input.application.namespaces.exclude
              separator: ', '
            - name: System Namespaces
              source: spec.input.application.namespaces.system
        - widget: Panel
          name: Containers
          children:
            - name: Include
              widget: JoinedArray
              source: spec.input.application.containers.include
              separator: ', '
            - name: Exclude
              widget: JoinedArray
              source: spec.input.application.containers.exclude
              separator: ', '
        - widget: Panel
          name: Other Settings
          children:
            - name: Keep Annotations
              source: spec.input.application.keepAnnotations
            - name: Drop Labels
              source: spec.input.application.dropLabels
            - name: Keep Original Log Body
              source: spec.input.application.keepOriginalBody
    - widget: Panel
      name: Output
      children:
        - name: Custom
          widget: CodeViewer
          language: '''plaintext'''
          source: spec.output.custom
          visibility: $exists(spec.output.custom)
        - name: HTTP
          widget: Panel
          visibility: $exists(spec.output.http)
          children:
            - name: Host
              widget: Panel
              children:
                - name: Value
                  source: spec.output.http.host.value
                  visibility: $exists(spec.output.http.host.value)
                - name: Value From Secret
                  widget: ResourceRefs
                  source: spec.output.http.host.valueFrom.secretKeyRef
                  kind: Secret
                  visibility: $exists(spec.output.http.host.valueFrom.secretKeyRef.name)
            - name: User
              widget: Panel
              children:
                - name: Value
                  source: spec.output.http.user.value
                  visibility: $exists(spec.output.http.user.value)
                - name: Value From Secret
                  widget: ResourceRefs
                  source: spec.output.http.user.valueFrom.secretKeyRef
                  kind: Secret
                  visibility: $exists(spec.output.http.user.valueFrom.secretKeyRef.name)
            - name: Password
              widget: Panel
              children:
                - name: Value
                  source: spec.output.http.password.value
                  visibility: $exists(spec.output.http.password.value)
                - name: Value From Secret
                  widget: ResourceRefs
                  source: spec.output.http.password.valueFrom.secretKeyRef
                  kind: Secret
                  visibility: >-
                    $exists(spec.output.http.password.valueFrom.secretKeyRef.name)
            - name: TLS Settings
              widget: Panel
              children:
                - name: Disabled
                  source: spec.output.http.tls.disabled
                  placeholder: 'false'
                - name: Skip certificate validation
                  source: spec.output.http.tls.skipCertificateValidation
                  placeholder: 'false'
                - name: Ca
                  widget: Panel
                  visibility: $exists(spec.output.http.tls.ca)
                  source: spec.output.http.tls.ca
                  children:
                    - name: Value
                      source: value
                      visibility: $exists(value)
                    - name: Value From Secret
                      widget: ResourceRefs
                      source: valueFrom.secretKeyRef
                      kind: Secret
                      visibility: $exists(valueFrom.secretKeyRef.name)
                - name: Cert
                  widget: Panel
                  visibility: $exists(spec.output.http.tls.cert)
                  source: spec.output.http.tls.cert
                  children:
                    - name: Value
                      source: value
                      visibility: $exists(value)
                    - name: Value From Secret
                      widget: ResourceRefs
                      source: valueFrom.secretKeyRef
                      kind: Secret
                      visibility: $exists(valueFrom.secretKeyRef.name)
                - name: Key
                  widget: Panel
                  visibility: $exists(spec.output.http.tls.key)
                  source: spec.output.http.tls.key
                  children:
                    - name: Value
                      source: value
                      visibility: $exists(value)
                    - name: Value From Secret
                      widget: ResourceRefs
                      source: valueFrom.secretKeyRef
                      kind: Secret
                      visibility: $exists(valueFrom.secretKeyRef.name)
            - name: Other Settings
              widget: Panel
              children:
                - name: Compression
                  source: spec.output.http.compress
                - name: De-dot
                  source: spec.output.http.dedot
                  placeholder: 'false'
                - name: Format
                  source: spec.output.http.format
                  placeholder: json
                - name: Port
                  source: spec.output.http.port
                  placeholder: '443'
                - name: URI
                  source: spec.output.http.uri
form:
  - path: spec.input
    widget: FormGroup
    defaultExpanded: true
    children:
      - name: Include Namespaces
        widget: SimpleList
        path: application.namespaces.include
        defaultExpanded: true
        inputInfo: Include container logs from selected namespaces
        children:
          - path: '[]'
      - name: Exclude Namespaces
        widget: SimpleList
        path: application.namespaces.exclude
        children:
          - path: '[]'
      - name: Include System Namespaces
        path: application.namespaces.system
      - name: Include Containers
        widget: SimpleList
        path: application.containers.include
      - name: Exclude Containers
        widget: SimpleList
        path: application.containers.exclude
      - name: Keep Annotations
        path: application.keepAnnotations
      - name: Drop Labels
        path: application.dropLabels
      - name: Keep Original Log Body
        path: application.keepOriginalBody
  - name: Filters
    widget: SimpleList
    path: spec.filters
    children:
      - widget: FormGroup
        path: '[]'
        children:
          - widget: CodeEditor
            path: custom
  - path: spec.output
    widget: FormGroup
    defaultExpanded: true
    simple: true
    children:
      - name: Custom
        path: custom
        widget: CodeEditor
        advanced: true
        inputInfo: >-
          Note: If you use a custom output, you put the LogPipeline in
          unsupported mode
          (https://kyma-project.io/#/telemetry-manager/user/02-logs?id=unsupported-mode)
      - name: HTTP
        path: http
        widget: FormGroup
        defaultExpanded: true
        simple: true
        children:
          - name: Host
            path: host
            simple: true
            widget: FormGroup
            children:
              - name: Value
                path: value
                simple: true
                widget: Text
              - name: Secret Reference
                path: valueFrom.secretKeyRef
                simple: true
                widget: ResourceRef
                resource:
                  kind: secret
                  version: v1
                children:
                  - path: key
                    simple: true
                    enum: $keys($secret.data)
          - name: User
            path: user
            simple: true
            widget: FormGroup
            children:
              - name: Value
                path: value
                simple: true
                widget: Text
              - name: Secret Reference
                path: valueFrom.secretKeyRef
                simple: true
                widget: ResourceRef
                resource:
                  kind: secret
                  version: v1
                children:
                  - path: key
                    simple: true
                    enum: $keys($secret.data)
          - name: Password
            path: password
            simple: true
            widget: FormGroup
            children:
              - name: Value
                path: value
                simple: true
                widget: Text
              - name: Secret Reference
                path: valueFrom.secretKeyRef
                simple: true
                widget: ResourceRef
                resource:
                  kind: secret
                  version: v1
                children:
                  - path: key
                    simple: true
                    enum: $keys($secret.data)
          - name: TLS
            widget: FormGroup
            path: tls
            children:
              - name: Disabled
                path: disabled
              - name: Skip Certificate Validation
                path: skipCertificateValidation
              - name: CA
                path: ca
                widget: FormGroup
                simple: true
                children:
                  - name: Value
                    path: value
                    widget: Text
                    simple: true
                  - name: Secret Reference
                    path: valueFrom.secretKeyRef
                    widget: ResourceRef
                    simple: true
                    resource:
                      kind: secret
                      version: v1
                    children:
                      - simple: true
                        path: key
                        enum: $keys($secret.data)
              - name: Cert
                path: cert
                widget: FormGroup
                simple: true
                children:
                  - name: Value
                    path: value
                    widget: Text
                    simple: true
                  - name: Secret Reference
                    path: valueFrom.secretKeyRef
                    widget: ResourceRef
                    simple: true
                    resource:
                      kind: secret
                      version: v1
                    children:
                      - simple: true
                        path: key
                        enum: $keys($secret.data)
              - name: Key
                path: key
                widget: FormGroup
                simple: true
                children:
                  - name: Value
                    path: value
                    widget: Text
                    simple: true
                  - name: Secret Reference
                    path: valueFrom.secretKeyRef
                    widget: ResourceRef
                    simple: true
                    resource:
                      kind: secret
                      version: v1
                    children:
                      - simple: true
                        path: key
                        enum: $keys($secret.data)
          - name: URI
            path: uri
            widget: Text
          - name: Port
            path: port
            widget: Text
          - name: Compress
            path: compress
            widget: Text
          - name: Format
            path: format
            widget: Text
          - name: Dedot
            simple: true
            path: dedot
general:
  resource:
    kind: LogPipeline
    group: telemetry.kyma-project.io
    version: v1alpha1
  name: Log Pipelines
  category: Telemetry
  urlPath: logpipelines
  scope: cluster
  description: >-
    {{[LogPipeline custom
    resource](https://kyma-project.io/#/telemetry-manager/user/resources/02-logpipeline)}}
    configures a custom Log Pipeline.
list:
  - source: >-
      $each(spec.output, function($v, $k) {$v.url.value or
      $v.url.valueFrom.secretKeyRef.name or $v.host.value or
      $v.host.valueFrom.secretKeyRef.name ? $k})
    placeholder: custom
    type: string
    name: Type
    isSelected: true
    widget: Text
  - name: Unsupported-Mode
    source: status.unsupportedMode
    widget: Badge
    highlights:
      positive:
        - 'false'
      critical:
        - 'true'
  - name: Status
    source: status.conditions
    widget: Columns
    children:
      - name: Type
        source: type
        widget: Badge
      - name: Status
        source: status
        widget: Badge
        highlights:
          positive:
            - 'True'
          critical:
            - 'False'
---
dataSources:
  oauth2clients:
    resource:
      kind: OAuth2Client
      version: v1alpha1
      group: hydra.ory.sh
      namespace: null
    filter: $item.metadata.namespace != "kyma-system"
  secret:
    resource:
      kind: Secret
      version: v1
    filter: $item.metadata.name = $root.spec.secretName
details:
  header:
    - source: 'status.state ? "error" : "ok"'
      highlights:
        positive:
          - ok
        negative:
          - error
      name: status
      widget: Badge
  body:
    - source: '"deprecation.short"'
      widget: Alert
      name: warning
      severity: warning
    - name: configuration
      widget: Panel
      children:
        - name: spec.redirectUris
          source: spec.redirectUris
          widget: Labels
          visibility: $exists(spec.redirectUris)
        - name: spec.postLogoutRedirectUris
          source: spec.postLogoutRedirectUris
          widget: Labels
          visibility: $exists(spec.postLogoutRedirectUris)
        - name: spec.clientName
          source: spec.clientName
          widget: Labels
          visibility: $exists(spec.clientName)
        - name: spec.responseTypes
          source: spec.responseTypes
          widget: Labels
        - name: spec.grantTypes
          source: spec.grantTypes
          widget: Labels
        - name: spec.scope
          source: spec.scope
          widget: Labels
        - name: spec.audience
          source: spec.audience
          widget: Labels
          visibility: $exists(spec.audience)
        - name: spec.secretName
          widget: ResourceLink
          source: spec.secretName
          resource:
            name: spec.secretName
            namespace: $root.metadata.namespace
            kind: '''Secret'''
        - name: spec.tokenEndpointAuthMethod
          source: spec.tokenEndpointAuthMethod
          widget: Labels
    - name: data
      widget: Panel
      source: $secret().items.data
      decodable: true
      children:
        - name: secret.client_id
          source: client_id
        - name: secret.client_secret
          source: client_secret
form:
  - path: metadata.name
    extraPaths:
      - spec.secretName
      - metadata.labels['app.kubernetes.io/name']
  - path: spec.responseTypes
    simple: true
    required: true
    widget: MultiCheckbox
    name: Response Types
    options:
      - key: id_token
        name: ID Token
      - key: code
        name: Code
      - key: token
        name: Token
  - path: spec.grantTypes
    simple: true
    required: true
    widget: MultiCheckbox
    options:
      - key: client_credentials
        name: Client Credentials
      - key: authorization_code
        name: Authorization Code
      - key: implicit
        name: Implicit
      - key: refresh_token
        name: Refresh Token
  - name: spec.clientName
    path: spec.clientName
    widget: Text
  - name: spec.secretName
    path: spec.secretName
    widget: Resource
    visibility: $canI('v1', 'Secret')
    overwrite: false
    resource:
      kind: Secret
      scope: namespace
      version: v1
  - simple: true
    var: separator
    value: ''
  - name: spec.secretName
    path: spec.secretName
    visibility: $not($canI('v1', 'Secret'))
    overwrite: false
    widget: Text
  - name: spec.tokenEndpointAuthMethod
    path: spec.tokenEndpointAuthMethod
    enum:
      - none
      - client_secret_basic
      - client_secret_post
      - private_key_jwt
  - name: spec.scope
    widget: Text
    simple: true
    path: spec.scope
    inputInfo: >-
      You can provide more then one Scope, but they have to be separated by a
      Space
  - widget: SimpleList
    name: spec.redirectUris
    defaultExpanded: true
    path: spec.redirectUris
    inputInfo: >-
      Input must consist of two parts, which are separated by ':' (e.g.
      'test:temp')
    children:
      - path: '[]'
  - name: spec.postLogoutRedirectUris
    path: spec.postLogoutRedirectUris
    widget: SimpleList
    defaultExpanded: true
    inputInfo: >-
      Input must consist of two parts, which are separated by ':' (e.g.
      'test:temp')
    children:
      - path: '[]'
  - path: spec.audience
    name: spec.audience
    widget: SimpleList
    defaultExpanded: true
    children:
      - path: '[]'
general:
  resource:
    kind: OAuth2Client
    group: hydra.ory.sh
    version: v1alpha1
  name: OAuth2 Clients
  category: Configuration
  urlPath: oauth2clients
  scope: namespace
  description: >-
    Disclaimer: OAuth2Clients support is discontinued in Kyma! Please make sure
    to migrate to another solution as a soon as possible.
list:
  - source: '"deprecation.short"'
    widget: Alert
    severity: warning
  - name: spec.secretName
    widget: ResourceLink
    source: spec.secretName
    resource:
      name: spec.secretName
      namespace: $root.metadata.namespace
      kind: '''secret'''
  - source: 'status.state ? "error" : "ok"'
    highlights:
      positive:
        - ok
      negative:
        - error
    name: status
    widget: Badge
    description: status.message
injections:
  - name: deprecation.title
    widget: Panel
    source: $
    filter: $item.metadata.uid = ($oauth2clients().items.metadata.uid)[0]
    targets:
      - slot: details-top
        location: ClusterOverview
    order: 1
    children:
      - widget: Alert
        source: '''deprecation.long'''
        severity: warning
      - widget: ExternalLink
        name: Migration blogpost
        link: >-
          "https://blogs.sap.com/2023/06/06/sap-btp-kyma-runtime-ory-hydra-oauth2-client-migration"
        source: '"SAP BTP, Kyma runtime ORY Hydra OAuth2 Client migration"'
      - widget: ResourceList
        source: $oauth2clients()
        name: OAuth2Clients
        disableCreate: true
        children:
          - source: metadata.name
            name: Name
            sort: 'true'
            search:
              source: metadata.name
            widget: ResourceLink
            resource:
              name: metadata.name
              namespace: $root.metadata.namespace
              kind: kind
          - source: metadata.namespace
            name: Namespace
presets:
  - name: template
    default: true
    value:
      spec:
        scope: ''
        secretName: ''
        tokenEndpointAuthMethod: client_secret_basic
        responseTypes: []
        grantTypes: []
translations:
  en:
    metadata.annotations: Annotations
    metadata.labels: Labels
    metadata.creationTimestamp: Created at
    status: Status
    spec.scope: Scope
    spec.responseTypes: Response Types
    spec.grantTypes: Grant Types
    spec.tokenEndpointAuthMethod: Token Endpoint Authentication Method
    spec.tokenEndpointAuthMethod.none: None
    spec.tokenEndpointAuthMethod.client_secret_basic: Client Secret/ Basic
    spec.tokenEndpointAuthMethod.client_secret_post: Client Secret/ POST
    spec.tokenEndpointAuthMethod.private_key_jwt: Private Key/ JWT
    spec.redirectUris: Redirect URIs
    spec.postLogoutRedirectUris: Post-Logout Redirect URIs
    spec.audience: Audience
    spec.secretName: Secret Name
    configuration: Configuration
    data: Data
    spec.clientName: Client Name
    secret.client_id: client_id
    secret.client_secret: client_secret
    deprecation.title: Ory Hydra Deprecation on May 19, 2022
    deprecation.long: >
      You are using Ory Hydra OAuth2, which has been deprecated since May 19,
      2022 and is scheduled to be removed on October 14, 2023.

      During the Kyma upgrade on October 14, 2023, workloads that still rely on
      deprecated Ory Hydra OAuth2 may experience minor outages. To prevent this,
      follow the procedure outlined in the blog post below before the specified
      date.

      If you are unable to follow the procedure, Ory Hydra OAuth2 will be
      migrated to the hydra-deprecated Namespace to prevent outages caused by
      API call failures. However, you will then be fully responsible for
      managing Ory Hydra OAuth2. This includes troubleshooting, maintenance,
      security updates, vulnerability fixes, and adherence to product standards.

      If you want to continue using the OAuth2 functionality provided as part of
      the SAP BTP, Kyma runtime offering, delete the hydra-deprecated Namespace
      or follow the migration steps outlined in the blog post below.
    deprecation.short: >-
      Support for OAuth2Clients has been discontinued in Kyma. Migrate to a
      different solution.
---
dataSources:
  relatedServiceInstance:
    resource:
      kind: ServiceInstance
      group: services.cloud.sap.com
      version: v1
    filter: $root.spec.serviceInstanceName = $item.metadata.name
  relatedSecret:
    resource:
      kind: Secret
      version: v1
    filter: $root.spec.secretName = $item.metadata.name
details:
  resourceGraph:
    depth: 1
    dataSources:
      - source: relatedServiceInstance
      - source: relatedSecret
  status:
    header:
      - name: status
        source: status.conditions[$count(status.conditions)-1].reason
        highlights:
          positive:
            - Provisioned
          informative:
            - NotProvisioned
          negative:
            - CreateFailed
        widget: Badge
        description: >-
          $filter(status.conditions, function ($v, $i, $a) { $length($v.message)
          > 0 })[0].message
    body:
      - name: status.observedGeneration
        source: status.observedGeneration
      - name: status.lastCredentialsRotationTime
        source: status.lastCredentialsRotationTime
      - name: status.bindingID
        source: status.bindingID
      - name: status.instanceID
        source: status.instanceID
      - name: status.operationType
        source: status.operationType
      - name: status.operationURL
        source: status.operationURL
      - name: conditions
        source: status.conditions
        widget: ConditionList
  header:
    - name: metadata.finalizers
      source: metadata.finalizers
      widget: Labels
  body:
    - name: spec.specification
      widget: Panel
      children:
        - name: spec.serviceInstanceName
          source: spec.serviceInstanceName
          widget: ResourceLink
          resource:
            namespace: $root.metadata.namespace
            kind: '''ServiceInstance'''
            name: $root.spec.serviceInstanceName
        - name: spec.secretName
          source: spec.secretName
          widget: ResourceLink
          resource:
            namespace: $root.metadata.namespace
            kind: '''Secret'''
            name: $root.spec.secretName
        - name: spec.externalName
          source: spec.externalName
        - name: spec.secretKey
          source: spec.secretKey
          visibility: '$exists($value) ? $boolean($value) : false'
        - name: spec.secretRootKey
          source: spec.secretRootKey
          visibility: '$exists($value) ? $boolean($value) : false'
    - name: spec.userInfo
      widget: Panel
      children:
        - name: spec.groups
          source: spec.userInfo.groups
          widget: Labels
        - name: spec.uid
          source: spec.userInfo.uid
        - name: spec.username
          source: spec.userInfo.username
      visibility: $exists(spec.userInfo)
    - name: spec.credentialsRotationPolicy
      widget: Panel
      visibility: $exists(spec.credentialsRotationPolicy)
      children:
        - name: spec.enabled
          source: spec.credentialsRotationPolicy.enabled
        - name: spec.rotatedBindingTTL
          source: spec.credentialsRotationPolicy.rotatedBindingTTL
        - name: spec.rotationFrequency
          source: spec.credentialsRotationPolicy.rotationFrequency
    - name: spec.parameters
      source: spec.parameters
      widget: CodeViewer
      visibility: '$exists($value) ? $boolean($value) : false'
    - name: spec.parametersFrom
      source: spec.parametersFrom
      widget: CodeViewer
      visibility: '$exists($value) ? $boolean($value) : false'
    - name: spec.secretTemplate
      source: spec.secretTemplate
      widget: CodeViewer
      visibility: '$exists($value) ? $boolean($value) : false'
    - widget: EventList
      name: Events
      filter: $matchEvents($$, $root.kind, $root.metadata.name)
      hideInvolvedObjects: true
form:
  - simple: true
    path: spec.serviceInstanceName
    required: true
    widget: Resource
    visibility: $canI('services.cloud.sap.com/v1', 'ServiceInstance')
    overwrite: false
    resource:
      kind: ServiceInstance
      scope: namespace
      group: services.cloud.sap.com
      version: v1
  - simple: true
    var: separator
    value: ''
  - simple: true
    path: spec.serviceInstanceName
    required: true
    widget: Text
    overwrite: false
    visibility: $not($canI('services.cloud.sap.com/v1', 'ServiceInstance'))
  - path: spec.externalName
    placeholder: spec.externalNamePlaceholder
  - path: spec.secretName
  - path: spec.secretKey
  - path: spec.secretRootKey
  - path: spec.parameters
    widget: CodeEditor
    language: '''json'''
  - path: spec.parametersFrom
    widget: SimpleList
    defaultExpanded: true
    children:
      - path: '[].secretKeyRef.name'
        widget: Resource
        resource:
          kind: Secret
          version: v1
          scope: namespace
        provideVar: secret
        required: false
      - path: '[].secretKeyRef.key'
        enum: $keys($secret.data)
        required: false
        placeholder: chooseSecretKey
  - path: spec.credentialsRotationPolicy
    widget: FormGroup
    children:
      - path: enabled
      - path: rotationFrequency
      - path: rotatedBindingTTL
  - path: spec.secretTemplate
    widget: CodeEditor
    language: '''go'''
general:
  resource:
    kind: ServiceBinding
    group: services.cloud.sap.com
    version: v1
  name: Service Bindings
  category: Service Management
  urlPath: servicebindings
  scope: namespace
  description: >-
    {{[BTP Service
    Binding](https://github.com/SAP/sap-btp-service-operator/blob/main/README.md)}}
    provides access details for an existing service instance.
list:
  - name: spec.serviceInstanceName
    source: spec.serviceInstanceName
    widget: ResourceLink
    resource:
      namespace: $root.metadata.namespace
      kind: '''ServiceInstance'''
      name: $root.spec.serviceInstanceName
  - name: spec.externalName
    source: spec.externalName
  - name: status
    source: status.conditions[$count(status.conditions)-1].reason
    description: >-
      $filter(status.conditions, function ($v, $i, $a) { $length($v.message) > 0
      })[0].message
    highlights:
      positive:
        - Provisioned
      informative:
        - NotProvisioned
      negative:
        - CreateFailed
    widget: Badge
translations:
  en:
    metadata.annotations: Annotations
    metadata.labels: Labels
    metadata.creationTimestamp: Created at
    metadata.finalizers: Finalizers
    status: Status
    status.bindingID: Binding ID
    status.instanceID: InstanceID
    status.observedGeneration: Observed Generation
    status.lastCredentialsRotationTime: Last Credentials Rotation Time
    status.operationURL: Operation URL
    status.operationType: Operation Type
    spec.specification: Specification
    spec.secretName: Secret Name
    spec.externalName: External Name
    spec.externalNamePlaceholder: Defaults to the Service Binding name if empty
    spec.serviceInstanceName: Service Instance Name
    spec.controlledBy: Controlled By
    spec.parameters: Parameters
    spec.parametersFrom: Parameters from Secrets
    spec.credentialsRotationPolicy: Credentials Rotation Policy
    spec.secretTemplate: Secret Template
    spec.secretKey: Secret Key
    spec.secretRootKey: Secret Root Key
    spec.enabled: Enabled
    spec.rotationFrequency: Rotation Frequency
    spec.rotatedBindingTTL: Rotated Binding TTL
    spec.userInfo: User Info
    spec.groups: Groups
    spec.uid: UID
    spec.username: Username
    chooseSecretKey: Choose Secret Key
    bindingData: Binding Data
    conditions: Conditions
---
dataSources:
  myServiceBindings:
    resource:
      kind: ServiceBinding
      group: services.cloud.sap.com
      version: v1
    filter: $item.spec.serviceInstanceName = $root.metadata.name
details:
  resourceGraph:
    depth: 1
    dataSources:
      - source: myServiceBindings
  status:
    header:
      - name: status
        source: status.conditions[$count(status.conditions)-1].reason
        description: >-
          $filter(status.conditions, function ($v, $i, $a) { $length($v.message)
          > 0 })[0].message
        widget: Badge
        highlights:
          positive:
            - Provisioned
          informative:
            - NotProvisioned
          negative:
            - CreateFailed
    body:
      - name: status.observedGeneration
        source: status.observedGeneration
      - name: status.instanceID
        source: status.instanceID
      - name: status.operationType
        source: status.operationType
      - name: status.operationURL
        source: status.operationURL
      - name: status.tags
        source: status.tags
        widget: Labels
        fullWidth: true
      - name: conditions
        source: status.conditions
        widget: ConditionList
  header:
    - name: metadata.finalizers
      source: metadata.finalizers
      widget: Labels
  body:
    - name: specification
      widget: Panel
      children:
        - name: spec.serviceOfferingName
          source: spec.serviceOfferingName
        - name: spec.servicePlanName
          source: spec.servicePlanName
        - name: spec.servicePlanID
          source: spec.servicePlanID
          visibility: '$exists($value) ? $boolean($value) : false'
        - name: spec.externalName
          source: spec.externalName
        - name: spec.shared
          source: spec.shared
        - name: spec.btpAccessCredentialsSecret
          source: spec.btpAccessCredentialsSecret
          visibility: '$exists($value) ? $boolean($value) : false'
        - name: spec.customTags
          source: spec.customTags
          widget: Labels
          visibility: '$exists($value) ? $boolean($value) : false'
    - name: spec.userInfo
      widget: Panel
      children:
        - name: spec.groups
          source: spec.userInfo.groups
          widget: Labels
        - name: spec.uid
          source: spec.userInfo.uid
        - name: spec.username
          source: spec.userInfo.username
      visibility: $exists(spec.userInfo)
    - name: spec.parameters
      source: spec.parameters
      widget: CodeViewer
      visibility: '$exists($value) ? $boolean($value) : false'
    - name: spec.parametersFrom
      source: spec.parametersFrom
      widget: CodeViewer
      visibility: '$exists($value) ? $boolean($value) : false'
    - name: BTP Service Binding
      source: $myServiceBindings()
      widget: ResourceList
    - widget: EventList
      name: Events
      filter: $matchEvents($$, $root.kind, $root.metadata.name)
      hideInvolvedObjects: true
form:
  - simple: true
    path: spec.serviceOfferingName
    required: true
  - simple: true
    path: spec.servicePlanName
    required: true
    placeholder: spec.servicePlanNamePlaceholder
  - simple: true
    path: spec.servicePlanID
  - path: spec.externalName
    placeholder: spec.externalNamePlaceholder
  - path: spec.btpAccessCredentialsSecret
  - path: spec.shared
  - path: spec.parameters
    widget: CodeEditor
    language: '''json'''
  - path: spec.parametersFrom
    widget: GenericList
    defaultExpanded: true
    children:
      - path: '[].secretKeyRef.name'
        widget: Resource
        resource:
          kind: Secret
          version: v1
          scope: namespace
        provideVar: secret
        required: false
      - path: '[].secretKeyRef.key'
        enum: $keys($secret.data)
        required: false
        placeholder: chooseSecretKey
  - path: spec.customTags
    widget: SimpleList
    children:
      - path: '[]'
    placeholder: spec.enterCustomTag
general:
  resource:
    kind: ServiceInstance
    group: services.cloud.sap.com
    version: v1
  name: Service Instances
  category: Service Management
  urlPath: serviceinstances
  scope: namespace
  description: >-
    {{[BTP Service
    Instance](https://github.com/SAP/sap-btp-service-operator/blob/main/README.md)}}
    makes the functionality of a service available for consumption.
list:
  - name: spec.serviceOfferingName
    source: spec.serviceOfferingName
  - name: spec.servicePlanName
    source: spec.servicePlanName
  - name: spec.externalName
    source: spec.externalName
  - name: status
    source: status.conditions[$count(status.conditions)-1].reason
    description: >-
      $filter(status.conditions, function ($v, $i, $a) { $length($v.message) > 0
      })[0].message
    widget: Badge
    highlights:
      positive:
        - Provisioned
      informative:
        - NotProvisioned
      negative:
        - CreateFailed
translations:
  en:
    metadata.finalizers: Finalizers
    conditions: Conditions
    status: Status
    status.observedGeneration: Observed Generation
    status.operationURL: Operation URL
    status.operationType: Operation Type
    status.tags: Tags
    status.instanceID: Instance ID
    specification: Specification
    spec.externalName: External Name
    spec.externalNamePlaceholder: Defaults to the instance name if empty
    spec.servicePlanName: Plan Name
    spec.servicePlanNamePlaceholder: The plan name to use for the Service Instance
    spec.serviceOfferingName: Offering Name
    spec.parameters: Instance Parameters
    spec.userInfo: User Info
    spec.groups: Groups
    spec.uid: UID
    spec.username: Username
    spec.customTags: Custom Tags
    spec.enterCustomTag: Enter custom tag
    spec.shared: Shared
    spec.btpAccessCredentialsSecret: BTP Access Credentials Secret
    spec.servicePlanID: Plan ID
    chooseSecretKey: Choose Secret Key
---
dataSources:
  apirules:
    resource:
      kind: APIRule
      group: gateway.kyma-project.io
      version: v1beta1
    filter: $item.spec.service.name = $root.metadata.name
  podSelector:
    resource:
      kind: Pod
      version: v1
    filter: $matchByLabelSelector($item, $root.spec.selector)
  subscriptions:
    resource:
      kind: Subscription
      group: eventing.kyma-project.io
      version: v1alpha1
    filter: >-
      $substringAfter($substringBefore($item.spec.sink, '.'), '://') =
      $root.metadata.name
  relatedDNSEntry:
    resource:
      kind: DNSEntry
      group: dns.gardener.cloud
      version: v1alpha1
    filter: >-
      $filter($item.spec.targets, function ($v, $i, $a) {
      $contains($root.status.loadBalancer.ingress.ip, $v)})
details:
  resourceGraph:
    dataSources:
      - source: apirules
      - source: podSelector
      - source: subscriptions
      - source: relatedDNSEntry
  status:
    body:
      - name: Conditions
        source: status.conditions
        visibility: $exists(status.conditions)
        widget: ConditionList
      - name: External IPs
        source: >-
          $count(status.loadBalancer.ingress) ?
          $map(status.loadBalancer.ingress, function($value) {$value.ip ?
          $value.ip : $value.hostname}) ~> $join(', '):
          ($count($item.spec.externalIPs) ? $item.spec.externalIPs ~> $join(',
          '): '-')
  header:
    - name: Controlled by
      source: metadata.ownerReferences
      widget: ControlledBy
  body:
    - name: Specification
      widget: Panel
      children:
        - name: Service Type
          source: spec.type
        - name: Cluster IP
          source: spec.clusterIP
          visibility: $exists(spec.clusterIP)
        - name: Cluster IPs
          source: spec.clusterIPs
          visibility: $exists(spec.clusterIPs)
          widget: Labels
        - name: Ports
          source: >-
            $count(spec.ports) ? $map(spec.ports, function($value) {$value.port
            = $value.targetPort ? [$string($value.port), '/',
            $string($value.protocol)] ~> $join('') : [ $string($value.name), '
            (', $string($value.port), ') --> (', $string($value.targetPort),
            ')'] ~> $join('') }) ~> $join(', ')  : '-'
        - name: Selector
          source: spec.selector
          visibility: $exists(spec.selector)
          widget: Labels
        - name: Allocate Load Balancer Node Ports
          source: spec.allocateLoadBalancerNodePorts
          visibility: $exists(spec.allocateLoadBalancerNodePorts)
        - name: External IPs
          source: spec.externalIPs
          visibility: $exists(spec.externalIPs)
          widget: Labels
        - name: External Name
          source: spec.externalName
          visibility: $exists(spec.externalName)
        - name: External Traffic Policy
          source: spec.externalTrafficPolicy
          visibility: $exists(spec.externalTrafficPolicy)
        - name: Health Check Node Port
          source: spec.healthCheckNodePort
          visibility: $exists(spec.healthCheckNodePort)
        - name: Internal Traffic Policy
          source: spec.internalTrafficPolicy
          visibility: $exists(spec.internalTrafficPolicy)
        - name: IP Families
          source: spec.ipFamilies
          visibility: $exists(spec.ipFamilies)
          widget: Labels
        - name: IP Family Policy
          source: spec.ipFamilyPolicy
          visibility: $exists(spec.ipFamilyPolicy)
        - name: Load Balancer Class
          source: spec.loadBalancerClass
          visibility: $exists(spec.loadBalancerClass)
        - name: Load Balancer IP
          source: spec.loadBalancerIP
          visibility: $exists(spec.loadBalancerIP)
        - name: Load Balancer Source Ranges
          source: spec.loadBalancerSourceRanges
          visibility: $exists(spec.loadBalancerSourceRanges)
        - name: Publish Not Ready Addresses
          source: spec.publishNotReadyAddresses
          visibility: $exists(spec.publishNotReadyAddresses)
        - name: Session Affinity
          source: spec.sessionAffinity
          visibility: $exists(spec.sessionAffinity)
        - name: Session Affinity Config Timeout Seconds
          source: spec.sessionAffinityConfig.clientIP.timeoutSeconds
          visibility: $exists(spec.sessionAffinityConfig.clientIP.timeoutSeconds)
        - name: Traffic Distribution
          source: spec.trafficDistribution
          visibility: $exists(spec.trafficDistribution)
    - widget: ResourceList
      source: $subscriptions()
      name: Subscriptions
      disableCreate: true
      children:
        - source: metadata.name
          name: Name
          sort: 'true'
          widget: ResourceLink
          resource:
            name: metadata.name
            namespace: $root.metadata.namespace
            kind: kind
        - source: spec.filter.filters[0].eventType.value
          name: Event Types
          sort:
            default: true
            compareFunction: $compareStrings($first, $second)
        - source: status.ready
          name: Ready
          sort: true
          widget: Badge
          highlights:
            positive:
              - 'true'
            negative:
              - 'false'
    - widget: ResourceList
      source: $apirules()
      name: API Rules
      disableCreate: true
      sort:
        - source: spec.service.host
          default: true
        - source: spec.service.port
          compareFunction: $first - $second
    - widget: Panel
      name: Selector
      disablePadding: true
      children:
        - source: $podSelector()
          widget: ResourceList
          disableCreate: true
          visibility: $exists($root.spec.selector) and $boolean($root.spec.selector)
        - source: spec.selector
          widget: Panel
          name: Matches all Pods in the Namespace
          visibility: $not($exists($value)) or $not($boolean($value))
      header:
        - source: spec.selector
          widget: Labels
          name: Selector
          visibility: $exists($value) and $boolean($value)
    - widget: EventList
      name: Events
      filter: $matchEvents($$, $root.kind, $root.metadata.name)
      hideInvolvedObjects: true
form:
  - widget: KeyValuePair
    path: spec.selector
    simple: true
    name: Selectors
    defaultExpanded: true
  - path: spec.type
    name: Type
    placeholder: Enter Type
  - widget: GenericList
    path: spec.ports
    simple: true
    children:
      - path: '[]'
        simple: true
        children:
          - path: name
            simple: true
            name: Ports Name
            placeholder: Enter Ports Name
            widget: Name
          - path: protocol
            simple: true
            name: Protocol
            placeholder: Enter Protocol
            widget: Text
            required: true
          - path: port
            simple: true
            name: Port
            placeholder: Enter Port
            required: true
          - path: targetPort
            simple: true
            name: Target Port
            placeholder: Enter Target Port
            widget: Text
            required: true
            inputInfo: >-
              Number or name of the port to access on the pods targeted by the
              service. Number must be in the range 1 to 65535.
          - path: nodePort
            simple: true
            name: Node Port
            visibility: $root.spec.type != 'ClusterIP'
            placeholder: Enter Node Port
          - path: appProtocol
            simple: true
            name: Application Protocol
            enum:
              - http
              - tcp
              - gRPC
            placeholder: Enter Application Protocol
    template:
      protocol: TCP
      port: 80
      targetPort: 9376
  - widget: SimpleList
    path: spec.ipFamilies
    name: IP Family
    enum:
      - IPv6
      - IPv4
    visibility: $root.spec.type != 'ExternalName'
    children:
      - path: '[]'
    placeholder: Enter IP Family
  - path: spec.ipFamilyPolicy
    name: IP Family Policy
    placeholder: Enter IP Family Policy
    enum:
      - SingleStack
      - PreferDualStack
      - RequireDualStack
    visibility: $root.spec.type != 'ExternalName'
  - widget: SimpleList
    path: spec.clusterIPs
    name: Cluster IPs
    defaultexpanded: true
    children:
      - path: '[]'
    placeholder: Enter IP addresses assigned to this service
    visibility: $root.spec.type != 'ExternalName'
  - path: spec.clusterIP
    name: Cluster IP
    placeholder: Enter IP address of the service
    visibility: $root.spec.type != 'ExternalName'
  - widget: SimpleList
    path: spec.externalIPs
    name: External IPs
    children:
      - path: '[]'
    placeholder: Enter external IP addresses assigned to this service
  - path: spec.sessionAffinity
    name: Session Affinity
    placeholder: Enter Session Affinity
  - path: spec.externalTrafficPolicy
    name: External Traffic Policy
    placeholder: Enter External Traffic Policy
    visibility: $root.spec.type = 'NodePort' or $root.spec.type = 'LoadBalancer'
  - path: spec.internalTrafficPolicy
    name: Internal Traffic Policy
    placeholder: Enter Internal Traffic Policy
  - widget: SimpleList
    path: spec.loadBalancerSourceRanges
    name: LoadBalancer Source Ranges
    visibility: $root.spec.type = 'LoadBalancer'
    children:
      - path: '[]'
    placeholder: Enter LoadBalancer source ranges
  - path: spec.loadBalancerClass
    name: LoadBalancer Class
    placeholder: Enter LoadBalancer Class
    visibility: $root.spec.type = 'LoadBalancer'
  - path: spec.externalName
    name: External Name
    placeholder: Enter external name
    visibility: $root.spec.type = 'ExternalName'
  - path: spec.loadBalancerIP
    name: LoadBalancer IP
    placeholder: Enter LoadBalancer IP
    visibility: $root.spec.type = 'LoadBalancer'
  - path: spec.healthCheckNodePort
    name: Health Check NodePort
    placeholder: Enter Health Check NodePort
    visibility: >-
      $root.spec.type = 'LoadBalancer' and $root.spec.externalTrafficPolicy =
      'Local'
  - path: spec.allocateLoadBalancerNodePorts
    name: Allocate LoadBalancer NodePorts
    visibility: $root.spec.type = 'LoadBalancer'
  - path: spec.publishNotReadyAddresses
    name: Publish Not Ready Addresses
  - path: spec.sessionAffinityConfig.clientIP.timeoutSeconds
    visibility: $root.spec.sessionAffinity = 'ClientIP'
    name: Timeout seconds
    placeholder: enter timeout seconds
    inputInfo: Default value is 10800(for 3 hours)
list:
  - name: Controlled By
    source: metadata.ownerReferences
    widget: ControlledBy
    kindOnly: true
  - name: Type
    source: spec.type
    sort:
      compareFunction: $compareStrings($second, $first)
  - name: Cluster IP
    source: spec.clusterIP
    sort: true
  - name: Ports
    source: >-
      $count(spec.ports) ? $map(spec.ports, function($value) {$value.port =
      $value.targetPort ? [$string($value.port), '/', $string($value.protocol)]
      ~> $join('') : [ $string($value.name), ' (', $string($value.port), ') -->
      (', $string($value.targetPort), ')'] ~> $join('') }) ~> $join(', ')  : '-'
  - name: External IPs
    source: >-
      $count(status.loadBalancer.ingress) ? $map(status.loadBalancer.ingress,
      function($value) {$value.ip ? $value.ip : $value.hostname}) ~> $join(',
      '): ($count($item.spec.externalIPs) ? $item.spec.externalIPs ~> $join(',
      '): '-')
general:
  resource:
    kind: Service
    version: v1
  urlPath: services
  scope: namespace
  name: Services
  category: Discovery and Network
  description: >-
    {{[Services](https://kubernetes.io/docs/concepts/services-networking/service/)}}
     enables access to an application running on a set of Pods.
presets:
  - name: template
    default: true
    value:
      spec:
        selector:
          app: ''
        type: ClusterIP
---
general:
  resource:
    kind: Subscription
    group: eventing.kyma-project.io
    version: v1alpha2
  name: Subscriptions
  category: Configuration
  scope: namespace
  description: >-
    {{"{{[Subscription](https://kyma-project.io/docs/kyma/latest/05-technical-reference/00-custom-resources/evnt-01-subscription#documentation-content)}}"}}
    is used to subscribe to events.
  urlPath: subscriptions
details:
  header:
    - name: status.conditions.status
      source: 'status.ready = false ? "error" : "ready"'
      widget: Badge
      description: status.conditions.message
    - name: spec.typeMatching
      source: spec.typeMatching
    - name: spec.source
      source: spec.source
    - name: spec.sink
      source: spec.sink
      widget: ResourceLink
      resource:
        name: $substringBefore($substringAfter(spec.sink, "http://"), ".")
        namespace: $root.metadata.namespace
        kind: '''Service'''
  body:
    - source: status.conditions
      widget: Table
      name: status.conditions
      children:
        - source: $item.type
          name: status.conditions.type
        - source: $item.status
          widget: Badge
          name: status.conditions.status
        - source: $item.reason
          name: status.conditions.reason
        - source: $item.message
          name: status.conditions.message
        - source: $readableTimestamp($item.lastTransitionTime)
          name: status.conditions.lastTransitionTime
    - name: spec.types
      source: spec.types
      widget: Table
      children:
        - name: Type
          search: true
          source: $item
          sort: false
    - widget: EventList
      filter: $matchEvents($$, $root.kind, $root.metadata.name)
      name: events
      defaultType: NORMAL
      hideInvolvedObjects: true
form:
  - path: spec.config
    widget: KeyValuePair
    defaultExpanded: false
  - path: spec.types
    simple: true
    widget: SimpleList
    defaultExpanded: true
    children:
      - path: '[]'
        simple: true
  - simple: true
    type: string
    var: service
    name: Service
    widget: Resource
    resource:
      kind: Service
      version: v1
      scope: namespace
    trigger:
      - sink
  - path: spec.sink
    name: spec.sink
    simple: true
    inputInfo: inputInfo.sink
    placeholder: placeholder.sink
    subscribe:
      sink: >-
        "http://" & $service & "." & $root.metadata.namespace &
        ".svc.cluster.local"
  - path: spec.typeMatching
    simple: true
    enum:
      - standard
      - exact
    required: true
  - path: spec.source
    name: spec.source
    simple: true
    required: true
    visibility: spec.typeMatching = 'standard'
    widget: Resource
    resource:
      kind: Application
      group: applicationconnector.kyma-project.io
      version: v1alpha1
list:
  - name: status.conditions.status
    source: 'status.ready = false ? "error" : "ready"'
    widget: Badge
    description: status.conditions.message
presets:
  - name: Default Type Matching
    default: true
    value:
      spec:
        typeMatching: standard
translations:
  en:
    inputInfo.sink: Sink structure, 'http://{SERVICE}.{NAMESPACE}.svc.cluster.local'
    inputInfo.eventType: Event Type structure, 'sap.kyma.custom.{APP}.{EVENT.NAME}.{VERSION}'
    events: Events
    placeholder.eventType: >-
      Enter the event type, for example,
      sap.kyma.custom.test-app.order.cancelled.v1
    placeholder.sink: Enter the sink, for example, http://service.default.svc.cluster.local
    spec.filters: Filters
    spec.filter.eventType: Event Type
    spec.filter.eventSource: Event Source
    spec.filter.event.property: Property
    spec.filter.event.type: Type
    spec.filter.event.value: Value
    spec.types: Types
    spec.source: Source
    spec.typeMatching: Type Matching
    spec.sink: Sink
    spec.service: Service
    spec.sink.controlledBy: Controlled By
    status.cleanEventTypes: Event Types
    status.conditions: Conditions
    status.conditions.lastTransitionTime: Last Transition
    status.conditions.reason: Reason
    status.conditions.status: Status
    status.conditions.type: Type
    status.conditions.message: Message
    status.type: Type
---
details:
  header:
    - source: >-
        $each(spec.output, function($v, $k) {$v.endpoint.value or
        $v.endpoint.valueFrom.secretKeyRef.name ? $k})
      placeholder: custom
      type: string
      name: Type
      isSelected: true
      widget: Text
  body:
    - source: status.conditions
      widget: Table
      name: Reconciliation Conditions
      children:
        - source: type
          name: Type
        - source: status
          name: Status
          widget: Badge
          highlights:
            positive:
              - 'True'
            critical:
              - 'False'
        - source: reason
          name: Reason
        - source: message
          name: Message
        - source: $readableTimestamp(lastTransitionTime)
          name: Last transition
          sort: true
    - widget: Panel
      name: Output
      children:
        - name: OTLP
          widget: Panel
          visibility: $exists(spec.output.otlp)
          children:
            - name: Endpoint
              widget: Panel
              visibility: $exists(spec.output.otlp.endpoint)
              children:
                - name: Value
                  source: spec.output.otlp.endpoint.value
                  visibility: $exists(spec.output.otlp.endpoint.value)
                - name: Value From Secret
                  widget: ResourceRefs
                  source: spec.output.otlp.endpoint.valueFrom.secretKeyRef
                  kind: Secret
                  visibility: >-
                    $exists(spec.output.otlp.endpoint.valueFrom.secretKeyRef.name)
            - name: Authentication
              widget: Panel
              visibility: $exists(spec.output.otlp.authentication)
              children:
                - name: User
                  widget: Panel
                  visibility: $exists(spec.output.otlp.authentication.basic.user)
                  children:
                    - name: Value
                      source: spec.output.otlp.authentication.basic.user.value
                      visibility: >-
                        $exists(spec.output.otlp.authentication.basic.user.value)
                    - name: Value From Secret
                      widget: ResourceRefs
                      source: >-
                        spec.output.otlp.authentication.basic.user.valueFrom.secretKeyRef
                      kind: Secret
                      visibility: >-
                        $exists(spec.output.otlp.authentication.basic.user.valueFrom.secretKeyRef.name)
                - name: Password
                  widget: Panel
                  visibility: $exists(spec.output.otlp.authentication.basic.password)
                  children:
                    - name: Value
                      source: spec.output.otlp.authentication.basic.password.value
                      visibility: >-
                        $exists(spec.output.otlp.authentication.basic.password.value)
                    - name: Value From Secret
                      widget: ResourceRefs
                      source: >-
                        spec.output.otlp.authentication.basic.password.valueFrom.secretKeyRef
                      kind: Secret
                      visibility: >-
                        $exists(spec.output.otlp.authentication.basic.password.valueFrom.secretKeyRef.name)
            - name: Headers
              widget: Panel
              visibility: $exists(spec.output.otlp.headers)
              children:
                - name: Header
                  widget: Panel
                  visibility: $exists(spec.output.otlp.headers[].name)
                  source: spec.output.otlp.headers[]
                  children:
                    - name: Name
                      source: name
                      visibility: $exists(name)
                    - name: Prefix
                      source: prefix
                      visibility: $exists(prefix)
                    - name: Value
                      source: value
                      visibility: $exists(value)
                    - name: Value From Secret
                      widget: ResourceRefs
                      source: valueFrom.secretKeyRef
                      kind: Secret
                      visibility: $exists(valueFrom.secretKeyRef.name)
            - name: TLS
              widget: Panel
              visibility: $exists(spec.output.otlp.tls)
              children:
                - name: Insecure
                  visibility: $exists(spec.output.otlp.tls.insecure)
                  source: spec.output.otlp.tls.insecure
                - name: Skip Cert Verification
                  visibility: $exists(spec.output.otlp.tls.insecureSkipVerify)
                  source: spec.output.otlp.tls.insecureSkipVerify
                - name: Ca
                  widget: Panel
                  visibility: $exists(spec.output.otlp.tls.ca)
                  source: spec.output.otlp.tls.ca
                  children:
                    - name: Value
                      source: value
                      visibility: $exists(value)
                    - name: Value From Secret
                      widget: ResourceRefs
                      source: valueFrom.secretKeyRef
                      kind: Secret
                      visibility: $exists(valueFrom.secretKeyRef.name)
                - name: Cert
                  widget: Panel
                  visibility: $exists(spec.output.otlp.tls.cert)
                  source: spec.output.otlp.tls.cert
                  children:
                    - name: Value
                      source: value
                      visibility: $exists(value)
                    - name: Value From Secret
                      widget: ResourceRefs
                      source: valueFrom.secretKeyRef
                      kind: Secret
                      visibility: $exists(valueFrom.secretKeyRef.name)
                - name: Key
                  widget: Panel
                  visibility: $exists(spec.output.otlp.tls.key)
                  source: spec.output.otlp.tls.key
                  children:
                    - name: Value
                      source: value
                      visibility: $exists(value)
                    - name: Value From Secret
                      widget: ResourceRefs
                      source: valueFrom.secretKeyRef
                      kind: Secret
                      visibility: $exists(valueFrom.secretKeyRef.name)
            - widget: Panel
              name: Other Settings
              children:
                - name: Protocol
                  source: spec.output.otlp.protocol
form:
  - path: spec.output
    widget: FormGroup
    defaultExpanded: true
    simple: true
    children:
      - name: OTLP
        path: otlp
        widget: FormGroup
        defaultExpanded: true
        simple: true
        children:
          - name: Endpoint
            path: endpoint
            widget: FormGroup
            simple: true
            children:
              - name: Value
                path: value
                widget: Text
                simple: true
              - name: Secret Reference
                path: valueFrom.secretKeyRef
                widget: ResourceRef
                simple: true
                resource:
                  kind: secret
                  version: v1
                children:
                  - simple: true
                    path: key
                    enum: $keys($secret.data)
          - name: Protocol
            path: protocol
            simple: true
            widget: FormGroup
            children:
              - name: Value
                widget: Text
          - name: Authentication
            path: authentication
            widget: FormGroup
            simple: true
            children:
              - name: User
                path: basic.user
                widget: FormGroup
                simple: true
                children:
                  - name: Value
                    path: value
                    widget: Text
                    simple: true
                  - name: Secret Reference
                    path: valueFrom.secretKeyRef
                    widget: ResourceRef
                    resource:
                      kind: secret
                      version: v1
                    simple: true
                    children:
                      - simple: true
                        path: key
                        enum: $keys($secret.data)
              - name: Password
                path: basic.password
                widget: FormGroup
                simple: true
                children:
                  - name: Value
                    path: value
                    widget: Text
                    simple: true
                  - name: Secret Reference
                    path: valueFrom.secretKeyRef
                    widget: ResourceRef
                    resource:
                      kind: secret
                      version: v1
                    simple: true
                    children:
                      - simple: true
                        path: key
                        enum: $keys($secret.data)
          - name: Headers
            path: headers[]
            widget: FormGroup
            simple: true
            children:
              - name: Name
                path: name
                widget: Text
                simple: true
              - name: Prefix
                path: prefix
                widget: Text
                simple: true
              - name: Value
                path: value
                widget: Text
                simple: true
              - name: Secret Reference
                path: valueFrom.secretKeyRef
                widget: ResourceRef
                simple: true
                resource:
                  kind: secret
                  version: v1
                children:
                  - simple: true
                    path: key
                    enum: $keys($secret.data)
          - name: TLS
            widget: FormGroup
            path: tls
            children:
              - name: Insecure
                path: insecure
              - name: Skip Certificate Validation
                path: insecureSkipVerify
              - name: CA
                path: ca
                widget: FormGroup
                simple: true
                children:
                  - name: Value
                    path: value
                    widget: Text
                    simple: true
                  - name: Secret Reference
                    path: valueFrom.secretKeyRef
                    widget: ResourceRef
                    simple: true
                    resource:
                      kind: secret
                      version: v1
                    children:
                      - simple: true
                        path: key
                        enum: $keys($secret.data)
              - name: Cert
                path: cert
                widget: FormGroup
                simple: true
                children:
                  - name: Value
                    path: value
                    widget: Text
                    simple: true
                  - name: Secret Reference
                    path: valueFrom.secretKeyRef
                    widget: ResourceRef
                    simple: true
                    resource:
                      kind: secret
                      version: v1
                    children:
                      - simple: true
                        path: key
                        enum: $keys($secret.data)
              - name: Key
                path: key
                widget: FormGroup
                simple: true
                children:
                  - name: Value
                    path: value
                    widget: Text
                    simple: true
                  - name: Secret Reference
                    path: valueFrom.secretKeyRef
                    widget: ResourceRef
                    simple: true
                    resource:
                      kind: secret
                      version: v1
                    children:
                      - simple: true
                        path: key
                        enum: $keys($secret.data)
general:
  resource:
    kind: TracePipeline
    group: telemetry.kyma-project.io
    version: v1alpha1
  name: Trace Pipelines
  category: Telemetry
  urlPath: tracepipelines
  scope: cluster
  description: >-
    {{[TracePipeline custom
    resource](https://kyma-project.io/#/telemetry-manager/user/resources/04-tracepipeline)}}
    configures a custom Trace Pipeline.
list:
  - source: >-
      $each(spec.output, function($v, $k) {$v.endpoint.value or
      $v.endpoint.valueFrom.secretKeyRef.name ? $k})
    placeholder: custom
    type: string
    name: Type
    isSelected: true
    widget: Text
  - name: Status
    source: status.conditions
    widget: Columns
    children:
      - name: Type
        source: type
        widget: Badge
      - name: Status
        source: status
        widget: Badge
        highlights:
          positive:
            - 'True'
          critical:
            - 'False'
