apiVersion: core.oam.dev/v1beta1
kind: Application
metadata:
  annotations:
    addons.oam.dev/description: An out of the box solution for KubeVela observability
  name: observability
  namespace: vela-system
spec:
  components:
  - name: grafana-registration
    properties:
      chart: ./chart
      git:
        branch: master
      repoType: git
      targetNamespace: vela-system
      url: https://github.com/oam-dev/grafana-registration
      values:
        replicaCount: 1
    type: helm
  - name: grafana
    properties:
      chart: grafana
      releaseName: grafana
      repoType: helm
      targetNamespace: vela-system
      url: https://charts.kubevela.net/addons
      version: 6.14.1
    traits:
    - properties:
        domain: '[[ index .Args "grafana-domain" ]]'
        http:
          /: 80
      type: pure-ingress
    - properties:
        credentialSecret: grafana
        credentialSecretNamespace: vela-system
        grafanaServiceName: grafana
        grafanaServiceNamespace: vela-system
        urls:
        - https://charts.kubevela.net/addons/dashboards/kubevela_core_logging.json
        - https://charts.kubevela.net/addons/dashboards/kubevela_core_monitoring.json
        - https://charts.kubevela.net/addons/dashboards/kubevela_application_logging.json
        - https://charts.kubevela.net/addons/dashboards/flux2/cluster.json
      type: import-grafana-dashboard
    type: helm
  - name: loki
    properties:
      chart: loki-stack
      releaseName: loki
      repoType: helm
      targetNamespace: vela-system
      url: https://charts.kubevela.net/addons
      version: 2.4.1
    traits:
    - properties:
        access: proxy
        credentialSecret: grafana
        credentialSecretNamespace: vela-system
        grafanaServiceName: grafana
        grafanaServiceNamespace: vela-system
        name: loki
        namespace: vela-system
        service: loki
        type: loki
      type: register-grafana-datasource
    type: helm
  - name: prometheus-server
    properties:
      chart: prometheus
      releaseName: prometheus
      repoType: helm
      targetNamespace: vela-system
      url: https://charts.kubevela.net/addons
      values:
        alertmanager:
          persistentVolume:
            enabled: '[[ index .Args "alertmanager-pvc-enabled" | default "true" ]]'
            size: '[[ index .Args "alertmanager-pvc-size" | default "20Gi" ]]'
            storageClass: '[[ index .Args "alertmanager-pvc-class" ]]'
        server:
          persistentVolume:
            enabled: '[[ index .Args "server-pvc-enabled" | default "true" ]]'
            size: '[[ index .Args "server-pvc-size" | default "20Gi" ]]'
            storageClass: '[[ index .Args "server-pvc-class" ]]'
      version: 14.4.1
    traits:
    - properties:
        access: proxy
        credentialSecret: grafana
        credentialSecretNamespace: vela-system
        grafanaServiceName: grafana
        grafanaServiceNamespace: vela-system
        name: prometheus
        namespace: vela-system
        service: prometheus-server
        type: prometheus
      type: register-grafana-datasource
    type: helm
  - name: kube-state-metrics
    properties:
      chart: kube-state-metrics
      repoType: helm
      targetNamespace: vela-system
      url: https://charts.kubevela.net/addons
      values:
        image:
          repository: oamdev/kube-state-metrics
          tag: v2.1.0
      version: 3.4.1
    type: helm
  workflow:
    steps:
    - name: checking-depends-on
      properties:
        name: fluxcd
        namespace: vela-system
      type: depends-on-app
    - name: apply-resources
      type: apply-remaining
status:
  rollout:
    batchRollingState: ""
    currentBatch: 0
    lastTargetAppRevision: ""
    rollingState: ""
    upgradedReadyReplicas: 0
    upgradedReplicas: 0
