|
| 1 | +--- |
| 2 | +apiVersion: argoproj.io/v1alpha1 |
| 3 | +kind: Application |
| 4 | +metadata: |
| 5 | + name: port-k8s-exporter |
| 6 | + namespace: argocd |
| 7 | + finalizers: |
| 8 | + - resources-finalizer.argocd.argoproj.io |
| 9 | +spec: |
| 10 | + project: production |
| 11 | + source: |
| 12 | + chart: port-k8s-exporter |
| 13 | + repoURL: https://port-labs.github.io/helm-charts |
| 14 | + targetRevision: 0.1.13 |
| 15 | + helm: |
| 16 | + releaseName: port-k8s-exporter |
| 17 | + values: |- |
| 18 | + installCRDs: true |
| 19 | + secret: |
| 20 | + secrets: |
| 21 | + portClientId: CLIENT_ID |
| 22 | + portClientSecret: CLIENT_SECRET |
| 23 | + configMap: |
| 24 | + config: |
| 25 | + resources: |
| 26 | + - kind: v1/namespaces |
| 27 | + selector: |
| 28 | + query: .metadata.name | contains("kube-system") |
| 29 | + port: |
| 30 | + entity: |
| 31 | + mappings: |
| 32 | + - identifier: '"dot"' |
| 33 | + title: '"dot"' |
| 34 | + blueprint: '"cluster"' |
| 35 | + - kind: v1/namespaces |
| 36 | + selector: |
| 37 | + query: .metadata.environment == "true" |
| 38 | + port: |
| 39 | + entity: |
| 40 | + mappings: |
| 41 | + - identifier: .metadata.name + "-" + "dot" |
| 42 | + title: .metadata.labels.environment |
| 43 | + blueprint: '"environment"' |
| 44 | + relations: |
| 45 | + cluster: '"dot"' |
| 46 | + - kind: v1/namespaces |
| 47 | + selector: |
| 48 | + query: .metadata.name | startswith("kube") | not |
| 49 | + port: |
| 50 | + entity: |
| 51 | + mappings: |
| 52 | + - identifier: .metadata.name + "-" + "dot" |
| 53 | + title: .metadata.name |
| 54 | + blueprint: '"namespace"' |
| 55 | + properties: |
| 56 | + creationTimestamp: .metadata.creationTimestamp |
| 57 | + labels: .metadata.labels |
| 58 | + relations: |
| 59 | + Cluster: '"dot"' |
| 60 | + - kind: devopstoolkitseries.com/v1alpha1/appclaims |
| 61 | + selector: |
| 62 | + query: .spec.compositionSelector.matchLabels.type == "backend-db-google" |
| 63 | + port: |
| 64 | + entity: |
| 65 | + mappings: |
| 66 | + - identifier: .metadata.name + "-appclaim-" + .metadata.namespace + "-" + "dot" |
| 67 | + title: .metadata.name |
| 68 | + icon: '"Deployment"' |
| 69 | + blueprint: '"backend-app"' |
| 70 | + properties: |
| 71 | + url: '"https://github.com/" + .metadata.annotations.gitHubOrg + "/" + .metadata.annotations.gitHubRepo' |
| 72 | + language: go |
| 73 | + host: .spec.parameters.host |
| 74 | + db-version: .spec.parameters.db.version |
| 75 | + db-size: .spec.parameters.db.size |
| 76 | + labels: .metadata.labels |
| 77 | + relations: |
| 78 | + environment: .metadata.namespace + "-" + "dot" |
| 79 | + - kind: v1/nodes |
| 80 | + port: |
| 81 | + entity: |
| 82 | + mappings: |
| 83 | + - identifier: (.metadata.name) | (split(".")|join("_")) + "-" + "dot" |
| 84 | + title: .metadata.name + "-" + "dot" |
| 85 | + icon: '"Node"' |
| 86 | + blueprint: '"node"' |
| 87 | + properties: |
| 88 | + creationTimestamp: .metadata.creationTimestamp |
| 89 | + totalCPU: .status.allocatable.cpu |
| 90 | + totalMemory: .status.allocatable.memory |
| 91 | + labels: .metadata.labels |
| 92 | + kubeletVersion: .status.nodeInfo.kubeletVersion | split("-") | .[0] |
| 93 | + ready: .status.conditions[] | select(.type == "Ready") | .status |
| 94 | + relations: |
| 95 | + Cluster: '"dot"' |
| 96 | + - kind: v1/pods |
| 97 | + selector: |
| 98 | + query: .metadata.namespace | startswith("kube") | not |
| 99 | + port: |
| 100 | + entity: |
| 101 | + mappings: |
| 102 | + - identifier: .metadata.name + "-" + .metadata.namespace + "-" + "dot" |
| 103 | + title: .metadata.name |
| 104 | + icon: '"Microservices"' |
| 105 | + blueprint: '"pod"' |
| 106 | + properties: |
| 107 | + startTime: .status.startTime |
| 108 | + phase: .status.phase |
| 109 | + labels: .metadata.labels |
| 110 | + containers: (.spec.containers | map({image, resources})) + .status.containerStatuses | group_by(.image) | map(add) |
| 111 | + conditions: .status.conditions |
| 112 | + relations: |
| 113 | + Node: (.spec.nodeName) | (split(".")|join("_")) + "-" + "dot" |
| 114 | + destination: |
| 115 | + server: https://kubernetes.default.svc |
| 116 | + namespace: kyverno |
| 117 | + syncPolicy: |
| 118 | + automated: |
| 119 | + selfHeal: true |
| 120 | + prune: true |
| 121 | + syncOptions: |
| 122 | + - CreateNamespace=true |
| 123 | + - Replace=true |
0 commit comments